Spellpack Single target and AOE divine shield; Mass Hex&Sleep

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
This spell pack (If I can say so), contains 2 spell: Single Target Divine Shield and Multi Target Divine shield. (Meaning they are targetable). Thanks to Sfilip, who withstand my stupid mistakes and questions and for helping me to understand, how to remove bj functions. I have to mention the fact, these are my first JASS spells.:eek:

BTNDivineInterventioncopy.jpg


Multi Target Divine Shield

An impenetrable shield surrounds the targeted units, protecting them from all damage and spells for a set amount of time.

[Level 1]

Mana - 125
Duration - 15 seconds
Area of effect - 200
Cooldown - 45 seconds

[Level 2]

Mana - 125
Duration - 30 seconds
Area of effect - 200
Cooldown - 60 seconds

[Level 3]

Mana - 125
Duration - 45 seconds
Area of effect - 200
Cooldown - 75 seconds

BTNDivineInterventioncopy.jpg


Single Target Divine Shield

An impenetrable shield surrounds the targeted unit, protecting it from all damage and spells for a set amount of time.

[Level 1]

Mana - 50
Duration - 15 seconds
Cooldown - 35 seconds

[Level 2]

Mana - 50
Duration - 30 seconds
Cooldown - 50 seconds

[Level 3]

Mana - 50
Duration - 45 seconds
Cooldown - 65 seconds

BTNHexcopy.jpg


Mass Hex

Transforms the targeted enemy units into random critters, disabling special abilities.

[Level 1]

Mana - 100
Duration - 15 seconds, 4 seconds hero
Area of Effect - 200
Cooldown - 30 seconds

[Level 2]

Mana - 100
Duration - 30 seconds, 5 seconds hero
Area of Effect - 200
Cooldown - 35 seconds

[Level 3]

Mana - 100
Duration - 45 seconds, 6 seconds hero
Area of Effect - 200
Cooldown - 40 seconds

BTNSleepcopy.jpg


Mass Sleep

Puts a targeted enemy units to sleep. A sleeping unit can be awoken by attacking it.

[Level 1]

Mana - 150
Duration - 20 seconds, 5 seconds hero
Area of Effect - 200
Cooldown - 35 seconds

[Level 2]

Mana - 125
Duration - 40 seconds, 10 seconds hero
Area of Effect - 200
Cooldown - 45 seconds

[Level 3]

Mana - 100
Duration - 60 seconds, 15 seconds hero
Area of Effect - 200
Cooldown - 55 seconds

*Includes an aoe template.
 

Attachments

  • Art Spellpack.w3x
    22 KB · Views: 855

SFilip

Gone but not forgotten
Reaction score
633
Nice one, added to the index.
Though there is one little leak you might wanna fix...
The group in the AOE version is never destroyed. You need one call DestroyGroup(e) just before you null it.
 

R@d14nc3

New Member
Reaction score
49
>The group in the AOE version is never destroyed. You need one call DestroyGroup(e) just before you null it.
Lol, so Andrew hasn't mastered GUI at all...
But nice one anyways Thumbs up ;)
 

Chocobo

White-Flower
Reaction score
409
Looked quickly in the map, I found :

Code:
//===========================================================================
// Trigger: Mana
//===========================================================================
function Trig_Mana_Func002A takes nothing returns nothing
    call SetUnitManaPercentBJ( GetEnumUnit(), 100 )
endfunction

function Trig_Mana_Actions takes nothing returns nothing
    set bj_wantDestroyGroup = true
    call ForGroupBJ( udg_heroes_unitgroup, function Trig_Mana_Func002A )
endfunction

//===========================================================================
function InitTrig_Mana takes nothing returns nothing
    set gg_trg_Mana = CreateTrigger(  )
    call TriggerRegisterPlayerChatEvent( gg_trg_Mana, Player(0), "-mana", true )
    call TriggerAddAction( gg_trg_Mana, function Trig_Mana_Actions )
endfunction

