Excalibur v1
1405
lvl: 40

ID:

45

Author:

SymphonyX

Rarity:

unique

Status:

Approved

Description:

The legendary Sword of the Kings.

Latest Upload Comment:

Restored from 1.10
Power of the Sword
Has an equal chance to decrease the armor of the damaged creep by 5 or 10 for 5 seconds.

Level Bonus:
+0.2 armor reduction.
Specials:
-5% attackspeed
+10% crit chance
+x0.1 crit damage
Download

Toggle Triggers

Header

goldcost: 0
    globals
    BuffType Symphony_armorReduce
    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
    
    local Modifier m = Modifier.create()
    set Symphony_armorReduce = BuffType.create(5,0,false)
    call m.addModification(MOD_ARMOR,-0,-0.2)
    call Symphony_armorReduce.setBuffModifier(m)
    call Symphony_armorReduce.setBuffIcon('@@0@@')

    endfunction

On Damage

ONDAMAGE_chance: 1.0 goldcost: 500 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Item itm returns nothing
    local Tower tower = itm.getCarrier()
    if Event.isMainTarget() == true then        
        if (GetRandomReal(0, 1) < 0.5) then 
            call Symphony_armorReduce.apply(tower,Event.getTarget(),25+tower.getLevel())
        else
            call Symphony_armorReduce.apply(tower,Event.getTarget(),50+tower.getLevel())
        endif
    endif
endfunction