landsandboat/scripts/items/aries_mantle.lua

25 lines
636 B
Lua

-----------------------------------
-- ID: 13693
-- Item: Aries Mantle
-- Enchantment: Sleep
-----------------------------------
---@type TItem
local itemObject = {}
itemObject.onItemCheck = function(target, item, caster)
return 0
end
itemObject.onItemUse = function(target, user)
if
target:hasStatusEffect(xi.effect.SLEEP_I) or
target:hasStatusEffect(xi.effect.SLEEP_II) or
target:hasStatusEffect(xi.effect.LULLABY)
then
target:messageBasic(xi.msg.basic.NO_EFFECT)
else
target:addStatusEffect(xi.effect.SLEEP_I, { duration = 30, origin = user })
end
end
return itemObject