Caged Fire v1
1750
ID:
203
Family ID:
Author:
cedi
Rarity:
rare
Element:
fire
Attack Type:
Elemental
Attack Range:
900
Attack CD:
0.4
Damage:
266-266
Abil. Factor:
0.45
Status:
Approved

Description:

The fire of the demon Nerz'ragul destroyed half of the world. After years the mighty spellcaster Theradom caged it in a magical circle.

Latest Upload Comment:

Restored from 1.10
Specials:
-50% dmg to magical
+50% dmg to nature (+1%/lvl)
Melt
The enormous heat of the caged fire decreases the armor of all creeps in 900 range by 1 and damages them by 20. Each second creeps in 900 range around the caged fire lose 0.5 extra armor and the fire damage will increase by 20.

Level Bonus:
+0.04 start armor reduction
+0.02 armor reduction
+0.8 damage
Download

Toggle Triggers

Header

    globals
        BuffType myBuff
    endglobals
    
    function Create takes Buff b returns nothing
        local integer lvl = b.getCaster().getLevel()
        set b.userReal = 1.0 + 0.04 * lvl
        set b.userReal2 = 20.0 + 0.8 * lvl
        call b.getBuffedUnit().modifyProperty( MOD_ARMOR, -b.userReal )
    endfunction
    
    function Destroy takes Buff b returns nothing
        call b.getBuffedUnit().modifyProperty( MOD_ARMOR, b.userReal )
    endfunction
    
    function Reaction takes Buff b returns nothing
        local integer lvl = b.getCaster().getLevel()
        
        set b.userReal = b.userReal + 0.5 + 0.02 * lvl
        set b.userReal2 = b.userReal2 + 20.0 + 0.8 * lvl
        
        call b.getCaster().doSpellDamage(b.getBuffedUnit(), b.userReal2, b.getCaster().calcSpellCritNoBonus()) 
        call b.getBuffedUnit().modifyProperty( MOD_ARMOR, -0.5 - 0.02 * lvl )
    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 myBuff = BuffType.createAuraEffectType(false)
        call myBuff.addPeriodicEvent( EventHandler.Reaction, 1.00 )
        call myBuff.addEventOnCleanup( EventHandler.Destroy )
        call myBuff.addEventOnCreate( EventHandler.Create )
        //call m.addModification(MOD_ARMOR,-1.0,-0.5)
        //call myBuff.setBuffModifier(m)
        call myBuff.setBuffIcon('@@0@@')
    endfunction

Tower Aura

AURA_auraEffect: myBuff AURA_power: 1 AURA_level: 1 AURA_auraRange: 900 AURA_targetType: TARGET_TYPE_CREEPS AURA_levelAdd: 0 AURA_powerAdd: 0 AURA_targetSelf: false