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') { if (gun.gun_type!.$case === 'regular') {
dps = alpha / (reloadCoefficient * gun.gun_type!.value.reload); dps = alpha / (reloadCoefficient * gun.gun_type!.value.reload);
} else if (gun.gun_type!.$case === 'auto_loader') { } else if (gun.gun_type!.$case === 'auto_loader') {
dps = const damage = alpha * gun.gun_type!.value.shell_count;
(alpha * gun.gun_type!.value.shell_count) / let time = gun.gun_type!.value.clip_reload * reloadCoefficient;
(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.shell_count - 1) *
gun.gun_type!.value.intra_clip * gun.gun_type!.value.intra_clip *
intraClipCoefficient); intraClipCoefficient;
}
dps = damage / time;
} else { } else {
const mostOptimalShell = gun.gun_type!.value.shell_reloads.reduce<null | { const mostOptimalShell = gun.gun_type!.value.shell_reloads.reduce<null | {
index: number; index: number;
+2 -2
View File
@@ -1096,8 +1096,8 @@
"dpmEffective": "Effective at 60s", "dpmEffective": "Effective at 60s",
"shells": "Shells", "shells": "Shells",
"mostOptimalShellIndex": "Most optimal shell", "mostOptimalShellIndex": "Most optimal shell",
"shellReloads": "Shell reloads", "shellReloads": "Reloads",
"shellReload": "Shell reload", "shellReload": "Reload",
"intraClip": "Intra-clip", "intraClip": "Intra-clip",
"caliber": "Caliber", "caliber": "Caliber",
"penetration": "Penetration", "penetration": "Penetration",