2021-01-18 12:51:02 -05:00
|
|
|
-----------------------------------
|
2013-01-28 14:42:48 +00:00
|
|
|
-- ID: 15838
|
|
|
|
|
-- Item: Protect Ring
|
|
|
|
|
-- Item Effect: Protect II
|
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 = {}
|
2013-01-28 14:42:48 +00:00
|
|
|
|
2026-05-25 20:42:11 -06:00
|
|
|
itemObject.onItemCheck = function(target, item, caster)
|
2018-08-07 19:36:44 -04:00
|
|
|
return 0
|
|
|
|
|
end
|
2013-01-28 14:42:48 +00:00
|
|
|
|
2026-02-19 22:48:02 -07:00
|
|
|
itemObject.onItemUse = function(target, user)
|
2021-08-23 13:57:50 -07:00
|
|
|
local power = 50
|
|
|
|
|
local tier = 2
|
2021-08-29 06:24:20 -07:00
|
|
|
local bonus = 0
|
2021-08-23 13:57:50 -07:00
|
|
|
if target:getMod(xi.mod.ENHANCES_PROT_SHELL_RCVD) > 0 then
|
2021-08-29 06:24:20 -07:00
|
|
|
bonus = 2 -- 2x Tier from MOD
|
2021-08-23 13:57:50 -07:00
|
|
|
end
|
|
|
|
|
|
2021-08-29 06:24:20 -07:00
|
|
|
power = power + (bonus * tier)
|
2021-08-23 13:57:50 -07:00
|
|
|
|
2026-02-19 22:48:02 -07:00
|
|
|
if target:addStatusEffect(xi.effect.PROTECT, { power = power, duration = 1800, origin = user, tier = tier }) then
|
2021-04-01 15:10:15 -04:00
|
|
|
target:messageBasic(xi.msg.basic.GAINS_EFFECT_OF_STATUS, xi.effect.PROTECT)
|
2013-01-28 14:42:48 +00:00
|
|
|
else
|
2021-04-01 15:10:15 -04:00
|
|
|
target:messageBasic(xi.msg.basic.NO_EFFECT)
|
2013-01-28 14:42:48 +00:00
|
|
|
end
|
2018-08-07 19:36:44 -04:00
|
|
|
end
|
2021-01-17 11:55:03 -05:00
|
|
|
|
2022-10-06 17:25:46 +03:00
|
|
|
return itemObject
|