[trigger=Cast]Spiritual Charge
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Spiritual Charge
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SC_Index1 Equal to 0
Then - Actions
Trigger - Turn on Spiritual Charge Loop <gen>
Else - Actions
Set SC_Index1 = (SC_Index1 + 1)
Set SC_Index2 = (SC_Index2 + 1)
Set SC_Boolean[SC_Index2] = True
Set SC_Caster[SC_Index2] = (Triggering unit)
Set SC_CasterLoc[SC_Index2] = (Position of (Triggering unit))
Set SC_EchoingFinale[SC_Index2] = False
Set SC_Counter[SC_Index2] = 1
Set SC_Level[SC_Index2] = (Level of (Ability being cast) for (Triggering unit))
Set SC_Damage[SC_Index2] = (((Real(SC_Index2)) x 80.00) + 120.00)
Set SC_TargetLoc[SC_Index2] = (Target point of ability being cast)
Unit - Create 1 Dummy Spirit for Owner of Triggering unit at SC_CasterLoc[SC_Index2] facing (Angle from SC_CasterLoc[SC_Index2] to SC_TargetLoc[SC_Index2]) degrees
Animation - Change (Last created unit)'s vertex coloring to (100.00%, 100.00%, 0.00%) with 50.00% transparency
Set SC_Spirit[SC_Index2] = (Last created unit)
Set SC_SpiritLoc[SC_Index2] = (Position of (Last created unit))
Unit - Order SC_Spirit[SC_Index2] to Move To SC_TargetLoc[SC_Index2]
[/trigger]
[trigger= Loop]Spiritual Charge Loop
Events
Time - Every 0.04 seconds of game time
Conditions
Actions
Spiritual Charge Loop
Events
Time - Every 0.04 seconds of game time
Conditions
Actions
For each (Integer SC_Index3) from 1 to SC_Index2, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SC_Boolean[SC_Index3] Equal to True
Then - Actions
Set A_Temp_Loc = (Position of SC_Spirit[SC_Index3])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between A_Temp_Loc and SC_SpiritLoc[SC_Index3]) Greater than or equal to 250.00
Then - Actions
Unit - Create 1 Dummy Caster for (Owner of SC_Caster[SC_Index3]) at A_Temp_Loc facing Default building facing degrees
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
Unit - Add Spitirual Resonance to (Last created unit)
Unit - Set level of Spitirual Resonance for (Last created unit) to SC_Level[SC_Index3]
Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
Special Effect - Create a special effect at A_Temp_Loc using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation(udg_SC_SpiritLoc[udg_SC_Index3])
Set SC_SpiritLoc[SC_Index3] = (Position of SC_Spirit[SC_Index3])
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between A_Temp_Loc and SC_TargetLoc[SC_Index3]) Less than or equal to 50.00
Then - Actions
Set SC_Boolean[SC_Index3] = False
Set SC_EchoingFinale[SC_Index3] = True
Animation - Change SC_Spirit[SC_Index3]'s animation speed to 470.00% of its original speed
Countdown Timer - Start SC_Timer[SC_Index3] as a One-shot timer that will expire in 1.96 seconds
Else - Actions
Custom script: call RemoveLocation(udg_A_Temp_Loc)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SC_EchoingFinale[SC_Index3] Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Elapsed time for SC_Timer[SC_Index3]) Greater than or equal to (0.24 x (Real(SC_Counter[SC_Index3])))
Then - Actions
Set SC_Counter[SC_Index3] = (SC_Counter[SC_Index3] + 1)
Animation - Play SC_Spirit[SC_Index3]'s attack slam animation
Special Effect - Create a special effect at SC_TargetLoc[SC_Index3] using war3mapImported\FireNova2.mdx
Special Effect - Destroy (Last created special effect)
Set A_Temp_Group = (Units within 450.00 of SC_TargetLoc[SC_Index3] matching (((Matching unit) belongs to an enemy of (Owner of SC_Caster[SC_Index3])) Equal to True))
Unit Group - Pick every unit in A_Temp_Group and do (Unit - Cause SC_Caster[SC_Index3] to damage (Picked unit), dealing SC_Damage[SC_Index3] damage of attack type Spells and damage type Normal)
Custom script: call DestroyGroup(udg_A_Temp_Group)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SC_Counter[SC_Index3] Equal to 9) or ((Elapsed time for SC_Timer[SC_Index3]) Greater than or equal to 1.92)
Then - Actions
Unit - Remove SC_Spirit[SC_Index3] from the game
Set SC_EchoingFinale[SC_Index3] = False
Custom script: call RemoveLocation(udg_SC_SpiritLoc[udg_SC_Index3])
Custom script: call RemoveLocation(udg_SC_CasterLoc[udg_SC_Index3])
Custom script: call RemoveLocation(udg_SC_TargetLoc[udg_SC_Index3])
Set SC_Index1 = (SC_Index1 - 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SC_Index1 Equal to 0
Then - Actions
Set SC_Index2 = 0
Trigger - Turn off (This trigger)
Else - Actions
Else - Actions
Else - Actions
Else - Actions
[/trigger]
[trigger= Remove Unit Leak]Remove Unit Leak
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Dummy Caster
Actions
Unit - Remove (Triggering unit) from the game
[/trigger]