landsandboat/scripts/items/walnut_cookie.lua

33 lines
918 B
Lua
Raw Permalink Normal View History

2021-01-18 12:51:02 -05:00
-----------------------------------
-- ID: 5922
-- Item: Walnut Cookie
-- Food Effect: 3 Min, All Races
2021-01-18 12:51:02 -05:00
-----------------------------------
-- HP Healing 3
-- MP Healing 6
-- Bird Killer 10
-- Resist Paralyze 10
2021-01-18 12:51:02 -05:00
-----------------------------------
---@type TItemFood
local itemObject = {}
itemObject.onItemCheck = function(target, item, caster)
return xi.itemUtils.foodOnItemCheck(target, xi.foodType.BASIC)
end
itemObject.onItemUse = function(target, user, item, action)
2026-02-19 22:48:02 -07:00
target:addStatusEffect(xi.effect.FOOD, { duration = 180, origin = user, sourceType = xi.effectSourceType.FOOD, sourceTypeParam = item:getID() })
end
itemObject.onEffectGain = function(target, effect)
effect:addMod(xi.mod.HPHEAL, 3)
effect:addMod(xi.mod.MPHEAL, 6)
effect:addMod(xi.mod.BIRD_KILLER, 10)
effect:addMod(xi.mod.PARALYZERES, 10)
end
itemObject.onEffectLose = function(target, effect)
end
2021-01-17 11:55:03 -05:00
return itemObject