Bronze Dragon Roost v1
1600
ID:
63
Family ID:
Author:
cedi
Rarity:
unique
Element:
iron
Attack Type:
Essence
Attack Range:
800
Attack CD:
2
Damage:
1186-1190
Status:
Approved

Description:

The mechanical version of the other two dragon roosts.
Specials:
Bounce attack:
   6 targets
   -10% damage per bounce
Bronzefication
Each time this tower damages a unit it has a 10% chance to turn the target's flesh into bronze for 5 seconds. The unit is slowed by 50%, loses 50% of its health regeneration, has a 25% higher item quality and has 50% more armor.

Level Bonus:
-1% hp regen
-0.8% armor
+1% item quality
+0.4% chance
Download

Toggle Triggers

Header

    globals
        BuffType BT
    endglobals
    
    function startA takes Buff B returns nothing
        local Unit U = B.getBuffedUnit()
        local unit u = U.getUnit()
        
        call SetUnitVertexColor( u, 255, 255, 125, 255 )
        call SetUnitTimeScale( u, 0.5 )
        set u = null
    endfunction
    
    function end takes Buff B returns nothing
        local Unit U = B.getBuffedUnit()
        local unit u = U.getUnit()
        
        call SetUnitVertexColor( u, 255, 255, 255, 255 ) 
        call SetUnitTimeScale( u, 1 )
        set u = null
    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 mod = Modifier.create()
        call mod.addModification( MOD_MOVESPEED, -0.5, 0 )
        call mod.addModification( MOD_HP_REGEN_PERC, -0.5, -0.01 )
        call mod.addModification( MOD_ARMOR_PERC, 0.5, -0.008 )
        //call mod.addModification( MOD_HP_PERC, 0.15, -0.003 )
        call mod.addModification( MOD_ITEM_QUALITY_ON_DEATH, 0.25, 0.01 )
        
        set BT = BuffType.create( 5.0, 0.1, false )
        call BT.setBuffIcon( '@@0@@' )
        call BT.setBuffModifier( mod )
        call BT.addEventOnCreate( startA )
        call BT.addEventOnCleanup( end )
    endfunction

On Damage

ONDAMAGE_chance: 0.1 ONDAMAGE_chanceLevelAdd: 0.004
function onDamage takes Tower tower returns nothing
    call BT.apply( tower, Event.getTarget(), tower.getLevel() )
endfunction