Skip to content

Commit 2699541

Browse files
author
LocalIdentity
committed
Revert "Kinetic Fusillade MaxAPS calculation (#9362)"
This reverts commit 6ae17e9.
1 parent 6ae17e9 commit 2699541

2 files changed

Lines changed: 15 additions & 13 deletions

File tree

src/Data/Skills/act_int.lua

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11203,28 +11203,29 @@ skills["KineticFusillade"] = {
1120311203
-- Projectiles orbit for base_skill_effect_duration before firing
1120411204
-- Recasting resets the timer, so attacking too fast wastes potential damage
1120511205
local baseDuration = skillData.duration
11206-
local actualDuration = baseDuration * output.DurationMod
11206+
local actualDuration = output.Duration or baseDuration
11207+
local ticksNeededForInitialDelay = math.ceil(actualDuration / data.misc.ServerTickTime)
1120711208
local timePerProjectile = baseDelayBetweenProjectiles * output.DurationMod
1120811209
local timeForAllProjectiles = timePerProjectile * projectileCount
11209-
local effectiveDelay = actualDuration + timeForAllProjectiles
11210+
local effectiveDelay = ticksNeededForInitialDelay * data.misc.ServerTickTime + math.ceil(timeForAllProjectiles / data.misc.ServerTickTime) * data.misc.ServerTickTime
1121011211
local maxEffectiveAPS = 1 / effectiveDelay
1121111212
local currentAPS = output.Speed
11212-
local MissProjectile = math.ceil((effectiveDelay - (1/currentAPS)) / timePerProjectile)
1121311213

1121411214
output.KineticFusilladeMaxEffectiveAPS = maxEffectiveAPS
1121511215

1121611216
if breakdown then
1121711217
local breakdownAPS = {}
11218-
t_insert(breakdownAPS, s_format("^1(These calculations are still in beta testing)", actualDuration))
11219-
t_insert(breakdownAPS, "")
11218+
t_insert(breakdownAPS, s_format("^1(These calculations are speculative and best-effort)", actualDuration))
1122011219
t_insert(breakdownAPS, s_format("^8Delay of^7 %.3fs ^8before projectiles start firing", actualDuration))
1122111220
t_insert(breakdownAPS, s_format("^8Each projectile fires sequentially with a^7 %.3fs ^8delay between each projectile", timePerProjectile))
11221+
t_insert(breakdownAPS, s_format("^8Server tick time:^7 %.3fs", data.misc.ServerTickTime))
11222+
t_insert(breakdownAPS, s_format("^8Ticks needed:^7 %d ^8(rounded up)", ticksNeededForInitialDelay + math.ceil(timeForAllProjectiles / data.misc.ServerTickTime)))
1122211223
t_insert(breakdownAPS, s_format("^8Effective delay:^7 %.3fs", effectiveDelay))
1122311224
t_insert(breakdownAPS, s_format("^8Max effective attack rate:^7 1 / %.3f = %.2f", effectiveDelay, maxEffectiveAPS))
1122411225
if currentAPS and currentAPS > maxEffectiveAPS then
1122511226
t_insert(breakdownAPS, "")
1122611227
t_insert(breakdownAPS, s_format("^1Current attack rate (%.2f) exceeds max effective rate!", currentAPS))
11227-
t_insert(breakdownAPS, s_format("^1You will lose up to %d projectiles per volley.", MissProjectile))
11228+
t_insert(breakdownAPS, s_format("^1DPS is reduced by %.1f%%", (1 - maxEffectiveAPS / currentAPS) * 100))
1122811229
elseif currentAPS then
1122911230
t_insert(breakdownAPS, "")
1123011231
t_insert(breakdownAPS, s_format("^2Current attack rate (%.2f) is within effective limits", currentAPS))
@@ -21104,4 +21105,4 @@ skills["Zealotry"] = {
2110421105
[39] = { 19, 53, 33, cooldown = 1.2, levelRequirement = 99, manaReservationPercent = 50, storedUses = 1, statInterpolation = { 1, 1, 1, }, },
2110521106
[40] = { 20, 54, 34, cooldown = 1.2, levelRequirement = 100, manaReservationPercent = 50, storedUses = 1, statInterpolation = { 1, 1, 1, }, },
2110621107
},
21107-
}
21108+
}

src/Export/Skills/act_int.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2326,28 +2326,29 @@ local skills, mod, flag, skill = ...
23262326
-- Projectiles orbit for base_skill_effect_duration before firing
23272327
-- Recasting resets the timer, so attacking too fast wastes potential damage
23282328
local baseDuration = skillData.duration
2329-
local actualDuration = baseDuration * output.DurationMod
2329+
local actualDuration = output.Duration or baseDuration
2330+
local ticksNeededForInitialDelay = math.ceil(actualDuration / data.misc.ServerTickTime)
23302331
local timePerProjectile = baseDelayBetweenProjectiles * output.DurationMod
23312332
local timeForAllProjectiles = timePerProjectile * projectileCount
2332-
local effectiveDelay = actualDuration + timeForAllProjectiles
2333+
local effectiveDelay = ticksNeededForInitialDelay * data.misc.ServerTickTime + math.ceil(timeForAllProjectiles / data.misc.ServerTickTime) * data.misc.ServerTickTime
23332334
local maxEffectiveAPS = 1 / effectiveDelay
23342335
local currentAPS = output.Speed
2335-
local MissProjectile = math.ceil((effectiveDelay - (1/currentAPS)) / timePerProjectile)
23362336

23372337
output.KineticFusilladeMaxEffectiveAPS = maxEffectiveAPS
23382338

2339-
23402339
if breakdown then
23412340
local breakdownAPS = {}
2341+
t_insert(breakdownAPS, s_format("^1(These calculations are speculative and best-effort)", actualDuration))
23422342
t_insert(breakdownAPS, s_format("^8Delay of^7 %.3fs ^8before projectiles start firing", actualDuration))
23432343
t_insert(breakdownAPS, s_format("^8Each projectile fires sequentially with a^7 %.3fs ^8delay between each projectile", timePerProjectile))
2344+
t_insert(breakdownAPS, s_format("^8Server tick time:^7 %.3fs", data.misc.ServerTickTime))
2345+
t_insert(breakdownAPS, s_format("^8Ticks needed:^7 %d ^8(rounded up)", ticksNeededForInitialDelay + math.ceil(timeForAllProjectiles / data.misc.ServerTickTime)))
23442346
t_insert(breakdownAPS, s_format("^8Effective delay:^7 %.3fs", effectiveDelay))
23452347
t_insert(breakdownAPS, s_format("^8Max effective attack rate:^7 1 / %.3f = %.2f", effectiveDelay, maxEffectiveAPS))
23462348
if currentAPS and currentAPS > maxEffectiveAPS then
23472349
t_insert(breakdownAPS, "")
23482350
t_insert(breakdownAPS, s_format("^1Current attack rate (%.2f) exceeds max effective rate!", currentAPS))
2349-
t_insert(breakdownAPS, s_format("^1You will lose up to %d projectiles per volley.", MissProjectile))
2350-
2351+
t_insert(breakdownAPS, s_format("^1DPS is reduced by %.1f%%", (1 - maxEffectiveAPS / currentAPS) * 100))
23512352
elseif currentAPS then
23522353
t_insert(breakdownAPS, "")
23532354
t_insert(breakdownAPS, s_format("^2Current attack rate (%.2f) is within effective limits", currentAPS))

0 commit comments

Comments
 (0)