landsandboat/scripts/items/daybreak.lua

24 lines
639 B
Lua
Raw Permalink Normal View History

2025-10-16 18:35:29 +01:00
-----------------------------------
-- ID: 22040
-- Daybreak
-- Able to cast "Dispelga"
-----------------------------------
---@type TItem
local itemObject = {}
itemObject.onItemCheck = function(target, item, caster)
2025-10-16 18:35:29 +01:00
end
itemObject.onItemEquip = function(target, item)
local mainWeapon = target:getEquippedItem(xi.slot.MAIN)
if mainWeapon and mainWeapon:getID() == xi.item.DAYBREAK then
target:addSpell(xi.magic.spell.DISPELGA, { silentLog = true, saveToDB = false })
2025-10-16 18:35:29 +01:00
end
end
itemObject.onItemUnequip = function(target, item)
target:delSpell(xi.magic.spell.DISPELGA, { saveToDB = false })
2025-10-16 18:35:29 +01:00
end
return itemObject