Hell Storm Init

Events


Map initialization

Conditions

Actions


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


-------- After importing this spell, you might need to sets these variables again --------


Set Hs_ability = Hell Storm


Set Hs_dummyType = Hell Storm Dummy


Set Hs_loopTrigger = Hell Storm Loop <gen>


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


-------- Determines the Area of Effect (AoE) --------


Set Hs_areaEffect[1] = 600.00


Set Hs_areaEffect[2] = 600.00


Set Hs_areaEffect[3] = 600.00


Set Hs_areaEffect[4] = 600.00


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


-------- Determines the spell duration --------


Set Hs_duration[1] = 10.00


Set Hs_duration[2] = 10.00


Set Hs_duration[3] = 10.00


Set Hs_duration[4] = 10.00


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


-------- Determines the border ball model --------


Set Hs_bBallModel = Abilities\Weapons\FireBallMissile\FireBallMissile.mdl


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


-------- Determines the border ball scale size --------


Set Hs_bBallScale[1] = 1.00


Set Hs_bBallScale[2] = 1.05


Set Hs_bBallScale[3] = 1.10


Set Hs_bBallScale[4] = 1.15


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


-------- Determines the border ball minimum height --------


Set Hs_bBallMinHeight = 50.00


-------- Determines the border ball maximum height --------


Set Hs_bBallMaxHeight = 200.00


-------- Note: The border ball flying height will be differently randomized between these 2 values when it spawns --------


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


-------- Determines border ball spinning speed --------


Set Hs_bBallSpinSpeed[1] = 5.00


Set Hs_bBallSpinSpeed[2] = 6.00


Set Hs_bBallSpinSpeed[3] = 7.00


Set Hs_bBallSpinSpeed[4] = 8.00


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


-------- Does the border ball spin clockwise? --------


Set Hs_bBallSpinClockwise = False


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


-------- Determines the border ball Damage Over Time (DOT) that damage any unit that comes near --------


Set Hs_bBallDOT[1] = 2.00


Set Hs_bBallDOT[2] = 4.00


Set Hs_bBallDOT[3] = 6.00


Set Hs_bBallDOT[4] = 8.00


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


-------- Determines the border ball DOT range --------


Set Hs_bBallDOTRange[1] = 75.00


Set Hs_bBallDOTRange[2] = 100.00


Set Hs_bBallDOTRange[3] = 125.00


Set Hs_bBallDOTRange[4] = 150.00


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


-------- Determines the effect spawn on units that are being damaged --------


Set Hs_bBallDOTEffect = Abilities\Spells\Items\AIfb\AIfbSpecialArt.mdl


-------- Determines the effect attachment point --------


Set Hs_bBallDOTPoint = chest


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


-------- Determines the number of the border ball --------


Set Hs_bBallNumber[1] = 10


Set Hs_bBallNumber[2] = 14


Set Hs_bBallNumber[3] = 18


Set Hs_bBallNumber[4] = 22


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


-------- Determines the border ball death time --------


Set Hs_bBallDeathTime = 0.50


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


-------- Determines the rain ball model --------


Set Hs_rBallModel = Abilities\Weapons\PhoenixMissile\Phoenix_Missile_mini.mdl


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


-------- Determines the rain ball scale size --------


Set Hs_rBallScale[1] = 1.00


Set Hs_rBallScale[2] = 1.00


Set Hs_rBallScale[3] = 1.00


Set Hs_rBallScale[4] = 1.00


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


-------- Determines the rain ball starting height --------


Set Hs_rBallStartHeight = 600.00


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


-------- Determines the rain ball starting distance from its target --------


Set Hs_rBallStartDistance = 200.00


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


-------- Determines the rain ball spawn interval --------


Set Hs_rBallSpawnInterval[1] = 0.20


Set Hs_rBallSpawnInterval[2] = 0.20


Set Hs_rBallSpawnInterval[3] = 0.20


Set Hs_rBallSpawnInterval[4] = 0.20


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


-------- Determines the rain ball falling speed --------


Set Hs_rBallFallSpeed[1] = 30.00


Set Hs_rBallFallSpeed[2] = 30.00


Set Hs_rBallFallSpeed[3] = 30.00


Set Hs_rBallFallSpeed[4] = 30.00


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


-------- Determines the rain ball death time --------


Set Hs_rBallDeathTime = 0.50


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


-------- Determines the rain ball explosion model --------


