landsandboat/scripts/items/hellsteak.lua
2025-10-05 21:12:24 -06:00

52 lines
1.6 KiB
Lua

-----------------------------------
-- ID: 5609
-- Item: hellsteak
-- Food Effect: 180Min, All Races
-----------------------------------
-- Health 20
-- Strength 6
-- Intelligence -2
-- Health Regen While Healing 2
-- hMP +1
-- Attack % 18 (cap 145)
-- Ranged ATT % 18 (cap 145)
-- Dragon Killer 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_HP, 20)
target:addMod(xi.mod.STR, 6)
target:addMod(xi.mod.INT, -2)
target:addMod(xi.mod.HPHEAL, 2)
target:addMod(xi.mod.MPHEAL, 1)
target:addMod(xi.mod.FOOD_ATTP, 18)
target:addMod(xi.mod.FOOD_ATT_CAP, 145)
target:addMod(xi.mod.FOOD_RATTP, 18)
target:addMod(xi.mod.FOOD_RATT_CAP, 145)
target:addMod(xi.mod.DRAGON_KILLER, 5)
end
itemObject.onEffectLose = function(target, effect)
target:delMod(xi.mod.FOOD_HP, 20)
target:delMod(xi.mod.STR, 6)
target:delMod(xi.mod.INT, -2)
target:delMod(xi.mod.HPHEAL, 2)
target:delMod(xi.mod.MPHEAL, 1)
target:delMod(xi.mod.FOOD_ATTP, 18)
target:delMod(xi.mod.FOOD_ATT_CAP, 145)
target:delMod(xi.mod.FOOD_RATTP, 18)
target:delMod(xi.mod.FOOD_RATT_CAP, 145)
target:delMod(xi.mod.DRAGON_KILLER, 5)
end
return itemObject