# [Spell]Triggered Life Drain is Stacking

Status
Not open for further replies.

#### Develyngyr

Level 2
Is there something wrong with these triggers? The effectiveness of the spells increased by 2 times everytime I cast this spell.

For example:

The first time spell is casted, drains 90 hp/s
The second time spell is casted, drains 180 hp/s
The third time spell is casted, drains 360 hp/s

Another problem:
1) How to add lightning effect to this spell? I based to spell on channel ability

Upheaval
• Actions
• -------- MUI INIT --------
• Set HR_A_WR_DR_Idx = (HR_A_WR_DR_Idx + 1)
• Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• (Ability being cast) Equal to (==) Warlock - Upheaval
• Then - Actions
• -------- RESET EVERYTHING --------
• Set HR_A_WR_DR_Val_CT_HP[HR_A_WR_DR_Idx] = 0.00
• Set HR_A_WR_DR_Val_CT_EN[HR_A_WR_DR_Idx] = 0.00
• Set HR_A_WR_DR_Val_TG_EN[HR_A_WR_DR_Idx] = 0.00
• Set HR_A_WR_DR_Val_TG_HP[HR_A_WR_DR_Idx] = 0.00
• -------- ABILITY VARS --------
• Set HR_A_WR_DR_Caster[HR_A_WR_DR_Idx] = (Casting unit)
• Set HR_A_WR_DR_Target[HR_A_WR_DR_Idx] = (Target unit of ability being cast)
• -------- Caster Hitpoints --------
• Set HR_A_WR_DR_Val_CT_HP[HR_A_WR_DR_Idx] = (9.00 + (0.10 x (3.00 x (Real((Intelligence of HR_A_WR_DR_Caster[HR_A_WR_DR_Idx] (Include bonuses)))))))
• -------- Caster Mana --------
• Set HR_A_WR_DR_Val_CT_EN[HR_A_WR_DR_Idx] = 2.50
• -------- Boss Energy --------
• Set HR_A_WR_DR_Val_TG_EN[HR_A_WR_DR_Idx] = 1.50
• -------- Boss HP --------
• Set HR_A_WR_DR_Val_TG_HP[HR_A_WR_DR_Idx] = (9.00 + (0.10 x (25.00 x (Real((Intelligence of HR_A_WR_DR_Caster[HR_A_WR_DR_Idx] (Include bonuses)))))))
• Else - Actions
• Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• (Ability being cast) Equal to (==) Doom Guard - Shadow Path
• Then - Actions
• -------- ABILITY VARS --------
• Set HR_A_WR_DR_Caster[HR_A_WR_DR_Idx] = (Casting unit)
• Set HR_A_WR_DR_Target[HR_A_WR_DR_Idx] = (Target unit of ability being cast)
• -------- Caster Hitpoints --------
• Set HR_A_WR_DR_Val_CT_HP[HR_A_WR_DR_Idx] = 75.00
• -------- Caster Mana --------
• Set HR_A_WR_DR_Val_CT_EN[HR_A_WR_DR_Idx] = 0.00
• -------- Boss Energy --------
• Set HR_A_WR_DR_Val_TG_EN[HR_A_WR_DR_Idx] = 0.00
• -------- Boss HP --------
• Set HR_A_WR_DR_Val_TG_HP[HR_A_WR_DR_Idx] = 20.00
• Else - Actions
• -------- MUI INIT --------
• Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• HR_A_WR_DR_Idx Equal to (==) 1
• Then - Actions
• Trigger - Turn on Upheaval Loop <gen>
• Else - Actions
Upheaval Loop
• Upheaval Loop
• Events
• Time - Every 0.10 seconds of game time
• Conditions
• Actions
• Do Multiple ActionsFor each (Integer HR_A_WR_DR_CurIdx) from 1 to HR_A_WR_DR_Idx, do (Actions)
• Loop - Actions
• Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• Multiple ConditionsOr - Any (Conditions) are true
• Conditions
• (Current order of HR_A_WR_DR_Caster[HR_A_WR_DR_CurIdx]) Equal to (==) (Order(channel))
• Then - Actions
• Unit - Cause HR_A_WR_DR_Caster[HR_A_WR_DR_CurIdx] to damage HR_A_WR_DR_Target[HR_A_WR_DR_CurIdx], dealing HR_A_WR_DR_Val_TG_HP[HR_A_WR_DR_CurIdx] damage of attack type Spells and damage type Normal
• Unit - Set life of HR_A_WR_DR_Caster[HR_A_WR_DR_CurIdx] to ((Life of HR_A_WR_DR_Caster[HR_A_WR_DR_CurIdx]) + HR_A_WR_DR_Val_CT_HP[HR_A_WR_DR_CurIdx])
• Unit - Set mana of HR_A_WR_DR_Caster[HR_A_WR_DR_CurIdx] to ((Mana of HR_A_WR_DR_Caster[HR_A_WR_DR_CurIdx]) + HR_A_WR_DR_Val_CT_EN[HR_A_WR_DR_CurIdx])
• Set BS_F_Energy = (BS_F_Energy - (Integer(HR_A_WR_DR_Val_TG_EN[HR_A_WR_DR_CurIdx])))
• Set HR_A_WR_DR_CTR[HR_A_WR_DR_CurIdx] = (HR_A_WR_DR_CTR[HR_A_WR_DR_CurIdx] + 1)
• Floating Text - Create floating text that reads (+ + (String((Integer(HR_A_WR_DR_Val_CT_HP[HR_A_WR_DR_CurIdx]))))) above HR_A_WR_DR_Caster[HR_A_WR_DR_CurIdx] with Z offset 0.00, using font size 8.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
• Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
• Floating Text - Change (Last created floating text): Disable permanence
• Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
• Floating Text - Change the fading age of (Last created floating text) to 0.90 seconds
• Else - Actions
• Set HR_A_WR_DR_CTR[HR_A_WR_DR_CurIdx] = 100
• -------- SPELL FINISHES --------
• Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• HR_A_WR_DR_CTR[HR_A_WR_CM_CurIDX] Equal to (==) 100
• Then - Actions
• Set HR_A_WR_DR_Caster[HR_A_WR_DR_CurIdx] = No unit
• Set HR_A_WR_DR_Target[HR_A_WR_DR_CurIdx] = No unit
• Set HR_A_WR_DR_Val_CT_HP[HR_A_WR_DR_CurIdx] = 0.00
• Set HR_A_WR_DR_Val_CT_EN[HR_A_WR_DR_CurIdx] = 0.00
• Set HR_A_WR_DR_Val_TG_EN[HR_A_WR_DR_CurIdx] = 0.00
• Set HR_A_WR_DR_Val_TG_HP[HR_A_WR_DR_CurIdx] = 0.00
• Set HR_A_WR_DR_Idx = (HR_A_WR_DR_Idx - 1)
• Else - Actions
• -------- MUI INIT --------
• Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• HR_A_WR_DR_Idx Equal to (==) 0
• Then - Actions
• Trigger - Turn off (This trigger)
• Else - Actions