Set Hs_rBallExplodeEffect = Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl


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


-------- Determines the rain ball explosion damage --------


Set Hs_rBallExplodeDamage[1] = 50.00


Set Hs_rBallExplodeDamage[2] = 100.00


Set Hs_rBallExplodeDamage[3] = 150.00


Set Hs_rBallExplodeDamage[4] = 200.00


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


-------- Determines the rain ball explosion range --------


Set Hs_rBallExplodeRange[1] = 200.00


Set Hs_rBallExplodeRange[2] = 200.00


Set Hs_rBallExplodeRange[3] = 200.00


Set Hs_rBallExplodeRange[4] = 200.00


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


-------- Determines the spark effect that randomly spawns inside the targeted area --------


Set Hs_sparkEffect = Abilities\Spells\Other\Doom\DoomDeath.mdl


-------- Determines the spark effect spawn interval --------


Set Hs_sparkEffectInterval = 0.25


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


-------- Damage magic immune units? --------


Set Hs_damageMagicImmune = False


-------- Damage ally units? --------


Set Hs_damageAlly = False


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


-------- Determines the attack type --------


Set Hs_attackType = Spells


-------- Determines the damage type --------


Set Hs_damageType = Fire


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


-------- Determines the loop timer speed --------


Set Hs_loopSpeed = 0.03


-------- Note: I recommend you not to change this, but for some reason i leave this configurable for those who might need this somehow --------


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


-------- Do not change anything below this line if don't know what you're doing --------


-------- =========================================================================== --------


Trigger - Add to Hs_loopTrigger the event (Time - Every Hs_loopSpeed seconds of game time)


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



If - Conditions




Hs_bBallSpinClockwise Equal to True



Then - Actions




Set Hs_rotateAngle = -90.00




For each (Integer Hs_index) from 1 to 4, do (Actions)





Loop - Actions






Custom script: set udg_Hs_bBallSpinSpeed[udg_Hs_index]=-udg_Hs_bBallSpinSpeed[udg_Hs_index]



Else - Actions




Set Hs_rotateAngle = 90.00


Set Hs_speed[0] = (Hs_rBallStartHeight x Hs_loopSpeed)
Hell Storm Cast

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Hs_ability

Actions


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



If - Conditions




Hs_maxIndex Equal to 0



Then - Actions




Trigger - Turn on Hs_loopTrigger



Else - Actions


Set Hs_maxIndex = (Hs_maxIndex + 1)


Set Hs_caster[Hs_maxIndex] = (Triggering unit)


Set Hs_owner[Hs_maxIndex] = (Triggering player)


Set Hs_level[Hs_maxIndex] = (Level of Hs_ability for Hs_caster[Hs_maxIndex])


Set Hs_realTimer[Hs_maxIndex] = Hs_duration[Hs_level[Hs_maxIndex]]


Set Hs_realTimer2[Hs_maxIndex] = Hs_rBallSpawnInterval[Hs_level[Hs_maxIndex]]


Set Hs_realTimer3[Hs_maxIndex] = Hs_sparkEffectInterval


Set Hs_offset[Hs_maxIndex] = (Hs_areaEffect[Hs_level[Hs_maxIndex]] - Hs_rBallExplodeRange[Hs_level[Hs_maxIndex]])


Set Hs_targetLoc[Hs_maxIndex] = (Target point of ability being cast)


Set Hs_loopID[Hs_maxIndex] = 3


Set Hs_casterIndex = Hs_maxIndex


Set Hs_creationAngle = (Random angle)


Set Hs_creationGapAngle = (360.00 / (Real(Hs_bBallNumber[Hs_level[Hs_casterIndex]])))


Set Hs_offset[0] = (Hs_areaEffect[Hs_level[Hs_casterIndex]] - Hs_bBallDOTRange[Hs_level[Hs_casterIndex]])


For each (Integer Hs_index) from 1 to Hs_bBallNumber[Hs_level[Hs_casterIndex]], do (Actions)



Loop - Actions




Set Hs_creationAngle = (Hs_creationAngle + Hs_creationGapAngle)




Set Hs_tempLoc = (Hs_targetLoc[Hs_casterIndex] offset by Hs_offset[0] towards Hs_creationAngle degrees)




Set Hs_maxIndex = (Hs_maxIndex + 1)




