Spell Fountain of Fire

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
Fountain of Fire

fountainoffire.jpg


Spell Info(Most people love this:eek:) :
GUI/Jass/vJass : vJass
MUI/non-MUI : MUI
System required : PUI

vJass here :
JASS:

/////////////////////////////////////////////////////////////////////////////////////////////
//        *     *      *                                                                   //
//      *    *  *   *    *                 kingking present :                              //
//    *       * * *        *                FOUNTAIN OF FIRE                               //
//   *         ~*~~         *                                                              //
//  *         | *  |         *                Caster concentrates his fire energy          //
//  *         | *  |          *                 to rip out waves of fire.                  //
// *          | *  |           *                                                           //
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     Requires : Jass NewGen Pack v5d                    //
//                                                 PUI by Cohadar                          //
//  Implement instruction :                                                                //
//  1) Copy this trigger.                                                                  //
//  2) Copy PUI(If you don't have or already have another similar system)                  //
//  3) Copy dummy in Object Editor. (If you don't have)                                    //
//  4) Copy ability in Object Editor.                                                      //
//  5) Adjust the rawcode to match your map.                                               //
//  6) You may adjust the constants to meet your needs.                                    //
//  7) Put the ability on a unit, save the map and enjoy it!                               //
//                                                                                         //
//                                                                                         //
//  Current version : 2.0                                                                  //
/////////////////////////////////////////////////////////////////////////////////////////////
scope VolcanoEruption initializer Init

globals
    //Ability's Settings//////
    private constant integer ABIL_ID = 'A000'
    private constant integer DUMMY_ID = 'n000'
    private constant integer ORDER_ID = 852221//Order Id of ability. =)
    private constant real RIP_OUT_RATE = .1
    private constant real MANA_PER_BOLT = 2. //MANA_PER_BOLT * Level = Mana needed to fire a bolt
    //////////////////////////
    //Dummy's Settings////////
    private constant real SLIDE_PERIOD = .03125
    private constant real MAX_AOE = 600.
    private constant real MAX_DUMMY_HEIGHT = 500.
    private constant integer SLIDE_TICKS = 20 //Range * SLIDE_TICKS = Distance travelled by dummy
    private constant real ANGLE_INCREASEMENT = 20.
    private constant real AOE_INCREASEMENT = 50.
   ///////////////////////////
   //Damage Settings//////////
    private constant real DAMAGE = 20. //DAMAGE * Level = Total damage
    private constant real DAMAGE_AOE = 150.
    private constant attacktype ATK_TYPE = ATTACK_TYPE_NORMAL
    private constant damagetype DMG_TYPE = DAMAGE_TYPE_NORMAL
    private constant weapontype WPN_TYPE = null //Just for sound.
    //////////////////////////
    //Eye Candy Settings//////
    private constant string GROUND_FIRE_EFFECT = "Abilities\\Spells\\Human\\FlameStrike\\FlameStrikeTarget.mdl"
    private constant string GROUND_TEXTURE = "Textures\\VolcanoMed.blp"
    private constant string FIRE_BALL = "Abilities\\Weapons\\RedDragonBreath\\RedDragonMissile.mdl"
    //////////////////////////
endglobals
//==============================No more touching, children..===============================\\
private struct Data
    unit cs
    player p
    integer lvl
    real x
    real y
    real dmg
    real manaPerBolt
    real range
    effect e
    real angle
    boolean stop
    
    method onDestroy takes nothing returns nothing
        call DestroyEffect(.e)
    endmethod
endstruct

private struct DummyData
    unit cs
    unit dummy
    player p
    effect e
    real x
    real y
    real angle
    real range
    real totalrange
    real dis
    real cos
    real sin
    real dmg
    integer ticks
    
    method onDestroy takes nothing returns nothing
        call KillUnit(.dummy)
        call DestroyEffect(.e)
    endmethod
endstruct

private function GetParabolaZ takes real x,real d,real h returns real
    return 4 * h * x * (d - x) / (d * d)
endfunction

globals//locals
    private boolexpr PickUnitz // Pick and Damage =D
    private group G = CreateGroup()
    private unit U
    private integer tempdata
    private integer array CasterData
    private integer Id
endglobals

globals//Caster Struct Stack?
    private timer RipTimer = CreateTimer()
    private integer array RipData
    private integer RipCounter = 0
endglobals

globals//Dummy Struct Stack?
    private timer SlideTimer = CreateTimer()
    private integer array SlideData
    private integer SlideCounter = 0
endglobals

private function DamageUnits takes nothing returns boolean
    set U = GetFilterUnit()
    if GetWidgetLife(U) > .405 and IsUnitEnemy(U,DummyData(tempdata).p) then
        call UnitDamageTarget(DummyData(tempdata).cs,U,DummyData(tempdata).dmg,false,false,ATK_TYPE,DMG_TYPE,WPN_TYPE)
    endif
    return false
endfunction