#### iBraianHD

Level 3
A little question... you are using:
• Set HR_A_WR_DR_CTR[HR_A_WR_DR_CurIdx] = 100
to finishes the spell?

If it is true...
• -------- SPELL FINISHES --------
• Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• HR_A_WR_DR_CTR[HR_A_WR_CM_CurIDX] Equal to (==) 100
• Then - Actions
• Set HR_A_WR_DR_Caster[HR_A_WR_DR_CurIdx] = No unit
• Set HR_A_WR_DR_Target[HR_A_WR_DR_CurIdx] = No unit
• Set HR_A_WR_DR_Val_CT_HP[HR_A_WR_DR_CurIdx] = 0.00
• Set HR_A_WR_DR_Val_CT_EN[HR_A_WR_DR_CurIdx] = 0.00
• Set HR_A_WR_DR_Val_TG_EN[HR_A_WR_DR_CurIdx] = 0.00
• Set HR_A_WR_DR_Val_TG_HP[HR_A_WR_DR_CurIdx] = 0.00
• Set HR_A_WR_DR_Idx = (HR_A_WR_DR_Idx - 1)
• Else - Actions
this is wrong because you are using a wrong condition and all values stay with the last changes and when you cast the spell you are adding + values (but I don't know if this is the solution xD)

PD: you are very creative with vars names

Status
Not open for further replies.

Replies
9
Views
761
Replies
1
Views
705
Replies
16
Views
881
Replies
3
Views
518
Replies
6
Views
657