landsandboat/scripts/items/mist_slacks.lua
jamesbradleym d241316858 Manage status effect by source
Co-authored-by: jamesbradleym <jamesbradleym@gmail.com>
Co-authored-by: TracentEden <92269743+TracentEden@users.noreply.github.com>
2024-11-13 10:45:53 -05:00

23 lines
664 B
Lua

-----------------------------------
-- ID: 14324
-- Item: Mist Slacks
-- Item Effect: Evasion Boost
-----------------------------------
---@type TItem
local itemObject = {}
itemObject.onItemCheck = function(target, item, param, caster)
return 0
end
itemObject.onItemUse = function(target)
if target:hasEquipped(xi.item.MIST_SLACKS) then
if not target:hasStatusEffect(xi.effect.EVASION_BOOST) then
target:addStatusEffect(xi.effect.EVASION_BOOST, 15, 0, 180, 0, 0, 0, xi.effectSourceType.EQUIPPED_ITEM, xi.item.MIST_SLACKS)
else
target:messageBasic(xi.msg.basic.NO_EFFECT)
end
end
end
return itemObject