Moderator
M
Moderator
11:41, 3rd Jan 2010
TriggerHappy:
0.01 timer is too small but other than that it's fine.
TriggerHappy:
0.01 timer is too small but other than that it's fine.
|
Magic of the Frozen Stone
|
Target Point/Channeling: Calls down power of the Winter. Massive blizzards and avalanches are the just one of the horrible things that can happen to nearby creatures. Summons a giant Frozen stone which damages and slows units. Lasts 4 seconds. 175/200/225 damage each explosion and 10/20/30% slow. Manacost: 250/300/350 Cooldown: 100 seconds |
OW Table and Stuff

Events


Map initialization

Conditions

Actions


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


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


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



If - Conditions




OW_Load_HashTable Equal to False



Then - Actions




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




Set OW_Load_HashTable = True




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




Hashtable - Create a hashtable




Set OW_Table = (Last created hashtable)




Set OW_Ability = Magic of the Frozen Stone




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




Trigger - Add to (This trigger) the event (Unit - A unit Dies)




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



Else - Actions


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


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



If - Conditions




(Unit-type of (Triggering unit)) Equal to Frost Effect



Then - Actions




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




Unit - Remove (Triggering unit) from the game




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



Else - Actions


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


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



If - Conditions




(Unit-type of (Triggering unit)) Equal to Frost Nova




(Custom value of (Triggering unit)) Not equal to 0



Then - Actions




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




Set OW_Point_1 = (Position of (Triggering unit))




Special Effect - Create a special effect at OW_Point_1 using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl




Special Effect - Destroy (Last created special effect)




Custom script: set bj_wantDestroyGroup = true




Unit Group - Pick every unit in (Units within (110.00 + (20.00 x (Real((Custom value of (Triggering unit)))))) of OW_Point_1 matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) and do (Actions)





Loop - Actions






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






Unit - Cause (Triggering unit) to damage (Picked unit), dealing (150.00 + (25.00 x (Real((Custom value of (Triggering unit)))))) damage of attack type Spells and damage type Cold






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






Set OW_Point_3 = (Position of (Picked unit))






Unit - Create 1 Frost Nova for (Owner of (Triggering unit)) at OW_Point_3 facing Default building facing degrees






Unit - Hide (Last created unit)






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






Unit - Add Magic of the Frozen Stone Slow to (Last created unit)






Unit - Set level of Magic of the Frozen Stone Slow for (Last created unit) to (Custom value of (Triggering unit))






Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)






Custom script: call RemoveLocation(udg_OW_Point_3)




Unit - Remove (Triggering unit) from the game




Custom script: call RemoveLocation(udg_OW_Point_1)




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



Else - Actions


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


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



If - Conditions




(Ability being cast) Equal to Magic of the Frozen Stone



Then - Actions




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




Set OW_Stop_Cast[(Load 1 of (Key (Triggering unit)) from OW_Table)] = True




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



Else - Actions


-------- ------------------------- --------
Magic of the Frozen Stone

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Magic of the Frozen Stone

Actions


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



If - Conditions




OW_Index[1] Equal to 0



Then - Actions




Trigger - Turn on Magic of the Frozen Stone Loop <gen>



Else - Actions


Set OW_Index[1] = (OW_Index[1] + 1)


Set OW_Index[2] = (OW_Index[2] + 1)


Set OW_Counter[OW_Index[2]] = 0


Set OW_Stop_Cast[OW_Index[2]] = False


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


Set OW_Caster[OW_Index[2]] = (Triggering unit)


Hashtable - Save OW_Index[2] as 1 of (Key (Triggering unit)) in OW_Table


Trigger - Add to OW Table and Stuff <gen> the event (Unit - OW_Caster[OW_Index[2]] Stops casting an ability)


Set OW_Owner[OW_Index[2]] = (Owner of OW_Caster[OW_Index[2]])


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


Set OW_Point_1 = (Target point of ability being cast)


Hashtable - Save (X of OW_Point_1) as 1 of OW_Index[2] in OW_Table


