Rooted Chasm v1
45
ID:
680
Family ID:
Author:
SirCoqaLot.
Rarity:
uncommon
Element:
nature
Attack Type:
Essence
Attack Range:
950
Attack CD:
1.4
Damage:
47-47
Abil. Factor:
0.75
Status:
Approved

Description:

Basic Tower that has a small chance to root creeps it attacks.

Latest Upload Comment:

Restored from 1.10
Entangle
Has a chance of 12.5% to entangle the attacked target for 1.5 seconds. Entangled targets are immobile and suffer 120 damage per second. Cannot entangle air or boss units. 

Level Bonus:
+0.2% chance to entangle
+6 damage per second
Download

Toggle Triggers

Header

    globals
        //@export
        BuffType chasm_entangle
    endglobals
    
    function chasmEntangleDamage takes Buff b returns nothing
        local Tower t = b.getCaster()
        local Creep c = b.getBuffedUnit()
        call t.doSpellDamage(c, t.userInt + t.userInt * t.getLevel() / 20, t.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 chasm_entangle = BuffType.createDuplicate(cb_stun, 1.5, 0.75, false)
        call chasm_entangle.setBuffIcon('@@0@@')
        call chasm_entangle.addPeriodicEvent(chasmEntangleDamage, 1.0)
    endfunction

On Damage

ONDAMAGE_chance: 0.125 ONDAMAGE_chanceLevelAdd: 0.002
function onDamage takes Tower tower returns nothing
    local Creep target = Event.getTarget()
    if target.getSize() < SIZE_BOSS and target.getSize() != SIZE_AIR then
        call chasm_entangle.apply(tower, target, 0)
        call target.reorder()
    endif
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    set tower.userInt = 120 //base entagle dps
endfunction