landsandboat/scripts/items/ether_+1.lua

21 lines
513 B
Lua

-----------------------------------
-- ID: 4129
-- Item: Ether +1
-- Item Effect: Restores 25 MP
-----------------------------------
---@type TItem
local itemObject = {}
itemObject.onItemCheck = function(target, item, caster)
if target:getMP() == target:getMaxMP() then
return xi.msg.basic.ITEM_UNABLE_TO_USE
end
return 0
end
itemObject.onItemUse = function(target)
target:messageBasic(xi.msg.basic.RECOVERS_MP, 0, target:addMP(25 * xi.settings.main.ITEM_POWER))
end
return itemObject