Area Roaster v1
650
ID:
67
Family ID:
Author:
SirCoqaLot.
Rarity:
uncommon
Element:
fire
Attack Type:
Elemental
Attack Range:
700
Attack CD:
1.2
Damage:
85-85
Abil. Factor:
0.09
Status:
Approved

Description:

Advanced tower that attacks multiple targets at once and burns them, increasing other fire towers damage and dealing some damage over time.

Latest Upload Comment:

Restored from 1.10
Ignite
Units damaged by this tower receive 7% more damage from fire towers and take 35 spell damage every 0.5 seconds for 5 seconds. The damage over time effect stacks. 

Level Bonus:
+1.4 spell damage 
+0.05 seconds duration
Download

Toggle Triggers

Header

    globals
    //@export
    BuffType sir_area_rooster
    endglobals
    
    function sir_area_damage takes Buff b returns nothing
    
    local Tower caster = b.getCaster()
    
    call caster.doSpellDamage(b.getBuffedUnit(),(35+caster.getLevel()*1.4)*b.getLevel(),caster.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
    local Modifier m = Modifier.create()
    set sir_area_rooster = BuffType.create(0,0,false)
    call sir_area_rooster.setBuffIcon('@@1@@')
    call m.addModification(MOD_DMG_FROM_FIRE,0,0.001)
    call sir_area_rooster.setBuffModifier(m)
    call sir_area_rooster.addPeriodicEvent(sir_area_damage,0.5)
    call sir_area_rooster.setStackingGroup("sir_area_rooster")
    endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
    local Buff buffyorno = Event.getTarget().getBuffOfGroup("sir_area_rooster")

    if buffyorno != 0 then 
        set tower.userInt = buffyorno.getLevel()+1
        set tower.userInt2 = IMaxBJ(buffyorno.getPower(),70)
    else
        set tower.userInt = 1
        set tower.userInt2 = 70
    endif
    
    call sir_area_rooster.applyAdvanced(tower,Event.getTarget(),tower.userInt,tower.userInt2,5+tower.getLevel()*0.05)
    
endfunction