Moderator
M
Moderator
15:28, 22nd Jul 2013
PurgeandFire: Good job. This spell is nicely coded and fun to play around with.
PurgeandFire: Good job. This spell is nicely coded and fun to play around with.
Assassinate

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Assassinate

Actions


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


-------- DO NOT CHANGE!!! --------


Set Assa_Max = (Assa_Max + 1)


Set Assa_Caster[Assa_Max] = (Triggering unit)


Set Assa_Target[Assa_Max] = (Target unit of ability being cast)


Set Assa_Ability = (Ability being cast)


Set Assa_Lvl[Assa_Max] = (Level of (Ability being cast) for Assa_Caster[Assa_Max])


Unit - Pause Assa_Caster[Assa_Max]


Unit - Make Assa_Caster[Assa_Max] Invulnerable


Unit - Turn collision for Assa_Caster[Assa_Max] Off


-------- END --------


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


-------- CHANGEABLE: No. of Attacks --------


Set Assa_Attacks[Assa_Max] = 12


-------- CHANGEABLE: Random Point where the Caster will teleport and attack --------


Set Assa_Random = (Random real number between 50.00 and 100.00)


-------- CHANGEABLE: Damage Dealt to the primary target --------


Set Assa_DamageS[1] = 10.00


Set Assa_DamageS[2] = 15.00


Set Assa_DamageS[3] = 20.00


-------- CHANGEABLE: Damage Dealt if 'Assa_DamageS' effect is done (ending effect) --------


Set Assa_DamageE[1] = 50.00


Set Assa_DamageE[2] = 200.00


Set Assa_DamageE[3] = 500.00


-------- CHANGEABLE: Area of effect if 'Assa_DamageS' effect is done (ending effect) --------


Set Assa_Area[1] = 125.00


Set Assa_Area[2] = 300.00


Set Assa_Area[3] = 500.00


-------- CHANGEABLE: Animation Speed --------


Animation - Change Assa_Caster[Assa_Max]'s animation speed to 250.00% of its original speed


-------- END --------


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


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


-------- DO NOT CHANGE!!! --------


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



If - Conditions




Assa_Max Equal to 1



Then - Actions




Trigger - Turn on Assassinate Loop <gen>



Else - Actions


-------- END --------


-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
Assassinate Loop

Events


Time - Every 0.10 seconds of game time

Conditions

Actions


For each (Integer Assa_Loop) from 1 to Assa_Max, do (Actions)



Loop - Actions




Animation - Play Assa_Caster[Assa_Loop]'s attack animation




Special Effect - Create a special effect attached to the origin of Assa_Target[Assa_Loop] using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl




Special Effect - Destroy (Last created special effect)




Special Effect - Create a special effect attached to the origin of Assa_Caster[Assa_Loop] using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl




Special Effect - Destroy (Last created special effect)




Set Assa_PointT = (Position of Assa_Target[Assa_Loop])




Set Assa_PointR = (Assa_PointT offset by Assa_Random towards (Random real number between 0.00 and 359.99) degrees)




Unit - Move Assa_Caster[Assa_Loop] instantly to Assa_PointR, facing Assa_PointT




Unit - Create 1 Assassinate Dummy for (Owner of Assa_Caster[Assa_Loop]) at Assa_PointR facing Assa_PointT




Unit - Add a 1.00 second Generic expiration timer to (Last created unit)




Animation - Change (Last created unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 75.00% transparency




Animation - Play (Last created unit)'s attack animation




Unit - Cause Assa_Caster[Assa_Loop] to damage Assa_Target[Assa_Loop], dealing Assa_DamageS[Assa_Lvl[Assa_Loop]] damage of attack type Spells and damage type Normal




Set Assa_Attacks[Assa_Loop] = (Assa_Attacks[Assa_Loop] - 1)




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





If - Conditions






Assa_Attacks[Assa_Loop] Equal to 0





Then - Actions






Set Assa_GroupDMG = (Units within Assa_Area[Assa_Lvl[Assa_Loop]] of Assa_PointT matching ((((Matching unit) belongs to an enemy of (Owner of Assa_Caster[Assa_Loop])) Equal to True) and (((Matching unit) is alive) Equal to True)))






Unit Group - Pick every unit in Assa_GroupDMG and do (Actions)







Loop - Actions








Unit - Cause Assa_Caster[Assa_Loop] to damage (Picked unit), dealing Assa_DamageE[Assa_Lvl[Assa_Loop]] damage of attack type Spells and damage type Normal








Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl








Special Effect - Destroy (Last created special effect)








Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl








Special Effect - Destroy (Last created special effect)








-------- Should avoid making dummies under existing units as this consumes unnescescary resources. --------








Unit - Create 1 Dummy for (Owner of Assa_Caster[Assa_Loop]) at Assa_PointT facing Default building facing degrees








Unit - Add a 1.00 second Generic expiration timer to (Last created unit)








Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)






-------- Only remove existing groups. --------






Custom script: call DestroyGroup( udg_Assa_GroupDMG )






Unit - Unpause Assa_Caster[Assa_Loop]






Unit - Make Assa_Caster[Assa_Loop] Vulnerable






Unit - Turn collision for Assa_Caster[Assa_Loop] On






Animation - Change Assa_Caster[Assa_Loop]'s animation speed to 100.00% of its original speed






Set Assa_Caster[Assa_Loop] = Assa_Caster[Assa_Max]






Set Assa_Caster[Assa_Max] = No unit






-------- Must move max index object member to loop index object member. It makes no sense to move loop index object member to itself! --------






Set Assa_Target[Assa_Loop] = Assa_Target[Assa_Max]






Set Assa_Target[Assa_Max] = No unit






-------- Must move all members of an object during object move operation. --------






Set Assa_Attacks[Assa_Loop] = Assa_Attacks[Assa_Max]






Set Assa_Lvl[Assa_Loop] = Assa_Lvl[Assa_Max]






Set Assa_Max = (Assa_Max - 1)






Set Assa_Loop = (Assa_Loop - 1)





Else - Actions




Custom script: call RemoveLocation(udg_Assa_PointT)




Custom script: call RemoveLocation(udg_Assa_PointR)




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





If - Conditions






Assa_Max Equal to 0





Then - Actions






Trigger - Turn off (This trigger)





Else - Actions
Assassinate Recover

Events


Unit - A unit Dies

Conditions


(Unit-type of (Triggering unit)) Equal to Assassinate Dummy

Actions


Unit - Remove (Triggering unit) from the game