


 -------- setting all integer to 0 to ensure there won't be any bugs --------



 Set WW_LoopA = 0



 Set WW_TmpInteger = 0



 Set WW_TmpInteger2 = 0



 -------- Setting the caster --------



 Set WW_TmpCaster = (Triggering unit)



 Set WW_TmpOwner = (Triggering player)



 -------- Setting the location of the caster --------



 Set WW_TmpPoint = (Position of WW_TmpCaster)



 -------- Creating the handle dummy  --------



 Unité - Create 1 WW_Handle_Type for WW_TmpOwner at WW_TmpPoint facing Orientation bâtiment par défaut degrees



 Set WW_TmpHandle = (Last created unit)



 -------- Saving the handle of the caster --------



 Table de hachage - Save Handle OfWW_TmpCaster as (Key Caster) of (Key WW_TmpHandle) in WW_Hashtable



 -------- Setting the integers --------



 Set WW_TmpInteger = (Level of WW_Ability for WW_TmpCaster)



 Set WW_TmpInteger2 = (WW_DummyAmount_Base + (WW_DummyAmount_Level x WW_TmpInteger))



 -------- Saving the integers --------



 Table de hachage - Save WW_TmpInteger2 as (Key OrbAmount) of (Key WW_TmpHandle) in WW_Hashtable



 Table de hachage - Save WW_TmpInteger as (Key Abilitylevel) of (Key WW_TmpHandle) in WW_Hashtable



 -------- Adding the handle dummy to the group so the spell is MUI --------



 Groupe unité - Add (Last created unit) to WW_Group



 -------- Setting the target point of the ability --------



 Set WW_TmpPoint2 = (Target point of ability being cast)



 -------- Creating the pillar and saving him --------



 Unité - Create 1 WW_Pillar_Type for (Owner of WW_TmpCaster) at WW_TmpPoint2 facing Orientation bâtiment par défaut degrees



 Table de hachage - Save Handle Of(Last created unit) as (Key Pillar) of (Key WW_TmpHandle) in WW_Hashtable



 -------- The range --------



 Set WW_TmpReal = (WW_Range_Base + (WW_Range_Level x (Real((Load (Key Abilitylevel) of (Key WW_TmpHandle) from WW_Hashtable)))))



 Table de hachage - Save WW_TmpReal as (Key Range) of (Key WW_TmpHandle) in WW_Hashtable



 -------- Angle + creating the orbs --------



 Set WW_TmpReal = ((Angle from WW_TmpPoint to WW_TmpPoint2) - (360.00 / (Real((Load (Key OrbAmount) of (Key WW_TmpHandle) from WW_Hashtable)))))



 For each (Integer WW_LoopA) from 1 to WW_TmpInteger2, do (Actions)




 Boucle - Actions





 Set WW_TmpInteger = (WW_LoopA + ((WW_TmpInteger2 x 2) + 1))





 Set WW_TmpReal = (WW_TmpReal + (360.00 / (Real(WW_TmpInteger2))))





 Unité - Create 1 WW_Orbs_Type for WW_TmpOwner at WW_TmpPoint2 facing WW_TmpReal degrees





 Custom script:   set udg_WW_TmpTrigger = CreateTrigger(  )





 Table de hachage - Save Handle OfWW_TmpTrigger as WW_TmpInteger of (Key WW_TmpHandle) in WW_Hashtable





 Custom script:   call TriggerAddCondition( LoadTriggerHandle( udg_WW_Hashtable, GetHandleId(udg_WW_TmpHandle), udg_WW_TmpInteger ), Condition( function WW_TT_Group ) )





 Custom script:   call TriggerRegisterUnitInRange( LoadTriggerHandle( udg_WW_Hashtable, GetHandleId(udg_WW_TmpHandle), udg_WW_TmpInteger ), GetLastCreatedUnit(), LoadReal( udg_WW_Hashtable, GetHandleId(udg_WW_TmpHandle), StringHash("Range") ), null  )





 Table de hachage - Save Handle Of(Last created unit) as WW_LoopA of (Key WW_TmpHandle) in WW_Hashtable





 Table de hachage - Save WW_TmpReal as (WW_LoopA + (Load (Key OrbAmount) of (Key WW_TmpHandle) from WW_Hashtable)) of (Key WW_TmpHandle) in WW_Hashtable



 -------- The distance --------



 Set WW_TmpReal = (WW_Distance_Base + (WW_Distance_Level x (Real((Load (Key Abilitylevel) of (Key WW_TmpHandle) from WW_Hashtable)))))



 Table de hachage - Save WW_TmpReal as (Key MaxDistance) of (Key WW_TmpHandle) in WW_Hashtable



 -------- The duration --------



 Set WW_TmpReal = (WW_Duration_Base + (WW_Duration_Level x (Real((Load (Key Abilitylevel) of (Key WW_TmpHandle) from WW_Hashtable)))))



 Table de hachage - Save WW_TmpReal as (Key Duration) of (Key WW_TmpHandle) in WW_Hashtable



 -------- The damage --------



 Set WW_TmpReal = (WW_Damage_Base + (WW_Damage_Level x (Real((Load (Key Abilitylevel) of (Key WW_TmpHandle) from WW_Hashtable)))))



 Table de hachage - Save WW_TmpReal as (Key Damage) of (Key WW_TmpHandle) in WW_Hashtable



 -------- The speed --------



 Set WW_TmpReal = (WW_Speed_Base + (WW_Speed_Level x (Real((Load (Key Abilitylevel) of (Key WW_TmpHandle) from WW_Hashtable)))))



 Table de hachage - Save WW_TmpReal as (Key Speed) of (Key WW_TmpHandle) in WW_Hashtable



 -------- The rotation --------



 Set WW_TmpReal = (WW_Rotation_Base + (WW_Rotation_Level x (Real((Load (Key Abilitylevel) of (Key WW_TmpHandle) from WW_Hashtable)))))



 Table de hachage - Save WW_TmpReal as (Key Rotation) of (Key WW_TmpHandle) in WW_Hashtable



 -------- the distance --------



 Table de hachage - Save 0.00 as (Key Distance) of (Key WW_TmpHandle) in WW_Hashtable



 -------- the boolean --------



 Table de hachage - Save FALSE as (Key Return) of (Key WW_TmpHandle) in WW_Hashtable



 -------- turning on the loop --------



 -------- clearing the leaks --------



 Custom script:   call RemoveLocation( udg_WW_TmpPoint )



 Custom script:   call RemoveLocation( udg_WW_TmpPoint2 )



 Custom script:   set udg_WW_TmpHandle = null