Moderator
M
Moderator
Spell v1.0 | Reviewed by Maker | 29th Sep 2013 | ||||
| APPROVED | ||||
|
HB Settings

Events


Time - Elapsed game time is 0.20 seconds

Conditions

Actions


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


-------- Leave This (changing them might cause problems) --------


Hashtable - Create a hashtable


Set HB_Table = (Last created hashtable)


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


-------- Damage (Scaling is the ammount increased per level) --------


Set HB_DamageBase = 25.00


Set HB_DamageScaling = 50.00


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


-------- Speed (Pro speed is for the projectile / Eff speed is the circling bolts) --------


Set HB_Eff_Speed = 20.00


Set HB_Pro_Speed = 15.00


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


-------- Area of Effect (Range of area on impact) --------


Set HB_AoE = 200.00


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


-------- Bolt Size (Influence Lesser bolts distance to main bolt and impact radius) --------


Set HB_Range = 40.00
HB Cast

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Holy Bolt

Actions


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


-------- Setting initial Variables (do not change anything in this trigger) --------


Set HB_Caster = (Triggering unit)


Set HB_Target = (Target unit of ability being cast)


Set HB_Point[2] = (Position of HB_Caster)


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


-------- Creating Dummies (do not change anything in this trigger) --------


Unit - Create 1 Holy Projectile for (Owner of HB_Caster) at HB_Point[2] facing Default building facing degrees


Set HB_HPUnit = (Last created unit)


Unit Group - Add HB_HPUnit to HB_HPGroup[1]


Set HB_Handle = (Last created unit)


For each (Integer HB_Integer) from 1 to 6, do (Actions)



Loop - Actions




Set HB_Point[(HB_Integer + 2)] = (HB_Point[2] offset by HB_Range towards ((Real(HB_Integer)) x 60.00) degrees)




Unit - Create 1 Lesser Projectile for (Owner of HB_Caster) at HB_Point[(HB_Integer + 2)] facing Default building facing degrees




Set HB_LPUnit[HB_Integer] = (Last created unit)




Hashtable - Save Handle OfHB_LPUnit[HB_Integer] as HB_Integer of (Key HB_Handle) in HB_Table


Hashtable - Save Handle OfHB_Caster as 7 of (Key HB_Handle) in HB_Table


Hashtable - Save Handle OfHB_Target as 8 of (Key HB_Handle) in HB_Table


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


-------- Removing Leaks and starts loop (do not change anything in this trigger) --------


Trigger - Turn on HB Loop <gen>


For each (Integer HB_Integer) from 2 to 8, do (Actions)



Loop - Actions




Custom script: call RemoveLocation(udg_HB_Point[udg_HB_Integer])
HB Loop

Events


Time - Every 0.04 seconds of game time

Conditions

Actions


Unit Group - Pick every unit in HB_HPGroup[1] and do (Actions)



Loop - Actions




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




-------- Loading Units From Table (do not change anything in this trigger) --------




Set HB_Handle = (Picked unit)




Set HB_HPUnit = (Picked unit)




For each (Integer HB_Integer) from 1 to 6, do (Actions)





Loop - Actions






Set HB_LPUnit[HB_Integer] = (Load HB_Integer of (Key HB_Handle) in HB_Table)




Set HB_Caster = (Load 7 of (Key HB_Handle) in HB_Table)




Set HB_Target = (Load 8 of (Key HB_Handle) in HB_Table)




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




-------- Creating points (do not change anything in this trigger) --------




Set HB_Point[2] = (Position of HB_HPUnit)




Set HB_Point[9] = (Position of HB_Target)




Set HB_Point[1] = (HB_Point[2] offset by HB_Pro_Speed towards (Angle from HB_Point[2] to HB_Point[9]) degrees)




For each (Integer HB_Integer) from 1 to 6, do (Actions)





Loop - Actions






Set HB_Point[(HB_Integer + 9)] = (Position of HB_LPUnit[HB_Integer])






Set HB_Point[(HB_Integer + 2)] = (HB_Point[1] offset by 40.00 towards ((Angle from HB_Point[2] to HB_Point[(HB_Integer + 9)]) + HB_Eff_Speed) degrees)




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




-------- Moving Units (do not change anything in this trigger) --------




