Ability Type: Active
Targeting Type: Instant
Ability Hotkey: E
The Lightning Revenant calls upon a powerful storm of crackling energy, which strikes weakened enemies with deadly bolts of lightning. The storm is charged with Razor's malevolent will, and will seek out only the most injured targets for its shattering blasts.
===================================================================
===================================================================
EYE
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to EYE of the Storm
Actions
Set EoS_MaxIndex = (EoS_MaxIndex + 1)
Set EoS_Caster[EoS_MaxIndex] = (Triggering unit)
Set EoS_Loc = (Position of EoS_Caster[EoS_MaxIndex])
Unit - Create 1 EYE DUMMY for (Owner of EoS_Caster[EoS_MaxIndex]) at EoS_Loc facing Default building facing degrees
Set EoS_Dummy[EoS_MaxIndex] = (Last created unit)
Set EoS_Group[EoS_MaxIndex] = (Units within 500.00 of EoS_Loc matching (((Matching unit) belongs to an enemy of (Owner of EoS_Caster[EoS_MaxIndex])) Equal to True))
Set EoS_Counter[EoS_MaxIndex] = 333
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Set EoS_Group2 = (Units within 500.00 of EoS_Loc matching (((Matching unit) belongs to an enemy of (Owner of EoS_Caster[EoS_MaxIndex])) Equal to True))
Unit - Order EoS_Dummy[EoS_CurrentIndex] to Neutral Naga Sea Witch - Forked Lightning (Random unit from EoS_Group2)
Custom script: call DestroyGroup(udg_EoS_Group2)
Custom script: call RemoveLocation(udg_EoS_Loc)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Documentation: [1/5]
No comments or explanation at the trigger and description which could make people confused what kind of spell is this and what is this for
Cons: [3/5]
You don't need to use array for Set EYE_Point[1] = (Position of EYE_caster)
EYE Group at cast trigger is useless
Destroy the group after you are done using it, you overwrite so many group in the loop trigger
Overall: [2/5]
No Comment
Suggestions:
Replace the Set EYE_Point[1] = (Position of EYE_caster) to Set EYE_Point = ..
don't store EYE Group at the cast trigger if you're not going to use it
Your EYE Loop leaks a group every 0.03 seconds. Its because the call DestroyGroup is called only when the dummy died, not after each declaration of group. and you dont need the RemoveLocation in the else part as its done outside the if-then-else.
Well, if you fix the leaks and what not it should be decent, I made my own makeshift version a while back I'll post with hidden tags here so you can take a look if you want its by no extent perfect but I don't think it leaks and it technically reduces armor too, although its kind of a convoluted method.
EoS Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Eye of the Storm
Actions
Set EoS_MaxIndex = (EoS_MaxIndex + 1)
Set EoS_Caster[EoS_MaxIndex] = (Triggering unit)
Set TempLoc = (Position of (Triggering unit))
Unit - Create 1 Eye Of the Storm for (Owner of EoS_Caster[EoS_MaxIndex]) at TempLoc facing Default building facing degrees
Set EoS_Storm[EoS_MaxIndex] = (Last created unit)
Unit - Set level of Eye of the Storm (dummy) for (Last created unit) to (Level of Eye of the Storm for (Triggering unit))
Set EoS_Group[EoS_MaxIndex] = (Units within 500.00 of TempLoc matching ((((Matching unit) belongs to an ally of (Owner of EoS_Caster[EoS_MaxIndex])) Not equal to True) and (((Life of (Matching unit)) Greater than 0.41) and ((Unit-type of (Matching unit)) Equal to Mountain Giant))))
Set EoS_Counter[EoS_MaxIndex] = 333
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
EoS_MaxIndex Equal to 1
Then - Actions
Trigger - Turn on EoS Loop <gen>
Else - Actions
Custom script: call RemoveLocation(udg_TempLoc)
EoS Loop
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
For each (Integer EoS_CurrentIndex) from 1 to EoS_MaxIndex, do (Actions)
Loop - Actions
Set EoS_Counter[EoS_CurrentIndex] = (EoS_Counter[EoS_CurrentIndex] - 1)
Set TempLoc = (Position of EoS_Storm[EoS_CurrentIndex])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
EoS_Counter[EoS_CurrentIndex] Less than or equal to 0
(EoS_Caster[EoS_CurrentIndex] is alive) Not equal to True
(Life of EoS_Caster[EoS_CurrentIndex]) Less than or equal to 0.41
Then - Actions
Unit - Kill EoS_Storm[EoS_CurrentIndex]
Unit Group - Pick every unit in EoS_Group[EoS_CurrentIndex] and do (Actions)
Loop - Actions
Unit - Set level of EoS Armor for (Picked unit) to 1
Set TempGroup = (Units within 500.00 of TempLoc matching (((Unit-type of (Matching unit)) Equal to Mountain Giant) and (((Life of (Matching unit)) Greater than 0.41) and (((Matching unit) belongs to an ally of (Owner of EoS_Caster[EoS_CurrentIndex])) Not equal to True))))
Unit Group - Pick every unit in TempGroup and do (Actions)
Loop - Actions
Set EoS_TempUnit = (Picked unit)
Set HealthAmount = 2000000.00
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Life of TempUnit) Less than HealthAmount
Then - Actions
Set EoS_TempUnit2 = EoS_TempUnit
Else - Actions
Unit - Order EoS_Storm[EoS_CurrentIndex] to Orc Far Seer - Chain Lightning EoS_TempUnit2
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(EoS_TempUnit is in EoS_Group[EoS_CurrentIndex]) Equal to True
Then - Actions
Else - Actions
Unit Group - Add EoS_TempUnit2 to EoS_Group[EoS_CurrentIndex]
Custom script: call DestroyGroup(udg_TempGroup)
Custom script: call RemoveLocation(udg_TempLoc)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
EoS_MaxIndex Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
Armor Reduc
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Eye of the Storm (dummy)
Actions
Unit - Set level of EoS Armor for EoS_TempUnit2 to ((Level of EoS Armor for EoS_TempUnit2) + 1)
Set TempReal = ((Real((Level of Eye of the Storm (dummy) for (Triggering unit)))) x 37.50)
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing TempReal damage of attack type Normal and damage type Normal
Your EYE Loop leaks a group every 0.03 seconds. Its because the call DestroyGroup is called only when the dummy died, not after each declaration of group. and you dont need the RemoveLocation in the else part as its done outside the if-then-else.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.