Skip to content

Commit 6ae17e9

Browse files
authored
Kinetic Fusillade MaxAPS calculation (#9362)
* Update act_int.lua Adjust KF max aps calculation * Update kf calculation
1 parent cb6d544 commit 6ae17e9

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

src/Data/Skills/act_int.lua

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11203,29 +11203,28 @@ 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 = output.Duration or baseDuration
11207-
local ticksNeededForInitialDelay = math.ceil(actualDuration / data.misc.ServerTickTime)
11206+
local actualDuration = baseDuration * output.DurationMod
1120811207
local timePerProjectile = baseDelayBetweenProjectiles * output.DurationMod
1120911208
local timeForAllProjectiles = timePerProjectile * projectileCount
11210-
local effectiveDelay = ticksNeededForInitialDelay * data.misc.ServerTickTime + math.ceil(timeForAllProjectiles / data.misc.ServerTickTime) * data.misc.ServerTickTime
11209+
local effectiveDelay = actualDuration + timeForAllProjectiles
1121111210
local maxEffectiveAPS = 1 / effectiveDelay
1121211211
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 speculative and best-effort)", actualDuration))
11218+
t_insert(breakdownAPS, s_format("^1(These calculations are still in beta testing)", actualDuration))
11219+
t_insert(breakdownAPS, "")
1121911220
t_insert(breakdownAPS, s_format("^8Delay of^7 %.3fs ^8before projectiles start firing", actualDuration))
1122011221
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)))
1122311222
t_insert(breakdownAPS, s_format("^8Effective delay:^7 %.3fs", effectiveDelay))
1122411223
t_insert(breakdownAPS, s_format("^8Max effective attack rate:^7 1 / %.3f = %.2f", effectiveDelay, maxEffectiveAPS))
1122511224
if currentAPS and currentAPS > maxEffectiveAPS then
1122611225
t_insert(breakdownAPS, "")
1122711226
t_insert(breakdownAPS, s_format("^1Current attack rate (%.2f) exceeds max effective rate!", currentAPS))
11228-
t_insert(breakdownAPS, s_format("^1DPS is reduced by %.1f%%", (1 - maxEffectiveAPS / currentAPS) * 100))
11227+
t_insert(breakdownAPS, s_format("^1You will lose up to %d projectiles per volley.", MissProjectile))
1122911228
elseif currentAPS then
1123011229
t_insert(breakdownAPS, "")
1123111230
t_insert(breakdownAPS, s_format("^2Current attack rate (%.2f) is within effective limits", currentAPS))
@@ -21105,4 +21104,4 @@ skills["Zealotry"] = {
2110521104
[39] = { 19, 53, 33, cooldown = 1.2, levelRequirement = 99, manaReservationPercent = 50, storedUses = 1, statInterpolation = { 1, 1, 1, }, },
2110621105
[40] = { 20, 54, 34, cooldown = 1.2, levelRequirement = 100, manaReservationPercent = 50, storedUses = 1, statInterpolation = { 1, 1, 1, }, },
2110721106
},
21108-
}
21107+
}

src/Export/Skills/act_int.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2326,29 +2326,28 @@ 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 = output.Duration or baseDuration
2330-
local ticksNeededForInitialDelay = math.ceil(actualDuration / data.misc.ServerTickTime)
2329+
local actualDuration = baseDuration * output.DurationMod
23312330
local timePerProjectile = baseDelayBetweenProjectiles * output.DurationMod
23322331
local timeForAllProjectiles = timePerProjectile * projectileCount
2333-
local effectiveDelay = ticksNeededForInitialDelay * data.misc.ServerTickTime + math.ceil(timeForAllProjectiles / data.misc.ServerTickTime) * data.misc.ServerTickTime
2332+
local effectiveDelay = actualDuration + timeForAllProjectiles
23342333
local maxEffectiveAPS = 1 / effectiveDelay
23352334
local currentAPS = output.Speed
2335+
local MissProjectile = math.ceil((effectiveDelay - (1/currentAPS)) / timePerProjectile)
23362336

23372337
output.KineticFusilladeMaxEffectiveAPS = maxEffectiveAPS
23382338

2339+
23392340
if breakdown then
23402341
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)))
23462344
t_insert(breakdownAPS, s_format("^8Effective delay:^7 %.3fs", effectiveDelay))
23472345
t_insert(breakdownAPS, s_format("^8Max effective attack rate:^7 1 / %.3f = %.2f", effectiveDelay, maxEffectiveAPS))
23482346
if currentAPS and currentAPS > maxEffectiveAPS then
23492347
t_insert(breakdownAPS, "")
23502348
t_insert(breakdownAPS, s_format("^1Current attack rate (%.2f) exceeds max effective rate!", currentAPS))
2351-
t_insert(breakdownAPS, s_format("^1DPS is reduced by %.1f%%", (1 - maxEffectiveAPS / currentAPS) * 100))
2349+
t_insert(breakdownAPS, s_format("^1You will lose up to %d projectiles per volley.", MissProjectile))
2350+
23522351
elseif currentAPS then
23532352
t_insert(breakdownAPS, "")
23542353
t_insert(breakdownAPS, s_format("^2Current attack rate (%.2f) is within effective limits", currentAPS))

0 commit comments

Comments
 (0)