Portable Tombstone v1
50
lvl: 0

ID:

274

Author:

Boekie

Rarity:

unique

Status:

Approved

Description:

A dark artefact from a graveyard seldom spoken of.

Latest Upload Comment:

Restored from 1.10
Curse of the Grave
This item has a 0.25% attackspeed adjusted chance on attack to kill a non boss, non champion target immediately.

Level Bonus:
+0.01% chance
Download

Toggle Triggers

Header

goldcost: 0
    globals
        MultiboardValues boekie_tombstonejibs
    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
    set boekie_tombstonejibs = MultiboardValues.create(1)
    call boekie_tombstonejibs.setKey(0,"Tombstone Kills")
    endfunction

On Attack

goldcost: 50 ONATTACK_chance: 1.0 ONATTACK_chanceLevelAdd: 0.0005
function onAttack takes Item itm returns nothing
    local Tower tower = itm.getCarrier()
    local Unit creep = Event.getTarget()
      
    if creep.getSize() < SIZE_CHAMPION and tower.calcChance((0.0025+(tower.getLevel()*0.0001)) * tower.getBaseAttackspeed()) then 
        call tower.killInstantly(creep)
        call SFXAtUnit("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",creep.getUnit())
        set itm.userInt = itm.userInt + 1
    endif 
endfunction

On Item Creation

goldcost: 0
function onCreate takes Item itm returns nothing
    set itm.userInt = 0 //number of innocent creeps slaughtered mercilessly.
endfunction

On Tower Details

goldcost: 0
function onTowerDetails takes Item itm returns MultiboardValues
    call boekie_tombstonejibs.setValue(0,I2S(itm.userInt))
    return boekie_tombstonejibs
endfunction