fix: most optimal shell index

This commit is contained in:
TrèsAbhi committed 2024-08-12 19:53:47 -05:00
1 parent 820c125912
commit 8d32c7ce23
2 files changed
+5 -4

No files matched your search

@@ -206,7 +206,7 @@ export function Characteristics() {
)}
{gun.type === 'autoReloader' ? (
<>
<Info indent name="Most optimal">
<Info indent name="Most optimal shell index">
{stats.mostOptimalShellIndex}
</Info>
<Info name="Shell reloads" unit="s" />
+4 -3
View File
@@ -343,11 +343,12 @@ export function tankCharacteristics(
damageCoefficient * shell.damage.armor * gun.reload.slice(1).length
: undefined;
const shells = gun.type === 'regular' ? 1 : gun.count;
console.log(gun.reload);
const mostOptimalShellIndex =
gun.type === 'autoReloader'
? gun.reload.at(-1)! < gun.reload.at(-2)!
? gun.reload.length
: 1
? gun.reload[0] + gun.intraClip < gun.reload[1]
? 1
: gun.reload.length
: undefined;
const shellReloads =
gun.type === 'autoReloader'