landsandboat/scripts/items/decennial_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
760 B
Lua

-----------------------------------
-- ID: 10796
-- Item: Decennial Ring
-- Experience point bonus
-----------------------------------
-- Bonus: +100%
-- Duration: 720 min
-- Max bonus: 10000 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 = 100
local duration = 43200
local subpower = 10000
xi.itemUtils.addItemExpEffect(target, effect, power, duration, subpower)
end
return itemObject