Spellpack Simple DotA Slams

waaaks!

Zinctified
Reaction score
256
MUI
JASS and GUI
Leakless

BTNSeaGiantWarStomp.gif

Ravage (JASS) : Requires New Gen

Slams the ground, causing waves of spikes to ring the hero in all directions. Deals damage and stuns.

Level 1 - Deals 250 damage. 1.2 seconds stun.
Level 2 - Deals 350 damage. 1.5 seconds stun.
Level 3 - Deals 450 damage. 1.8 seconds stun.



JASS:
globals
 constant integer RavSpellId = 'A000' //Ravage Spell Id
 constant integer RavDSpellId = 'A001' //Ravage(Dummy) Spell Id
 constant string RavOrderId = "impale" //Order string of the Ravage(Dummy) Spell
 constant integer RavDummy = 'u001' //Your Dummy unit
endglobals

struct Rdata
 unit caster
 unit dummy
 location loc
 location pol
 integer level
 integer n
endstruct

function Trig_Ravage_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == RavSpellId
endfunction

function Trig_Ravage_Actions takes nothing returns nothing
 local Rdata d = Rdata.create()
 set d.caster = GetTriggerUnit()
 set d.loc = GetUnitLoc(d.caster)
 set d.level = GetUnitAbilityLevel(d.caster, RavSpellId)
 set d.n = 1
 loop
  exitwhen d.n > 36
  set d.pol = PolarProjectionBJ(d.loc, 50.0, 10*d.n)
  set d.dummy = CreateUnit(GetOwningPlayer(d.caster), RavDummy, GetUnitX(d.caster), GetUnitY(d.caster), 10*d.n)
  call UnitApplyTimedLife(d.dummy, 'BTLF', 5.0)
  call UnitAddAbility(d.dummy, RavDSpellId)
  call SetUnitAbilityLevel(d.dummy, RavDSpellId, d.level)
  call IssuePointOrderLoc(d.dummy, RavOrderId, d.pol)
  set d.n = d.n + 1
 endloop
 call d.destroy()
endfunction

//===========================================================================
function InitTrig_Ravage takes nothing returns nothing
    set gg_trg_Ravage = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Ravage, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Ravage, Condition( function Trig_Ravage_Conditions ) )
    call TriggerAddAction( gg_trg_Ravage, function Trig_Ravage_Actions )
endfunction


BTNGolemThunderclap.gif

Reverse Polarity (GUI)

Through some unknown property of matter, the Magnataur sucks all nearby enemies to his position and stuns them with a powerful slam, dealing damage.

Level 1 - 2 second stun, deals 150 damage.
Level 2 - 3 second stun, dealing 225 damage.
Level 3 - 4 second stun, dealing 300 damage.



Code:
Reverse Polarity
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Reverse Polarity 
    Actions
        Set Rev_cast = (Triggering unit)
        Set Rev_loc = (Position of Rev_cast)
        Set Rev_group = (Units within 600.00 of Rev_loc matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an ally of (Owner of Rev_cast)) Equal to False)))
        Unit Group - Pick every unit in Rev_group and do (Actions)
            Loop - Actions
                Unit - Pause (Picked unit)
                Unit - Move (Picked unit) instantly to Rev_loc
                Unit - Unpause (Picked unit)
        Custom script:   call RemoveLocation(udg_Rev_loc)
        Custom script:   call DestroyGroup(udg_Rev_group)

Such simple spells Ive made, while theres nothing to do with my project LotAL

credits to Tinki3 for Spell's Test Map Template

feedbacks are welcome
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
@Reverse Polarity
You forgot to add 'Matching Unit is a Structure Equal to False' :p
Or do you want Structures to be sucked too?

Question: Why do you need to Pause the units?
 

NetherHawk

New Member
Reaction score
26
cant ravage be done simply with GUI too while being MUI too. >.> but i suppose Jass comes naturally to u

+rep!
 

NapaHero

Back from the dead...
Reaction score
43
Reverse Polarity, in DotA, stuns and deals damage, but you are pausing the units and not dealing damage. Fix your trigger, please.
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
That's probably because the units are moved while the War Stomp has finished.
If I were to make this spell, I'd pick all units nearby (with conditions) and Storm Bolt them (according to level) each and move them (or move and then Storm Bolt, people won't notice anyway)
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
>>cant ravage be done simply with GUI too while being MUI too. >.>
True

>>Why do you need to Pause the units?
Erm...yeah, waaaks!. You don't need to pause when moving the units because your spell already has stun.

@Waaaks!
Why use struct..? It can be done easily without vJass syntax. :p
But as you like.

Anyway, add this method into your ravange's struct:
JASS:
method onDestroy takes nothing returns nothing
  set .caster = null
  set .dummy= null
    call RemoveLocation(loc)
    call RemoveLocation(pol)
  set loc = null
  set pol = null
endmethod

This method is ran everytime you destroy that struct. It helps you to remove leak...
And I think I found a leak:
Code:
loop
  exitwhen d.n > 36
  [color=red]set d.pol = PolarProjectionBJ(d.loc, 50.0, 10*d.n)[/color] //Keep setting without removing?
  set d.dummy = CreateUnit(GetOwningPlayer(d.caster), RavDummy, GetUnitX(d.caster), GetUnitY(d.caster), 10*d.n)
  call UnitApplyTimedLife(d.dummy, 'BTLF', 5.0)
  call UnitAddAbility(d.dummy, RavDSpellId)
  call SetUnitAbilityLevel(d.dummy, RavDSpellId, d.level)
  call IssuePointOrderLoc(d.dummy, RavOrderId, d.pol)
  set d.n = d.n + 1
 endloop
 

Naminator

Coming Back To Life
Reaction score
76
I don't want to be rude. But this 2 spell has already been made by emjlr3. Ravage in JASS and Reverse Polarity in GUI also. Look in the DotA Spell Index.

6 DotA Spells: (Made by emjlr3)
Rupture: Deals a mighty blow to the enemy causing any movement to result in bleeding and loss of life.
Freezing Field: Causes many random icy explosions in an area surrounding Rylai. Lasts 4 seconds.
Toss: Tiny grabs the nearest unit, friend or foe, and launches them at a location. Upon landing, the unit deals damage in an area as well as receiving 20% of that damage to themselves (this damage increases as your size increases).
Sprout: Sprouts a ring of trees around an enemy unit, trapping it in place.
Reverse Polarity: Through some unknown property of matter, the Magnataur sucks all nearby enemies to his position and stuns them with a powerful slam, dealing damage.
Ravage: Slams the ground, causing waves of spikes to ring the hero in all directions. Deals damage and stuns.

Good job by the way!
 

emjlr3

Change can be a good thing
Reaction score
395
yea these have been done

and there is no need for a strct in ravage, completely un necc.
 

waaaks!

Zinctified
Reaction score
256
lol i hate GUI stuffs..thats why i made ravage in jass

for the reverse polarity...it does damage, it doesnt damage in the trigger, but damages in the spell

i based it off with warstomp and give it a damage....well if im moving my unit, ill pause and unpause it after moving...maybe because it sometimes move the unit to somewhere in the map

for ravage...i tried to make it as an ordinary jass...but newgen gives me error when i tried to test it ingame...like there are locations made even i removed the leak already....thats why i tried structs...and when i used structs in ravage, new gen didnt give any errors in game
 

Sim

Forum Administrator
Staff member
Reaction score
534
Unapproved, reasons were already stated above.

As for the Reverse Polarity, it doesn't pause the units. The normal War Stomp AoE should do it.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top