landsandboat/scripts/items/ether.lua

22 lines
510 B
Lua
Raw Permalink Normal View History

2021-01-18 12:51:02 -05:00
-----------------------------------
2016-01-16 01:26:33 -05:00
-- ID: 4128
-- Item: Ether
-- Item Effect: Restores 20 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(20 * xi.settings.main.ITEM_POWER))
end
2021-01-17 11:55:03 -05:00
return itemObject