Custom script: call SetUnitX(udg_HB_HPUnit, GetLocationX(udg_HB_Point[1]))




Custom script: call SetUnitY(udg_HB_HPUnit, GetLocationY(udg_HB_Point[1]))




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




Custom script: call SetUnitX(udg_HB_LPUnit[1], GetLocationX(udg_HB_Point[3]))




Custom script: call SetUnitY(udg_HB_LPUnit[1], GetLocationY(udg_HB_Point[3]))




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




Custom script: call SetUnitX(udg_HB_LPUnit[2], GetLocationX(udg_HB_Point[4]))




Custom script: call SetUnitY(udg_HB_LPUnit[2], GetLocationY(udg_HB_Point[4]))




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




Custom script: call SetUnitX(udg_HB_LPUnit[3], GetLocationX(udg_HB_Point[5]))




Custom script: call SetUnitY(udg_HB_LPUnit[3], GetLocationY(udg_HB_Point[5]))




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




Custom script: call SetUnitX(udg_HB_LPUnit[4], GetLocationX(udg_HB_Point[6]))




Custom script: call SetUnitY(udg_HB_LPUnit[4], GetLocationY(udg_HB_Point[6]))




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




Custom script: call SetUnitX(udg_HB_LPUnit[5], GetLocationX(udg_HB_Point[7]))




Custom script: call SetUnitY(udg_HB_LPUnit[5], GetLocationY(udg_HB_Point[7]))




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




Custom script: call SetUnitX(udg_HB_LPUnit[6], GetLocationX(udg_HB_Point[8]))




Custom script: call SetUnitY(udg_HB_LPUnit[6], GetLocationY(udg_HB_Point[8]))




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




-------- Checking Impact (You can change the number (2) to 1 if you want the bolt to impact at a longer distance) --------




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





If - Conditions






(Distance between HB_Point[1] and HB_Point[9]) Less than or equal to (HB_Range / 2.00)





Then - Actions






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






-------- Damage and Removing units (do not change anything in this trigger) --------






Set HB_HPGroup[2] = (Units within HB_AoE of HB_Point[9] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of HB_Caster)) Equal to True))))






Unit Group - Pick every unit in HB_HPGroup[2] and do (Actions)







Loop - Actions








Unit - Cause HB_Caster to damage (Picked unit), dealing (HB_DamageBase + (HB_DamageScaling x (Real((Level of Holy Bolt for HB_Caster))))) 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\Items\StaffOfPurification\PurificationTarget.mdl








Special Effect - Destroy (Last created special effect)






Unit - Remove HB_HPUnit from the game






For each (Integer HB_Integer) from 1 to 6, do (Actions)







Loop - Actions








Unit - Remove HB_LPUnit[HB_Integer] from the game






Special Effect - Create a special effect at HB_Point[9] using Abilities\Spells\Items\StaffOfPurification\PurificationCaster.mdl






Special Effect - Destroy (Last created special effect)






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






-------- Removing leaks and ends loop (do not change anything in this trigger) --------






Custom script: call DestroyGroup(udg_HB_HPGroup[2])






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







If - Conditions








(Number of units in HB_HPGroup[1]) Less than 1







Then - Actions








Trigger - Turn off (This trigger)







Else - Actions





Else - Actions






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






-------- Check if target is alive (do not change anything in this trigger) --------






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







If - Conditions








(HB_Target is dead) Equal to True







Then - Actions








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








-------- Removing units (do not change anything in this trigger) --------








Unit - Remove HB_HPUnit from the game








For each (Integer HB_Integer) from 1 to 6, do (Actions)









Loop - Actions










Unit - Remove HB_LPUnit[HB_Integer] from the game








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








-------- Removing leaks and ends loop (do not change anything in this trigger) --------








Custom script: call DestroyGroup(udg_HB_HPGroup[2])








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









If - Conditions










(Number of units in HB_HPGroup[1]) Less than 1









Then - Actions










Trigger - Turn off (This trigger)









Else - Actions







Else - Actions




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




-------- Removing leaks (do not change anything in this trigger) --------




For each (Integer HB_Integer) from 1 to 15, do (Actions)





Loop - Actions






Custom script: call RemoveLocation(udg_HB_Point[udg_HB_Integer])