-----------------------------------
-- ID: 5220
-- Item: plate_of_ikra_gunkan_+1
-- Food Effect: 60Min, All Races
-----------------------------------
-- Health 30
-- Magic 12
-- Dexterity 3
-- Mind -1
-- Accuracy % 18
-- Accuracy Cap 30
-- Ranged ACC % 18
-- Ranged ACC Cap 30
-----------------------------------
---@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, 3600, 0, 0, 0, xi.effectSourceType.FOOD, item:getID(), user:getID())
end

itemObject.onEffectGain = function(target, effect)
    target:addMod(xi.mod.FOOD_HP, 30)
    target:addMod(xi.mod.FOOD_MP, 12)
    target:addMod(xi.mod.DEX, 3)
    target:addMod(xi.mod.MND, -1)
    target:addMod(xi.mod.FOOD_ACCP, 18)
    target:addMod(xi.mod.FOOD_ACC_CAP, 30)
    target:addMod(xi.mod.FOOD_RACCP, 18)
    target:addMod(xi.mod.FOOD_RACC_CAP, 30)
end

itemObject.onEffectLose = function(target, effect)
    target:delMod(xi.mod.FOOD_HP, 30)
    target:delMod(xi.mod.FOOD_MP, 12)
    target:delMod(xi.mod.DEX, 3)
    target:delMod(xi.mod.MND, -1)
    target:delMod(xi.mod.FOOD_ACCP, 18)
    target:delMod(xi.mod.FOOD_ACC_CAP, 30)
    target:delMod(xi.mod.FOOD_RACCP, 18)
    target:delMod(xi.mod.FOOD_RACC_CAP, 30)
end

return itemObject