//===========================================================================
// Trigger: Life
//===========================================================================
function Trig_Life_Func002A takes nothing returns nothing
    call SetUnitLifePercentBJ( GetEnumUnit(), 100 )
endfunction

function Trig_Life_Actions takes nothing returns nothing
    set bj_wantDestroyGroup = true
    call ForGroupBJ( udg_heroes_unitgroup, function Trig_Life_Func002A )
endfunction

//===========================================================================
function InitTrig_Life takes nothing returns nothing
    set gg_trg_Life = CreateTrigger(  )
    call TriggerRegisterPlayerChatEvent( gg_trg_Life, Player(0), "-life", true )
    call TriggerAddAction( gg_trg_Life, function Trig_Life_Actions )
endfunction

//===========================================================================
// Trigger: Reset
//===========================================================================
function Trig_Reset_Func002A takes nothing returns nothing
    call UnitResetCooldown( GetEnumUnit() )
endfunction

function Trig_Reset_Actions takes nothing returns nothing
    set bj_wantDestroyGroup = true
    call ForGroupBJ( udg_heroes_unitgroup, function Trig_Reset_Func002A )
endfunction

//===========================================================================
function InitTrig_Reset takes nothing returns nothing
    set gg_trg_Reset = CreateTrigger(  )
    call TriggerRegisterPlayerChatEvent( gg_trg_Reset, Player(0), "-reset", true )
    call TriggerAddAction( gg_trg_Reset, function Trig_Reset_Actions )
endfunction


You do not need "set bj_wantDestroyGroup = true" because udg_heroes_unitgroup is already defined.


Code:
globals
    // User-defined
[B]    unit                    udg_a                      = null
    unit                    udg_b                      = null
    real                    udg_c                      = 0
    effect                  udg_d                      = null
    group                   udg_e                      = null[/B]
    group                   udg_heroes_unitgroup       = null

    // Generated
    trigger                 gg_trg_Level_Initialization = null
    trigger                 gg_trg_Mana                = null
    trigger                 gg_trg_Life                = null
    trigger                 gg_trg_Reset               = null
    trigger                 gg_trg_castable_divine     = null
    trigger                 gg_trg_aoe_divine          = null
    unit                    gg_unit_Huth_0018          = null
    unit                    gg_unit_Hapm_0000          = null
    unit                    gg_unit_Hpal_0009          = null
endglobals

You never used a,b,c,d, and e. (UDG_<WHATEVER> I mean)


Code:
//===========================================================================
// Trigger: castable divine
//===========================================================================
function Trig_castable_divine_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A000'
endfunction

function Trig_castable_divine_Actions takes nothing returns nothing
    local unit a = GetTriggerUnit()
    local unit b = GetSpellTargetUnit()
    local real c = ( 15.00 * I2R(GetUnitAbilityLevel( a, 'A000')) )

    call SetUnitInvulnerable( b, true )
    call TriggerSleepAction( c )
    call SetUnitInvulnerable( b, false )

    set a = null
    set b = null
endfunction

//===========================================================================
function InitTrig_castable_divine takes nothing returns nothing
    local integer i = 0
    set gg_trg_castable_divine = CreateTrigger(  )
    loop
        call TriggerRegisterPlayerUnitEvent( gg_trg_castable_divine, Player(i), EVENT_PLAYER_UNIT_SPELL_EFFECT, null )
        set i = i + 1
        exitwhen i == 12
    endloop
    call TriggerAddCondition( gg_trg_castable_divine, Condition( function Trig_castable_divine_Conditions ) )
    call TriggerAddAction( gg_trg_castable_divine, function Trig_castable_divine_Actions )
endfunction
//===========================================================================
// Trigger: aoe divine
//===========================================================================
function Trig_aoe_divine_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A001'
endfunction