Hashtable - Save (Y of OW_Point_1) as 2 of OW_Index[2] in OW_Table


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


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


Special Effect - Create a special effect at OW_Point_1 using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl


Special Effect - Destroy (Last created special effect)


Unit - Create 1 Frost Orb for OW_Owner[OW_Index[2]] at OW_Point_1 facing Default building facing degrees


Animation - Change (Last created unit) flying height to 300.00 at 900.00


Unit - Turn collision for (Last created unit) Off


Unit - Add a 4.00 second Healing Ward expiration timer to (Last created unit)


Hashtable - Save Handle Of(Last created unit) as 4 of OW_Index[2] in OW_Table


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


Set OW_Times = 100


Set OW_Distance = 100.00


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


For each (Integer OW_Integ[OW_Index[2]]) from 1 to 2, do (Actions)



Loop - Actions




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




Set OW_Degrees = (120.00 x (Real(OW_Integ[OW_Index[2]])))




Set OW_Point_2 = (OW_Point_1 offset by OW_Distance towards OW_Degrees degrees)




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




Unit - Create 1 Frost Effect for OW_Owner[OW_Index[2]] at OW_Point_2 facing ((180.00 x (Real(OW_Integ[OW_Index[2]]))) - 90.00) degrees




Unit - Turn collision for (Last created unit) Off




Animation - Change (Last created unit) flying height to 300.00 at 0.00




Hashtable - Save Handle Of(Last created unit) as OW_Integ[OW_Index[2]] of OW_Index[2] in OW_Table




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




Custom script: call RemoveLocation(udg_OW_Point_2)


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


Custom script: set bj_wantDestroyGroup = true


