Darkchaoself
What is this i dont even
- Reaction score
- 106
Blast Hexagon
MUI: No
JASS: Lol
Leakless: Yes
This is my first actually completed spell ever, be nice
Creates a hexagon of mana, that drains every unit within the hexagon from its mana, and it gives it to the caster.
Level 1- 10 Mana Per Sec
Level 2- 20 Mana Per Sec
Level 3- 30 Mana Per Sec

Code:
Hexagon Blast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Blast Hexagon
Actions
Set BH_Caster = (Casting unit)
Set BH_Targ = (Target point of ability being cast)
For each (Integer A) from 0 to 5, do (Actions)
Loop - Actions
Set BH_Point[(Integer A)] = (BH_Targ offset by 500.00 towards (60.00 x (Real((Integer A)))) degrees)
For each (Integer A) from 0 to 4, do (Actions)
Loop - Actions
Lightning - Create a Drain Mana lightning effect from source BH_Point[(Integer A)] to target BH_Point[((Integer A) + 1)]
Set BH_Lighting[(Integer A)] = (Last created lightning effect)
Lightning - Create a Drain Mana lightning effect from source BH_Point[(Integer A)] to target BH_Point[((Integer A) + 1)]
Set BH_Lighting[((Integer A) + 6)] = (Last created lightning effect)
Lightning - Create a Drain Mana lightning effect from source BH_Point[5] to target BH_Point[0]
Set BH_Lighting[5] = (Last created lightning effect)
Lightning - Create a Drain Mana lightning effect from source BH_Point[5] to target BH_Point[0]
Set BH_Lighting[11] = (Last created lightning effect)
Wait 0.27 game-time seconds
Trigger - Turn on Exit Unit Group <gen>
Set BH_UnitGroup = (Units within 500.00 of BH_Targ matching ((((Matching unit) belongs to an enemy of (Owner of BH_Caster)) Equal to True) and (((Matching unit) is Mechanical) Equal to False)))
Unit Group - Pick every unit in BH_UnitGroup and do (Actions)
Loop - Actions
Set BH_Offset_Angle[(Integer A)] = (BH_Targ offset by 450.00 towards (Random angle) degrees)
Unit - Create 1 BlastDummy for (Owner of BH_Caster) at BH_Offset_Angle[(Integer A)] facing Default building facing degrees
Unit - Add a 5.10 second Generic expiration timer to (Last created unit)
Unit - Set level of SiphonManaDummy for (Last created unit) to (Level of Blast Hexagon for BH_Caster)
Set BH_Dummies[(Integer A)] = (Last created unit)
Unit - Order (Last created unit) to Human Blood Mage - Siphon Mana (Picked unit)
Wait 5.00 seconds
For each (Integer A) from 0 to 15, do (Actions)
Loop - Actions
Lightning - Destroy BH_Lighting[(Integer A)]
For each (Integer A) from 0 to 15, do (Actions)
Loop - Actions
Custom script: call RemoveLocation(udg_BH_Point[bj_forLoopAIndex])
Custom script: call RemoveLocation(udg_BH_Offset_Angle[bj_forLoopAIndex])
Trigger - Turn off Exit Unit Group <gen>
Custom script: call DestroyGroup (udg_BH_UnitGroup)
Custom script: call RemoveLocation (udg_BH_Targ)
Code:
Exit Unit Group
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in BH_UnitGroup and do (Actions)
Loop - Actions
Set ExitUnitGroupUnitPoint = (Position of (Picked unit))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between BH_Targ and ExitUnitGroupUnitPoint) Greater than or equal to 500.00
Then - Actions
Unit Group - Remove (Picked unit) from BH_UnitGroup
Unit - Make (Picked unit) Invulnerable
Set BH_Invuln_Remove = (Picked unit)
Unit - Make BH_Invuln_Remove Vulnerable
Custom script: call RemoveLocation(udg_ExitUnitGroupUnitPoint)
Else - Actions
Custom script: call RemoveLocation(udg_ExitUnitGroupUnitPoint)
Unit - Set mana of BH_Caster to ((Mana of BH_Caster) + ((10.00 x (Real((Level of Blast Hexagon for BH_Caster)))) x (Real((Number of units in BH_UnitGroup)))))
Please comment
Attachments
-
16.7 KB Views: 462