Spell Init

Events


Map initialization

Conditions

Actions


-------- Change them whatever you want --------


Set FS_Ability = Fatal Sword


Set FS_Damage[1] = 100.00


Set FS_Damage[2] = 200.00


Set FS_Damage[3] = 300.00


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


Set FS_Speed = 50.00
FS Cast

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to FS_Ability

Actions


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



If - Conditions




FS_Temp Equal to 0



Then - Actions




Trigger - Turn on FS Loop <gen>



Else - Actions


-------- IMPORTANT PART. DON'T TOUCH THIS --------


Set FS_Temp = (FS_Temp + 1)


-------- ----------------------- --------


Set FS_Caster[FS_Temp] = (Triggering unit)


Set FS_CastLoc[FS_Temp] = (Position of FS_Caster[FS_Temp])


Set FS_Target[FS_Temp] = (Target unit of ability being cast)


Set FS_TargetLoc[FS_Temp] = (Position of FS_Target[FS_Temp])


Set FS_CastRange[FS_Temp] = (Distance between FS_CastLoc[FS_Temp] and FS_TargetLoc[FS_Temp])


Set FS_Range[FS_Temp] = (FS_CastRange[FS_Temp] x 1.25)


Unit - Turn collision for FS_Caster[FS_Temp] Off


Unit - Pause FS_Target[FS_Temp]


Animation - Play FS_Caster[FS_Temp]'s attack slam animation


Trigger - Turn on FS Loop <gen>


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


Special Effect - Create a special effect attached to the right hand of FS_Caster[FS_Temp] using Abilities\Weapons\PhoenixMissile\Phoenix_Missile.mdl


Set FS_SFX[FS_Temp] = (Last created special effect)
FS Loop

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


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



If - Conditions




FS_Range[FS_Temp] Greater than 0.00



Then - Actions




Set FS_Move[FS_Temp] = ((Position of FS_Caster[FS_Temp]) offset by FS_Speed towards (Facing of FS_Caster[FS_Temp]) degrees)




Unit - Move FS_Caster[FS_Temp] instantly to FS_Move[FS_Temp]




Set FS_Range[FS_Temp] = (FS_Range[FS_Temp] - FS_Speed)



Else - Actions




Special Effect - Destroy FS_SFX[FS_Temp]




Unit - Cause FS_Caster[FS_Temp] to damage FS_Target[FS_Temp], dealing FS_Damage[(Level of FS_Ability for FS_Caster[FS_Temp])] damage of attack type Spells and damage type Normal




Unit - Turn collision for FS_Caster[FS_Temp] On




Animation - Reset FS_Caster[FS_Temp]'s animation




Unit - Unpause FS_Target[FS_Temp]




Set FS_Temp = (FS_Temp - 1)


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



If - Conditions




FS_Temp Equal to 0



Then - Actions




Trigger - Turn off (This trigger)



Else - Actions