Grounding Gloves v1
1500
lvl: 44

ID:

209

Author:

SirCoqaLot.

Rarity:

unique

Status:

Approved

Description:


Latest Upload Comment:

Restored from 1.10
Entangling Roots
On attack the carrier has an 6% attackspeed adjusted chance to create a field of overgrowth in 200 AoE around the target. Creeps entering the overgrowth will become entangled for 1.8 seconds, taking 4500 spell damage per second. Cannot entangle the same creep for 3 seconds afterwards. Bosses can only be hit once.
Download

Toggle Triggers

Header

goldcost: 0
    globals
        BuffType BT
        BuffType CD
        Cast C
    endglobals
    
    function overgrowth_dmg takes DummyUnit C returns nothing
        local Creep U = Event.getTarget()
        local Tower tower = C.getCaster()
        set Event.damage = 0
        
        if U.getBuffOfType(CD) == 0 then
            call BT.apply(tower, U, 0)
            if U.getSize() < SIZE_BOSS then
                call CD.apply(tower, U, 0)
            else
                call CD.applyOnlyTimed(tower, U, -1)
            endif
        endif
    endfunction
    
    function periodicDmg takes Buff B returns nothing
        call B.getCaster().doSpellDamage(B.getBuffedUnit(), 4500, B.getCaster().calcSpellCritNoBonus())
    endfunction
    
    //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
        set BT = BuffType.createDuplicate(cb_stun, 1.8, 0.00, false)
        call BT.addPeriodicEvent(periodicDmg, 1.0)
        call BT.setBuffIcon('@@1@@')
        
        set CD = BuffType.create(4.8, 0.00, false)
        
        set C = Cast.create('@@0@@', "blizzard", 4.0)
        call C.setDamageEvent(overgrowth_dmg)
    endfunction

On Damage

ONDAMAGE_chance: 1 goldcost: 1500 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Item itm returns nothing
    local Creep target = Event.getTarget()
    local Tower tower = itm.getCarrier()
    if Event.isMainTarget() and tower.calcChance(tower.getBaseAttackspeed()*0.06) then
        call C.pointCastFromTargetOnTarget( tower, target, 1.0, 1.0 )
        call Effect.createColored( "Abilities\\Spells\\NightElf\\EntangleMine\\Roots.mdl", target.getX(), target.getY(), 0.0, 270.0, 1.2, 210, 255, 180, 255 ).setLifetime( 2.5 )
    endif 
endfunction