landsandboat/scripts/items/black_drop.lua

22 lines
546 B
Lua

-----------------------------------
-- ID: 4265
-- Item: Black Drop
-- Transports the user to their Home Point
-----------------------------------
---@type TItem
local itemObject = {}
itemObject.onItemCheck = function(target, item, caster)
if target:hasStatusEffect(xi.effect.MEDICINE) then
return xi.msg.basic.ITEM_NO_USE_MEDICATED
end
return 0
end
itemObject.onItemUse = function(target, user)
target:addStatusEffect(xi.effect.MEDICINE, { duration = 3600, origin = user })
target:warp()
end
return itemObject