Soul Collectors Cloak v6
1000
lvl: 28

ID:

184

Author:

cedi

Rarity:

unique

Status:

Approved

Description:

This cloak has the special ability to absorb the souls of units that are killed by the user of the cloak.

Latest Upload Comment:

Damage gain from 20 to 10
Soul Power
Each time the user of this cloak kills a unit, its dps is increased by 10. There is a maximum of 4000 bonus dps. The extra damage is bound to the item.
Download

Toggle Triggers

Header

goldcost: 0
            globals
        MultiboardValues cedi_dpsCloakMB
    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 cedi_dpsCloakMB = MultiboardValues.create(1)
        call cedi_dpsCloakMB.setKey(0,"DPS Gained")
    endfunction
        

On Item Creation

goldcost: 0
function onCreate takes Item itm returns nothing
            
set itm.userInt = 0
        
endfunction

On Item Drop

goldcost: 0
function onDrop takes Item itm returns nothing
            
call itm.getCarrier().modifyProperty(MOD_DPS_ADD, -itm.userInt)
        
endfunction

On Item Pickup

goldcost: 0
function onPickup  takes Item itm returns nothing
            
call itm.getCarrier().modifyProperty(MOD_DPS_ADD, itm.userInt)
        
endfunction

On Kill

goldcost: 1000
function onKill takes Item itm returns nothing
            
if itm.userInt < 4000 then
        call itm.getCarrier().modifyProperty(MOD_DPS_ADD, 10)
        set itm.userInt = itm.userInt + 10
    endif
        
endfunction

On Tower Details

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