From 723ceaba0ea471cde3a5c0c4e16cb83534ffb084 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sun, 3 Dec 2023 15:03:46 +0200 Subject: [PATCH] Automatically handle alt kits of weapons with multishot --- app/features/build-analyzer/analyzer-constants.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/features/build-analyzer/analyzer-constants.ts b/app/features/build-analyzer/analyzer-constants.ts index 58de91835..e246ae55a 100644 --- a/app/features/build-analyzer/analyzer-constants.ts +++ b/app/features/build-analyzer/analyzer-constants.ts @@ -96,7 +96,7 @@ export const damageTypeToWeaponType: Record< SPECIAL_TICK: "SPECIAL", }; -export const multiShot: Partial> = { +const rawMultiShot: Partial> = { // L-3 300: 3, // H-3 @@ -111,6 +111,14 @@ export const multiShot: Partial> = { 3050: 2, }; +// automatically handle alt kits +export const multiShot = Object.fromEntries( + Object.entries(rawMultiShot).flatMap(([key, value]) => [ + [Number(key), value], + [Number(key) + 1, value], + ]), +) as Record; + export const RAINMAKER_SPEED_PENALTY_MODIFIER = 0.8; export const UNKNOWN_SHORT = "U";