-----------------------------------
-- ID: 4540
-- Item: Boiled Tuna Head
-- Food Effect: 180Min, All Races
-----------------------------------
-- Magic 20
-- Dexterity 3
-- Intelligence 4
-- Mind -3
-- Magic Regen While Healing 2
-- Evasion 5
-----------------------------------
---@type TItemFood
local itemObject = {}

itemObject.onItemCheck = function(target, item, param, caster)
    return xi.itemUtils.foodOnItemCheck(target, xi.foodType.BASIC)
end

itemObject.onItemUse = function(target, user, item, action)
    target:addStatusEffect(xi.effect.FOOD, 0, 0, 10800, 0, 0, 0, xi.effectSourceType.FOOD, item:getID(), user:getID())
end

itemObject.onEffectGain = function(target, effect)
    target:addMod(xi.mod.FOOD_MP, 20)
    target:addMod(xi.mod.DEX, 3)
    target:addMod(xi.mod.INT, 4)
    target:addMod(xi.mod.MND, -3)
    target:addMod(xi.mod.MPHEAL, 2)
    target:addMod(xi.mod.EVA, 5)
end

itemObject.onEffectLose = function(target, effect)
    target:delMod(xi.mod.FOOD_MP, 20)
    target:delMod(xi.mod.DEX, 3)
    target:delMod(xi.mod.INT, 4)
    target:delMod(xi.mod.MND, -3)
    target:delMod(xi.mod.MPHEAL, 2)
    target:delMod(xi.mod.EVA, 5)
end

return itemObject
