Spell Ice Pillar

BRUTAL

I'm working
Reaction score
118
Ice Pillar

Requires AIDS, Damage, Event, GTrigger, Key Timers 2; all included in the map.

Spell Description: Sub-Zero shoots out ice from underneath the target throwing the target in the air and freezing the target.

Screen Shots:
13838224.png

ip2b.png

ip3.png

JASS:
// Ice Pillar by BRUTAL.
// Requires AIDS, Damage, Event, GT, and KT2.
// Credits are welcome but not necessary.
// October 12th 2009.

scope icepillar initializer init

globals
    private constant integer ID='A000' // ID of the ice pillar spell.
    private constant integer ID2='A001' // ID of the freeze-stun spell that DUMMY will cast on the target.
    private constant integer DUMMY_ID='h000' // ID of the blizzard unit.
    private constant integer DUMMY_ID2='h001' // ID of the ice unit.
    private constant integer DUMMY_ID3='h002' // ID of the global DUMMY unit.
    private constant integer BUFF='B000' // ID of the freeze-stun buff.
    private constant integer PILLARS=8 // The number of pillars shot up.
    private constant real PILLAR_DIS=75. // How far pillars are created from the target point.
    private constant real PERIOD=.02 // Period of the KT2 timer.
    private constant real SPEED=1500. // How fast the unit is pushed back when attacked.
    private constant real SCALE_BLIZ=1.5 // Scale size of the blizzard unit.
    private constant real SCALE_ICE=.6 // Scale size of the ice unit.
    private constant string SOUND="Abilities\\Spells\\Undead\\FreezingBreath\\FreezingBreathTarget1.wav" 
    // The sound that is played when the target is frozen.
    private constant boolean DODGEABLE=false // Setting this to false will stun the target instantly
    // when the spell is casted, thus making the spell undodgeable. If left on true, the target unit will be stunned
    // if it is within AOE of its original position at spell cast.
        private constant real AOE=125. // Applies only if DODGEABLE is set to true, otherwise ignore this.
        // This is the AOE that the target unit must be within from the point the target was at spell cast.
    private unit DUMMY // The global dummy unit.
    private real MapMaxX
    private real MapMaxY
    private real MapMinX
    private real MapMinY
    private integer filter
endglobals

private function DAMAGE takes unit u, integer level returns real
    return 100.+GetHeroStr(u,true)*level // Damage the target receives when it is shot up.
endfunction

private function LANDDAMAGE takes nothing returns real
    return 50. // Damage the target receives from hitting the ground.
endfunction

private function Fly takes unit u, real h, real r returns nothing
    call UnitAddAbility(u,'Amrf') // Adds crow form to whatever unit, then sets
    call SetUnitFlyHeight(u,h,r)  // the height and rate, then remove crow form.
    call UnitRemoveAbility(u,'Amrf')
endfunction

private function Text takes unit u, real damage returns nothing 
    local texttag tt=CreateTextTag() // This creates floating text.
    if u!=null then
        call SetTextTagText(tt,I2S(R2I(damage)),.023)
        call SetTextTagPosUnit(tt,u,-125)
        call SetTextTagColor(tt,255,0,0,255)
        call SetTextTagPermanent(tt,false)
        call SetTextTagVelocity(tt,0,.044)
        call SetTextTagLifespan(tt,3)
        call SetTextTagFadepoint(tt,2)
    endif
    set tt=null
endfunction

