Spell Earth Splitter

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
This spell is from DotA.. I have recoded it..

JASS:
/*
    Earth Splitter v2.0.1
        by kingking
    
    Description : Using his mighty axe, the Tauren Chieften rends the very earth itself, 
    sending a jagged crack under the feet of his enemies. After several seconds the earth 
    implodes, sending his foes tumbling inwards. Any unit caught in the implosion will 
    take damage based on their maximum life and have their speed slowed for a short time. 
    Implodes after certain seconds. Deals part of a unit's maximum HP and slow it.
    
    Implement Instruction :
    1) Copy this trigger and required libraries to your map.
    2) Make sure you implemented the required libraries correctly.
    3) Copy the abilities, "Earth Splitter" and "Earth Splitter slow" to your map.
    4) Copy the Earth Splitter buff.
    5) Set the buff in Earth Splitter Slow.
    6) Adjust the constant globals to correct rawcodes.
    7) You may tweak constant functions if you want.
    8) Enjoy it!
    
    Requires :
    GTrigger Event System
    KeyTimers 2
    DummyCaster
    Jasshelper v0.A.2.A or later
*/
scope EarthSplitter
    
    /* <=                            Constant globals                                 =>  */
    globals
        private constant integer ABIL_ID = 'A000'
        //Ability's Id
        private constant integer SLOW_ID = 'A001' 
        //Slow's id
        private constant string GROUND_EFFECT = "Abilities\\Spells\\Orc\\EarthQuake\\EarthQuakeTarget.mdl"
        //Effect on the ground when unit are damaged and slowed
        private constant real GROUND_EFFECT_DURATION = 2.
        //Duration of efect.
        private constant string SMASH_EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
        //Effect of projectile.
        private constant attacktype DAMAGE_A_ATTACK_TYPE = ATTACK_TYPE_MELEE
        private constant damagetype DAMAGE_A_DAMAGE_TYPE = DAMAGE_TYPE_NORMAL
        private constant weapontype DAMAGE_A_WEAPON_TYPE = null
        private constant attacktype DAMAGE_B_ATTACK_TYPE = ATTACK_TYPE_MAGIC
        private constant damagetype DAMAGE_B_DAMAGE_TYPE = DAMAGE_TYPE_MAGIC
        private constant weapontype DAMAGE_B_WEAPON_TYPE = null
    endglobals
    
    private keyword d
    
    //==============                <= Constants =>                               ========\\
    private function FilterUnit takes unit whichUnit returns boolean
        return IsUnitEnemy(whichUnit,d.owner) and IsUnitType(whichUnit,UNIT_TYPE_DEAD) == false and IsUnitType(whichUnit,UNIT_TYPE_STRUCTURE) == false
    endfunction
    
    private function DamageFactor takes integer lvl returns real
        return 10. * lvl + 15.
    endfunction
    
    private function WaveSpeed takes integer lvl returns real
        return .2
    endfunction
    
    private function WaveRange takes integer lvl returns real
        return 150.
    endfunction
    
    private function NumberOfWaves takes integer lvl returns integer
        return 12
    endfunction
    
    private function Delay takes integer lvl returns real
        return 1.
    endfunction
    
    private function AoE takes integer lvl returns real
        return 250.
    endfunction
    
    private function DamageAFrac takes integer lvl returns real
        return 50.
    endfunction
    
    private function DamageBFrac takes integer lvl returns real
        return 50.
    endfunction
    
