From bb9eb2be318ac7ea85a3cbc23bf38ba4755c49f3 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sun, 18 Sep 2022 14:28:43 +0300 Subject: [PATCH] More descriptive jump RNG reduction stat --- app/modules/analyzer/stats.ts | 32 +++++++++---- app/modules/analyzer/types.ts | 5 ++- app/modules/analyzer/weapon-params.json | 60 +++++++++++++++++++++++++ app/routes/analyzer.tsx | 20 ++++++--- public/locales/en/analyzer.json | 4 +- scripts/create-analyzer-json.ts | 2 + 6 files changed, 105 insertions(+), 18 deletions(-) diff --git a/app/modules/analyzer/stats.ts b/app/modules/analyzer/stats.ts index cfd775175..be5c41871 100644 --- a/app/modules/analyzer/stats.ts +++ b/app/modules/analyzer/stats.ts @@ -85,7 +85,8 @@ export function buildStats({ quickRespawnTime: quickRespawnTime(input), superJumpTimeGroundFrames: superJumpTimeGroundFrames(input), superJumpTimeTotal: superJumpTimeTotal(input), - jumpRngReductionEffectPercentage: jumpRngReductionEffectPercentage(input), + shotSpreadAir: shotSpreadAir(input), + shotSpreadGround: mainWeaponParams.Stand_DegSwerve, subDefPointSensorMarkedTimeInSeconds: subDefPointSensorMarkedTimeInSeconds(input), subDefInkMineMarkedTimeInSeconds: subDefInkMineMarkedTimeInSeconds(input), @@ -539,23 +540,36 @@ function superJumpTimeTotal( }; } -function jumpRngReductionEffectPercentage( +function shotSpreadAir( args: StatFunctionInput -): AnalyzedBuild["stats"]["jumpRngReductionEffectPercentage"] { - const JUMP_RNG_REDUCTION_ABILITY = "IA"; - const { baseEffect, effect } = abilityPointsToEffects({ +): AnalyzedBuild["stats"]["shotSpreadAir"] { + const SHOT_SPREAD_AIR_ABILITY = "IA"; + const groundSpread = args.mainWeaponParams.Stand_DegSwerve; + const jumpSpread = args.mainWeaponParams.Jump_DegSwerve; + + if ( + typeof jumpSpread !== "number" || + typeof groundSpread !== "number" || + jumpSpread === groundSpread + ) + return; + + const { effect } = abilityPointsToEffects({ abilityPoints: apFromMap({ abilityPoints: args.abilityPoints, - ability: JUMP_RNG_REDUCTION_ABILITY, + ability: SHOT_SPREAD_AIR_ABILITY, }), key: "ReduceJumpSwerveRate", weapon: args.mainWeaponParams, }); + const extraSpread = jumpSpread - groundSpread; + const reducedExtraSpread = extraSpread * (1 - effect); + return { - baseValue: roundToTwoDecimalPlaces(baseEffect * 100), - value: roundToTwoDecimalPlaces(effect * 100), - modifiedBy: JUMP_RNG_REDUCTION_ABILITY, + baseValue: roundToTwoDecimalPlaces(jumpSpread), + value: roundToTwoDecimalPlaces(reducedExtraSpread + groundSpread), + modifiedBy: SHOT_SPREAD_AIR_ABILITY, }; } diff --git a/app/modules/analyzer/types.ts b/app/modules/analyzer/types.ts index b7f651568..958679e21 100644 --- a/app/modules/analyzer/types.ts +++ b/app/modules/analyzer/types.ts @@ -24,6 +24,8 @@ export interface MainWeaponParams { DamageParam_ValueMax?: number; DamageParam_ValueMin?: number; DamageParam_ValueDirect?: number; + Jump_DegSwerve?: number; + Stand_DegSwerve?: number; /** Damage caused by charger's full charged shot */ DamageParam_ValueFullCharge?: number; /** Max damage caused by charger's charged shot before fully charged */ @@ -190,7 +192,8 @@ export interface AnalyzedBuild { quickRespawnTime: Stat; superJumpTimeGroundFrames: Stat; superJumpTimeTotal: Stat; - jumpRngReductionEffectPercentage: Stat; + shotSpreadAir?: Stat; + shotSpreadGround?: number; subDefPointSensorMarkedTimeInSeconds: Stat; subDefInkMineMarkedTimeInSeconds: Stat; diff --git a/app/modules/analyzer/weapon-params.json b/app/modules/analyzer/weapon-params.json index aca2ad6d7..edf28c6c4 100644 --- a/app/modules/analyzer/weapon-params.json +++ b/app/modules/analyzer/weapon-params.json @@ -7,6 +7,8 @@ "WeaponSpeedType": "Fast", "DamageParam_ValueMax": 380, "DamageParam_ValueMin": 190, + "Jump_DegSwerve": 18, + "Stand_DegSwerve": 12, "InkRecoverStop": 15, "InkConsume": 0.008 }, @@ -17,6 +19,8 @@ "WeaponSpeedType": "Fast", "DamageParam_ValueMax": 280, "DamageParam_ValueMin": 140, + "Jump_DegSwerve": 15, + "Stand_DegSwerve": 12, "InkRecoverStop": 15, "InkConsume": 0.0043 }, @@ -27,6 +31,8 @@ "WeaponSpeedType": "Fast", "DamageParam_ValueMax": 280, "DamageParam_ValueMin": 140, + "Jump_DegSwerve": 0, + "Stand_DegSwerve": 0, "InkConsume": 0.008 }, "30": { @@ -36,6 +42,8 @@ "WeaponSpeedType": "Fast", "DamageParam_ValueMax": 240, "DamageParam_ValueMin": 120, + "Jump_DegSwerve": 16, + "Stand_DegSwerve": 13, "InkRecoverStop": 15, "InkConsume": 0.0055 }, @@ -45,6 +53,8 @@ "specialWeaponId": 1, "DamageParam_ValueMax": 360, "DamageParam_ValueMin": 180, + "Jump_DegSwerve": 12, + "Stand_DegSwerve": 6, "InkConsume": 0.0092 }, "45": { @@ -53,6 +63,8 @@ "specialWeaponId": 1, "DamageParam_ValueMax": 360, "DamageParam_ValueMin": 180, + "Jump_DegSwerve": 12, + "Stand_DegSwerve": 6, "InkConsume": 0.0092 }, "50": { @@ -61,6 +73,8 @@ "specialWeaponId": 9, "DamageParam_ValueMax": 520, "DamageParam_ValueMin": 300, + "Jump_DegSwerve": 12, + "Stand_DegSwerve": 6, "InkConsume": 0.013 }, "60": { @@ -70,6 +84,8 @@ "WeaponSpeedType": "Fast", "DamageParam_ValueMax": 280, "DamageParam_ValueMin": 140, + "Jump_DegSwerve": 12, + "Stand_DegSwerve": 6, "InkConsume": 0.008 }, "70": { @@ -88,6 +104,8 @@ }, "DamageParam_ValueMax": 420, "DamageParam_ValueMin": 210, + "Jump_DegSwerve": 6, + "Stand_DegSwerve": 2.7, "InkConsume": 0.02 }, "80": { @@ -96,6 +114,8 @@ "specialWeaponId": 8, "DamageParam_ValueMax": 620, "DamageParam_ValueMin": 350, + "Jump_DegSwerve": 11.3511, + "Stand_DegSwerve": 4, "InkConsume": 0.025 }, "90": { @@ -104,6 +124,8 @@ "specialWeaponId": 8, "DamageParam_ValueMax": 320, "DamageParam_ValueMin": 160, + "Jump_DegSwerve": 8, + "Stand_DegSwerve": 3, "InkConsume": 0.016 }, "200": { @@ -131,6 +153,8 @@ "Distance": 3.57 } ], + "Jump_DegSwerve": 8, + "Stand_DegSwerve": 0, "InkRecoverStop": 55, "InkConsume": 0.075 }, @@ -154,6 +178,8 @@ "Distance": 3.3 } ], + "Jump_DegSwerve": 10, + "Stand_DegSwerve": 0, "InkRecoverStop": 60, "InkConsume": 0.1 }, @@ -177,6 +203,8 @@ "Distance": 3.5 } ], + "Jump_DegSwerve": 8, + "Stand_DegSwerve": 0, "InkRecoverStop": 70, "InkConsume": 0.11 }, @@ -201,6 +229,8 @@ "Distance": 4 } ], + "Jump_DegSwerve": 8, + "Stand_DegSwerve": 0, "InkRecoverStop": 40, "InkConsume": 0.04 }, @@ -224,6 +254,8 @@ "Distance": 3.3 } ], + "Jump_DegSwerve": 8, + "Stand_DegSwerve": 0, "InkRecoverStop": 50, "InkConsume": 0.07 }, @@ -247,6 +279,8 @@ "Distance": 3.3 } ], + "Jump_DegSwerve": 8, + "Stand_DegSwerve": 0, "InkRecoverStop": 50, "InkConsume": 0.08 }, @@ -257,6 +291,8 @@ "TripleShotSpanFrame": 8, "DamageParam_ValueMax": 290, "DamageParam_ValueMin": 145, + "Jump_DegSwerve": 6, + "Stand_DegSwerve": 1, "InkRecoverStop": 25, "InkConsume": 0.0115 }, @@ -277,6 +313,8 @@ "TripleShotSpanFrame": 20, "DamageParam_ValueMax": 410, "DamageParam_ValueMin": 205, + "Jump_DegSwerve": 1, + "Stand_DegSwerve": 1, "InkRecoverStop": 25, "InkConsume": 0.0225 }, @@ -286,6 +324,8 @@ "specialWeaponId": 1, "DamageParam_ValueMax": 380, "DamageParam_ValueMin": 190, + "Jump_DegSwerve": 0, + "Stand_DegSwerve": 0, "InkConsume": 0.022 }, "1000": { @@ -478,6 +518,8 @@ }, "DamageParam_ValueMax": 320, "DamageParam_ValueMin": 160, + "Jump_DegSwerve": 8, + "Stand_DegSwerve": 4, "InkRecoverStop": 30, "InkConsumeFullChargeSplatling": 0.1725 }, @@ -494,6 +536,8 @@ }, "DamageParam_ValueMax": 300, "DamageParam_ValueMin": 150, + "Jump_DegSwerve": 7, + "Stand_DegSwerve": 3.3, "InkRecoverStop": 40, "InkConsumeFullChargeSplatling": 0.225 }, @@ -516,6 +560,8 @@ "WeaponSpeedType": "Slow", "DamageParam_ValueMax": 320, "DamageParam_ValueMin": 160, + "Jump_DegSwerve": 6, + "Stand_DegSwerve": 3, "InkRecoverStop": 40, "InkConsumeFullChargeSplatling": 0.35 }, @@ -532,6 +578,8 @@ }, "DamageParam_ValueMax": 280, "DamageParam_ValueMin": 140, + "Jump_DegSwerve": 12, + "Stand_DegSwerve": 6, "InkRecoverStop": 40, "InkConsumeFullChargeSplatling": 0.25 }, @@ -549,6 +597,8 @@ "DamageParam_ValueMax": 320, "DamageParam_ValueMin": 160, "KeepChargeFullFrame": 200, + "Jump_DegSwerve": 3.6, + "Stand_DegSwerve": 3.3, "InkRecoverStop": 40, "InkConsumeFullChargeSplatling": 0.15 }, @@ -559,6 +609,8 @@ "WeaponSpeedType": "Fast", "DamageParam_ValueMax": 360, "DamageParam_ValueMin": 180, + "Jump_DegSwerve": 12, + "Stand_DegSwerve": 7, "InkConsume": 0.00663, "InkConsume_SideStepParam": 0.05 }, @@ -568,6 +620,8 @@ "specialWeaponId": 12, "DamageParam_ValueMax": 300, "DamageParam_ValueMin": 150, + "Jump_DegSwerve": 7.5, + "Stand_DegSwerve": 2, "InkConsume": 0.0072, "InkConsume_SideStepParam": 0.07 }, @@ -577,6 +631,8 @@ "specialWeaponId": 6, "DamageParam_ValueMax": 360, "DamageParam_ValueMin": 180, + "Jump_DegSwerve": 8, + "Stand_DegSwerve": 3.2, "InkConsume": 0.014, "InkConsume_SideStepParam": 0.08 }, @@ -586,6 +642,8 @@ "specialWeaponId": 7, "DamageParam_ValueMax": 280, "DamageParam_ValueMin": 140, + "Jump_DegSwerve": 8, + "Stand_DegSwerve": 4, "InkConsume": 0.012, "InkConsume_SideStepParam": 0.08 }, @@ -595,6 +653,8 @@ "specialWeaponId": 13, "DamageParam_ValueMax": 280, "DamageParam_ValueMin": 140, + "Jump_DegSwerve": 12.8, + "Stand_DegSwerve": 7.4, "InkConsume": 0.008, "InkConsume_SideStepParam": 0.03 }, diff --git a/app/routes/analyzer.tsx b/app/routes/analyzer.tsx index a8df94def..90865c162 100644 --- a/app/routes/analyzer.tsx +++ b/app/routes/analyzer.tsx @@ -134,12 +134,20 @@ export default function BuildAnalyzerPage() {