landsandboat/scripts/items/mist_tunic.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
661 B
Lua

-----------------------------------
-- ID: 14423
-- Item: Mist Tunic
-- 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_TUNIC) then
if not target:hasStatusEffect(xi.effect.EVASION_BOOST) then
target:addStatusEffect(xi.effect.EVASION_BOOST, 20, 0, 180, 0, 0, 0, xi.effectSourceType.EQUIPPED_ITEM, xi.item.MIST_TUNIC)
else
target:messageBasic(xi.msg.basic.NO_EFFECT)
end
end
end
return itemObject