Skip to content

Commit

Permalink
Update composure.lua to be more retail accurate
Browse files Browse the repository at this point in the history
  • Loading branch information
lefneer311 authored Oct 8, 2024
1 parent 5db5d08 commit 618e717
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions scripts/effects/composure.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,6 @@ effectObject.onEffectGain = function(target, effect)
end

effectObject.onEffectTick = function(target, effect)
-- Recalculate accuracy every tick in case of level change
local player = target:getMaster() or target
local mLevel = player:getMainLvl()
local jpValue = player:getJobPointLevel(xi.jp.COMPOSURE_EFFECT)
local newAccPower = math.floor(((24 * mLevel) + 74) / 49)
local newPower = newAccPower + jpValue

if newPower ~= effect:getPower() then
player:delMod(xi.mod.ACC, effect:getPower()) -- Remove old bonus
effect:setPower(newPower) -- Update stored power
player:addMod(xi.mod.ACC, newPower) -- Apply new bonus
end
end

effectObject.onEffectLose = function(target, effect)
Expand Down

0 comments on commit 618e717

Please sign in to comment.