diff --git a/app/features/build-analyzer/core/stats.test.ts b/app/features/build-analyzer/core/stats.test.ts index 5a997baf7..9977be396 100644 --- a/app/features/build-analyzer/core/stats.test.ts +++ b/app/features/build-analyzer/core/stats.test.ts @@ -253,6 +253,36 @@ describe("Analyze build", () => { ).toBe(roundToNDecimalPlaces((jrParams.InkConsume! * 100) / 1.1)); }); + test.each([ + { why: "Sploosh 64.995", weaponSplId: 0, iss: 9, ism: 16, expected: 64.99 }, + { + why: "Sploosh 101.998", + weaponSplId: 0, + iss: 15, + ism: 57, + expected: 101.99, + }, + { why: "Jr. just under 100", weaponSplId: 10, iss: 3, ism: 1, expected: 99.99 }, + ] as const)( + "Full ink tank actions are truncated, not rounded up ($why)", + ({ weaponSplId, iss, ism, expected }) => { + const analyzed = buildStats({ + weaponSplId, + abilityPoints: new Map([ + ["ISS", iss], + ["ISM", ism], + ]), + hasTacticooler: false, + }); + + const oneSubOption = analyzed.stats.fullInkTankOptions.find( + (option) => option.subsUsed === 1, + ); + + expect(oneSubOption?.value).toBe(expected); + }, + ); + test("Sub Power Up Beakon AP boost matches Lean", () => { for (const [subPowerAp, quickSuperJumpAp] of subPowerApToQuickSuperJumpAp) { const analyzed = buildStats({ diff --git a/app/features/build-analyzer/core/stats.ts b/app/features/build-analyzer/core/stats.ts index 616dec4ed..6601fe455 100644 --- a/app/features/build-analyzer/core/stats.ts +++ b/app/features/build-analyzer/core/stats.ts @@ -316,11 +316,10 @@ export function fullInkTankOptions( id: nanoid(), subsUsed: subsFromFullInkTank, type, - value: effectToRounded( + value: cutToNDecimalPlaces( (inkTankSize(args.weaponSplId) - subWeaponInkConsume * subsFromFullInkTank) / mainWeaponInkConsume, - 2, ), }); } diff --git a/changelog/2026-09-25-ink-tank-actions-rounding.md b/changelog/2026-09-25-ink-tank-actions-rounding.md new file mode 100644 index 000000000..977847b2b --- /dev/null +++ b/changelog/2026-09-25-ink-tank-actions-rounding.md @@ -0,0 +1,5 @@ +--- +navItem: analyzer +type: bug +--- +Build analyzer no longer shows one extra action from a full ink tank when the true count falls just short of the next whole number