//                           <= NO MORE TOUCHING =>                                       \\
    
    private keyword Data
    
    globals
        private constant integer MaxWave = 13
        private constant group enumGroup = CreateGroup()
        private conditionfunc cf
        private Data d
    endglobals
    
    private struct Data 
        unit caster
        player owner
        real array eX [MaxWave]
        real array eY [MaxWave]
        effect array eff [MaxWave]
        real cx
        real cy
        real tx
        real ty
        real angle
        real array cos [3]
        real array sin [3]
        integer tick
        group g
        real fraction
        integer level
        real waveRange
        real halfRange
        integer waveCount
        real aoe
        real dmgAFrac
        real dmgBFrac
        
        private static method End takes nothing returns boolean
            local thistype this = KT_GetData()
            loop
                call DestroyEffect(.eff[.tick])
                set .eff[.tick] = null
                set .tick = .tick + 1
            exitwhen .tick > .waveCount
            endloop
            call GroupClear(.g)
            call .destroy()
            return true
        endmethod
        
        private static method Damage takes nothing returns boolean
            local unit u = GetFilterUnit()
            local real maxHP
            if not IsUnitInGroup(u,d.g) and FilterUnit(u) then
                call UnitAddAbility(DUMMY,SLOW_ID)
                call SetUnitAbilityLevel(DUMMY,SLOW_ID,d.level)
                call IssueTargetOrder(DUMMY,"slow",u)
                call UnitRemoveAbility(DUMMY,SLOW_ID)
                set maxHP = GetUnitState(u,UNIT_STATE_MAX_LIFE) * d.fraction
                call UnitDamageTarget(d.caster,u,d.dmgAFrac * maxHP,false,false,DAMAGE_A_ATTACK_TYPE,DAMAGE_A_DAMAGE_TYPE,DAMAGE_A_WEAPON_TYPE)
                call UnitDamageTarget(d.caster,u,d.dmgBFrac * maxHP,false,false,DAMAGE_B_ATTACK_TYPE,DAMAGE_B_DAMAGE_TYPE,DAMAGE_B_WEAPON_TYPE)
                call SetUnitX(u,d.eX[d.tick])
                call SetUnitY(u,d.eY[d.tick])
                call GroupAddUnit(d.g,u)
            endif
            set u = null
            return false
        endmethod
        
        private static method Periodic2 takes nothing returns boolean
            local thistype this = KT_GetData()
            if .g == null then
                set .g = CreateGroup()
            endif
            loop
                set .eff[.tick] = AddSpecialEffect(GROUND_EFFECT,.eX[.tick],.eY[.tick])
                set d = this
                call GroupEnumUnitsInRange(enumGroup,.eX[.tick],.eY[.tick],.aoe,cf)
                set .tick = .tick - 1
            exitwhen .tick == -1
            endloop
            call KT_Add(function thistype.End,this,GROUND_EFFECT_DURATION)
            return true
        endmethod
        
        private static method Periodic takes nothing returns boolean
            local thistype this = KT_GetData()
            if .tick < .waveCount then
                set .tick = .tick + 1
                set .cx = .cx + .cos[0]
                set .cy = .cy + .sin[0]
                set .eX[.tick] = .cx
                set .eY[.tick] = .cy
                call DestroyEffect(AddSpecialEffect(SMASH_EFFECT,.cx + .cos[0],.cy + .sin[0]))
                call DestroyEffect(AddSpecialEffect(SMASH_EFFECT,.cx + .cos[1],.cy + .sin[1]))
                call DestroyEffect(AddSpecialEffect(SMASH_EFFECT,.cx + .cos[2],.cy + .sin[2]))
                return false
            endif
            call KT_Add(function thistype.Periodic2, this, Delay(.level))
            return true
        endmethod
        
        private static method Act takes nothing returns boolean
            local thistype this = thistype.allocate()
            set .caster = GetTriggerUnit()
            set .tx = GetSpellTargetX()
            set .ty = GetSpellTargetY()
            set .cx = GetUnitX(.caster)
            set .cy = GetUnitY(.caster)
            set .angle = Atan2(.ty - .cy,.tx - .cx)
            set .level = GetUnitAbilityLevel(.caster,ABIL_ID)
            set .waveRange = WaveRange(.level)
            set .halfRange = .waveRange / 2.
            set .cos[0] = .waveRange * Cos(.angle)
            set .sin[0] = .waveRange * Sin(.angle)
            set .cos[1] = .halfRange * Cos(.angle + 2.1)
            set .sin[1] = .halfRange * Sin(.angle + 2.1)
            set .cos[2] = .halfRange * Cos(.angle - 2.1)
            set .sin[2] = .halfRange * Sin(.angle - 2.1)
            set .waveCount = NumberOfWaves(.level)
            set .aoe = AoE(.level)
            set .fraction = DamageFactor(.level) * .01
            set .owner = GetOwningPlayer(.caster)
            set .dmgAFrac = DamageAFrac(.level) * .01
            set .dmgBFrac = DamageBFrac(.level) * .01
            set .tick = 0
            call KT_Add(function thistype.Periodic,this,WaveSpeed(.level))
            return false
        endmethod
        
        private static method onInit takes nothing returns nothing
            call GT_AddStartsEffectAction(function thistype.Act,ABIL_ID)
            
            set cf = Condition(function thistype.Damage)
        endmethod
    endstruct

