Constant

Events


Map initialization

Conditions

Actions


Set C_BS_Boulder_Smash_Ability = Earth Spirit - Boulder Smash


Set C_BS_Stone_Remnant_Ability = Earth Spirit - Stone Remnant


Set C_BS_Remnant_Type = Stone Remnant


Set C_BS_Dummy = Dummy


Set C_BS_Dummy_Ability = Boulder-Smash Stun


Set C_BS_Bounce_Add = 1


Set C_BS_Bounce_Base = 0


Set C_BS_Damage_Add = 25.00


Set C_BS_Damage_Base = 25.00


Set C_BS_Effect_AOE = 200.00


Set C_BS_Search_Cone = 120.00


Set C_BS_Search_AOE = 100.00


Set C_BS_Distance_Remnant_Y_Base = 2000.00


Set C_BS_Distance_Remnant_Y_Add = 0.00


Set C_BS_Distance_Remnant_N_Base = 400.00


Set C_BS_Distance_Remnant_N_Add = 100.00


Set C_BS_SR_Duration = 120.00


Set C_BS_Speed = 1200.00


Set C_BS_Loop_Interval = 0.03


Set BS_MUI_Index = 0


Trigger - Add to BS Loop <gen> the event (Time - Every C_BS_Loop_Interval seconds of game time)


Trigger - Turn off (This trigger)
Stone Remnant Cast

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to C_BS_Stone_Remnant_Ability

Actions


Set TempLoc00 = (Target point of ability being cast)


Unit - Create 1 C_BS_Remnant_Type for (Triggering player) at TempLoc00 facing (Facing of (Triggering unit)) degrees


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


Unit - Pause (Last created unit)


Animation - Change (Last created unit)'s animation speed to 0.00% of its original speed


Special Effect - Create a special effect at TempLoc00 using abilities\weapons\DemolisherMissile\DemolisherMissile.mdl


Special Effect - Destroy (Last created special effect)


Custom script: call RemoveLocation (udg_TempLoc00)
Cast Cancel

Events


Unit - A unit Begins casting an ability

Conditions


And - All (Conditions) are true



Conditions




(Ability being cast) Equal to C_BS_Boulder_Smash_Ability




((Target unit of ability being cast) is in BS_In_Effect) Equal to True

Actions


Unit - Order (Triggering unit) to Stop
BS Cast

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to C_BS_Boulder_Smash_Ability

Actions


Set BS_MUI_Index = (BS_MUI_Index + 1)


Set BS_Caster[BS_MUI_Index] = (Triggering unit)


Set BS_Level[BS_MUI_Index] = (Level of C_BS_Boulder_Smash_Ability for BS_Caster[BS_MUI_Index])


Set BS_Remnant[BS_MUI_Index] = (Target unit of ability being cast)


Set TempLoc00 = (Position of BS_Caster[BS_MUI_Index])


Set TempLoc01 = (Position of BS_Remnant[BS_MUI_Index])


Set BS_Damage[BS_MUI_Index] = (C_BS_Damage_Base + (C_BS_Damage_Add x (Real(BS_Level[BS_MUI_Index]))))


Set BS_Degrees[BS_MUI_Index] = (Angle from TempLoc00 to TempLoc01)


Set BS_Bounce[BS_MUI_Index] = (C_BS_Bounce_Base + (C_BS_Bounce_Add x BS_Level[BS_MUI_Index]))


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



If - Conditions




(Unit-type of BS_Remnant[BS_MUI_Index]) Equal to Stone Remnant



Then - Actions




Set BS_Count[BS_MUI_Index] = (Integer(((C_BS_Distance_Remnant_Y_Base + (C_BS_Distance_Remnant_Y_Add x (Real(BS_Level[BS_MUI_Index])))) / (C_BS_Speed x C_BS_Loop_Interval))))




Set BS_Is_Remnant[BS_MUI_Index] = True



Else - Actions




Set BS_Count[BS_MUI_Index] = (Integer(((C_BS_Distance_Remnant_N_Base + (C_BS_Distance_Remnant_N_Add x (Real(BS_Level[BS_MUI_Index])))) / (C_BS_Speed x C_BS_Loop_Interval))))




Set BS_Is_Remnant[BS_MUI_Index] = False


Unit Group - Add BS_Remnant[BS_MUI_Index] to BS_Last_Mover[BS_MUI_Index]


Unit Group - Add BS_Remnant[BS_MUI_Index] to BS_In_Effect


Unit - Turn collision for BS_Remnant[BS_MUI_Index] Off


Custom script: call RemoveLocation (udg_TempLoc00)


Custom script: call RemoveLocation (udg_TempLoc01)


Trigger - Turn on BS Loop <gen>
BS Loop

Events

Conditions

Actions


For each (Integer BS_Integer_A) from 1 to BS_MUI_Index, do (Actions)



