@@ -2309,42 +2309,42 @@ local skills, mod, flag, skill = ...
23092309 end
23102310 end,
23112311 postCritFunc = function(activeSkill, output, breakdown)
2312- if activeSkill.skillPart == 2 then
2313- local skillData = activeSkill.skillData
2314- local t_insert = table.insert
2315- local s_format = string.format
2312+ local skillData = activeSkill.skillData
2313+ local t_insert = table.insert
2314+ local s_format = string.format
23162315
2317- -- Calculate effective attack rate accounting for delayed projectile firing
2318- -- Projectiles orbit for base_skill_effect_duration before firing
2319- -- Recasting resets the timer, so attacking too fast wastes potential damage
2320- local baseDuration = skillData.duration
2321- local actualDuration = output.Duration or baseDuration
2322- local ticksNeeded = math.ceil(actualDuration / data.misc.ServerTickTime)
2323- local effectiveDelay = ticksNeeded * data.misc.ServerTickTime
2324- local maxEffectiveAPS = 1 / effectiveDelay
2325- local currentAPS = output.Speed
2316+ -- Calculate effective attack rate accounting for delayed projectile firing
2317+ -- Projectiles orbit for base_skill_effect_duration before firing
2318+ -- Recasting resets the timer, so attacking too fast wastes potential damage
2319+ local baseDuration = skillData.duration
2320+ local actualDuration = output.Duration or baseDuration
2321+ local ticksNeeded = math.ceil(actualDuration / data.misc.ServerTickTime)
2322+ local effectiveDelay = ticksNeeded * data.misc.ServerTickTime
2323+ local maxEffectiveAPS = 1 / effectiveDelay
2324+ local currentAPS = output.Speed
23262325
2327- output.KineticFusilladeMaxEffectiveAPS = maxEffectiveAPS
2326+ output.KineticFusilladeMaxEffectiveAPS = maxEffectiveAPS
23282327
2329- if breakdown then
2330- local breakdownAPS = {}
2331- t_insert(breakdownAPS, s_format("^8Projectiles orbit for %.3fs before firing", actualDuration))
2332- t_insert(breakdownAPS, s_format("^8Server tick time:^7 %.3fs", data.misc.ServerTickTime))
2333- t_insert(breakdownAPS, s_format("^8Ticks needed:^7 %d ^8(rounded up)", ticksNeeded))
2334- t_insert(breakdownAPS, s_format("^8Effective delay:^7 %.3fs", effectiveDelay))
2335- t_insert(breakdownAPS, s_format("^8Max effective attack rate:^7 1 / %.3f = %.2f", effectiveDelay, maxEffectiveAPS))
2336- if currentAPS and currentAPS > maxEffectiveAPS then
2337- t_insert(breakdownAPS, "")
2338- t_insert(breakdownAPS, s_format("^1Current attack rate (%.2f) exceeds max effective rate!", currentAPS))
2339- t_insert(breakdownAPS, s_format("^1DPS is reduced by %.1f%%", (1 - maxEffectiveAPS / currentAPS) * 100))
2340- elseif currentAPS then
2341- t_insert(breakdownAPS, "")
2342- t_insert(breakdownAPS, s_format("^2Current attack rate (%.2f) is within effective limits", currentAPS))
2343- end
2344- breakdown.KineticFusilladeMaxEffectiveAPS = breakdownAPS
2328+ if breakdown then
2329+ local breakdownAPS = {}
2330+ t_insert(breakdownAPS, s_format("^8Projectiles orbit for %.3fs before firing", actualDuration))
2331+ t_insert(breakdownAPS, s_format("^8Server tick time:^7 %.3fs", data.misc.ServerTickTime))
2332+ t_insert(breakdownAPS, s_format("^8Ticks needed:^7 %d ^8(rounded up)", ticksNeeded))
2333+ t_insert(breakdownAPS, s_format("^8Effective delay:^7 %.3fs", effectiveDelay))
2334+ t_insert(breakdownAPS, s_format("^8Max effective attack rate:^7 1 / %.3f = %.2f", effectiveDelay, maxEffectiveAPS))
2335+ if currentAPS and currentAPS > maxEffectiveAPS then
2336+ t_insert(breakdownAPS, "")
2337+ t_insert(breakdownAPS, s_format("^1Current attack rate (%.2f) exceeds max effective rate!", currentAPS))
2338+ t_insert(breakdownAPS, s_format("^1DPS is reduced by %.1f%%", (1 - maxEffectiveAPS / currentAPS) * 100))
2339+ elseif currentAPS then
2340+ t_insert(breakdownAPS, "")
2341+ t_insert(breakdownAPS, s_format("^2Current attack rate (%.2f) is within effective limits", currentAPS))
23452342 end
2343+ breakdown.KineticFusilladeMaxEffectiveAPS = breakdownAPS
2344+ end
23462345
2347- -- Adjust dpsMultiplier if attacking too fast
2346+ -- Adjust dpsMultiplier if attacking too fast (only for "All Projectiles" mode)
2347+ if activeSkill.skillPart == 2 then
23482348 if currentAPS and currentAPS > maxEffectiveAPS then
23492349 local efficiencyRatio = maxEffectiveAPS / currentAPS
23502350 local originalMultiplier = skillData.dpsMultiplier or output.ProjectileCount
0 commit comments