Ok, so I want to create a spell that gives a chance to add 1 strength to my hero on attack. Str lasts for 5 seconds.
Here are my triggers:
So my question is, how can I make this possible to cast multiple times on one unit ? (For now only the last 1 strength will be removed when the 5 seconds are over)
Please, any ideas ? (+Rep for helpful answers)
Here are my triggers:
-
Power of Darkness Store
-

Events
-


Unit - A unit Is attacked
-
-

Conditions
-


((Attacked unit) has buff Power Of Darkness ) Equal to True
-
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(Random integer number between 1 and 100) Less than or equal to 25
-
-



Then - Actions
-




Set PoD_Caster = (Attacked unit)
-




Special Effect - Create a special effect attached to the origin of PoD_Caster using Abilities\Spells\Other\Charm\CharmTarget.mdl
-




Special Effect - Destroy (Last created special effect)
-




Hero - Modify Strength of PoD_Caster: Add 1
-




Hashtable - Save Handle Of(Attacked unit) as 0 of (Key (Attacked unit)) in PoD_Hash
-




Hashtable - Save 5 as 1 of (Key (Attacked unit)) in PoD_Hash
-




Unit Group - Add PoD_Caster to PoD_Group
-
-



Else - Actions
-
-
-
-
Power of Darkness Loop
-

Events
-


Time - Every 1.00 seconds of game time
-
-

Conditions
-

Actions
-


Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
-



Loop - Actions
-




Set PoD_Caster = (Load 0 of (Key (Picked unit)) in PoD_Hash)
-




Set PoD_Time = (Load 1 of (Key (Picked unit)) from PoD_Hash)
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






PoD_Time Greater than 0
-
-





Then - Actions
-






Hashtable - Save (PoD_Time - 1) as 1 of (Key (Picked unit)) in PoD_Hash
-
-





Else - Actions
-






Hero - Modify Strength of PoD_Caster: Subtract 1
-






Special Effect - Create a special effect attached to the origin of PoD_Caster using Abilities\Spells\Orc\AncestralSpirit\AncestralSpiritCaster.mdl
-






Special Effect - Destroy (Last created special effect)
-






Hashtable - Clear all child hashtables of child (Key (Picked unit)) in PoD_Hash
-






Unit Group - Remove PoD_Caster from PoD_Group
-
-
-
-
-
-
So my question is, how can I make this possible to cast multiple times on one unit ? (For now only the last 1 strength will be removed when the 5 seconds are over)
Please, any ideas ? (+Rep for helpful answers)





