Burning Watchtower v1
65
ID:
658
Family ID:
Author:
Natac
Rarity:
uncommon
Element:
fire
Attack Type:
Elemental
Attack Range:
800
Attack CD:
1.4
Damage:
51-52
Status:
Approved

Description:

Burning structure with a small synergetic effect for its element.
Burn
Starts to burn a target. On every further hit of a fire tower, the target will receive more bonus damage then before. Burning Structures will increase the bonus damage by 1, any other fire towers by 0.3. If the unit dies, it explodes and deals 49 damage to nearby units in a range of 200.
Lasts 5 seconds after the last attack of a fire tower.

Level Bonus:
+ 0.1 damage gain (Burning Structrues)
+ 0.03 damage gain (Other fire towers)
+ 0.12 seconds burn duration
Download

Toggle Triggers

Header

    globals
        //This buff is configurated as follows:
        //level: damage gain per attack
        //userReal: Already done bonus damage on the buffed unit
        //userInt: AOE-Damage if the buffed unit dies
        //@export
        BuffType   natac_burning_buff
    endglobals
    
    // b.userReal: The user Real is the current bonus damage of the buff. Init with 0
    function initOnCreate takes Buff b returns nothing
        set b.userReal  = 0.0
        set b.userInt = 0
    endfunction
    
    // Increase damage gain and do direct damage to the target by setting the event damage
    function damageOnFireAttack takes Buff b returns nothing 
        local real    damageGain 
        local real    damageFactor
        local Unit    attacker       = Event.getTarget()
        local boolean isBurningTower 
        if(Element.FIRE == attacker.getCategory()) then
            set isBurningTower = Tower(attacker).getFamily() == Tower(b.getCaster()).getFamily()
            if(isBurningTower) then 
                set damageFactor = 1.0 // is Burning Tower
            else
                set damageFactor = 0.3 // is other fire tower
            endif
            
            set  damageGain   = damageFactor * b.getLevel() * 0.01 //Added power with "*100", so multiply with 0.01
            set  b.userReal   = b.userReal + damageGain
            set  Event.damage = Event.damage + b.userReal
            
            if(isBurningTower) then //Display damage
                call attacker.getOwner().displaySmallFloatingText(I2S(R2I(b.userReal)), b.getBuffedUnit(),255,90,0, 40.0)
            endif
            
            call b.refreshDuration() // Reset duration
        endif
    endfunction 
    
    // Does damage to all units around the buffed unit, if the buffed unit dies
    // b.userInt: AOE damage of the current buff.
    function explodeOnDeath takes Buff b returns nothing 
        local Unit killer      = Event.getTarget()
        local Unit buffedUnit  = b.getBuffedUnit()
        call  SFXAtUnit("Abilities\\Spells\\Other\\Incinerate\\FireLordDeathExplode.mdl",buffedUnit.getUnit())
        call  killer.doSpellDamageAoEUnit(buffedUnit,200, b.userInt, killer.calcSpellCritNoBonus(),0.0)
    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  natac_burning_buff = BuffType.create(0.0, 0.0, false) //CustomTime applied
        call natac_burning_buff.setBuffIcon('@@0@@')
        call natac_burning_buff.addEventOnCreate(EventHandler.initOnCreate)
        call natac_burning_buff.addEventOnDamaged(EventHandler.damageOnFireAttack,1.0,0.0)
        call natac_burning_buff.addEventOnDeath(EventHandler.explodeOnDeath)
    endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
    local integer towerLevel = tower.getLevel()
    local Unit    target     = Event.getTarget()
    local real    level      = 1 + towerLevel*0.1
    local real    duration   = 5 + towerLevel*0.12
    local Buff    b          = natac_burning_buff.applyCustomTimed(tower, target, R2I(level*100), duration)
    
    // Upgrade AOE-damage, if it makes sense
    if(b.userInt < 49) then
        set b.userInt = 49
    endif
endfunction
Burning Sentry v1
370
ID:
659
Family ID:
Author:
Natac
Rarity:
uncommon
Element:
fire
Attack Type:
Elemental
Attack Range:
800
Attack CD:
1.38
Damage:
286-287
Status:
Approved

Description:

