S
Sunny_D
Guest
here is a trigger you can use. should work - MUI and leak-free afaik!
picks only alive units owned by player 12 within range of 600 of target point and each picked enemy has a 1/50 chance to increase the heroes stats by (Level of spell / 2)
picks only alive units owned by player 12 within range of 600 of target point and each picked enemy has a 1/50 chance to increase the heroes stats by (Level of spell / 2)
Code:
Soul Steal
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to SoulSteal
Actions
Set Counter = 0
Set TempLoc = (Target point of ability being cast)
Set TempGroup = (Units within 600.00 of TempLoc matching ((Owner of (Matching unit)) Equal to Player 12 (Brown)))
Unit Group - Pick every unit in TempGroup and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is alive) Equal to True
Then - Actions
Set Counter = (Counter + 1)
Else - Actions
For each (Integer A) from 1 to Counter, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 50) equal to 25
Then - Actions
Hero - Modify Strength of (Triggering unit): Add ((Level of SoulSteal for (Triggering unit)) / 2)
Hero - Modify Agility of (Triggering unit): Add ((Level of SoulSteal for (Triggering unit)) / 2)
Hero - Modify Intelligence of (Triggering unit): Add ((Level SoulSteal for (Triggering unit)) / 2)
Else - Actions
Custom script: call DestroyGroup (udg_TempGroup)
Custom script: call RemoveLocation (udg_TempLoc)