Spell Blast Hexagon

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

RedRage

New Member
Reaction score
7
Your spell leaks... I don't have time too look for it, but one of the "hexagon parts" doesn't get removed
 

0zaru

Learning vJASS ;)
Reaction score
60
leak here..:
Code:
Unit - Create 1 BlastDummy for (Owner of BH_Caster) at [COLOR="Red"](BH_Targ offset by 450.00 towards (Random angle) degrees)[/COLOR] facing Default building facing degrees
 

NapaHero

Back from the dead...
Reaction score
43
And here:

Code:
Unit Group - Pick every unit in BH_UnitGroup and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Distance between BH_Targ and [B](Position of (Picked unit)))[/B] 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
                    Else - Actions
                        Do nothing
I suggest you to look at Leak Remove tutorials. Anyway, looks cool.
 

Darkchaoself

What is this i dont even
Reaction score
106
leak here..:
Code:
Unit - Create 1 BlastDummy for (Owner of BH_Caster) at [COLOR="Red"](BH_Targ offset by 450.00 towards (Random angle) degrees)[/COLOR] facing Default building facing degrees
And here:

Code:
Unit Group - Pick every unit in BH_UnitGroup and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Distance between BH_Targ and [B](Position of (Picked unit)))[/B] 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
                    Else - Actions
                        Do nothing
I suggest you to look at Leak Remove tutorials. Anyway, looks cool.
Yea, i know about leaks, just careless mistakes. I;m to lazy to fix before submission :rolleyes: Ill fix when i get a chance
 

Sim

Forum Administrator
Staff member
Reaction score
532
Nice spell! Very original.

Try to fix the leaks though ;)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    363 bots on the forum been like that for about a month this is the most bots we have ever consistently hosted
  • The Helper The Helper:
    and we are on cloud flare too right?
  • Stephen Stephen:
    Probably stupid AI garbage. It's harvesting our Nuon knowledge.
  • Stephen Stephen:
    The bots I mean.
  • The Helper The Helper:
    I suspect AI Bots as well
  • The Helper The Helper:
    Happy Saturday!!!
    +1
  • The Helper The Helper:
    I reorganized the forums somewhat but I doubt anyone would notice
  • The Helper The Helper:
    Happy Friday!
    +1
  • The Helper The Helper:
    Happy Saturday!
    +1
  • The Helper The Helper:
    The forum software says we have 554 members online now. We did not have that many unique visitors the whole day today. Too many bots and the disconnect between the forum counts and the stats.
  • Varine Varine:
    Currently it says 413 guests and 2 members
    +1
  • Varine Varine:
    Aww
  • The Helper The Helper:
    That is going to be mostly bots
  • The Helper The Helper:
    527 (members: 2, guests: 525)
  • The Helper The Helper:
    Happy Saturday!
    +1
  • V-SNES V-SNES:
    Happy Saturday!
    +1
  • The Helper The Helper:
    622 (members: 2, guests: 620)
  • The Helper The Helper:
    666 (members: 4, guests: 662) :)
    +1
  • Varine Varine:
    609 (members: 4, guests: 605)
  • The Helper The Helper:
    I was posting that last one because the 666 users online :)
    +1
  • The Helper The Helper:
    Happy Wednesday Night!
    +1
  • The Helper The Helper:
    Happy Thursday!
    +1
  • The Helper The Helper:
    Marathon watching The Expanse!
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    leaving for the weekend in San Antonio will be gone until Sunday afternoon
    +1

    The Helper Discord

    Members online

    No members online now.

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top