Crit Blade v1 644
lvl: 16
|
ID: 250
Author: Ranakastrasz
Rarity: unique
Status: Approved
|
Critical Accumulation
On attack, increases critical strike chance by 2% up to a maximum of 40%. The bonus is lost when a critical strike is made. The bonus is bound to the item.
Specials:
Specials: +x0.8 crit damage |
Download
Toggle Triggers Header
goldcost: 0
globals
MultiboardValues CritBlade_multiboard
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 CritBlade_multiboard = MultiboardValues.create(1)
call CritBlade_multiboard.setKey(0,"Crit Gained")
endfunction
On Attack
goldcost: 50
ONATTACK_chance: 1.0
ONATTACK_chanceLevelAdd: 0.0
function onAttack takes Item itm returns nothing
if (itm.getCarrier().getNumberOfCrits() > 0)then
call itm.getCarrier().modifyProperty( MOD_ATK_CRIT_CHANCE , -itm.userReal )
//call itm.getCarrier().modifyProperty( MOD_ATK_CRIT_DAMAGE , -itm.userReal )
set itm.userReal = 0
//call itm.setCharges(0)
else
//call itm.setCharges(itm.getCharges()+R2I(0.02*100))
if itm.userReal < 0.40 then
set itm.userReal = itm.userReal + 0.02
call itm.getCarrier().modifyProperty( MOD_ATK_CRIT_CHANCE, 0.02 )
//call itm.getCarrier().modifyProperty( MOD_ATK_CRIT_DAMAGE, 0.02 )
endif
endif
endfunction
On Item Creation
goldcost: 0
function onCreate takes Item itm returns nothing
set itm.userReal = 0.00
endfunction
On Item Drop
goldcost: 0
function onDrop takes Item itm returns nothing
call itm.getCarrier().modifyProperty( MOD_ATK_CRIT_CHANCE , -itm.userReal )
//call itm.getCarrier().modifyProperty( MOD_ATK_CRIT_DAMAGE , -itm.userReal )
endfunction
On Item Pickup
goldcost: 0
function onPickup takes Item itm returns nothing
call itm.getCarrier().modifyProperty( MOD_ATK_CRIT_CHANCE , itm.userReal )
//call itm.getCarrier().modifyProperty( MOD_ATK_CRIT_DAMAGE , itm.userReal )
endfunction
On Tower Details
goldcost: 0
function onTowerDetails takes Item itm returns MultiboardValues
call CritBlade_multiboard.setValue(0,R2S(itm.userReal*100)+"%")
return CritBlade_multiboard
endfunction
|
Description:
Latest Upload Comment: