- Joined
- May 1, 2008
- Messages
- 1,605
Seas =)
I want create a spell, that drains a random amount of life and mana from the hero, each friendly unit in range get healed by both amounts and nearly enemy units get damage by both amounts. Also the Hero should lose the drained life and the drained mana.
I create the following trigger, but it doesn't work correct. The casting hero always die, and the damage/heal is always the same. Tested it 20 times and always the same. Can someone help me please? =)
I want create a spell, that drains a random amount of life and mana from the hero, each friendly unit in range get healed by both amounts and nearly enemy units get damage by both amounts. Also the Hero should lose the drained life and the drained mana.
I create the following trigger, but it doesn't work correct. The casting hero always die, and the damage/heal is always the same. Tested it 20 times and always the same. Can someone help me please? =)
-
Heart of Sheria
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Ds Basic
-
-
Actions
-
Set TempPoint11 = (Position of (Casting unit))
-
Set DragonCounterLife = (Random integer number between (Integer((Life of (Casting unit)))) and (Integer((Max life of (Casting unit)))))
-
Set DragonCounterMana = (Random integer number between (Integer((Mana of (Casting unit)))) and (Integer((Max mana of (Casting unit)))))
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 450.00 of TempPoint11 matching (((Matching unit) belongs to an ally of (Owner of (Casting unit))) Equal to True)) and do (Actions)
-
Loop - Actions
-
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + ((Real(DragonCounterLife)) + (Real(DragonCounterMana))))
-
-
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 450.00 of TempPoint11 matching (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True)) and do (Actions)
-
Loop - Actions
-
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - ((Real(DragonCounterLife)) + (Real(DragonCounterMana))))
-
-
-
Unit - Set life of (Casting unit) to ((Life of (Casting unit)) - (Real(DragonCounterLife)))
-
Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) - (Real(DragonCounterMana)))
-
Custom script: call RemoveLocation(udg_TempPoint11)
-
-