function Trig_aoe_divine_Func001A takes nothing returns nothing
    local unit a = GetEnumUnit()
    local unit b = CreateUnit( GetOwningPlayer(GetTriggerUnit()), 'O000', GetUnitX( a ), GetUnitY( a ), 0)
    
    call UnitAddAbility( b, 'A000' )
    call SetUnitAbilityLevel( b, 'A000', GetUnitAbilityLevel(GetTriggerUnit(), 'A001' ) )
    call IssueTargetOrder( b, "frostarmor", a )
    call UnitApplyTimedLife( b, 'BTLF', 1.00 )
    
    set a = null
    set b = null
endfunction

function Trig_aoe_divine_Actions takes nothing returns nothing
    local group e = CreateGroup()
    
    call GroupEnumUnitsInRangeOfLoc(e, GetSpellTargetLoc(), 200.0, null)
    call ForGroup(e, function Trig_aoe_divine_Func001A)
    call DestroyGroup(e)
    
    set e = null
endfunction

//===========================================================================
function InitTrig_aoe_divine takes nothing returns nothing
    local integer i = 0
    set gg_trg_aoe_divine = CreateTrigger(  )
    loop
        call TriggerRegisterPlayerUnitEvent( gg_trg_aoe_divine, Player(i), EVENT_PLAYER_UNIT_SPELL_EFFECT, null )
        set i = i + 1
        exitwhen i == 12
    endloop
    call TriggerAddCondition( gg_trg_aoe_divine, Condition( function Trig_aoe_divine_Conditions ) )
    call TriggerAddAction( gg_trg_aoe_divine, function Trig_aoe_divine_Actions )
endfunction

It can be changed a bit. Here's mine.


Code:
function Trig_castable_divine_Conditions takes nothing returns boolean
    return GetSpellAbilityId()=='A000'
endfunction

function Trig_castable_divine_Actions takes nothing returns nothing
    local unit a=GetTriggerUnit()
    local unit b=GetSpellTargetUnit()
    local real c=(15.*I2R(GetUnitAbilityLevel(a,'A000')))
    call SetUnitInvulnerable(b,true)
    call PolledWait(c)
    call SetUnitInvulnerable(b,false)
    set a=null
    set b=null
endfunction

function InitTrig_castable_divine takes nothing returns nothing
    local integer i=0
    set gg_trg_castable_divine=CreateTrigger()
    loop
        call TriggerRegisterPlayerUnitEvent(gg_trg_castable_divine,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
        set i=i+1
        exitwhen i==12
    endloop
    call TriggerAddCondition(gg_trg_castable_divine,Condition(function Trig_castable_divine_Conditions))
    call TriggerAddAction(gg_trg_castable_divine,function Trig_castable_divine_Actions)
endfunction

function Trig_aoe_divine_Conditions takes nothing returns boolean
    return GetSpellAbilityId()=='A001'
endfunction

function Trig_aoe_divine_Func001A takes nothing returns nothing
    local unit a=GetEnumUnit()
    local unit b=CreateUnit(GetOwningPlayer(GetTriggerUnit()),'O000',GetUnitX(a),GetUnitY(a),0)
    callUnitAddAbility(b,'A000')
    call SetUnitAbilityLevel(b,'A000',GetUnitAbilityLevel(GetTriggerUnit(),'A001'))
    call IssueTargetOrder(b,"frostarmor",a)
    call UnitApplyTimedLife(b,'BTLF',1.)
    set a = null
    set b = null
endfunction

function Trig_aoe_divine_Actions takes nothing returns nothing
    local group e=CreateGroup()
    call GroupEnumUnitsInRangeOfLoc(e,GetSpellTargetLoc(),200.,null)
    call ForGroup(e,function Trig_aoe_divine_Func001A)
    call DestroyGroup(e)
    set e = null
endfunction

function InitTrig_aoe_divine takes nothing returns nothing
    local integer i=0
    set gg_trg_aoe_divine=CreateTrigger()
    loop
        call TriggerRegisterPlayerUnitEvent(gg_trg_aoe_divine,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
        set i=i+1
        exitwhen i==12
    endloop
    call TriggerAddCondition(gg_trg_aoe_divine,Condition(function Trig_aoe_divine_Conditions))
    call TriggerAddAction(gg_trg_aoe_divine,function Trig_aoe_divine_Actions)
endfunction

Changed TriggerSleepAction to PolledWait.
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
Jeah, forgot to delete the special effect variable d. Going to edit it.

EDIT: Added Mass Sleep and Mass Hex.
 

emjlr3

Change can be a good thing
Reaction score
395
ok so, i dont like the fact that you use your single target divine shield trigger in your AOE divine shield trigger

there is no configuration for those who do not know JASS, and those who do would not bother using these, since they could make it on their own

secondly, what may be easier, is to create an AOE template, and allow any type if abil to be used, instead of 3 diff triggers for 3 diff abils

as it is it does not get my aproval

I would suggest removing it from the index SFilip
 

Chocobo

White-Flower
Reaction score
409
REMOVE udg_a, udg_b,udg_c, and udg_e because you never used them.


I've seen you used conversion from GUI to Custom Script, then you removed udg_ (s) , didn't you?


Found no leaks in the script, looks fine.


For mass hex, what about a Hex line? :p (cheapy and very easy).


Just some knowledge you can have :

hex orderId : 852502
sleep orderId : 852227
frostarmor orderId : 852225
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
ok so, i dont like the fact that you use your single target divine shield trigger in your AOE divine shield trigger

there is no configuration for those who do not know JASS, and those who do would not bother using these, since they could make it on their own

secondly, what may be easier, is to create an AOE template, and allow any type if abil to be used, instead of 3 diff triggers for 3 diff abils

as it is it does not get my aproval

I would suggest removing it from the index SFilip

Yeah, I thought about the aoe template. Just added the hex and sleep for bonus. Anyway, these are my first JASS spells and yes, they don not meet the JESP standards.

REMOVE udg_a, udg_b,udg_c, and udg_e because you never used them.


I've seen you used conversion from GUI to Custom Script, then you removed udg_ (s) , didn't you?


Found no leaks in the script, looks fine.


For mass hex, what about a Hex line? :p (cheapy and very easy).


Just some knowledge you can have :

hex orderId : 852502
sleep orderId : 852227
frostarmor orderId : 852225

Yeah, for the single target one. (Its faster [for me] to make and event and a condition(s) and then convert it in JASS than write them from scratch.)

EDIT:

How was I supposed to know, that you don't need to make variables in the variable editor if you use local variables in JASS...
 

emjlr3

Change can be a good thing
Reaction score
395
orderid's do not matter

in anycase, I do not ask that you follow the JESP standard, just that you add a little configuration options, along with some instructions on how to implement.
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
You just converted from GUI to Custom Script and you forget to delete variable. :p

Locals are not Globals.

I just thought I needed them too. No-one told me that if I delete them the trigger still works. I know globals aren't locals. Anyway, lets give this one a rest, the fact is I am a beginner at JASS, and you are not.

orderid's do not matter

in anycase, I do not ask that you follow the JESP standard, just that you add a little configuration options, along with some instructions on how to implement.

It shall be done.

EDIT:

Did it, but tell me if it suits.
 
M

Mysecret

Guest
Well i was trying the spells out and after a while i realised the Dreadlord and Shadow hunter werent moving... I realised that they where still acting like they are about to cast the mass spells even though they already did.:confused:
 
G

Gordrid

Guest
Well i was trying the spells out and after a while i realised the Dreadlord and Shadow hunter werent moving... I realised that they where still acting like they are about to cast the mass spells even though they already did.:confused:

Yea I have that problem as well. The spell isn't even cast when I use the ability. Any ideas on how to correct it?
 

hasslarn

New Member
Reaction score
20
i tryed this spells on ur map they worked fine
when i tryed them on my map
singe target divine didnt work
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
Check if there is any codes in the map header, in that case copy that to your map and try it again.
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
I don't see this submission worthy enough to belong in the approved section, as it was one of my early experimentations with JASS.

Graveyarded until I will release a better version, which fulfills standards.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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