landsandboat/scripts/items/naruko_earring.lua

25 lines
856 B
Lua
Raw Permalink Normal View History

2021-01-18 12:51:02 -05:00
-----------------------------------
2018-09-27 22:30:57 -05:00
-- ID: 14789
-- Item: Naruko Earring
-- Item Effect: Enmity +10
-- Duration: 3 Minutes
2021-01-18 12:51:02 -05:00
-----------------------------------
---@type TItem
local itemObject = {}
2018-09-27 22:30:57 -05:00
itemObject.onItemCheck = function(target, item, caster)
if target:getStatusEffectBySource(xi.effect.ENMITY_BOOST, xi.effectSourceType.EQUIPPED_ITEM, xi.item.NARUKO_EARRING) ~= nil then
target:delStatusEffect(xi.effect.ENMITY_BOOST, nil, xi.effectSourceType.EQUIPPED_ITEM, xi.item.NARUKO_EARRING)
2018-09-27 22:30:57 -05:00
end
2018-09-27 22:30:57 -05:00
return 0
end
2026-02-19 22:48:02 -07:00
itemObject.onItemUse = function(target, user)
if target:hasEquipped(xi.item.NARUKO_EARRING) then
2026-02-19 22:48:02 -07:00
target:addStatusEffect(xi.effect.ENMITY_BOOST, { power = 10, duration = 180, origin = user, sourceType = xi.effectSourceType.EQUIPPED_ITEM, sourceTypeParam = xi.item.NARUKO_EARRING })
end
end
2021-01-17 11:55:03 -05:00
return itemObject