Sacred Altar v1
3000
ID:
607
Family ID:
Author:
Boekie
Rarity:
unique
Element:
nature
Attack Type:
Essence
Attack Range:
875
Attack CD:
2.5
Damage:
3052-3052
Abil. Factor:
0.3
Status:
Approved

Description:

This sacred altar can control the growth of plants.

Latest Upload Comment:

Restored from 1.10
Gift of Nature
All towers in 175 range will receive a gift of nature. When a gifted tower attacks a creep there is a 10% attackspeed adjusted chance to entangle that creep for 1.2 seconds, dealing 700 damage per second. Does not work on air units or bosses!

Level Bonus:
+0.2% chance 
+35 additional damage
Download

Toggle Triggers

Header

    globals
    BuffType boekie_entangle_buff
    BuffType boekie_entangle_aura 
    endglobals
    
    function entangle takes Buff b returns nothing  
        local Tower  caster = b.getCaster()  
        local Tower  tower = b.getBuffedUnit() 
        local Creep target = Event.getTarget()
        
        if caster.calcChance((0.10+(0.002*caster.getLevel()))*tower.getBaseAttackspeed()) then 
            if target.getSize() < SIZE_BOSS and target.getSize() != SIZE_AIR then
                call boekie_entangle_buff.apply(caster, target, caster.getLevel()) 
            endif
        endif       
    endfunction 
    
    function entangleDamage takes Buff b returns nothing  
        local Tower t = b.getCaster()  
        local Creep c = b.getBuffedUnit()
        call t.doSpellDamage(c, 700 + 35 * b.getLevel(), 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 boekie_entangle_buff = BuffType.createDuplicate(cb_stun, 1.2, 0, false)
        call boekie_entangle_buff.setBuffIcon('@@0@@') 
        call boekie_entangle_buff.addPeriodicEvent(entangleDamage, 1.0)
        set boekie_entangle_aura = BuffType.createAuraEffectType(true)
        call boekie_entangle_aura.setStackingGroup("entangle_aura")
        call boekie_entangle_aura.setBuffIcon('@@1@@') 
        call boekie_entangle_aura.addEventOnAttack(entangle,  1.0, 0.0) 
    endfunction

Tower Aura

AURA_auraEffect: boekie_entangle_aura AURA_power: 0 AURA_level: 0 AURA_auraRange: 175 AURA_targetType: TARGET_TYPE_TOWERS AURA_levelAdd: 1 AURA_powerAdd: 1 AURA_targetSelf: true