Loop - Actions




Set BS_Count[BS_Integer_A] = (BS_Count[BS_Integer_A] - 1)




Set TempLoc00 = (Position of BS_Remnant[BS_Integer_A])




Set TempLoc01 = (TempLoc00 offset by (C_BS_Speed x C_BS_Loop_Interval) towards BS_Degrees[BS_Integer_A] degrees)




Unit - Move BS_Remnant[BS_Integer_A] instantly to TempLoc01, facing BS_Degrees[BS_Integer_A] degrees




Special Effect - Create a special effect at TempLoc00 using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl




Special Effect - Destroy (Last created special effect)




Set TempGroup = (Units within C_BS_Effect_AOE of TempLoc00 matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of BS_Caster[BS_Integer_A])) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Ma




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





Loop - Actions






Set Temp_Unit = (Picked unit)






Set TempLoc02 = (Position of Temp_Unit)






Unit Group - Add (Picked unit) to BS_Already_Hit[BS_Integer_A]






Unit - Cause BS_Caster[BS_Integer_A] to damage Temp_Unit, dealing BS_Damage[BS_Integer_A] damage of attack type Magic and damage type Normal






Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Cleave\CleaveDamageTarget.mdl






Special Effect - Destroy (Last created special effect)






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







If - Conditions








And - All (Conditions) are true









Conditions










(Temp_Unit is alive) Equal to True










BS_Is_Remnant[BS_Integer_A] Equal to True







Then - Actions








Unit - Create 1 C_BS_Dummy for (Owner of Temp_Unit) at TempLoc00 facing TempLoc02








Unit - Add C_BS_Dummy_Ability to (Last created unit)








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








Unit - Set level of C_BS_Dummy_Ability for (Last created unit) to BS_Level[BS_Integer_A]








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







Else - Actions






Custom script: call RemoveLocation (udg_TempLoc02)




Custom script: call DestroyGroup (udg_TempGroup)




Custom script: call RemoveLocation (udg_TempLoc01)




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





If - Conditions






BS_Count[BS_Integer_A] Less than or equal to 0





Then - Actions






Unit - Turn collision for BS_Remnant[BS_Integer_A] On






Unit Group - Remove BS_Remnant[BS_Integer_A] from BS_In_Effect






Set BS_Caster[BS_Integer_A] = BS_Caster[BS_MUI_Index]






Set BS_Remnant[BS_Integer_A] = BS_Remnant[BS_MUI_Index]






Set BS_Count[BS_Integer_A] = BS_Count[BS_MUI_Index]






Set BS_Damage[BS_Integer_A] = BS_Damage[BS_MUI_Index]






Set BS_Degrees[BS_Integer_A] = BS_Degrees[BS_MUI_Index]






Set BS_Level[BS_Integer_A] = BS_Level[BS_MUI_Index]






Set BS_Bounce[BS_Integer_A] = BS_Count[BS_MUI_Index]






Set BS_Is_Remnant[BS_Integer_A] = BS_Is_Remnant[BS_MUI_Index]






Unit Group - Remove all units from BS_Already_Hit[BS_Integer_A]






Unit Group - Remove all units from BS_Last_Mover[BS_Integer_A]






Unit Group - Add all units of BS_Already_Hit[BS_MUI_Index] to BS_Already_Hit[BS_Integer_A]






Unit Group - Add all units of BS_Last_Mover[BS_MUI_Index] to BS_Last_Mover[BS_Integer_A]






Unit Group - Remove all units from BS_Already_Hit[BS_MUI_Index]






Unit Group - Remove all units from BS_Last_Mover[BS_MUI_Index]






Set BS_MUI_Index = (BS_MUI_Index - 1)






Set BS_Integer_A = (BS_Integer_A - 1)





Else - Actions