Burning structure with a medium synergetic effect for its element.
Burn
Starts to burn a target. On every further hit of a fire tower, the target will receive more bonus damage then before. Burning Structures will increase the bonus damage by 2.5, any other fire towers by 0.75. If the unit dies, it explodes and deals 277 damage to nearby units in a range of 200.
Lasts 5 seconds after the last attack of a fire tower.

Level Bonus:
+ 0.25 damage gain (Burning Structrues)
+ 0.08 damage gain (Other fire towers)
+ 0.12 seconds burn duration
Download

Toggle Triggers

Header

    globals
        //This buff is configurated as follows:
        //level: damage gain per attack
        //userReal: Already done bonus damage on the buffed unit
        //userInt: AOE-Damage if the buffed unit dies
        //@import
        BuffType   natac_burning_buff
    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
    endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
    local integer towerLevel = tower.getLevel()
    local Unit    target     = Event.getTarget()
    local real    level      = 2.5 + towerLevel*0.25
    local real    duration   = 5 + towerLevel*0.12
    local Buff    b          = natac_burning_buff.applyCustomTimed(tower, target, R2I(level*100), duration)
    
    // Upgrade AOE-damage, if it makes sense
    if(b.userInt < 277) then
        set b.userInt = 277
    endif
endfunction
Burning Outpost v1
1000
ID:
660
Family ID:
Author:
Natac
Rarity:
uncommon
Element:
fire
Attack Type:
Elemental
Attack Range:
800
Attack CD:
1.36
Damage:
759-760
Status:
Approved

Description:

Burning structure with a big synergetic effect for its element.
Burn
Starts to burn a target. On every further hit of a fire tower, the target will receive more bonus damage then before. Burning Structures will increase the bonus damage by 4, any other fire towers by 1.2. If the unit dies, it explodes and deals 750 damage to nearby units in a range of 200.
Lasts 5 seconds after the last attack of a fire tower.

Level Bonus:
+ 0.4 damage gain (Burning Structrues)
+ 0.12 damage gain (Other fire towers)
+ 0.12 seconds burn duration
Download

Toggle Triggers

Header

    globals
        //This buff is configurated as follows:
        //level: damage gain per attack
        //userReal: Already done bonus damage on the buffed unit
        //userInt: AOE-Damage if the buffed unit dies
        //@import
        BuffType   natac_burning_buff
    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
    endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
    local integer towerLevel = tower.getLevel()
    local Unit    target     = Event.getTarget()
    local real    level      = 4 + towerLevel*0.4
    local real    duration   = 5 + towerLevel*0.12
    local Buff    b          = natac_burning_buff.applyCustomTimed(tower, target, R2I(level*100), duration)
    
    // Upgrade AOE-damage, if it makes sense
    if(b.userInt < 750) then
        set b.userInt = 750
    endif
endfunction
Burning Fortress v1
2500
ID:
661
Family ID:
Author:
Natac
Rarity:
uncommon
Element:
fire
Attack Type:
Elemental
Attack Range:
800
Attack CD:
1.34
Damage:
1865-1866
Status:
Approved

Description:

Burning structure with a huge synergetic effect for its element.
Burn
Starts to burn a target. On every further hit of a fire tower, the target will receive more bonus damage then before. Burning Structures will increase the bonus damage by 5.5, any other fire towers by 1.65. If the unit dies, it explodes and deals 1875 damage to nearby units in a range of 200.
Lasts 5 seconds after the last attack of a fire tower.

Level Bonus:
+ 0.55 damage gain (Burning Structrues)
+ 0.17 damage gain (Other fire towers)
+ 0.12 seconds burn duration
Download

Toggle Triggers

Header

    globals
        //This buff is configurated as follows:
        //level: damage gain per attack
        //userReal: Already done bonus damage on the buffed unit
        //userInt: AOE-Damage if the buffed unit dies
        //@import
        BuffType   natac_burning_buff
    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
    endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
    local integer towerLevel = tower.getLevel()
    local Unit    target     = Event.getTarget()
    local real    level      = 5.5 + towerLevel*0.55
    local real    duration   = 5 + towerLevel*0.12
    local Buff    b          = natac_burning_buff.applyCustomTimed(tower, target, R2I(level*100), duration)
    
    // Upgrade AOE-damage, if it makes sense
    if(b.userInt < 1875) then
        set b.userInt = 1875
    endif
endfunction