From bfc3cbfc878087f2ecabe43812047d1f9a7fb8e3 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sat, 29 Oct 2022 12:42:40 +0300 Subject: [PATCH] Fix Hydra wrong dmg multipliers Closes #1055 --- app/modules/analyzer/constants.ts | 2 +- app/modules/analyzer/objectDamage.test.ts | 26 +++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/app/modules/analyzer/constants.ts b/app/modules/analyzer/constants.ts index a1baf0cbf..2a6b01d2d 100644 --- a/app/modules/analyzer/constants.ts +++ b/app/modules/analyzer/constants.ts @@ -140,7 +140,7 @@ export const objectDamageJsonKeyPriority: Record< Slosher_WashtubBombCore: null, Slosher_Washtub: null, Slosher: null, - Spinner: null, + Spinner: ["NORMAL_MAX", "NORMAL_MIN", "NORMAL_MAX_FULL_CHARGE"], Sprinkler: null, Stringer_Short: null, Stringer: null, diff --git a/app/modules/analyzer/objectDamage.test.ts b/app/modules/analyzer/objectDamage.test.ts index cd87b5703..f848d546f 100644 --- a/app/modules/analyzer/objectDamage.test.ts +++ b/app/modules/analyzer/objectDamage.test.ts @@ -113,4 +113,30 @@ CalculateDamage( } ); +const HYDRA_SPLATLING_ID = 4020; +CalculateDamage( + "Hits to destroy Minimum < Maximum < Maximum (Fully charged)", + () => { + const min = calculate({ + mainWeaponId: HYDRA_SPLATLING_ID, + damageType: "NORMAL_MIN", + })[0]?.damages[0]?.hitsToDestroy; + const max = calculate({ + mainWeaponId: HYDRA_SPLATLING_ID, + damageType: "NORMAL_MAX", + })[0]?.damages[0]?.hitsToDestroy; + const maxFullyCharged = calculate({ + mainWeaponId: HYDRA_SPLATLING_ID, + damageType: "NORMAL_MAX_FULL_CHARGE", + })[0]?.damages[0]?.hitsToDestroy; + + assert.ok(typeof min === "number"); + assert.ok(typeof max === "number"); + assert.ok(typeof maxFullyCharged === "number"); + + assert.ok(min > max); + assert.ok(max > maxFullyCharged); + } +); + CalculateDamage.run();