landsandboat/scripts/items/potion_+2.lua

21 lines
514 B
Lua

-----------------------------------
-- ID: 4114
-- Item: Potion +2
-- Item Effect: Restores 75 HP
-----------------------------------
---@type TItem
local itemObject = {}
itemObject.onItemCheck = function(target, item, caster)
if target:getHP() == target:getMaxHP() then
return xi.msg.basic.ITEM_UNABLE_TO_USE
end
return 0
end
itemObject.onItemUse = function(target)
target:messageBasic(xi.msg.basic.RECOVERS_HP, 0, target:addHP(75 * xi.settings.main.ITEM_POWER))
end
return itemObject