From 21cfd958d842624a58514e6ecbb0ba0f89540423 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sat, 10 Dec 2022 19:58:17 +0200 Subject: [PATCH] Tri-Stringer correct damage --- app/modules/analyzer/constants.ts | 2 ++ app/modules/analyzer/objectDamage.test.ts | 2 ++ app/modules/analyzer/stats.ts | 7 ++++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/modules/analyzer/constants.ts b/app/modules/analyzer/constants.ts index 505f59656..e2e321031 100644 --- a/app/modules/analyzer/constants.ts +++ b/app/modules/analyzer/constants.ts @@ -181,6 +181,8 @@ export const damageTypesToCombine: Partial< }> > > = { + // Tri-Stringer + 7010: [{ when: "NORMAL_MAX", combineWith: "DISTANCE" }], // Splatana Stamper 8000: [ { when: "SPLATANA_VERTICAL_DIRECT", combineWith: "SPLATANA_VERTICAL" }, diff --git a/app/modules/analyzer/objectDamage.test.ts b/app/modules/analyzer/objectDamage.test.ts index ecac63904..c6097bfe0 100644 --- a/app/modules/analyzer/objectDamage.test.ts +++ b/app/modules/analyzer/objectDamage.test.ts @@ -93,6 +93,8 @@ const shotsToPopRM: Array< [8010, "SPLATANA_HORIZONTAL_DIRECT", 9, 8], // Splatana Stamper [8000, "SPLATANA_VERTICAL_DIRECT", 3, 3], + // // Tri-Stringer + [7010, "NORMAL_MAX", 3, 3], // REEF-LUX [7020, "NORMAL_MIN", 8, 7], ]; diff --git a/app/modules/analyzer/stats.ts b/app/modules/analyzer/stats.ts index 8ec7fb0f2..726829972 100644 --- a/app/modules/analyzer/stats.ts +++ b/app/modules/analyzer/stats.ts @@ -380,6 +380,8 @@ function damages(args: StatFunctionInput): AnalyzedBuild["stats"]["damages"] { args.mainWeaponParams[key as keyof MainWeaponParams] ?? args.subWeaponParams[key as keyof SubWeaponParams]; + const isMainWeaponParam = key in args.mainWeaponParams; + if (Array.isArray(value)) { for (const subValue of value.flat()) { result.push({ @@ -387,6 +389,9 @@ function damages(args: StatFunctionInput): AnalyzedBuild["stats"]["damages"] { value: subValue.Damage / 10, distance: subValue.Distance, id: semiRandomId(), + multiShots: isMainWeaponParam + ? multiShot[args.weaponSplId] + : undefined, }); } @@ -404,7 +409,7 @@ function damages(args: StatFunctionInput): AnalyzedBuild["stats"]["damages"] { type, multiShots: multiShot[args.weaponSplId], }), - multiShots: multiShot[args.weaponSplId], + multiShots: isMainWeaponParam ? multiShot[args.weaponSplId] : undefined, }); }