rename to reflect type definition Annotate xi.itemUtils.foodOnItemCheck Make TItemFood functions optional, since the definition does not include types
20 lines
573 B
Lua
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
|