Spell Init

Events


Map initialization

Conditions

Actions


Set Raikiri_Ability = Raikiri


-------- Change this if you wished to --------


Set SFX[1] = Abilities\Weapons\ZigguratMissile\ZigguratMissile.mdl


Set SFX[2] = Abilities\Spells\Orc\Purge\PurgeBuffTarget.mdl


Set Raikiri_AoE[1] = 100.00


Set Raikiri_AoE[2] = 150.00


Set Raikiri_AoE[3] = 200.00


Set Raikiri_AoE[4] = 250.00


Set Raikiri_Damage[1] = 10.00


Set Raikiri_Damage[2] = 15.00


Set Raikiri_Damage[3] = 20.00


Set Raikiri_Damage[4] = 25.00


Set Raikiri_Animation = attack slam


-------- ------------------------------- --------
Raikiri Cast

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Raikiri_Ability

Actions


-------- IMPORTANT SYSTEM PART START --------


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



If - Conditions




Raikiri_IndexSize Equal to 0



Then - Actions




Trigger - Turn on Raikiri Charge <gen>



Else - Actions


-------- Increase the index size --------


Set Raikiri_IndexSize = (Raikiri_IndexSize + 1)


-------- Dynamic Index --------


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



If - Conditions




Raikiri_IndexSize Greater than Raikiri_IndexMaxSize



Then - Actions




Set Raikiri_Index[Raikiri_IndexSize] = Raikiri_IndexSize




Set Raikiri_IndexMaxSize = Raikiri_IndexSize



Else - Actions


-------- Dynamic Index End --------


-------- IMPORTANT SYSTEM PART END --------


Set Raikiri_TempInt = Raikiri_Index[Raikiri_IndexSize]


-------- Setup those arrays --------


Set Raikiri_Caster[Raikiri_TempInt] = (Casting unit)


Set Raikiri_CasterLoc = (Position of (Raikiri_Caster[Raikiri_TempInt]))


Set Raikir_Owner[Raikiri_TempInt] = (Owner of Raikiri_Caster[Raikiri_TempInt])


Set Raikiri_Level[Raikiri_TempInt] = (Level of Raikiri_Ability for Raikiri_Caster[Raikiri_TempInt])


Set Raikiri_Angle[Raikiri_TempInt] = (Facing of (Triggering unit))


Special Effect - Create a special effect attached to the right hand of Raikiri_Caster[Raikiri_TempInt] using SFX[1]


Set Raikiri_Buff1[Raikiri_TempInt] = (Last created special effect)


-------- This is the distance it will travel.. If you want to change this, multiply it by 4.. Current distance is 600 --------


Set Raikiri_Distance[Raikiri_TempInt] = 2400.00


-------- Don't touch this --------


Set Raikiri_Speed[Raikiri_TempInt] = 25.00


Unit - Turn collision for Raikiri_Caster[Raikiri_TempInt] Off


Unit - Pause Raikiri_Caster[Raikiri_TempInt]


Custom script: call RemoveLocation(udg_Raikiri_MovePoint)


Custom script: call RemoveLocation(udg_Raikiri_CasterLoc)
Raikiri Charge

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


For each (Integer Raikiri_Loop) from 1 to Raikiri_IndexSize, do (Actions)



Loop - Actions




-------- This let look everything cleaner. --------




Set Raikiri_TempInt = Raikiri_Index[Raikiri_Loop]




-------- Condition... --------




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





If - Conditions






Raikiri_Distance[Raikiri_TempInt] Greater than 0.00





Then - Actions






Set Raikiri_CasterLoc = (Position of Raikiri_Caster[Raikiri_TempInt])






Set Raikiri_MovePoint = (Raikiri_CasterLoc offset by Raikiri_Speed[Raikiri_TempInt] towards Raikiri_Angle[Raikiri_TempInt] degrees)






Unit - Move Raikiri_Caster[Raikiri_TempInt] instantly to Raikiri_MovePoint, facing Raikiri_Angle[Raikiri_TempInt] degrees






Animation - Play Raikiri_Caster[Raikiri_TempInt]'s Raikiri_Animation animation






Custom script: set bj_wantDestroyGroup=true






Set Raikiri_Group[Raikiri_TempInt] = (Units within Raikiri_AoE[Raikiri_TempInt] of Raikiri_MovePoint)






Unit Group - Pick every unit in (Raikiri_Group[Raikiri_TempInt]) and do (Actions)







Loop - Actions








Set Raikiri_Targets[Raikiri_TempInt] = (Picked unit)








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









If - Conditions










(((Picked unit) is alive) Equal to True) and ((Owner of (Picked unit)) Not equal to Raikir_Owner[Raikiri_TempInt])









Then - Actions










Unit - Cause Raikiri_Caster[Raikiri_TempInt] to damage Raikiri_Targets[Raikiri_TempInt], dealing Raikiri_Damage[Raikiri_Level[Raikiri_TempInt]] damage of attack type Spells and damage type Normal










Special Effect - Create a special effect attached to the right hand of Raikiri_Caster[Raikiri_TempInt] using SFX[2]










Set Raikiri_Buff2[Raikiri_TempInt] = (Last created special effect)










Special Effect - Destroy Raikiri_Buff2[Raikiri_TempInt]










Unit Group - Remove Raikiri_Targets[Raikiri_TempInt] from (Last created unit group)









Else - Actions






Set Raikiri_Distance[Raikiri_TempInt] = (Raikiri_Distance[Raikiri_TempInt] - 100.00)






Custom script: call RemoveLocation(udg_Raikiri_MovePoint)






Custom script: call RemoveLocation(udg_Raikiri_CasterLoc)





Else - Actions






Animation - Reset Raikiri_Caster[Raikiri_TempInt]'s animation






Unit - Turn collision for Raikiri_Caster[Raikiri_TempInt] On






Unit - Unpause Raikiri_Caster[Raikiri_TempInt]






Special Effect - Destroy Raikiri_Buff1[Raikiri_TempInt]






Set Raikiri_Index[Raikiri_Loop] = Raikiri_Index[Raikiri_IndexSize]






Set Raikiri_Index[Raikiri_IndexSize] = Raikiri_TempInt






Set Raikiri_IndexSize = (Raikiri_IndexSize - 1)






Set Raikiri_Loop = (Raikiri_Loop - 1)






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







If - Conditions








Raikiri_IndexSize Equal to 0







Then - Actions








Trigger - Turn off (This trigger)








Skip remaining actions







Else - Actions






-------- IMPORTANT SYSTEM PART END --------