landsandboat/scripts/items/reraiser.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
573 B
Lua

-----------------------------------
-- ID: 4172
-- Item: Reraiser
-- Item Effect: This potion functions inthe same way as the spell Reraise.
-----------------------------------
---@type TItem
local itemObject = {}
itemObject.onItemCheck = function(target, item, param, caster)
return 0
end
itemObject.onItemUse = function(target)
local duration = 3600
target:delStatusEffect(xi.effect.RERAISE)
target:addStatusEffect(xi.effect.RERAISE, 1, 0, duration)
target:messageBasic(xi.msg.basic.GAINS_EFFECT_OF_STATUS, xi.effect.RERAISE)
end
return itemObject