private function Slide takes nothing returns nothing
    local integer N_Slide = SlideCounter
    local DummyData dd
    loop
    exitwhen N_Slide == 0
        set dd = SlideData[N_Slide]
        if dd.ticks > 0 then
            set dd.ticks = dd.ticks - 1
            set dd.x = dd.x + dd.cos
            set dd.y = dd.y + dd.sin
            set dd.dis = dd.dis + dd.range
            call SetUnitPosition(dd.dummy,dd.x,dd.y)
            call SetUnitFlyHeight(dd.dummy,GetParabolaZ(dd.dis,dd.totalrange,MAX_DUMMY_HEIGHT),0.)
        else
            set tempdata = dd
            call GroupEnumUnitsInRange(G,dd.x,dd.y,DAMAGE_AOE,PickUnitz)
            call dd.destroy()
            set SlideData[N_Slide] = SlideData[SlideCounter]
            set SlideCounter = SlideCounter - 1
        endif
        set N_Slide = N_Slide - 1
    endloop
    if SlideCounter == 0 then
        call PauseTimer(SlideTimer)
    endif
endfunction

private function CreateFire takes Data d, real ang returns nothing
    local DummyData dd = DummyData.create()
    set dd.x = d.x
    set dd.y = d.y
    set dd.p = d.p
    set dd.cs = d.cs
    set dd.dmg = d.dmg
    set dd.ticks = SLIDE_TICKS
    set dd.range = d.range / dd.ticks
    set dd.angle = d.angle + ang
    set dd.dummy = CreateUnit(dd.p,DUMMY_ID,dd.x,dd.y,dd.angle)
    set dd.cos = dd.range * Cos(dd.angle * .0175)
    set dd.sin = dd.range * Sin(dd.angle * .0175)
    set dd.totalrange = dd.ticks * dd.range
    set dd.dis = 0.
    set dd.e = AddSpecialEffectTarget(FIRE_BALL,dd.dummy,"origin")
    set SlideCounter = SlideCounter + 1
    set SlideData[SlideCounter] = dd
    if SlideCounter == 1 then
        call TimerStart(SlideTimer,SLIDE_PERIOD,true,function Slide)
    endif
endfunction

private function Rip takes nothing returns nothing
    local integer N_Rip = RipCounter
    local Data d
    local DummyData dd
    loop
    exitwhen N_Rip == 0
        set d = RipData[N_Rip]
        if GetUnitCurrentOrder(d.cs) == ORDER_ID and GetUnitState(d.cs,UNIT_STATE_MANA) > d.manaPerBolt and not d.stop then
            if d.range < 0. or d.range > MAX_AOE then
                set d.range = 0.
            endif
            set d.range = d.range + AOE_INCREASEMENT
            if d.angle > 360. then
                set d.angle = 0.
            endif
            set d.angle = d.angle + ANGLE_INCREASEMENT
            call CreateFire(d,0.)
            call CreateFire(d,180.)
            call SetUnitState(d.cs,UNIT_STATE_MANA,GetUnitState(d.cs,UNIT_STATE_MANA) - d.manaPerBolt)
        else
            if not d.stop then
                set CasterData[GetUnitIndex(d.cs)] = 0
            endif
            call d.destroy()
            set RipData[N_Rip] = RipData[RipCounter]
            set RipCounter = RipCounter - 1
        endif
        set N_Rip = N_Rip - 1
    endloop
    if RipCounter == 0 then
        call PauseTimer(RipTimer)
    endif
endfunction

private function Act takes nothing returns nothing
    local Data d = Data.create()
    set d.cs = GetTriggerUnit()
    set d.x = GetUnitX(d.cs)
    set d.y = GetUnitY(d.cs)
    set d.p = GetOwningPlayer(d.cs)
    set d.lvl = GetUnitAbilityLevel(d.cs,ABIL_ID)
    set d.dmg = DAMAGE * d.lvl
    set d.manaPerBolt = MANA_PER_BOLT + d.lvl
    set d.e = AddSpecialEffect(GROUND_FIRE_EFFECT,d.x,d.y)
    set d.angle = GetRandomReal(0.,360.)
    set d.range = 0.
    set d.stop = false
    set Id = GetUnitIndex(d.cs)
    if CasterData[Id] != 0 then
        set Data(CasterData[Id]).stop = true
    endif
    set CasterData[Id] = d
    set RipCounter = RipCounter + 1
    set RipData[RipCounter] = d
    if RipCounter == 1 then
        call TimerStart(RipTimer,RIP_OUT_RATE,true,function Rip)
    endif
endfunction

private function Cond takes nothing returns boolean
    return GetSpellAbilityId() == ABIL_ID
endfunction

private function Init takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_CHANNEL)
    call TriggerAddCondition(t,Condition(function Cond))
    call TriggerAddAction(t,function Act)
    set PickUnitz = Condition(function DamageUnits)//Pick and damage. =D
endfunction
endscope


As usual, map is attached :
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
This volcano eruption lacks serious volcano!
Caster concentrates his fire energy to cause underground volcano erupts. :cool:
Since there said is underground, Can we see the volcano?
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
Quite intense effect spam I must say.
Well, ERUPTION_RATE is adjustable :D
 

039-issac

New Member
Reaction score
1
nice spell
have to say it looks like a flame strike on roids, creating a actual mini volcano would look cooler, and shouldnt be too hard to add to add in code wise
 

Jesus4Lyf

Good Idea™
Reaction score
397
Hang on.

This just spits little balls out everywhere. I see naught that's volcano about it. The damage stuff seems to be poor - doesn't seem to effectively deal anything.

I'd much rather see a mountain raise and and dummy units with immolation slides down or something.

I think this headed to the graveyard (my current opinion).
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
Just wake up.. Hmm, changed some part of code...

Update : Now need PUI, bug found. :(
Changed dummies' model, fps won't drop so much now.
 
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