-----------------------------------------
-- ID: 5659
-- Item: Dish of Spafhetti Ortolana
-- Food Effect: 1 Hr, All Races
-----------------------------------------
-- Agility 2
-- Vitality 2
-- HP +30% Cap 75
-- StoreTP +6
-----------------------------------------

require("scripts/globals/status");

-----------------------------------------
-- OnItemCheck
-----------------------------------------

function onItemCheck(target)
result = 0;
	if (target:hasStatusEffect(EFFECT_FOOD) == true) then
		result = 246;
	end
return result;
end;

-----------------------------------------
-- OnItemUse
-----------------------------------------

function onItemUse(target)
	target:addStatusEffect(EFFECT_FOOD,0,0,7200,5659);
end;

-----------------------------------------
-- onEffectGain Action
-----------------------------------------

function onEffectGain(target,effect)
	target:addMod(MOD_VIT, 2);
	target:addMod(MOD_AGI, 2);
	target:addMod(MOD_FOOD_HPP, 30);
	target:addMod(MOD_FOOD_HP_CAP, 75);
	target:addMod(MOD_STORETP, 6);
end;

-----------------------------------------
-- onEffectLose Action
-----------------------------------------

function onEffectLose(target,effect)
	target:delMod(MOD_VIT, 2);
	target:delMod(MOD_AGI, 2);
	target:delMod(MOD_FOOD_HPP, 30);
	target:delMod(MOD_FOOD_HP_CAP, 75);
	target:delMod(MOD_STORETP, 6);
end;
