From 41120088e0fc031cbb0b9a4082f0d9d251b200a7 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Thu, 27 Oct 2022 09:27:12 +0300 Subject: [PATCH] Add Hydra fully charged shot damage to analyzer Closes #1046 --- app/modules/analyzer/constants.ts | 2 ++ app/modules/analyzer/stats.ts | 3 ++- app/modules/analyzer/types.ts | 1 + app/modules/analyzer/weapon-params.json | 1 + public/locales/en/analyzer.json | 1 + scripts/create-analyzer-json.ts | 4 ++++ 6 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/modules/analyzer/constants.ts b/app/modules/analyzer/constants.ts index ea90740d4..a1baf0cbf 100644 --- a/app/modules/analyzer/constants.ts +++ b/app/modules/analyzer/constants.ts @@ -23,6 +23,7 @@ export const DAMAGE_RECEIVERS = [ export const DAMAGE_TYPE = [ "NORMAL_MIN", "NORMAL_MAX", + "NORMAL_MAX_FULL_CHARGE", // Hydra Splatling goes from 32 to 40 dmg when fully charged "DIRECT", "FULL_CHARGE", "MAX_CHARGE", @@ -38,6 +39,7 @@ export const damageTypeToWeaponType: Record< > = { NORMAL_MIN: "MAIN", NORMAL_MAX: "MAIN", + NORMAL_MAX_FULL_CHARGE: "MAIN", DIRECT: "MAIN", FULL_CHARGE: "MAIN", MAX_CHARGE: "MAIN", diff --git a/app/modules/analyzer/stats.ts b/app/modules/analyzer/stats.ts index dbad75bfa..5f67f7fda 100644 --- a/app/modules/analyzer/stats.ts +++ b/app/modules/analyzer/stats.ts @@ -341,6 +341,7 @@ const damageTypeToParamsKey: Record< > = { NORMAL_MIN: "DamageParam_ValueMin", NORMAL_MAX: "DamageParam_ValueMax", + NORMAL_MAX_FULL_CHARGE: "DamageParam_ValueFullChargeMax", DIRECT: "DamageParam_ValueDirect", DISTANCE: "BlastParam_DistanceDamage", FULL_CHARGE: "DamageParam_ValueFullCharge", @@ -398,7 +399,7 @@ function shotsToSplat({ type: DamageType; isTripleShooter: boolean; }) { - if (type !== "NORMAL_MAX") return; + if (type !== "NORMAL_MAX" && type !== "NORMAL_MAX_FULL_CHARGE") return; const multiplier = isTripleShooter ? 3 : 1; diff --git a/app/modules/analyzer/types.ts b/app/modules/analyzer/types.ts index 7d6fe14f5..bedf7fe6b 100644 --- a/app/modules/analyzer/types.ts +++ b/app/modules/analyzer/types.ts @@ -33,6 +33,7 @@ export interface MainWeaponParams { MoveSpeedFullCharge?: number; DamageParam_ValueMax?: number; DamageParam_ValueMin?: number; + DamageParam_ValueFullChargeMax?: number; DamageParam_ValueDirect?: number; Jump_DegSwerve?: number; Stand_DegSwerve?: number; diff --git a/app/modules/analyzer/weapon-params.json b/app/modules/analyzer/weapon-params.json index e2ccd2823..172d0b5ba 100644 --- a/app/modules/analyzer/weapon-params.json +++ b/app/modules/analyzer/weapon-params.json @@ -597,6 +597,7 @@ "MoveSpeed_Charge": 0.04, "DamageParam_ValueMax": 320, "DamageParam_ValueMin": 160, + "DamageParam_ValueFullChargeMax": 400, "Jump_DegSwerve": 6, "Stand_DegSwerve": 3, "InkRecoverStop": 40, diff --git a/public/locales/en/analyzer.json b/public/locales/en/analyzer.json index 5034589c7..9cfcb8bc7 100644 --- a/public/locales/en/analyzer.json +++ b/public/locales/en/analyzer.json @@ -79,6 +79,7 @@ "damage.toSplat": "{{count}} hits to splat", "damage.NORMAL_MIN": "Minimum", "damage.NORMAL_MAX": "Maximum", + "damage.NORMAL_MAX_FULL_CHARGE": "Maximum (Fully charged)", "damage.DIRECT": "Direct", "damage.FULL_CHARGE": "Fully charged shot", "damage.MAX_CHARGE": "Maximum partial charge", diff --git a/scripts/create-analyzer-json.ts b/scripts/create-analyzer-json.ts index 75aab23cc..1933bb4d8 100644 --- a/scripts/create-analyzer-json.ts +++ b/scripts/create-analyzer-json.ts @@ -172,6 +172,10 @@ function parametersToMainWeaponResult( DamageParam_ValueDirect, BlastParam_DistanceDamage: params["BlastParam"]?.["DistanceDamage"], DamageParam_ValueFullCharge: params["DamageParam"]?.["ValueFullCharge"], + DamageParam_ValueFullChargeMax: + params["DamageParam"]?.["ValueFullChargeMax"] !== DamageParam_ValueMax() + ? params["DamageParam"]?.["ValueFullChargeMax"] + : undefined, DamageParam_ValueMaxCharge: params["DamageParam"]?.["ValueMaxCharge"], DamageParam_ValueMinCharge: params["DamageParam"]?.["ValueMinCharge"], CanopyHP: params["spl__BulletShelterCanopyParam"]?.["CanopyHP"],