Chilled Spire v1
800
ID:
304
Family ID:
Author:
SirCoqaLot.
Rarity:
rare
Element:
ice
Attack Type:
Elemental
Attack Range:
1100
Attack CD:
1.4
Damage:
801-801
Status:
Approved

Description:

Advanced frost tower that will freeze attacked creeps, stunning them and reducing their health regeneration.
Cold
This tower has a 20% chance on attack to freeze the attacked creep and reduce its health regeneration by 20%. The freeze lasts for 1 second and cannot be reapplied on already frozen units. Chance to proc, health regeneration reduction and freeze duration are halved for bosses. Does not affect immune creeps. 

Level Bonus:
+0.4% chance
+0.05 seconds duration
-0.6% hp regen
Download

Toggle Triggers

Header

    globals
    //@export
    BuffType sirFrost
    endglobals
    
    private function pauseAnim takes Buff b returns nothing
        call SetUnitTimeScale(b.getBuffedUnit().getUnit(),0)
    endfunction
    
    private function unPauseAnim takes Buff b returns nothing
        call SetUnitTimeScale(b.getBuffedUnit().getUnit(),1.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
        local Modifier regdown = Modifier.create()
        set sirFrost = BuffType.createDuplicate(cb_stun,-1,0,false)
        call sirFrost.setBuffIcon('@@0@@')
        call sirFrost.addEventOnCreate(pauseAnim)
        call sirFrost.addEventOnCleanup(unPauseAnim)
        // call sirFrost.addEventOnCleanup(regup)
        // call sirFrost.addEventOnCreate(regdown)
        call regdown.addModification(MOD_HP_REGEN_PERC, -(20)/100.0, -(0.6/100.0) )
        call sirFrost.setBuffModifier(regdown)
        
    endfunction

On Damage

ONDAMAGE_chance: 0.20 ONDAMAGE_chanceLevelAdd: 0.004
function onDamage takes Tower tower returns nothing
    local Creep creep = Event.getTarget()
    local integer lvl = tower.getLevel()
    local real scalar = 1.0
    if creep.getSize() >= SIZE_BOSS then
        set scalar = 0.5
    endif
    
    if GetRandomReal(0,1) < scalar and not creep.isImmune() and creep.getBuffOfType(sirFrost) == 0 then
        call sirFrost.applyCustomTimed(tower,creep,R2I(lvl * scalar),(1+lvl*0.05) * scalar )
        call SFXAtUnit("Abilities\\Spells\\Undead\\FreezingBreath\\FreezingBreathTargetArt.mdl",creep.getUnit())
    endif
    // call SFXAtUnit("Abilities\\Spells\\Undead\\FreezingBreath\\FreezingBreathTargetArt.mdl",creep.getUnit())
endfunction
Icy Spires v1
2400
ID:
323
Family ID:
Author:
SirCoqaLot.
Rarity:
rare
Element:
ice
Attack Type:
Elemental
Attack Range:
1100
Attack CD:
1.4
Damage:
2402-2402
Status:
Approved

Description:

Advanced frost tower that will freeze attacked creeps, stunning them and reducing their health regeneration.
Cold
This tower has a 25% chance on attack to freeze the attacked creep and reduce its health regeneration by 30%. The freeze lasts for 1.2 seconds and cannot be reapplied on already frozen units. Chance to proc, health regeneration reduction and freeze duration are halved for bosses. Does not affect immune creeps. 

Level Bonus:
+0.5% chance
+0.05 seconds duration
-0.8% hp regen
Download

Toggle Triggers

Header

    globals
    //@import
    BuffType sirFrost
    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: 0.25 ONDAMAGE_chanceLevelAdd: 0.005
function onDamage takes Tower tower returns nothing
    local Creep creep = Event.getTarget()
    local integer lvl = tower.getLevel()
    local real scalar = 1.0
    if creep.getSize() >= SIZE_BOSS then
        set scalar = 0.5
    endif
    
    if GetRandomReal(0,1) < scalar and not creep.isImmune() and creep.getBuffOfType(sirFrost) == 0 then
        call sirFrost.applyCustomTimed(tower,creep,R2I(lvl * scalar),(1.2+lvl*0.05) * scalar )
        call SFXAtUnit("Abilities\\Spells\\Undead\\FreezingBreath\\FreezingBreathTargetArt.mdl",creep.getUnit())
    endif
    // call SFXAtUnit("Abilities\\Spells\\Undead\\FreezingBreath\\FreezingBreathTargetArt.mdl",creep.getUnit())
endfunction