landsandboat/scripts/items/ether_+1.lua

22 lines
513 B
Lua
Raw Permalink Normal View History

2021-01-18 12:51:02 -05:00
-----------------------------------
2016-01-16 01:26:33 -05:00
-- ID: 4129
-- Item: Ether +1
-- Item Effect: Restores 25 MP
2021-01-18 12:51:02 -05:00
-----------------------------------
---@type TItem
local itemObject = {}
2016-01-16 01:26:33 -05:00
itemObject.onItemCheck = function(target, item, caster)
if target:getMP() == target:getMaxMP() then
2021-04-01 15:10:15 -04:00
return xi.msg.basic.ITEM_UNABLE_TO_USE
2017-11-11 00:34:58 -05:00
end
return 0
end
2016-01-16 01:26:33 -05:00
itemObject.onItemUse = function(target)
target:messageBasic(xi.msg.basic.RECOVERS_MP, 0, target:addMP(25 * xi.settings.main.ITEM_POWER))
end
2021-01-17 11:55:03 -05:00
return itemObject