endscope
/////////////////////////////////End/////////////////////////////////////////////////////////


Description : Using his mighty axe, the Tauren Chieften rends the very earth itself, sending a jagged crack under the feet of his enemies. After several seconds the earth implodes, sending his foes tumbling inwards. Any unit caught in the implosion will take damage based on their maximum life and have their speed slowed for a short time. Implodes after 3 seconds. Deals 35% of a unit's maximum HP and slow it.

Let's take a peek to it :
76605432.jpg

70305474.jpg


GUI/Jass/vJass -> Hints : Jasshelper is needed.
MUI/MPI -> Hints : Use structs to store data, MUI or not MUI?
Leak/Lag -> Classic case. :eek:

The icon is also included!
 

Attachments

  • DotA_Spell_Pack_14.w3x
    99.4 KB · Views: 427

8uY_YoU

New Member
Reaction score
4
Woo.. Earthsplitler.. An ability that has cool effect
Nice job..
But i still wondering how Natural Order works? It seems the system has been hacked..!
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
Woo.. Earthsplitler.. An ability that has cool effect
Nice job..
But i still wondering how Natural Order works? It seems the system has been hacked..!

Natural Order is easy, triggers are not needed. Set the Devolution Aura's Armor Bonus to negative value and tick the percent bonus. Finally set the target and AoE. It is done!!
 
Reaction score
341
 

GetTriggerUnit-

DogEntrepreneur
Reaction score
129
Major problem in here.

The dota ones slows at the end. Your doesn't.

Edit: When browsing the map I saw the spell "slow" but, it seem that they'rew not slowed and the effect is not showing.
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
Major problem in here.

The dota ones slows at the end. Your doesn't.

Edit: When browsing the map I saw the spell "slow" but, it seem that they'rew not slowed and the effect is not showing.

Fixed in v1.1
 

Jesus4Lyf

Good Idea™
Reaction score
397
WHY??? Why are you making DotA spells all the time :( I want more original :D
Yep. QFT.

>Learn to use GroupUtils for ENUMING units instead of creating and destroying them.
Oh, so we need a H2I system to enumerate groups now, do we? What's it meant to do, anyway? You certainly don't need a system to enumerate groups without creating and destroying, lol. o.o
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
Yep. QFT.

>Learn to use GroupUtils for ENUMING units instead of creating and destroying them.
Oh, so we need a H2I system to enumerate groups now, do we? What's it meant to do, anyway? You certainly don't need a system to enumerate groups without creating and destroying, lol. o.o

I prefer not to add an optional system unless it is needed very hard.
 

Azlier

Old World Ghost
Reaction score
461
If you don't use GroupUtils, recycle the groups instead. It's very easy to do.

JASS:
scope Lolwut

private struct Omg

    group Group

    static method create takes nothing returns thistype
        ...
        if .Group == null then
            set .Group = CreateGroup()
            //Never, ever destroy it.
        else
            call GroupClear(.Group)
        endif
        ...
    endmethod

endstruct
 

WolfieeifloW

WEHZ Helper
Reaction score
372
I didn't read it all but:

Can the attack/damage/weapon types be configurable please?
And from what I see;
The group 'picked' is being filled and emptied instantaneously;
So why not use a global group for it ;) !
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
So why not use a global group for it !
Can the attack/damage/weapon types be configurable please?
I will add it later.
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
v1.2

Group Recycle?
No more destroy group.

Doesn't kill trees
Added.

Is this counted as double posting? :p
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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 The Helper:
    I think we need to add something to the bottom of the front page that shows the Headline News forum that has a link to go to the News Forum Index so people can see there is more news. Do you guys see what I am saying, lets say you read all the articles on the front page and you get to the end and it just ends, no kind of link for MOAR!
  • The Helper The Helper:
    Happy Wednesday!
    +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