From 36f38cc79122216ca17cedb3c19620a4752a2bee Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Thu, 15 Sep 2022 13:56:17 +0300 Subject: [PATCH] Analyzer show brella canopy hp and damage --- app/modules/analyzer/stats.ts | 1 + app/modules/analyzer/types.ts | 4 ++++ app/modules/analyzer/weapon-params.json | 5 +++++ app/routes/analyzer.tsx | 9 +++++++++ public/locales/en/analyzer.json | 2 ++ scripts/create-analyzer-json.ts | 14 +++++++++++--- 6 files changed, 32 insertions(+), 3 deletions(-) diff --git a/app/modules/analyzer/stats.ts b/app/modules/analyzer/stats.ts index d7e5cdcd2..cbfbbbf53 100644 --- a/app/modules/analyzer/stats.ts +++ b/app/modules/analyzer/stats.ts @@ -48,6 +48,7 @@ export function buildStats({ weapon: { subWeaponSplId: mainWeaponParams.subWeaponId, specialWeaponSplId: mainWeaponParams.specialWeaponId, + brellaCanopyHp: mainWeaponParams.CanopyHP, speedType: mainWeaponParams.WeaponSpeedType ?? "Normal", isTripleShooter: Boolean(mainWeaponParams.TripleShotSpanFrame), }, diff --git a/app/modules/analyzer/types.ts b/app/modules/analyzer/types.ts index 2ec9a6e66..cf68220fc 100644 --- a/app/modules/analyzer/types.ts +++ b/app/modules/analyzer/types.ts @@ -29,6 +29,9 @@ export interface MainWeaponParams { // xxx: what are these? would probably be nice to show // DamageParam_ReduceStartFrame?: number; // DamageParam_ReduceEndFrame?: number; + // xxx: CanopyHP missing from Splat Brella + /** Brella shield HP */ + CanopyHP?: number; /** How much ink one shot consumes? InkConsume = 0.5 means 2 shots per full tank */ InkConsume?: number; /** How much ink one slosh of slosher consumes? */ @@ -153,6 +156,7 @@ export interface AnalyzedBuild { weapon: { subWeaponSplId: SubWeaponId; specialWeaponSplId: SpecialWeaponId; + brellaCanopyHp?: number; speedType: NonNullable | "Normal"; isTripleShooter: boolean; }; diff --git a/app/modules/analyzer/weapon-params.json b/app/modules/analyzer/weapon-params.json index 6ef6864ab..cabe35531 100644 --- a/app/modules/analyzer/weapon-params.json +++ b/app/modules/analyzer/weapon-params.json @@ -571,6 +571,7 @@ "SpecialPoint": 200, "subWeaponId": 3, "specialWeaponId": 14, + "DamageParam_ValueMax": 810, "InkConsumeUmbrella_WeaponShelterCanopyParam": 0.3 }, "6010": { @@ -584,6 +585,8 @@ } }, "WeaponSpeedType": "Slow", + "DamageParam_ValueMax": 1190, + "CanopyHP": 7000, "InkConsumeUmbrella_WeaponShelterCanopyParam": 0.3, "InkConsume_WeaponShelterShotgunParam": 0.11 }, @@ -592,6 +595,8 @@ "subWeaponId": 10, "specialWeaponId": 13, "WeaponSpeedType": "Fast", + "DamageParam_ValueMax": 400, + "CanopyHP": 2000, "InkConsumeUmbrella_WeaponShelterCanopyParam": 0, "InkConsume_WeaponShelterShotgunParam": 0.04 }, diff --git a/app/routes/analyzer.tsx b/app/routes/analyzer.tsx index 05210a1c6..747272cb6 100644 --- a/app/routes/analyzer.tsx +++ b/app/routes/analyzer.tsx @@ -55,6 +55,15 @@ export default function BuildAnalyzerPage() {
+ + {typeof analyzed.weapon.brellaCanopyHp === "number" && ( + + )} + { + if (DamageParam_ValueDirect) return undefined; + + return ( + params["DamageParam"]?.["ValueMax"] ?? + params["spl__BulletShelterShotgunParam"]?.["DamageEffectiveTotalMax"] + ); + }; + return { SpecialPoint: weapon.SpecialPoint, subWeaponId: resolveSubWeaponId(weapon), @@ -129,9 +138,7 @@ function parametersToMainWeaponResult( overwrites: resolveOverwrites(params), TripleShotSpanFrame: params["WeaponParam"]?.["TripleShotSpanFrame"], WeaponSpeedType: params["MainWeaponSetting"]?.["WeaponSpeedType"], - DamageParam_ValueMax: !DamageParam_ValueDirect - ? params["DamageParam"]?.["ValueMax"] - : undefined, + DamageParam_ValueMax: DamageParam_ValueMax(), DamageParam_ValueMin: !DamageParam_ValueDirect ? params["DamageParam"]?.["ValueMin"] : undefined, @@ -140,6 +147,7 @@ function parametersToMainWeaponResult( DamageParam_ValueFullCharge: params["DamageParam"]?.["ValueFullCharge"], DamageParam_ValueMaxCharge: params["DamageParam"]?.["ValueMaxCharge"], DamageParam_ValueMinCharge: params["DamageParam"]?.["ValueMinCharge"], + CanopyHP: params["spl__BulletShelterCanopyParam"]?.["CanopyHP"], InkConsume, InkConsumeSlosher, InkConsumeFullCharge: params["WeaponParam"]?.["InkConsumeFullCharge"],