landsandboat/scripts/items/bottle_of_cantarella.lua

21 lines
579 B
Lua

-----------------------------------
-- ID: 4246
-- Item: Cantarella
-- Item Effect: Poison 10HP / Removes 2000 HP over 10 minutes
-----------------------------------
---@type TItem
local itemObject = {}
itemObject.onItemCheck = function(target, item, caster)
return 0
end
itemObject.onItemUse = function(target, user)
if not target:hasStatusEffect(xi.effect.POISON) then
target:addStatusEffect(xi.effect.POISON, { power = 10, duration = 600, origin = user, tick = 3 })
else
target:messageBasic(xi.msg.basic.NO_EFFECT)
end
end
return itemObject