Init

Events


Map initialization

Conditions

Actions


Visibility - Disable fog of war


Visibility - Disable black mask


Set WMax = 2


Set WRecycledList[0] = WLastRecycled


For each (Integer A) from 1 to WMax, do (Actions)



Loop - Actions




Custom script: set udg_WDummyGroup[GetForLoopIndexA()] = CreateGroup()


-------- Configurables on each level --------


-------- Damage is dealt by every 0.03 second interval --------


-------- If you set the blades to a high value, it could make massive lag --------


-------- Level 1 --------


Set Damage[1] = 1.00


Set Duration[1] = 3.00


Set Blades[1] = 3


-------- Level 2 --------


Set Damage[2] = 2.00


Set Duration[2] = 4.00


Set Blades[2] = 4


-------- Level 3 --------


Set Damage[3] = 3.00


Set Duration[3] = 5.00


Set Blades[3] = 5
Windcutter

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Windcutter

Actions


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



If - Conditions




WHas[WLastRecycled] Equal to True



Then - Actions




Set WMax = (WMax + 1)




Set WLastRecycled = WMax




Set WIndex = WLastRecycled




Set WLastRecycled = WRecycledList[WLastRecycled]




Custom script: set udg_WDummyGroup[udg_WIndex] = CreateGroup()



Else - Actions




Set WIndex = WLastRecycled




Set WLastRecycled = WRecycledList[WLastRecycled]


Set WCaster[WIndex] = (Triggering unit)


Set WTargetPoint[WIndex] = (Target point of ability being cast)


Set WDamage[WIndex] = Damage[(Level of Windcutter for WCaster[WIndex])]


Set WTimer[WIndex] = Duration[(Level of Windcutter for WCaster[WIndex])]


Set WBlades = Blades[(Level of Windcutter for WCaster[WIndex])]


For each (Integer A) from 1 to WBlades, do (Actions)



Loop - Actions




Set TempPoint = (WTargetPoint[WIndex] offset by 150.00 towards ((360.00 / (Real(WBlades))) x (Real((Integer A)))) degrees)




Unit - Create 1 Wind for (Owner of WCaster[WIndex]) at TempPoint facing ((Angle from WTargetPoint[WIndex] to TempPoint) + 90.00) degrees




Unit Group - Add (Last created unit) to WDummyGroup[WIndex]




Animation - Change (Last created unit)'s animation speed to (Random real number between 25.00 and 50.00)% of its original speed




Unit - Create 1 Windcutter for (Owner of WCaster[WIndex]) at TempPoint facing ((Angle from WTargetPoint[WIndex] to TempPoint) + 90.00) degrees




Unit Group - Add (Last created unit) to WDummyGroup[WIndex]




Custom script: call RemoveLocation (udg_TempPoint)


Set WHas[WIndex] = True


Set WCount = (WCount + 1)


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



If - Conditions




(Windcutter Loop <gen> is on) Equal to False



Then - Actions




Trigger - Turn on Windcutter Loop <gen>




Trigger - Turn on Crush Effect <gen>



Else - Actions
Windcutter Loop

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


For each (Integer WInteger) from 0 to WMax, do (Actions)



Loop - Actions




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





If - Conditions






WHas[WInteger] Equal to True





Then - Actions






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







If - Conditions








WTimer[WInteger] Greater than 0.00







Then - Actions








Set WTimer[WInteger] = (WTimer[WInteger] - 0.03)








Custom script: set bj_wantDestroyGroup = true








Unit Group - Pick every unit in (Units within 400.00 of WTargetPoint[WInteger] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Ow and do (Actions)









Loop - Actions










Unit - Cause WCaster[WInteger] to damage (Picked unit), dealing WDamage[WInteger] damage of attack type Spells and damage type Normal








Unit Group - Pick every unit in WDummyGroup[WInteger] and do (Actions)









Loop - Actions










Set TempPoint = (Position of (Picked unit))










Set TempPoint2 = (WTargetPoint[WInteger] offset by 150.00 towards ((Angle from WTargetPoint[WInteger] to TempPoint) + 10.00) degrees)










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











If - Conditions












(Unit-type of (Picked unit)) Equal to Wind











Then - Actions












Set TempPoint3 = (WTargetPoint[WInteger] offset by (Random real number between 300.00 and 350.00) towards ((Angle from WTargetPoint[WInteger] to TempPoint) + 10.00) degrees)












Unit - Move (Picked unit) instantly to TempPoint3, facing ((Angle from WTargetPoint[WInteger] to TempPoint) + 90.00) degrees












Custom script: call RemoveLocation (udg_TempPoint3)











Else - Actions












Unit - Move (Picked unit) instantly to TempPoint2, facing ((Angle from WTargetPoint[WInteger] to TempPoint2) + 90.00) degrees










Custom script: call RemoveLocation (udg_TempPoint)










Custom script: call RemoveLocation (udg_TempPoint2)







Else - Actions








Unit Group - Pick every unit in WDummyGroup[WInteger] and do (Unit - Kill (Picked unit))








Set WHas[WInteger] = False








Set WCount = (WCount - 1)








Custom script: call RemoveLocation (udg_WTargetPoint[udg_WInteger])








Unit Group - Remove all units from WDummyGroup[WInteger]








Set WRecycledList[WInteger] = WLastRecycled








Set WLastRecycled = WInteger








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









If - Conditions










WCount Equal to 0









Then - Actions










Trigger - Turn off (This trigger)










Trigger - Turn off Crush Effect <gen>









Else - Actions





Else - Actions
Crush Effect

Events


Time - Every 0.50 seconds of game time

Conditions

Actions


For each (Integer WInteger) from 1 to WMax, do (Actions)



Loop - Actions




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





If - Conditions






WHas[WInteger] Equal to True





Then - Actions






Custom script: set bj_wantDestroyGroup = true






Unit Group - Pick every unit in (Units within 400.00 of WTargetPoint[WInteger] matching ((((Matching unit) belongs to an enemy of (Owner of WCaster[WInteger])) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A structure) Equal to False) and (((Matchi and do (Actions)







Loop - Actions








Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\CrushingWave\CrushingWaveDamage.mdl








Special Effect - Destroy (Last created special effect)





Else - Actions