landsandboat/scripts/effects/focus.lua

27 lines
823 B
Lua
Raw Permalink Normal View History

2011-10-03 18:44:15 +00:00
-----------------------------------
2021-04-01 15:10:15 -04:00
-- xi.effect.FOCUS
2025-09-24 09:16:15 -05:00
-- Note: Glanzfaust bonus is implemented as a latent effect while wearing the equipment and having the effect
2011-10-03 18:44:15 +00:00
-----------------------------------
---@type TEffect
local effectObject = {}
2011-10-03 18:44:15 +00:00
-- TODO: implement focus ranged accuracy bonus (needs verification)
effectObject.onEffectGain = function(target, effect)
2025-09-24 09:16:15 -05:00
local bonusPower = effect:getPower()
local monkLevel = utils.getActiveJobLevel(target, xi.job.MNK) + 1
-- https://wiki.ffo.jp/html/2841.html
2025-09-24 09:16:15 -05:00
effect:addMod(xi.mod.ACC, monkLevel + bonusPower)
-- https://www.bg-wiki.com/ffxi/Focus
2025-09-24 09:16:15 -05:00
effect:addMod(xi.mod.CRITHITRATE, math.floor(monkLevel * 0.2))
end
2011-10-03 18:44:15 +00:00
effectObject.onEffectTick = function(target, effect)
end
2011-10-03 18:44:15 +00:00
effectObject.onEffectLose = function(target, effect)
end
return effectObject