From 6425c08397af63f05d7d92aaede6637eff7d117d Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sun, 18 Jun 2023 13:03:22 +0300 Subject: [PATCH] Special damages: Zipcaster --- app/features/build-analyzer/core/stats.ts | 11 +++++++++++ app/features/build-analyzer/core/weapon-params.json | 12 +++++++++++- .../object-damage-calculator/calculator-constants.ts | 2 +- scripts/create-analyzer-json.ts | 4 +++- 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/app/features/build-analyzer/core/stats.ts b/app/features/build-analyzer/core/stats.ts index 7678f592f..797c2ec8a 100644 --- a/app/features/build-analyzer/core/stats.ts +++ b/app/features/build-analyzer/core/stats.ts @@ -12,6 +12,7 @@ import { CURLING_BOMB_ID, AUTO_BOMB_ID, TORPEDO_ID, + ZIPCASTER_ID, } from "~/modules/in-game-lists"; import { ANGLE_SHOOTER_ID } from "~/modules/in-game-lists"; import { INK_MINE_ID, POINT_SENSOR_ID } from "~/modules/in-game-lists"; @@ -502,6 +503,16 @@ function specialWeaponDamages( } } + // Zipcaster direct damage + if (args.mainWeaponParams.specialWeaponId === ZIPCASTER_ID) { + result.unshift({ + id: semiRandomId(), + distance: 0, + value: sumArray(result.map((v) => v.value)), + type: "BOMB_NORMAL", + }); + } + return result; } diff --git a/app/features/build-analyzer/core/weapon-params.json b/app/features/build-analyzer/core/weapon-params.json index 3de756f14..65433f4b7 100644 --- a/app/features/build-analyzer/core/weapon-params.json +++ b/app/features/build-analyzer/core/weapon-params.json @@ -1723,7 +1723,17 @@ "Low": 0.15, "Mid": 0.1305 } - } + }, + "DistanceDamage": [ + { + "Damage": 350, + "Distance": 3.2 + }, + { + "Damage": 250, + "Distance": 4 + } + ] }, "4": { "overwrites": { diff --git a/app/features/object-damage-calculator/calculator-constants.ts b/app/features/object-damage-calculator/calculator-constants.ts index a0483c01d..a878984d3 100644 --- a/app/features/object-damage-calculator/calculator-constants.ts +++ b/app/features/object-damage-calculator/calculator-constants.ts @@ -154,7 +154,7 @@ export const objectDamageJsonKeyPriority: Record< Sprinkler: null, Stringer_Short: ["NORMAL_MAX", "NORMAL_MIN", "DISTANCE"], Stringer: ["NORMAL_MAX", "NORMAL_MIN", "DISTANCE"], - SuperHook: null, + SuperHook: ["BOMB_NORMAL"], SuperLanding: null, TripleTornado: null, UltraShot: ["BOMB_NORMAL", "BOMB_DIRECT"], diff --git a/scripts/create-analyzer-json.ts b/scripts/create-analyzer-json.ts index 9d2e6051f..029e92d37 100644 --- a/scripts/create-analyzer-json.ts +++ b/scripts/create-analyzer-json.ts @@ -461,7 +461,9 @@ function parametersToSpecialWeaponResult(params: any) { return { ArmorHP: params["WeaponSpChariotParam"]?.["ArmorHP"], overwrites: resultUnwrapped, - DistanceDamage: params["BlastParam"]?.["DistanceDamage"], + DistanceDamage: + params["BlastParam"]?.["DistanceDamage"] ?? + params["HookBlastParam"]?.["DistanceDamage"], DirectDamage: params["DamageParam"]?.["DirectHitDamage"], }; }