Moderator
M
Moderator
23:38, 17th Oct 2010
TriggerHappy:
Thanks for updating your spell.
TriggerHappy:
Thanks for updating your spell.
Changelog
23:38, 17th Oct 2010
* Destroy TW_Point[2] & TW_Point[3] in Thunderwrath Loop.
23:38, 17th Oct 2010
* Place RemoveLocation(udg_TW_Point[2&3]) outside of the if condition.
Thuenderwrath
Lauches a magnetic lightning, damaging all enemies in front, and when he returns again causing damage.
Level 1 - Deal 100 damage, round trip.
Level 2 - Deal 200 damage, round trip.
Level 3 - Deal 300 damage, round trip.
Level 4 - Deal 400 damage, round trip.
Cooldown: 65 segundos.
Thunderwrath Hashtable

Events


Map initialization

Conditions

Actions


Hashtable - Create a hashtable


Set TW_Hashtable = (Last created hashtable)
Thunderwrath

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Thunderwrath

Actions


If ((Thunderwrath Loop <gen> is on) Equal to False) then do (Trigger - Turn on Thunderwrath Loop <gen>) else do (Custom script: //!)


Set TW_Int = (TW_Int + 1)


Set TW_Caster = (Triggering unit)


Set TW_Point[0] = (Position of TW_Caster)


Set TW_Point[1] = (Target point of ability being cast)


Set TW_Angle = (Angle from TW_Point[0] to TW_Point[1])


Set TW_Point[2] = (TW_Point[0] offset by 100.00 towards TW_Angle degrees)


Set TW_Spell_Distance = 1100.00


Set TW_Damage = (100.00 x (Real((Level of Thunderwrath for TW_Caster))))


Set TW_MissileSpeed = 25.00


Set TW_Return = False


Unit - Create 1 Dummy for (Owner of TW_Caster) at TW_Point[0] facing TW_Angle degrees


Set TW_Dummy = (Last created unit)


Set TW_Handle = (Last created unit)


Unit Group - Add TW_Dummy to TW_Group


Special Effect - Create a special effect at TW_Point[2] using Abilities\Weapons\FarseerMissile\FarseerMissile.mdl


Special Effect - Destroy (Last created special effect)


Special Effect - Create a special effect attached to the origin of TW_Dummy using Abilities\Weapons\FarseerMissile\FarseerMissile.mdl


Set TW_SFX = (Last created special effect)


-------- save values --------


Hashtable - Save TW_Angle as (Key angle) of (Key TW_Handle) in TW_Hashtable


Hashtable - Save TW_Damage as (Key damage) of (Key TW_Handle) in TW_Hashtable


Hashtable - Save TW_Spell_Distance as (Key distance) of (Key TW_Handle) in TW_Hashtable


Hashtable - Save TW_MissileSpeed as (Key speed) of (Key TW_Handle) in TW_Hashtable


Hashtable - Save TW_Int as (Key int) of (Key TW_Handle) in TW_Hashtable


Hashtable - Save TW_Return as (Key retornar) of (Key TW_Handle) in TW_Hashtable


Hashtable - Save Handle OfTW_Caster as (Key caster) of (Key TW_Handle) in TW_Hashtable


Hashtable - Save Handle OfTW_SFX as (Key sfx) of (Key TW_Handle) in TW_Hashtable


-------- unit group --------


Custom script: set udg_TW_DamagedUnits[LoadInteger(udg_TW_Hashtable , GetHandleId(udg_TW_Handle) , StringHash("int"))] = CreateGroup()


-------- clean --------


Custom script: call RemoveLocation(udg_TW_Point[0])


Custom script: call RemoveLocation(udg_TW_Point[1])


Custom script: call RemoveLocation(udg_TW_Point[2])
Thunderwrath Loop

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


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



Loop - Actions




Set TW_Handle = (Picked unit)




Set TW_Dummy = (Picked unit)




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





If - Conditions






TW_Dummy Not equal to No unit





Then - Actions






Set TW_Return = (Load (Key retornar) of (Key TW_Handle) from TW_Hashtable)






Set TW_MissileSpeed = (Load (Key speed) of (Key TW_Handle) from TW_Hashtable)






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







If - Conditions








TW_Return Equal to False







Then - Actions








Set TW_Angle = (Load (Key angle) of (Key TW_Handle) from TW_Hashtable)








Set TW_Spell_Distance = (Load (Key distance) of (Key TW_Handle) from TW_Hashtable)








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









If - Conditions










TW_Spell_Distance Greater than or equal to 0.00









Then - Actions










Set TW_Damage = (Load (Key damage) of (Key TW_Handle) from TW_Hashtable)










Set TW_Caster = (Load (Key caster) of (Key TW_Handle) in TW_Hashtable)










Set TW_Spell_Distance = (TW_Spell_Distance - TW_MissileSpeed)










Set TW_Point[0] = (Position of TW_Dummy)










Set TW_Point[1] = (TW_Point[0] offset by TW_MissileSpeed towards TW_Angle degrees)










Unit - Move TW_Dummy instantly to TW_Point[1]










Custom script: set bj_wantDestroyGroup = true










Unit Group - Pick every unit in (Units within 200.00 of TW_Point[1] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is dead) Equal to False) and ((((Matching unit) is in TW_DamagedUnits[(Load (Key int and do (Actions)











Loop - Actions












Unit Group - Add (Picked unit) to TW_DamagedUnits[(Load (Key int) of (Key TW_Handle) from TW_Hashtable)]












Unit - Cause TW_Caster to damage (Picked unit), dealing TW_Damage 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\Other\Monsoon\MonsoonBoltTarget.mdl












Special Effect - Destroy (Last created special effect)










Custom script: call RemoveLocation(udg_TW_Point[0])










Custom script: call RemoveLocation(udg_TW_Point[1])









Else - Actions










Set TW_Return = True










Set TW_Angle = (TW_Angle - 180.00)










Hashtable - Save TW_Angle as (Key angle) of (Key TW_Handle) in TW_Hashtable










Hashtable - Save TW_Return as (Key retornar) of (Key TW_Handle) in TW_Hashtable










Unit Group - Remove all units from TW_DamagedUnits[(Load (Key int) of (Key TW_Handle) from TW_Hashtable)]








Hashtable - Save TW_Spell_Distance as (Key distance) of (Key TW_Handle) in TW_Hashtable







Else - Actions








Set TW_Point[2] = (Position of TW_Dummy)








Set TW_Point[3] = (Position of TW_Caster)








Set TW_Angle = (Angle from TW_Point[2] to TW_Point[3])








Set TW_Spell_Distance = (Distance between TW_Point[2] and TW_Point[3])








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









If - Conditions










TW_Spell_Distance Greater than or equal to 72.00









Then - Actions










Set TW_Damage = (Load (Key damage) of (Key TW_Handle) from TW_Hashtable)










Set TW_Caster = (Load (Key caster) of (Key TW_Handle) in TW_Hashtable)










Set TW_Spell_Distance = (TW_Spell_Distance - TW_MissileSpeed)










Set TW_Point[0] = (Position of TW_Dummy)










Set TW_Point[1] = (TW_Point[0] offset by TW_MissileSpeed towards TW_Angle degrees)










Unit - Move TW_Dummy instantly to TW_Point[1], facing TW_Angle degrees










Custom script: set bj_wantDestroyGroup = true










Unit Group - Pick every unit in (Units within 200.00 of TW_Point[1] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is dead) Equal to False) and ((((Matching unit) is in TW_DamagedUnits[(Load (Key int and do (Actions)











Loop - Actions












Unit Group - Add (Picked unit) to TW_DamagedUnits[(Load (Key int) of (Key TW_Handle) from TW_Hashtable)]












Unit - Cause TW_Caster to damage (Picked unit), dealing TW_Damage 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\Other\Monsoon\MonsoonBoltTarget.mdl












Special Effect - Destroy (Last created special effect)










Custom script: call RemoveLocation(udg_TW_Point[0])










Custom script: call RemoveLocation(udg_TW_Point[1])









Else - Actions










Set TW_SFX = (Load (Key sfx) of (Key TW_Handle) in TW_Hashtable)










Special Effect - Destroy TW_SFX










Unit Group - Remove TW_Dummy from TW_Group










Unit - Remove TW_Dummy from the game










Set TW_Dummy = No unit










Custom script: call DestroyGroup(udg_TW_DamagedUnits[LoadInteger(udg_TW_Hashtable , GetHandleId(udg_TW_Handle) , StringHash("int"))])










Hashtable - Clear all child hashtables of child (Key TW_Handle) in TW_Hashtable










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











If - Conditions












(TW_Group is empty) Equal to True











Then - Actions












Trigger - Turn off Thunderwrath Loop <gen>












Set TW_Int = 0











Else - Actions








Hashtable - Save TW_Angle as (Key angle) of (Key TW_Handle) in TW_Hashtable








Hashtable - Save TW_Spell_Distance as (Key distance) of (Key TW_Handle) in TW_Hashtable








Custom script: call RemoveLocation(udg_TW_Point[2])








Custom script: call RemoveLocation(udg_TW_Point[3])





Else - Actions