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.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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