private struct Data
    unit caster
    unit target
    unit ice
    real x
    real y
    real dx
    real dy
    real hittimer=0
    boolean hit=false
    boolean safe=false
    integer ticks=157
    
    static method create takes unit u, unit t returns Data
        local Data data=Data.allocate()
        local integer i=1
        local unit d
        local real angle
        local real x
        local real y
        local real tx=GetUnitX(t)+150*Cos(90*bj_DEGTORAD)
        local real ty=GetUnitY(t)+150*Sin(90*bj_DEGTORAD)
        set data.caster=u
        set data.target=t
        set data.x=GetUnitX(t)
        set data.y=GetUnitY(t)
        if DODGEABLE==false then
            call IssueTargetOrder(DUMMY,"thunderbolt",t)
        endif
        loop
        exitwhen i>PILLARS
            set angle=360/PILLARS*i
            set x=tx+PILLAR_DIS*Cos(angle*bj_DEGTORAD)
            set y=ty+PILLAR_DIS*Sin(angle*bj_DEGTORAD)
            set d=CreateUnit(Player(13),DUMMY_ID,x,y,bj_UNIT_FACING)
            call SetUnitScale(d,SCALE_BLIZ,SCALE_BLIZ,SCALE_BLIZ)
            call UnitApplyTimedLife(d,'BTLF',1)
            set i=i+1
        endloop
        set d=null
        return data
    endmethod
    
    static method damage takes nothing returns nothing
        local real x
        local real y
        local real cx
        local real cy
        local real dx
        local real dy
        if GetEventDamageSource()==Data(filter).caster and GetTriggerUnit()==Data(filter).target and Data(filter).safe==true and Data(filter).ticks<=125 then 
            set x=GetUnitX(Data(filter).target)
            set y=GetUnitY(Data(filter).target)
            set cx=GetUnitX(Data(filter).caster)
            set cy=GetUnitY(Data(filter).caster)
            set dx=x-cx
            set dy=y-cy
            set Data(filter).dx=(SPEED*PERIOD)*Cos(Atan2(dy,dx))
            set Data(filter).dy=(SPEED*PERIOD)*Sin(Atan2(dy,dx))
            call SetUnitTimeScale(Data(filter).target,1)
            call Fly(Data(filter).ice,0,450)
            call Fly(Data(filter).target,0,450)
            set Data(filter).hit=true
            set Data(filter).safe=false
            set Data(filter).ticks=9
            call KillUnit(Data(filter).ice)
        endif
    endmethod
    
    method move takes nothing returns nothing
        local real dmg=DAMAGE(.caster,GetUnitAbilityLevel(.caster,ID))
        local real dmg2=LANDDAMAGE()
        local sound s
        local real x=GetUnitX(.target)
        local real y=GetUnitY(.target)
        set filter=this
        if .ticks==136 then
            if .x-x*.x-x+.y-y*.y-y<=AOE*AOE then
                if DODGEABLE==true then
                    call IssueTargetOrder(DUMMY,"thunderbolt",.target)
                endif
                set s=CreateSound(SOUND,false,false,false,10,10,"")
                call StartSound(s)
                call AttachSoundToUnit(s,.target)
                call KillSoundWhenDone(s)
                set s=null
                call Damage_Spell(.caster,.target,dmg)
                call Text(.target,dmg)
                if GetWidgetLife(.target)<=.405 then
                    set .ticks=0
                else
                    set .safe=true
                    set .ice=CreateUnit(Player(13),DUMMY_ID2,x,y,124)
                    call SetUnitScale(.ice,SCALE_ICE,SCALE_ICE,SCALE_ICE)
                    call Fly(.ice,150,450)
                    call Fly(.target,150,450)
                    call UnitApplyTimedLife(.ice,'BTLF',3)
                    call SetUnitTimeScale(.target,0)
                endif
            else
                set .ticks=0
            endif
        endif
        if .hit==true then
            set x=x+.dx
            set y=y+.dy
            if x>MapMaxX or x<MapMinX then
                set .dx=-.dx
            endif
            if y>MapMaxY or y<MapMinY then
                set .dy=-.dy
            endif
            call SetUnitX(.target,x)
            call SetUnitY(.target,y)
            call SetUnitX(.ice,x)
            call SetUnitY(.ice,y)
            if .hittimer==.12 then
               call Damage_Pure(.caster,.target,dmg2)
               call Text(.target,dmg2)
               call UnitRemoveAbility(Data(filter).target,BUFF)
            endif
            set .hittimer=.hittimer+.02
        endif
    endmethod
    
    method end takes nothing returns nothing
        call Fly(.ice,0,450)
        call Fly(.target,0,450)
        call SetUnitTimeScale(.target,1)
        call KillUnit(.ice)
        set .hit=false
        set .safe=false
    endmethod
endstruct

private function PeriodicFunc takes nothing returns boolean
    local Data data=KT_GetData()
    set data.ticks=data.ticks-1
    if data.ticks<=0 then  
        call data.end()
        return true
    else
        call data.move()
        return false
    endif  
endfunction 

private function actions takes nothing returns nothing
    call KT_Add(function PeriodicFunc,Data.create(GetTriggerUnit(),GetSpellTargetUnit()),PERIOD)
endfunction

private function init takes nothing returns nothing
    local trigger t=CreateTrigger()
    call TriggerAddAction(GT_RegisterStartsEffectEvent(CreateTrigger(),ID),function actions)
    call Damage_RegisterEvent(t)
    call TriggerAddAction(t,function Data.damage)
    set DUMMY=CreateUnit(Player(0),DUMMY_ID3,0,0,0)
    call UnitAddAbility(DUMMY,ID2)
    set MapMaxX=GetRectMaxX(bj_mapInitialPlayableArea)
    set MapMaxY=GetRectMaxY(bj_mapInitialPlayableArea)
    set MapMinX=GetRectMinX(bj_mapInitialPlayableArea)
    set MapMinY=GetRectMinY(bj_mapInitialPlayableArea)  
endfunction

endscope


Sub-Zero's Ice Pillar ability recreated.
Feedback is welcomed, if you see any bugs or mistakes let me know.
DL the map.
 

Attachments

  • Ice Pillar.w3x
    84.5 KB · Views: 457

The Undaddy

Creating with the power of rage
Reaction score
55
Nice spell.
Though somehow (couldn't do it twice o_O?) I managed to bug a troll stay airborne :D. You might want to look into that.I'll post a screenie if you like ;)
 

BRUTAL

I'm working
Reaction score
118
well if it only happened once maybe it was a weird thing?XD
but ya send some screenys
 

UndeadDragon

Super Moderator
Reaction score
447
Looks very nice! Also, you managed to do it in GUI. GJ :)
 
1

131ackout

Guest
Brutal,

Can you make the nova spell makes the unit goes to fly which takes the damage and then hits onto ground that still take damage & nova damage

or is it same ?
 

BRUTAL

I'm working
Reaction score
118
so your asking if i can make it so that it damages while going up then get damage when it goes down? ..and nova damage too? lol
 

BRUTAL

I'm working
Reaction score
118
goddam, ><
i was looking at the code for this spell and its not mui and everything was like wrong, didnt anyone look at the code :p
im gona upload the fixed version.
 

BRUTAL

I'm working
Reaction score
118
Bump.
Uses one global dummy unit to stun.
Has option to make spell dodgeable or not.
Remade the whole spell in vJass, tell me what you think. :p

Also, I was thinking about adding an effect for when the target hits the ground, but I can't think of anything good.
Any ideas?
 

Azlier

Old World Ghost
Reaction score
461
Switching to GT and KT (or possibly T32) could attract the attention of certain people with certain powers.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • 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 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