Rundown Iron Sentry v1
950
ID:
31
Family ID:
Author:
Glowackos
Rarity:
rare
Element:
iron
Attack Type:
Physical
Attack Range:
925
Attack CD:
1.4
Damage:
710-710
Abil. Factor:
0.5
Status:
Approved

Description:

A powerful iron tower that will go to great lengths to defend its territory.

Latest Upload Comment:

Restored from 1.10
Alert
Towers in 500 range get alerted whenever a creep of size air, champion or boss enters the sentry's attack range. They have their base damage increased by 7.5% for 5 seconds. Does not stack.

Level Bonus:
+0.5% base damage bonus
Trespasser Awareness
This tower strengthens its defenses when uninvited units enter its territory. It gains bonus 5%-40% base percent damage with each creep entering its attack range, based on the creep's size. Bonus damage lasts 5 seconds and new stacks of damage do not refresh duration of old ones.
There is also a 40% chance that the trespassing creep will permanently have its armor reduced by 3, which stacks up to 5 times.

Level Bonus:
+0.1 armor reduction
+0.1%-0.8% bonus base percent damage
Download

Toggle Triggers

Header

    globals
        //@export
        BuffType glow_damage_buff
        //@export
        BuffType glow_armor_shred
    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 m = Modifier.create()
        call m.addModification(MOD_DAMAGE_BASE_PERC, 0.075, 0.005)
        set glow_damage_buff = BuffType.create(5, 5, true)
        call glow_damage_buff.setBuffIcon('@@0@@')
        call glow_damage_buff.setBuffModifier(m)
        
        set m = Modifier.create()
        call m.addModification(MOD_ARMOR, 0.0, -0.01)
        set glow_armor_shred = BuffType.create(-1.0, 0.0, false)
        call glow_armor_shred.setBuffIcon('@@1@@')
        call glow_armor_shred.setBuffModifier(m)
    endfunction

On Unit Comes In Range

UNITINRANGE_targetType: TARGET_TYPE_CREEPS UNITINRANGE_range: 925
function onUnitInRange takes Tower tower returns nothing
    local Unit creep = Event.getTarget()
    local integer size = creep.getSize()
    local integer level = tower.getLevel()
    local Iterate it
    local Unit next
    local integer uid = tower.getUID()
    local Buff b = creep.getBuffOfType(glow_armor_shred)
    local integer buffLevel = 300 + 10 * level
    if b != 0 then
        set buffLevel = IMinBJ(buffLevel + b.getLevel(), buffLevel * 5)
    endif
    
    if tower.calcChance(0.4) then
        call glow_armor_shred.apply(tower,creep,buffLevel)
    endif
    call tower.modifyProperty(MOD_DAMAGE_BASE_PERC,(0.05 + 0.001*level)*(size+1))
    if size > SIZE_NORMAL then
        set it = Iterate.overUnitsInRangeOfCaster(tower, TARGET_TOWERS, 500)
        loop
            set next = it.next()
            exitwhen next == 0
            call glow_damage_buff.apply(tower,next,0)
        endloop
    endif
    call TriggerSleepAction(5)
    if tower.getUID() == uid then
        call tower.modifyProperty(MOD_DAMAGE_BASE_PERC,-(0.05 + 0.001*level)*(size+1))
    endif
endfunction