feat: burst dpm

This commit is contained in:
TrèsAbhi committed 2025-08-22 13:38:02 -05:00
1 parent 3205630a0f
commit 347523f9e7
2 files changed
+22 -7

No files matched your search

+20 -5
View File
@@ -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<null | {
index: number;
+2 -2
View File
@@ -1096,8 +1096,8 @@
"dpmEffective": "Effective at 60s",
"shells": "Shells",
"mostOptimalShellIndex": "Most optimal shell",
"shellReloads": "Shell reloads",
"shellReload": "Shell reload",
"shellReloads": "Reloads",
"shellReload": "Reload",
"intraClip": "Intra-clip",
"caliber": "Caliber",
"penetration": "Penetration",