Set TempGroup = (Units within C_BS_Search_AOE of TempLoc00 matching (((Unit-type of (Matching unit)) Equal to C_BS_Remnant_Type) and (((((Matching unit) is alive) Equal to True) and (((Matching unit) is in BS_In_Effect) Equal to False)) and ((((Matching unit) is in BS_Last_M






Set Temp_Unit = No unit






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







Loop - Actions








Set TempLoc01 = (Position of (Picked unit))








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









If - Conditions










And - All (Conditions) are true











Conditions












(Angle from TempLoc00 to TempLoc01) Less than (BS_Degrees[BS_Integer_A] + (C_BS_Search_Cone x 0.50))












(Angle from TempLoc00 to TempLoc01) Greater than (BS_Degrees[BS_Integer_A] - (C_BS_Search_Cone x 0.50))












Temp_Unit Equal to No unit









Then - Actions










Set Temp_Unit = (Picked unit)









Else - Actions








Custom script: call RemoveLocation (udg_TempLoc01)






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







If - Conditions








And - All (Conditions) are true









Conditions










BS_Is_Remnant[BS_Integer_A] Equal to True










Temp_Unit Not equal to No unit







Then - Actions








Unit - Turn collision for BS_Remnant[BS_Integer_A] On








Unit Group - Remove BS_Remnant[BS_Integer_A] from BS_In_Effect








Special Effect - Create a special effect at TempLoc00 using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl








Special Effect - Destroy (Last created special effect)








Set BS_Bounce[BS_Integer_A] = (BS_Bounce[BS_Integer_A] - 1)








Set BS_Remnant[BS_Integer_A] = Temp_Unit








Set TempLoc01 = (Position of BS_Remnant[BS_Integer_A])








Set BS_Count[BS_Integer_A] = (Integer(((C_BS_Distance_Remnant_Y_Base + (C_BS_Distance_Remnant_Y_Add x (Real(BS_Level[BS_MUI_Index])))) / (C_BS_Speed x C_BS_Loop_Interval))))








Set BS_Degrees[BS_Integer_A] = (Angle from TempLoc00 to TempLoc01)








Unit Group - Remove all units from BS_Already_Hit[BS_Integer_A]








Unit Group - Add BS_Remnant[BS_Integer_A] to BS_Last_Mover[BS_Integer_A]








Unit Group - Add BS_Remnant[BS_Integer_A] to BS_In_Effect








Unit - Turn collision for BS_Remnant[BS_Integer_A] Off








Custom script: call RemoveLocation (udg_TempLoc01)








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









If - Conditions










BS_Bounce[BS_Integer_A] Less than 0









Then - Actions










Set TempGroup = (Units within C_BS_Effect_AOE of TempLoc00 matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of BS_Caster[BS_Integer_A])) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Ma










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











Loop - Actions












Set Temp_Unit = (Picked unit)












Set TempLoc02 = (Position of Temp_Unit)












Unit Group - Add (Picked unit) to BS_Already_Hit[BS_Integer_A]












Unit - Cause BS_Caster[BS_Integer_A] to damage Temp_Unit, dealing BS_Damage[BS_Integer_A] damage of attack type Magic and damage type Normal












Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Cleave\CleaveDamageTarget.mdl












Special Effect - Destroy (Last created special effect)












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













If - Conditions














And - All (Conditions) are true















Conditions
















(Temp_Unit is alive) Equal to True
















BS_Is_Remnant[BS_Integer_A] Equal to True













Then - Actions














Unit - Create 1 C_BS_Dummy for (Owner of Temp_Unit) at TempLoc00 facing TempLoc02














Unit - Add C_BS_Dummy_Ability to (Last created unit)














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














Unit - Set level of C_BS_Dummy_Ability for (Last created unit) to BS_Level[BS_Integer_A]














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













Else - Actions












Custom script: call RemoveLocation (udg_TempLoc02)










Custom script: call DestroyGroup (udg_TempGroup)










Unit - Turn collision for BS_Remnant[BS_Integer_A] On










Unit Group - Remove BS_Remnant[BS_Integer_A] from BS_In_Effect










Set BS_Caster[BS_Integer_A] = BS_Caster[BS_MUI_Index]










Set BS_Remnant[BS_Integer_A] = BS_Remnant[BS_MUI_Index]










Set BS_Count[BS_Integer_A] = BS_Count[BS_MUI_Index]










Set BS_Damage[BS_Integer_A] = BS_Damage[BS_MUI_Index]










Set BS_Degrees[BS_Integer_A] = BS_Degrees[BS_MUI_Index]










Set BS_Level[BS_Integer_A] = BS_Level[BS_MUI_Index]










Set BS_Bounce[BS_Integer_A] = BS_Count[BS_MUI_Index]










Set BS_Is_Remnant[BS_Integer_A] = BS_Is_Remnant[BS_MUI_Index]










Unit Group - Remove all units from BS_Already_Hit[BS_Integer_A]










Unit Group - Remove all units from BS_Last_Mover[BS_Integer_A]










Unit Group - Add all units of BS_Already_Hit[BS_MUI_Index] to BS_Already_Hit[BS_Integer_A]










Unit Group - Add all units of BS_Last_Mover[BS_MUI_Index] to BS_Last_Mover[BS_Integer_A]










Unit Group - Remove all units from BS_Already_Hit[BS_MUI_Index]










Unit Group - Remove all units from BS_Last_Mover[BS_MUI_Index]










Set BS_MUI_Index = (BS_MUI_Index - 1)










Set BS_Integer_A = (BS_Integer_A - 1)









Else - Actions







Else - Actions






Custom script: call DestroyGroup (udg_TempGroup)






Set Temp_Unit = No unit




Custom script: call RemoveLocation (udg_TempLoc00)


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



If - Conditions




BS_MUI_Index Less than or equal to 0



Then - Actions




Trigger - Turn off (This trigger)



Else - Actions