landsandboat/scripts/items/hellsteak.lua
WinterSolstice8 14427a7f48 [lua] Convert food HP/MP mods to FOOD_HP/FOOD_MP mods
Command used to update files:

find -name "*.lua" -exec bash -c 'grep "xi.effect.FOOD" "{}" && sed -i "s/xi.mod.MP,/xi.mod.FOOD_MP,/g ; s/xi.mod.HP,/xi.mod.FOOD_HP,/g" "{}"' \;
2024-12-06 20:04:59 -07:00

52 lines
1.5 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)
target:addStatusEffect(xi.effect.FOOD, 0, 0, 10800, 5609)
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