From 347523f9e7f9fc8c520ed8791bc1f7e8f303478f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Fri, 22 Aug 2025 13:38:02 -0500 Subject: [PATCH] feat: burst dpm --- packages/core/src/blitzkit/resolveDpm.ts | 25 +++++++++++++++++++----- packages/i18n/strings/en.json | 4 ++-- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/packages/core/src/blitzkit/resolveDpm.ts b/packages/core/src/blitzkit/resolveDpm.ts index a503fd1dc..1d35df571 100644 --- a/packages/core/src/blitzkit/resolveDpm.ts +++ b/packages/core/src/blitzkit/resolveDpm.ts @@ -17,12 +17,27 @@ export function resolveDpm( if (gun.gun_type!.$case === 'regular') { dps = alpha / (reloadCoefficient * gun.gun_type!.value.reload); } else if (gun.gun_type!.$case === 'auto_loader') { - dps = - (alpha * gun.gun_type!.value.shell_count) / - (gun.gun_type!.value.clip_reload * reloadCoefficient + + const damage = alpha * gun.gun_type!.value.shell_count; + let time = gun.gun_type!.value.clip_reload * reloadCoefficient; + + if (gun.burst) { + time += + (gun.gun_type!.value.shell_count / gun.burst.count - 1) * + gun.gun_type!.value.intra_clip * + intraClipCoefficient; + + time += + (gun.gun_type!.value.shell_count / gun.burst.count) * + (gun.burst.count - 1) * + gun.burst.interval; + } else { + time += (gun.gun_type!.value.shell_count - 1) * - gun.gun_type!.value.intra_clip * - intraClipCoefficient); + gun.gun_type!.value.intra_clip * + intraClipCoefficient; + } + + dps = damage / time; } else { const mostOptimalShell = gun.gun_type!.value.shell_reloads.reduce