2021-01-18 12:51:02 -05:00
|
|
|
-----------------------------------
|
2020-07-19 02:46:49 -04:00
|
|
|
-- ID: 15559
|
|
|
|
|
-- Item: vision_ring
|
|
|
|
|
-- Item Effect: ACC+2 RACC+2
|
|
|
|
|
-- Duration: 30 Minutes
|
2021-01-18 12:51:02 -05:00
|
|
|
-----------------------------------
|
2024-08-24 12:32:37 -04:00
|
|
|
---@type TItem
|
2022-10-06 17:25:46 +03:00
|
|
|
local itemObject = {}
|
2020-07-19 02:46:49 -04:00
|
|
|
|
2026-05-25 20:42:11 -06:00
|
|
|
itemObject.onItemCheck = function(target, item, caster)
|
2024-11-13 10:45:49 -05:00
|
|
|
if target:getStatusEffectBySource(xi.effect.ENCHANTMENT, xi.effectSourceType.EQUIPPED_ITEM, xi.item.VISION_RING) ~= nil then
|
|
|
|
|
target:delStatusEffect(xi.effect.ENCHANTMENT, nil, xi.effectSourceType.EQUIPPED_ITEM, xi.item.VISION_RING)
|
2020-07-19 02:46:49 -04:00
|
|
|
end
|
2022-11-22 15:24:25 -05:00
|
|
|
|
2020-07-19 02:46:49 -04:00
|
|
|
return 0
|
|
|
|
|
end
|
|
|
|
|
|
2026-02-19 22:48:02 -07:00
|
|
|
itemObject.onItemUse = function(target, user)
|
2024-11-13 10:45:49 -05:00
|
|
|
if target:hasEquipped(xi.item.VISION_RING) then
|
2026-02-19 22:48:02 -07:00
|
|
|
target:addStatusEffect(xi.effect.ENCHANTMENT, { duration = 1800, origin = user, sourceType = xi.effectSourceType.EQUIPPED_ITEM, sourceTypeParam = xi.item.VISION_RING })
|
2024-11-13 10:45:49 -05:00
|
|
|
end
|
2020-07-19 02:46:49 -04:00
|
|
|
end
|
|
|
|
|
|
2022-10-06 17:25:46 +03:00
|
|
|
itemObject.onEffectGain = function(target, effect)
|
2025-11-27 12:29:39 -05:00
|
|
|
effect:addMod(xi.mod.ACC, 2)
|
|
|
|
|
effect:addMod(xi.mod.RACC, 2)
|
2020-07-19 02:46:49 -04:00
|
|
|
end
|
|
|
|
|
|
2022-10-06 17:25:46 +03:00
|
|
|
itemObject.onEffectLose = function(target, effect)
|
2020-07-19 02:46:49 -04:00
|
|
|
end
|
2021-01-17 11:55:03 -05:00
|
|
|
|
2022-10-06 17:25:46 +03:00
|
|
|
return itemObject
|