landsandboat/scripts/items/opacus_cell.lua
claywar 6e4fa2af25
[type] Add type annotations to Item scripts
rename to reflect type definition

Annotate xi.itemUtils.foodOnItemCheck

Make TItemFood functions optional, since the definition does not include types
2024-08-24 18:25:26 -04:00

22 lines
535 B
Lua

-----------------------------------
-- Opacus Cell
-- 5374
-- Unlocks job abilities, weapon skills
-----------------------------------
---@type TItem
local itemObject = {}
itemObject.onItemCheck = function(target, item, param, caster)
if target:hasStatusEffect(xi.effect.IMPAIRMENT) then
return 0
end
return -1
end
itemObject.onItemUse = function(target)
target:delStatusEffectSilent(xi.effect.IMPAIRMENT)
target:messageText(target, zones[target:getZoneID()].text.CELL_OFFSET + 9)
end
return itemObject