landsandboat/scripts/items/wizard_cookie.lua

31 lines
881 B
Lua
Raw Permalink Normal View History

2021-01-18 12:51:02 -05:00
-----------------------------------
2016-01-16 01:26:33 -05:00
-- ID: 4576
-- Item: wizard_cookie
-- Food Effect: 5Min, All Races
2021-01-18 12:51:02 -05:00
-----------------------------------
2016-01-16 01:26:33 -05:00
-- MP Recovered While Healing 7
-- Plantoid Killer 12
-- Slow Resist 12
2021-01-18 12:51:02 -05:00
-----------------------------------
---@type TItemFood
local itemObject = {}
2016-01-16 01:26:33 -05:00
itemObject.onItemCheck = function(target, item, caster)
return xi.itemUtils.foodOnItemCheck(target, xi.foodType.BASIC)
end
2016-01-16 01:26:33 -05:00
itemObject.onItemUse = function(target, user, item, action)
2026-02-19 22:48:02 -07:00
target:addStatusEffect(xi.effect.FOOD, { duration = 300, origin = user, sourceType = xi.effectSourceType.FOOD, sourceTypeParam = item:getID() })
end
2016-01-16 01:26:33 -05:00
itemObject.onEffectGain = function(target, effect)
effect:addMod(xi.mod.MPHEAL, 7)
effect:addMod(xi.mod.PLANTOID_KILLER, 12)
effect:addMod(xi.mod.SLOWRES, 12)
end
2016-01-16 01:26:33 -05:00
itemObject.onEffectLose = function(target, effect)
end
2021-01-17 11:55:03 -05:00
return itemObject