Unit Group - Pick every unit in (Units within (110.00 + (20.00 x (Real((Level of OW_Ability for OW_Caster[OW_Index[2]]))))) of OW_Point_1 matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of OW_Owner[OW_Index[2]]) Equal to True) and (((Matching and do (Actions)



Loop - Actions




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




Unit - Cause OW_Caster[OW_Index[2]] to damage (Picked unit), dealing (150.00 + (25.00 x (Real((Level of OW_Ability for OW_Caster[OW_Index[2]]))))) damage of attack type Spells and damage type Cold




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




Set OW_Point_3 = (Position of (Picked unit))




Unit - Create 1 Frost Nova for OW_Owner[OW_Index[2]] at OW_Point_3 facing Default building facing degrees




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




Unit - Add Magic of the Frozen Stone Slow to (Last created unit)




Unit - Set level of Magic of the Frozen Stone Slow for (Last created unit) to (Level of OW_Ability for OW_Caster[OW_Index[2]])




Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)




Custom script: call RemoveLocation(udg_OW_Point_3)




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


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


Custom script: call RemoveLocation(udg_OW_Point_1)


-------- ------------------------- --------
Magic of the Frozen Stone Loop

Events


Time - Every 0.04 seconds of game time

Conditions

Actions


For each (Integer OW_Index[3]) from 1 to OW_Index[2], do (Actions)



Loop - Actions




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





If - Conditions






OW_Counter[OW_Index[3]] Less than OW_Times





Then - Actions






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






Set OW_Counter[OW_Index[3]] = (OW_Counter[OW_Index[3]] + 1)






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






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







If - Conditions








OW_Stop_Cast[OW_Index[3]] Equal to False







Then - Actions








For each (Integer OW_Integ[OW_Index[3]]) from 1 to 2, do (Actions)









Loop - Actions










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










Set OW_Effect = (Load OW_Integ[OW_Index[3]] of OW_Index[3] in OW_Table)










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










Set OW_Point_1 = (Point((Load 1 of OW_Index[3] from OW_Table), (Load 2 of OW_Index[3] from OW_Table)))










Set OW_Distance = (100.00 - (0.40 x (Real(OW_Counter[OW_Index[3]]))))










Set OW_Degrees = ((180.00 x (Real(OW_Integ[OW_Index[3]]))) + (9.60 x (Real(OW_Counter[OW_Index[3]]))))










Set OW_Point_2 = (OW_Point_1 offset by OW_Distance towards OW_Degrees degrees)










Set OW_Angle = (Angle from OW_Point_1 to OW_Point_2)










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










Unit - Move OW_Effect instantly to OW_Point_2, facing (OW_Angle - 90.00) degrees










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










Custom script: call RemoveLocation(udg_OW_Point_1)










Custom script: call RemoveLocation(udg_OW_Point_2)








For each (Integer OW_Integ[OW_Index[3]]) from 1 to 15, do (Actions)









Loop - Actions










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











If - Conditions












OW_Counter[OW_Index[3]] Equal to (5 x OW_Integ[OW_Index[3]])











Then - Actions












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












Set OW_Point_1 = (Point((Load 1 of OW_Index[3] from OW_Table), (Load 2 of OW_Index[3] from OW_Table)))












Set OW_Degrees = (144.00 x (Real(OW_Integ[OW_Index[3]])))












Set OW_Distance = (Random real number between 200.00 and 400.00)












Set OW_Point_2 = (OW_Point_1 offset by OW_Distance towards OW_Degrees degrees)












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












Unit - Create 1 Frost Effect for OW_Owner[OW_Index[3]] at OW_Point_1 facing OW_Degrees degrees












Animation - Change (Last created unit) flying height to 300.00 at 0.00












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












Unit - Add Magic of the Frozen Stone Bombs to (Last created unit)












Unit - Set level of Magic of the Frozen Stone Bombs for (Last created unit) to (Level of OW_Ability for OW_Caster[OW_Index[3]])












Unit - Order (Last created unit) to Neutral Tinker - Cluster Rockets OW_Point_2












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












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












Unit - Create 1 Frost Nova for OW_Owner[OW_Index[3]] at OW_Point_2 facing OW_Degrees degrees












Unit - Set the custom value of (Last created unit) to (Level of OW_Ability for OW_Caster[OW_Index[3]])












Unit - Add a (Square root((((OW_Distance x OW_Distance) + 90000.00) / 250000.00))) second Generic expiration timer to (Last created unit)












Unit - Hide (Last created unit)












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












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












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












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












Custom script: call RemoveLocation(udg_OW_Point_1)












Custom script: call RemoveLocation(udg_OW_Point_2)












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












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











Else - Actions








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









If - Conditions










OW_Counter[OW_Index[3]] Equal to OW_Times









Then - Actions










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










Animation - Reset OW_Caster[OW_Index[3]]'s animation










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










Set OW_Effect = (Load 4 of OW_Index[3] in OW_Table)










Unit - Kill OW_Effect










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










For each (Integer OW_Integ[OW_Index[3]]) from 1 to 2, do (Actions)











Loop - Actions












Set OW_Effect = (Load OW_Integ[OW_Index[3]] of OW_Index[3] in OW_Table)












Unit - Kill OW_Effect










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










Set OW_Index[1] = (OW_Index[1] - 1)










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










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











If - Conditions












OW_Index[1] Equal to 0











Then - Actions












Set OW_Index[2] = 0












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












Trigger - Turn off (This trigger)











Else - Actions









Else - Actions







Else - Actions








Set OW_Counter[OW_Index[3]] = OW_Times








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









If - Conditions










OW_Counter[OW_Index[3]] Equal to OW_Times









Then - Actions










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










Animation - Reset OW_Caster[OW_Index[3]]'s animation










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










Set OW_Effect = (Load 4 of OW_Index[3] in OW_Table)










Unit - Kill OW_Effect










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










For each (Integer OW_Integ[OW_Index[3]]) from 1 to 2, do (Actions)











Loop - Actions












Set OW_Effect = (Load OW_Integ[OW_Index[3]] of OW_Index[3] in OW_Table)












Unit - Kill OW_Effect










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










Set OW_Index[1] = (OW_Index[1] - 1)










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










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











If - Conditions












OW_Index[1] Equal to 0











Then - Actions












Set OW_Index[2] = 0












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












Trigger - Turn off (This trigger)











Else - Actions









Else - Actions





Else - Actions