Jungle Stalker v1
800
ID:
537
Family ID:
Author:
Boekie
Rarity:
rare
Element:
nature
Attack Type:
Physical
Attack Range:
850
Attack CD:
1.1
Damage:
613-712
Abil. Factor:
0.7
Status:
Approved

Description:

This tower becomes enraged when it kills a unit and also gets stronger with every critical hit.

Latest Upload Comment:

Restored from 1.10
Specials:
15% crit chance (+0.5%/lvl)
Feral Aggression
On every critical hit this tower gains +0.2% bonus damage. This bonus is permanent and has a maximum of 200% bonus damage.
Bloodthirst
Whenever this tower kills a unit it becomes enraged, gaining +100% attackspeed for 3 seconds. Cannot retrigger while active!

Level Bonus:
+0.05 sec duration
+1% attackspeed
Download

Toggle Triggers

Header

    globals
        //@export
        BuffType boekie_rage_buff
        //@export
        MultiboardValues boekie_jungle_stalker_values
    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_ATTACKSPEED,1.0,0.01)  
        set boekie_rage_buff = BuffType.create(0.0,0.0,true) //0.0 time since I will apply it custom timed  
        call boekie_rage_buff.setBuffModifier(m)  
        call boekie_rage_buff.setBuffIcon('@@0@@')
        
        set boekie_jungle_stalker_values = MultiboardValues.create(1)
        call boekie_jungle_stalker_values.setKey(0, "Damage Bonus")
    endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
    local real damageBonus

    if Event.isAttackDamageCritical() and tower.userReal <= 2 then 
        set tower.userReal = tower.userReal + 0.002
        call tower.modifyProperty(MOD_DAMAGE_ADD_PERC, 0.002)
    endif
endfunction

On Kill

function onKill takes Tower tower returns nothing
    local integer lvl = tower.getLevel() 
    if tower.getBuffOfType(boekie_rage_buff) == 0 then  
        call boekie_rage_buff.applyCustomTimed(tower, tower, lvl, 3.0+0.05*lvl) 
    endif
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    local Tower preceding = Event.getPrecedingTower()  
    local real damageBonus 

    if(preceding.getFamily() == tower.getFamily()) then  
        set damageBonus = preceding.userReal 
        set tower.userReal = damageBonus 
        call tower.modifyProperty(MOD_DAMAGE_ADD_PERC, damageBonus)  
    else  
        set tower.userReal = 0.0 //Damage bonus  
    endif 
endfunction

On Tower Details

function onTowerDetails takes Tower tower returns MultiboardValues
    call boekie_jungle_stalker_values.setValue(0, formatPercent(tower.userReal, 1))
    return boekie_jungle_stalker_values
endfunction