landsandboat/scripts/items/resolution_ring.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

31 lines
759 B
Lua

-----------------------------------
-- ID: 28568
-- Item: Resolution Ring
-- Experience point bonus
-----------------------------------
-- Bonus: +50%
-- Duration: 720 min
-- Max bonus: 30000 exp
-----------------------------------
---@type TItem
local itemObject = {}
itemObject.onItemCheck = function(target, item, param, caster)
local result = 0
if target:hasStatusEffect(xi.effect.DEDICATION) then
result = xi.msg.basic.ITEM_UNABLE_TO_USE_2
end
return result
end
itemObject.onItemUse = function(target)
local effect = xi.effect.DEDICATION
local power = 50
local duration = 43200
local subpower = 30000
xi.itemUtils.addItemExpEffect(target, effect, power, duration, subpower)
end
return itemObject