31 lines
983 B
Lua
31 lines
983 B
Lua
-----------------------------------
|
|
-- ID: 15261
|
|
-- Item: hydra_tiara
|
|
-- Item Effect: Crit Rate +7% **Needs validation**
|
|
-- Duration: 3 Minutes
|
|
-----------------------------------
|
|
---@type TItem
|
|
local itemObject = {}
|
|
|
|
itemObject.onItemCheck = function(target, user)
|
|
if target:getStatusEffectBySource(xi.effect.POTENCY, xi.effectSourceType.EQUIPPED_ITEM, xi.item.HYDRA_TIARA) ~= nil then
|
|
target:delStatusEffect(xi.effect.POTENCY, nil, xi.effectSourceType.EQUIPPED_ITEM, xi.item.HYDRA_TIARA)
|
|
end
|
|
|
|
return 0
|
|
end
|
|
|
|
itemObject.onItemUse = function(target, user)
|
|
if target:hasEquipped(xi.item.HYDRA_TIARA) then
|
|
target:addStatusEffect(xi.effect.POTENCY, { duration = 180, origin = user, sourceType = xi.effectSourceType.EQUIPPED_ITEM, sourceTypeParam = xi.item.HYDRA_TIARA })
|
|
end
|
|
end
|
|
|
|
itemObject.onEffectGain = function(target, effect)
|
|
effect:addMod(xi.mod.CRITHITRATE, 7)
|
|
end
|
|
|
|
itemObject.onEffectLose = function(target, effect)
|
|
end
|
|
|
|
return itemObject
|