Improving my spell.

Carnerox

The one and only.
Reaction score
84
At the moment my fire nova spell is a very simple stun all units and deal damage, but it's a very boring spell. So is there anyway i can improve the idea of the spell and maybe the code?


JASS:
function Trig_FB_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A00F' //Rawcode.
endfunction

function Trig_FB_Actions takes nothing returns nothing
    local unit c = GetTriggerUnit() //Caster
    local unit d
    local location tp = GetUnitLoc(c) //Postion of Caster.
    local location sp
    local integer start = 1
    local integer end = 36
    loop
        exitwhen start > end
        call CreateNUnitsAtLoc( 1, 'h009', GetOwningPlayer(c), tp, GetUnitFacing(c))
        set d = GetLastCreatedUnit()
        call UnitApplyTimedLifeBJ (2.00, 'BTLF', d)
        call UnitAddAbilityBJ ('A00H', d)
        call SetUnitAbilityLevelSwapped ('A00H', d, GetUnitAbilityLevelSwapped ('A00F', c))
        set sp = PolarProjectionBJ (tp, GetUnitFacing(c), (I2R(start) * 10.00)) //Points that dummy units will fire the nova.
        call IssuePointOrderLoc (d, "carrionswarm", PolarProjectionBJ(tp, 200.00, ((start) * 70.00 )))
        call RemoveLocation (sp)
        set start = start + 1
    endloop
    //Removing leaks and nulling caster/dummy unit.
    call RemoveLocation (tp)
    set c = null
    set d = null
endfunction

//===========================================================================
function InitTrig_FireBlast takes nothing returns nothing
local trigger Fireblast = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ (Fireblast, EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition (Fireblast, Condition( function Trig_FB_Conditions))
    call TriggerAddAction (Fireblast, function Trig_FB_Actions)
endfunction


Thanks! :thup:
 

HydraRancher

Truth begins in lies
Reaction score
197
I believe this belongs in the JASS Help section, unless the main importance of this thread is the "Spell Idea", if so, tell us what the spell actually does. Rather than "fire nova" deals damage stuns. Does it have an AOE, any special extra buffs?
 

tmow

New Member
Reaction score
7
i dont know jass but i can give u some ideas....use the special effect...Neatral building explosion its underspawned effects...also make the damage more creative such as the number of units in that region x4

also u can make the explosion form a design =P
 

Carnerox

The one and only.
Reaction score
84
Rather than "fire nova" deals damage stuns. Does it have an AOE, any special extra buffs?
Yes it has an Aoe.

Kar Everburning builds up the fire in his body, then releases the fire slamming it into the ground stunning all enemy units within the blast. The aftershockk sends out fire bolts that deal damage to any units it passes through.

Level 1 - Deals 250 damage per unit, 2 second stun.
Level 2 - Deals 450 damage per unit, 3 second stun.
Level 3 - Deals 650 damage per unit, 4 second stun.

is what it does.

I just need more ideas for the simple spell :(
 

Laiev

Hey Listen!!
Reaction score
188
[del]Just tested the syntax error, can't test ability because i don't got the dummys and abilitys.[/del] I just remove all BJ's and use global to make more easy to configure


JASS:
scope NewAbility initializer InitTrig
globals
    private constant integer ABIL_ID  = 'A00F'
    private constant integer DUMMY_ID = 'h009'
    private constant integer DABIL_ID = 'A00H'
endglobals
private function Conditions takes nothing returns boolean
    return GetSpellAbilityId() == ABIL_ID
endfunction

private function Actions takes nothing returns nothing
    local unit c = GetTriggerUnit()
    local unit d
    local real x = GetUnitX(c)
    local real y = GetUnitY(c)
    local real lx
    local real ly
    local integer start = 1
    local integer end = 36
    loop
        exitwhen start > end
        set d = CreateUnit(GetOwningPlayer(c), DUMMY_ID, x, y, GetUnitFacing(c))
        call UnitApplyTimedLife(d, 'BTLF', 2.)
        call UnitAddAbility (d, DABIL_ID)
        call SetUnitAbilityLevel (d, DABIL_ID, GetUnitAbilityLevel(c, ABIL_ID))
        set lx = x + 200. * Cos((start * 70) * 3.14 / 180)
        set ly = y + 200. * Sin((start * 70) * 3.14 / 180)
        call IssuePointOrder (d, "carrionswarm", lx, ly)
        set start = start + 1
    endloop
    set c = null
    set d = null
endfunction

//===========================================================================
private function InitTrig takes nothing returns nothing
    local trigger Fireblast = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ (Fireblast, EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition (Fireblast, Condition( function Conditions))
    call TriggerAddAction (Fireblast, function Actions)
endfunction
endscope


EDIT: removed location, using x/y
 

Carnerox

The one and only.
Reaction score
84
base spell was war stomp, dummyspell(firenova) was carrionswarm and the dummy unit was a normal ol dummyunit.
 

watermelon

New Member
Reaction score
2
I just wanted to say that Laiev's code is nice, but there is no real need for the location tp. Just use x and y.
If you're extremely crazy about accuracy, you can also inline bj_DEGTORAD.
 

Tyman2007

Ya Rly >.
Reaction score
74
[ljass] set lx = GetLocationX(tp) + 200. * Cos((start * 70) * bj_DEGTORAD)
[/ljass]
[ljass]bj_DEGTORAD[/ljass]
So much better looking to just do [ljass]Cos((start * 70) * 3.14 / 180)[/ljass]

Get into technical terms

3.1415926535897 / 180 for a more exact answer :p
 

Laiev

Hey Listen!!
Reaction score
188
I just wanted to say that Laiev's code is nice, but there is no real need for the location tp. Just use x and y.
If you're extremely crazy about accuracy, you can also inline bj_DEGTORAD.

not matter what i do, i'll need a location or a return location, more easy to use the location... I know, not too safe but oh well...

and about the DEGTORAD i don't check the value in newgen :p forgive me about this :rolleyes:
 

watermelon

New Member
Reaction score
2
not matter what i do, i'll need a location or a return location, more easy to use the location... I know, not too safe but oh well...

and about the DEGTORAD i don't check the value in newgen :p forgive me about this :rolleyes:

Sorry, but isn't tp referring to the location of the caster? If it is, then why couldn't you just use the variables x and y which already refer to the caster's coordinates?

@Undead.Cow Just look at Tyman2007's post. If you don't want to calculate Pi/180 then here it is in numerical value: 0.017453293
 

Laiev

Hey Listen!!
Reaction score
188
updated, now don't use location, i think now is good :p

PS: [del]not[/del] tested and work :)

EDITED.
 
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