• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Echo Buster 1.12

  • Like
Reactions: deepstrasz
Casts a powerful magic around the target area which damages enemy units and implants magic in their positions which causes another set of magic explosions after 0.5 seconds.
Spell trigger:
JASS:
/*
    Echo Buster v1.12
    by Adiktuz
    
    --------------------------------------------------------
    
    External Library Requirements:
    
    Nova - http://www.hiveworkshop.com/forums/spells-569/nova-system-2-01-a-181884/
    SpellEffectEvent - http://www.hiveworkshop.com/forums/jass-resources-412/snippet-spelleffectevent-187193/

    --------------------------------------------------------
    
    How to Import:
    
    1) Import the Nova and Spell trigger folders to your map
    2) Import the dummy.mdx model (if you haven't have one already) and create a dummy caster
    3) Modify the spell settings on the globals block and spell setting functions
       of the Echo Buster trigger (this trigger)
    4) Make sure that you set the dummy's rawcode on the Nova library
    
    --------------------------------------------------------
*/


library EchoBuster initializer OnInit requires Nova, SpellEffectEvent 
    
    globals
        private constant integer SPELL_ID = 'A000'  //Rawcode of the spell
        private constant string PATH = "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl"   //Path to the effect of the base spell
        private constant attacktype AT = ATTACK_TYPE_MAGIC  //attack type of the base spell
        private constant damagetype DT = DAMAGE_TYPE_MAGIC  //damage type of the base spell
        private constant string E_PATH = "Abilities\\Spells\\Other\\HowlOfTerror\\HowlCaster.mdl"  //Path to the effect of the echo
        private constant attacktype E_AT = ATTACK_TYPE_CHAOS     //attack type of the echo
        private constant damagetype E_DT = DAMAGE_TYPE_DIVINE    //damage type of the echo
        private group tmpGroup = CreateGroup()
        private constant key KEY    //Placeholder key, random number
    endglobals
    
    //Setting functions for the base spell
    
    private function Faoe takes integer level, unit caster returns real
        return 150.0 + 50.0*level
    endfunction
    
    private function Scale takes integer level, unit caster returns real
        return 1.0 + 0.1*level
    endfunction
    
    private function Height takes integer level, unit caster returns real
        return 0.0
    endfunction
    
    private function Damage takes integer level, unit caster returns real
        return 100.0*level
    endfunction
    
    //Setting functions for the echo
    
    private function EFaoe takes integer level, unit caster returns real
        return 100.0
    endfunction
    
    private function EDelay takes integer level, unit caster returns real
        return 0.50
    endfunction
    
    private function EScale takes integer level, unit caster returns real
        return 0.8
    endfunction
    
    private function EHeight takes integer level, unit caster returns real
        return 0.0
    endfunction
    
    private function EDamage takes integer level, unit caster returns real
        return 0.0 + level*GetHeroInt(caster,true)
    endfunction
    
    //Determines which units can cause echos
    private function CanEcho takes unit u, NovaSystem nova returns boolean
        return IsUnitEnemy(u,nova.owner) and GetWidgetLife(u) >= .405 and not IsUnitType(u, UNIT_TYPE_DEAD)
    endfunction
    
    //Main spell function
    
    private function Fire takes nothing returns nothing
        local unit u = GetTriggerUnit()
        local integer level = GetUnitAbilityLevel(u,SPELL_ID)
        local unit v = null
        local real x = GetSpellTargetX()
        local real y = GetSpellTargetY()
        local NovaSystem nova = NovaSystem.simpleCreate(u,null, x, y,/*
        */Faoe(level,u), Height(level,u), Damage(level,u), Scale(level,u), PATH, AT, DT, SPELL_ID)
        call GroupEnumUnitsInRange(tmpGroup, x, y, Faoe(level,u), null)
        loop
            set v = FirstOfGroup(tmpGroup)
            exitwhen v == null
            if CanEcho(v,nova) then
                call NovaSystem.simpleCreateDelayTarget(u,v, GetUnitX(v), GetUnitY(v),EDelay(level,u),/*
                */EFaoe(level,u), EHeight(level,u), EDamage(level,u), EScale(level,u), E_PATH, E_AT, E_DT, KEY)
            endif
            call GroupRemoveUnit(tmpGroup,v)
        endloop
        set u = null
    endfunction
    
    private function OnInit takes nothing returns nothing
        call RegisterSpellEffectEvent(SPELL_ID, function Fire)
    endfunction
    
endlibrary

Credits

Since the imported resources are due to the Nova System, just take a look at it's credits list.

SpellEffectEvent - Bribe


v1.12 - Updated due to some changes in Nova that affected the spell's settings
- The echoes are now created at the position of the units at the time of
echo creation. (Before it was created at the position of the units when
the echo buster was used)
v1.11 - Fixed based on Maker's comments
v1.1 - Fixed based on moderator comments

Keywords:
adiktuz,lanthanum,nova,echo,delay,magic
Contents

Echo Buster v1.12 (Map)

Reviews
Echo Buster 1.11 | Reviewed by Maker | 30th May 2013 APPROVED A smooth, leakless and MUI spell with good use of effects Echo Buster 1.1 | Reviewed by Maker | 29th May 2013 NEEDS FIX [tr] [tr] The...

Moderator

M

Moderator


Echo Buster 1.11 | Reviewed by Maker | 30th May 2013
APPROVED


126248-albums6177-picture66521.png


  • A smooth, leakless and MUI spell with good use of effects
[tr]



Echo Buster 1.1 | Reviewed by Maker | 29th May 2013
NEEDS FIX


126248-albums6177-picture66522.png


  • The dummy's death type should be Can't raise, Does not decay
    so it won't stay there for 90 seconds after dying
  • The importing instructions should say that the dummy raw code
    needs to be set in the Nova trigger
[tr]

14:54, 20th Apr 2013
Magtheridon96: I'll take what Almia said and refine it to what is actually needed.

- Make the struct extend an array to get rid of the generated code you're not going to use
- Give importing instructions and linked requirements inside documentation
- Remove the set v = null line at the end of the function
- Use ThisConventionRightHere for functions instead of thisConvention. thisConvention is for variables and struct methods while ThisConvention is for pretty much everything else except for CONSTANTS_LIKE_THIS and TEXTMACROS_LIKE_THIS_TOO because they're like C/C++ #define macros =o (almost)

It may be short and sweet in terms of code but that's because you smartly used the Nova System instead of recoding an entire projectile system for this.
I will approve it with no rating to be fair.
 
Yay you are back!
Lemme review this.

1) Why did you name the functions like that?
2) I think the parameters for the settings should be added in the constant list.
3) You don't need to null "v",because conditions works on it and also you already set it in local declaration.
4)make the struct "extends array", so that it won't generate allocate/deallocate methods.
5)Just wanna show you the classic Nes method:
JASS:
private module Init
    static method onInit takes nothing returns nothing
        call init()
    endmethod
endmodule

private struct SysInit extends array
    static method init takes nothing returns nothing
        call RegisterSpellEffectEvent(SPELL_ID, function fire)
    endmethod

    implement Init
endstruct

6) Lacks documentation.

Dunno. Currently the spell is too simple.
 
Top