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

17 lines
401 B
Lua

-----------------------------------
-- ID: 4863
-- Scroll of Break
-- Teaches the black magic Break
-----------------------------------
---@type TItem
local itemObject = {}
itemObject.onItemCheck = function(target, item, param, caster)
return target:canLearnSpell(xi.magic.spell.BREAK)
end
itemObject.onItemUse = function(target)
target:addSpell(xi.magic.spell.BREAK)
end
return itemObject