Unit - Create 1 Hs_dummyType for Hs_owner[Hs_casterIndex] at Hs_tempLoc facing (Hs_creationAngle + Hs_rotateAngle) degrees




Set Hs_dummy[Hs_maxIndex] = (Last created unit)




Custom script: call SetUnitScale(udg_Hs_dummy[udg_Hs_maxIndex],udg_Hs_bBallScale[udg_Hs_level[udg_Hs_casterIndex]],0,0)




Special Effect - Create a special effect attached to the origin of Hs_dummy[Hs_maxIndex] using Hs_bBallModel




Set Hs_model[Hs_maxIndex] = (Last created special effect)




Set Hs_caster[Hs_maxIndex] = Hs_caster[Hs_casterIndex]




Set Hs_owner[Hs_maxIndex] = Hs_owner[Hs_casterIndex]




Set Hs_level[Hs_maxIndex] = Hs_level[Hs_casterIndex]




Set Hs_realTimer[Hs_maxIndex] = Hs_realTimer[Hs_casterIndex]




Set Hs_moveAngle[Hs_maxIndex] = Hs_creationAngle




Set Hs_offset[Hs_maxIndex] = Hs_offset[0]




Set Hs_targetX[Hs_maxIndex] = (X of Hs_targetLoc[Hs_casterIndex])




Set Hs_targetY[Hs_maxIndex] = (Y of Hs_targetLoc[Hs_casterIndex])




Set Hs_loopID[Hs_maxIndex] = 1




Custom script: if UnitAddAbility(udg_Hs_dummy[udg_Hs_maxIndex],'Amrf') and UnitRemoveAbility(udg_Hs_dummy[udg_Hs_maxIndex],'Amrf') then




Custom script: endif




Animation - Change Hs_dummy[Hs_maxIndex] flying height to (Random real number between Hs_bBallMinHeight and Hs_bBallMaxHeight) at 0.00




Custom script: call RemoveLocation(udg_Hs_tempLoc)
Hell Storm Loop

Events

Conditions

Actions


For each (Integer Hs_index) from 1 to Hs_maxIndex, do (Actions)



Loop - Actions




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





If - Conditions






Hs_loopID[Hs_index] Equal to 1





Then - Actions






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







If - Conditions








Hs_realTimer[Hs_index] Greater than 0.00







Then - Actions








Set Hs_moveAngle[Hs_index] = (Hs_moveAngle[Hs_index] + Hs_bBallSpinSpeed[Hs_level[Hs_index]])








Custom script: set udg_Hs_moveAngle[0]=udg_Hs_moveAngle[udg_Hs_index]*bj_DEGTORAD








Custom script: set udg_Hs_moveX=udg_Hs_targetX[udg_Hs_index]+udg_Hs_offset[udg_Hs_index]*Cos(udg_Hs_moveAngle[0])








Custom script: set udg_Hs_moveY=udg_Hs_targetY[udg_Hs_index]+udg_Hs_offset[udg_Hs_index]*Sin(udg_Hs_moveAngle[0])








Set Hs_tempLoc = (Point(Hs_moveX, Hs_moveY))








Unit - Make Hs_dummy[Hs_index] face Hs_tempLoc over 0.00 seconds








Custom script: call SetUnitX(udg_Hs_dummy[udg_Hs_index],udg_Hs_moveX)








Custom script: call SetUnitY(udg_Hs_dummy[udg_Hs_index],udg_Hs_moveY)








Set Hs_tempGroup = (Units within Hs_bBallDOTRange[Hs_level[Hs_index]] of Hs_tempLoc)








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









Loop - Actions










Set Hs_pickedUnit = (Picked unit)










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











If - Conditions












(Hs_pickedUnit is dead) Equal to False












(Hs_pickedUnit is A structure) Equal to False












(Hs_pickedUnit is A flying unit) Equal to False












(Hs_pickedUnit is Magic Immune) Equal to Hs_damageMagicImmune












(Hs_pickedUnit belongs to an ally of Hs_owner[Hs_index]) Equal to Hs_damageAlly











Then - Actions












Unit - Cause Hs_caster[Hs_index] to damage Hs_pickedUnit, dealing Hs_bBallDOT[Hs_level[Hs_index]] damage of attack type Hs_attackType and damage type Hs_damageType












Special Effect - Create a special effect attached to the Hs_bBallDOTPoint of Hs_pickedUnit using Hs_bBallDOTEffect












Special Effect - Destroy (Last created special effect)











