Skip to content

Commit

Permalink
Streamline Composure effect
Browse files Browse the repository at this point in the history
  • Loading branch information
lefneer311 authored Oct 8, 2024
1 parent 618e717 commit 385bdf7
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions scripts/effects/composure.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,15 @@
local effectObject = {}

effectObject.onEffectGain = function(target, effect)
local player = target:getMaster() or target
local mLevel = player:getMainLvl()
local jpValue = player:getJobPointLevel(xi.jp.COMPOSURE_EFFECT)
local accPower = math.floor(((24 * mLevel) + 74) / 49)
effect:setPower(accPower + jpValue)
local power = math.floor((24 * target:getMainLvl() + 74) / 49) + target:getJobPointLevel(xi.jp.COMPOSURE_EFFECT)

player:addMod(xi.mod.ACC, effect:getPower())
effect:addMod(xi.mod.ACC, power)
end

effectObject.onEffectTick = function(target, effect)
end

effectObject.onEffectLose = function(target, effect)
local player = target:getMaster() or target

player:delMod(xi.mod.ACC, effect:getPower())
end

return effectObject

0 comments on commit 385bdf7

Please sign in to comment.