landsandboat/scripts/items/flask_of_blinding_potion.lua

21 lines
566 B
Lua

-----------------------------------
-- ID: 4163
-- Item: Blinding Potion
-- Item Effect: This potion induces blindness.
-----------------------------------
---@type TItem
local itemObject = {}
itemObject.onItemCheck = function(target, item, caster)
return 0
end
itemObject.onItemUse = function(target, user)
if not target:hasStatusEffect(xi.effect.BLINDNESS) then
target:addStatusEffect(xi.effect.BLINDNESS, { power = 256, duration = 180, origin = user })
else
target:messageBasic(xi.msg.basic.NO_EFFECT)
end
end
return itemObject