Else - Actions








Custom script: call DestroyGroup(udg_Hs_tempGroup)








Custom script: call RemoveLocation(udg_Hs_tempLoc)








Set Hs_realTimer[Hs_index] = (Hs_realTimer[Hs_index] - Hs_loopSpeed)







Else - Actions








Special Effect - Destroy Hs_model[Hs_index]








Unit - Add a Hs_bBallDeathTime second Generic expiration timer to Hs_dummy[Hs_index]








Set Hs_loopID[Hs_index] = 4





Else - Actions






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







If - Conditions








Hs_loopID[Hs_index] Equal to 2







Then - Actions








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









If - Conditions










Hs_height[Hs_index] Greater than 0.00









Then - Actions










Set Hs_height[Hs_index] = (Hs_height[Hs_index] - Hs_rBallFallSpeed[Hs_level[Hs_index]])










Animation - Change Hs_dummy[Hs_index] flying height to Hs_height[Hs_index] at 0.00










Custom script: set udg_Hs_moveX=GetUnitX(udg_Hs_dummy[udg_Hs_index])+udg_Hs_speed[udg_Hs_index]*Cos(3.142)










Custom script: set udg_Hs_moveY=GetUnitY(udg_Hs_dummy[udg_Hs_index])+udg_Hs_speed[udg_Hs_index]*Sin(3.142)










Custom script: call SetUnitX(udg_Hs_dummy[udg_Hs_index],udg_Hs_moveX)










Custom script: call SetUnitY(udg_Hs_dummy[udg_Hs_index],udg_Hs_moveY)









Else - Actions










Special Effect - Destroy Hs_model[Hs_index]










Set Hs_tempLoc = (Position of Hs_dummy[Hs_index])










Special Effect - Create a special effect at Hs_tempLoc using Hs_rBallExplodeEffect










Special Effect - Destroy (Last created special effect)










Set Hs_tempGroup = (Units within Hs_rBallExplodeRange[Hs_level[Hs_index]] of Hs_tempLoc)










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











Loop - Actions












Set Hs_pickedUnit = (Picked unit)












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













If - Conditions














(Hs_pickedUnit is dead) Equal to False














(Hs_pickedUnit is A flying unit) Equal to False














(Hs_pickedUnit is Magic Immune) Equal to Hs_damageMagicImmune














(Hs_pickedUnit belongs to an ally of Hs_owner[Hs_index]) Equal to Hs_damageAlly













Then - Actions














Unit - Cause Hs_caster[Hs_index] to damage Hs_pickedUnit, dealing Hs_rBallExplodeDamage[Hs_level[Hs_index]] damage of attack type Hs_attackType and damage type Hs_damageType













Else - Actions










Custom script: call RemoveLocation(udg_Hs_tempLoc)










Unit - Add a Hs_rBallDeathTime second Generic expiration timer to Hs_dummy[Hs_index]










Set Hs_loopID[Hs_index] = 4







Else - Actions








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









If - Conditions










Hs_loopID[Hs_index] Equal to 3









Then - Actions










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











If - Conditions












Hs_realTimer[Hs_index] Greater than 0.00











Then - Actions












Set Hs_realTimer2[Hs_index] = (Hs_realTimer2[Hs_index] - Hs_loopSpeed)












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













If - Conditions














Hs_realTimer2[Hs_index] Less than or equal to 0.00













Then - Actions














Set Hs_realTimer2[Hs_index] = Hs_rBallSpawnInterval[Hs_level[Hs_index]]














Set Hs_creationAngle = (Random angle)














Set Hs_tempLoc = (Hs_targetLoc[Hs_index] offset by (Random real number between 0.00 and Hs_offset[Hs_index]) towards Hs_creationAngle degrees)














Set Hs_tempLoc2 = (Hs_tempLoc offset by Hs_rBallStartDistance towards 0.00 degrees)














Set Hs_maxIndex = (Hs_maxIndex + 1)














Unit - Create 1 Hs_dummyType for Hs_owner[Hs_index] at Hs_tempLoc2 facing 180.00 degrees














Set Hs_dummy[Hs_maxIndex] = (Last created unit)














Custom script: call SetUnitScale(udg_Hs_dummy[udg_Hs_maxIndex],udg_Hs_rBallScale[udg_Hs_level[udg_Hs_index]],0,0)














