-----------------------------------
-- ID: 4434
-- Item: Plate of Mushroom Risotto
-- Food Effect: 3 Hr, All Races
-----------------------------------
-- MP 30
-- Strength -1
-- Vitality 3
-- Mind 3
-- MP Recovered while healing 2
-- Enmity -4
-----------------------------------
---@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, 30)
    target:addMod(xi.mod.STR, -1)
    target:addMod(xi.mod.VIT, 3)
    target:addMod(xi.mod.MND, 3)
    target:addMod(xi.mod.MPHEAL, 2)
    target:addMod(xi.mod.ENMITY, -4)
end

itemObject.onEffectLose = function(target, effect)
    target:delMod(xi.mod.FOOD_MP, 30)
    target:delMod(xi.mod.STR, -1)
    target:delMod(xi.mod.VIT, 3)
    target:delMod(xi.mod.MND, 3)
    target:delMod(xi.mod.MPHEAL, 2)
    target:delMod(xi.mod.ENMITY, -4)
end

return itemObject
