landsandboat/scripts/items/reraise_gorget.lua
claywar 6e4fa2af25
[type] Add type annotations to Item scripts
rename to reflect type definition

Annotate xi.itemUtils.foodOnItemCheck

Make TItemFood functions optional, since the definition does not include types
2024-08-24 18:25:26 -04:00

20 lines
568 B
Lua

-----------------------------------
-- ID: 13171
-- Reraise Gorget
-- This necklace functions in the same way as the spell Reraise II.
-----------------------------------
---@type TItem
local itemObject = {}
itemObject.onItemCheck = function(target, item, param, caster)
return 0
end
itemObject.onItemUse = function(target)
local duration = 7200
target:delStatusEffect(xi.effect.RERAISE)
target:addStatusEffect(xi.effect.RERAISE, 2, 0, duration)
target:messageBasic(xi.msg.basic.GAINS_EFFECT_OF_STATUS, xi.effect.RERAISE)
end
return itemObject