landsandboat/scripts/items/bottle_of_ether_drops.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
540 B
Lua

-----------------------------------
-- ID: 5357
-- Item: Ether Drop
-- Item Effect: Restores 15 MP
-----------------------------------
---@type TItem
local itemObject = {}
itemObject.onItemCheck = function(target, item, param, caster)
if target:hasStatusEffect(xi.effect.MEDICINE) then
return xi.msg.basic.ITEM_NO_USE_MEDICATED
end
return 0
end
itemObject.onItemUse = function(target)
target:addMP(15 * xi.settings.main.ITEM_POWER)
target:addStatusEffect(xi.effect.MEDICINE, 0, 0, 300)
end
return itemObject