Burrow v1
70
ID:
186
Family ID:
Author:
tolleder
Rarity:
uncommon
Element:
iron
Attack Type:
Physical
Attack Range:
700
Attack CD:
3
Damage:
289-289
Abil. Factor:
0.95
Status:
Approved

Description:

A burrow with Peons inside, which will try to break through every armor.

Latest Upload Comment:

Restored from 1.10
Piercing Shot
10% of this tower's attack damage cannot be reduced by armor resistances.

Level Bonus:
+0.4% damage ratio
Download

Toggle Triggers

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
    local real curRatio=0.1+0.004*tower.getLevel()
    local real sDmg=Event.damage
    local real damageBase=Event.damage
    local Creep target=Event.getTarget()
    local real temp = AttackType.PHYSICAL.getDamageAgainst(target.getArmorType())
    
    if temp > 0. and temp < 1. then //ignoring armor type "resistance" not weakness :P
        set damageBase = damageBase / temp 
    endif
    
    set temp = (1 - target.getCurrentArmorDamageReduction())
    if temp > 0. then
        set damageBase = damageBase / temp 
    endif 
    
    if sDmg < damageBase then
        set Event.damage=damageBase*curRatio+sDmg*(1.-curRatio)
    endif
    //The engine calculates critical strike extra damage ***AFTER*** the onDamage event, so there is no need to care about it in this trigger.
endfunction