Stormy Dog v1
70
ID:
242
Family ID:
Author:
cedi
Rarity:
uncommon
Element:
storm
Attack Type:
Energy
Attack Range:
900
Attack CD:
1.5
Damage:
95-103
Abil. Factor:
0.90
Status:
Approved

Description:

Do you hear the howl of the storm?

Latest Upload Comment:

Restored from 1.10
Thunderous Roar
Whenever this tower damages a unit it has 30% chance to release a battle cry. The cry increases the attack speed of all towers in 420 range by 5% for 5 seconds. If a tower already has the thunderous roar buff the attack speed is increased by 0.3% and the duration is refreshed. Stacks up to 100 times.

Level Bonus:
+0.3% attack speed
Download

Toggle Triggers

Header

    globals
        //@export
        BuffType cedi_stormdog
    endglobals
    
    //Do not remove or rename this function!
    //Put your initialization tasks here, this function will be called on map init
    private function init takes nothing returns nothing
        local Modifier mod = Modifier.create()
        call mod.addModification( MOD_ATTACKSPEED, 0.05, 0.0005 ) //*6 was 0.003 before
        
        set cedi_stormdog = BuffType.create( 5.0, 0.0, true )
        call cedi_stormdog.setBuffIcon( '@@1@@' )
        call cedi_stormdog.setBuffModifier( mod )
    endfunction

On Damage

ONDAMAGE_chance: 0.3 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
    local Iterate I = Iterate.overUnitsInRangeOfCaster( tower, TARGET_TYPE_TOWERS, 420.0 )
    local Unit U 
    local Buff B
    call DestroyEffect( AddSpecialEffectTarget( "Abilities\\Spells\\NightElf\\Taunt\\TauntCaster.mdl", tower.getUnit(), "origin" ) )
    loop
        set U = I.next()
        exitwhen U == 0
        set B = U.getBuffOfType( cedi_stormdog )
        if B != 0 then
            if B.userInt < 100 then
                call cedi_stormdog.apply( tower, U, B.getLevel() + 6 )
                set B.userInt = B.userInt + 1
            else
                call B.refreshDuration()
            endif
        else
            set B = cedi_stormdog.apply( tower, U, tower.getLevel() * 6 )
            set B.userInt = 0
        endif
    endloop
endfunction