Special Effect - Create a special effect attached to the origin of Hs_dummy[Hs_maxIndex] using Hs_rBallModel














Set Hs_model[Hs_maxIndex] = (Last created special effect)














Set Hs_caster[Hs_maxIndex] = Hs_caster[Hs_index]














Set Hs_owner[Hs_maxIndex] = Hs_owner[Hs_index]














Set Hs_level[Hs_maxIndex] = Hs_level[Hs_index]














Set Hs_speed[Hs_maxIndex] = (Hs_rBallStartDistance / ((Hs_speed[0] / Hs_rBallFallSpeed[Hs_level[Hs_index]]) / Hs_loopSpeed))














Set Hs_height[Hs_maxIndex] = Hs_rBallStartHeight














Set Hs_distance[Hs_maxIndex] = Hs_rBallStartDistance














Set Hs_loopID[Hs_maxIndex] = 2














Custom script: if UnitAddAbility(udg_Hs_dummy[udg_Hs_maxIndex],'Amrf') and UnitRemoveAbility(udg_Hs_dummy[udg_Hs_maxIndex],'Amrf') then














Custom script: endif














Animation - Change Hs_dummy[Hs_maxIndex] flying height to Hs_rBallStartHeight at 0.00














Custom script: call RemoveLocation(udg_Hs_tempLoc)














Custom script: call RemoveLocation(udg_Hs_tempLoc2)













Else - Actions












Set Hs_realTimer3[Hs_index] = (Hs_realTimer3[Hs_index] - Hs_loopSpeed)












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













If - Conditions














Hs_realTimer3[Hs_index] Less than or equal to 0.00













Then - Actions














Set Hs_realTimer3[Hs_index] = Hs_sparkEffectInterval














Set Hs_tempLoc = (Hs_targetLoc[Hs_index] offset by (Random real number between 0.00 and Hs_areaEffect[Hs_level[Hs_index]]) towards (Random angle) degrees)














Special Effect - Create a special effect at Hs_tempLoc using Hs_sparkEffect














Special Effect - Destroy (Last created special effect)














Custom script: call RemoveLocation(udg_Hs_tempLoc)













Else - Actions












Set Hs_realTimer[Hs_index] = (Hs_realTimer[Hs_index] - Hs_loopSpeed)











Else - Actions












Custom script: call RemoveLocation(udg_Hs_targetLoc[udg_Hs_index])












Set Hs_loopID[Hs_index] = 4









Else - Actions










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











If - Conditions












Hs_loopID[Hs_index] Equal to 4











Then - Actions












Set Hs_caster[Hs_index] = Hs_caster[Hs_maxIndex]












Set Hs_caster[Hs_index] = Hs_caster[Hs_maxIndex]












Set Hs_distance[Hs_index] = Hs_distance[Hs_maxIndex]












Set Hs_dummy[Hs_index] = Hs_dummy[Hs_maxIndex]












Set Hs_height[Hs_index] = Hs_height[Hs_maxIndex]












Set Hs_level[Hs_index] = Hs_level[Hs_maxIndex]












Set Hs_loopID[Hs_index] = Hs_loopID[Hs_maxIndex]












Set Hs_model[Hs_index] = Hs_model[Hs_maxIndex]












Set Hs_moveAngle[Hs_index] = Hs_moveAngle[Hs_maxIndex]












Set Hs_offset[Hs_index] = Hs_offset[Hs_maxIndex]












Set Hs_owner[Hs_index] = Hs_owner[Hs_maxIndex]












Set Hs_realTimer[Hs_index] = Hs_realTimer[Hs_maxIndex]












Set Hs_realTimer2[Hs_index] = Hs_realTimer2[Hs_maxIndex]












Set Hs_realTimer3[Hs_index] = Hs_realTimer3[Hs_maxIndex]












Set Hs_speed[Hs_index] = Hs_speed[Hs_maxIndex]












Set Hs_targetLoc[Hs_index] = Hs_targetLoc[Hs_maxIndex]












Set Hs_targetX[Hs_index] = Hs_targetX[Hs_maxIndex]












Set Hs_targetY[Hs_index] = Hs_targetY[Hs_maxIndex]












Set Hs_maxIndex = (Hs_maxIndex - 1)












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













If - Conditions














Hs_maxIndex Equal to 0













Then - Actions














Trigger - Turn off (This trigger)













Else - Actions














Set Hs_index = (Hs_index - 1)











Else - Actions