mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-07-18 16:43:56 -05:00
Run/swim speed to analyzer
This commit is contained in:
parent
35dbe4e6cc
commit
c8d2d996e4
|
|
@ -52,6 +52,9 @@ export function buildStats({
|
|||
fullInkTankOptions: fullInkTankOptions(input),
|
||||
subWeaponWhiteInkFrames: subWeaponParams.InkRecoverStop,
|
||||
squidFormInkRecoverySeconds: squidFormInkRecoverySeconds(input),
|
||||
runSpeed: runSpeed(input),
|
||||
// shootingRunSpeed: shootingRunSpeed(input),
|
||||
swimSpeed: swimSpeed(input),
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
@ -248,3 +251,53 @@ function squidFormInkRecoverySeconds(
|
|||
modifiedBy: SQUID_FORM_INK_RECOVERY_SECONDS_ABILITY,
|
||||
};
|
||||
}
|
||||
|
||||
function runSpeed(args: StatFunctionInput): AnalyzedBuild["stats"]["runSpeed"] {
|
||||
const key =
|
||||
args.mainWeaponParams.WeaponSpeedType === "Fast"
|
||||
? "_Fast"
|
||||
: args.mainWeaponParams.WeaponSpeedType === "Slow"
|
||||
? "_Slow"
|
||||
: "";
|
||||
const RUN_SPEED_ABILITY = "RSU";
|
||||
const { baseEffect, effect } = abilityPointsToEffects({
|
||||
abilityPoints: apFromMap({
|
||||
abilityPoints: args.abilityPoints,
|
||||
ability: RUN_SPEED_ABILITY,
|
||||
}),
|
||||
key: `MoveVel_Human${key}`,
|
||||
weapon: args.mainWeaponParams,
|
||||
});
|
||||
|
||||
return {
|
||||
baseValue: effectToRounded(baseEffect * 10),
|
||||
value: effectToRounded(effect * 10),
|
||||
modifiedBy: RUN_SPEED_ABILITY,
|
||||
};
|
||||
}
|
||||
|
||||
function swimSpeed(
|
||||
args: StatFunctionInput
|
||||
): AnalyzedBuild["stats"]["swimSpeed"] {
|
||||
const key =
|
||||
args.mainWeaponParams.WeaponSpeedType === "Fast"
|
||||
? "_Fast"
|
||||
: args.mainWeaponParams.WeaponSpeedType === "Slow"
|
||||
? "_Slow"
|
||||
: "";
|
||||
const SWIM_SPEED_ABILITY = "SSU";
|
||||
const { baseEffect, effect } = abilityPointsToEffects({
|
||||
abilityPoints: apFromMap({
|
||||
abilityPoints: args.abilityPoints,
|
||||
ability: SWIM_SPEED_ABILITY,
|
||||
}),
|
||||
key: `MoveVel_Stealth${key}`,
|
||||
weapon: args.mainWeaponParams,
|
||||
});
|
||||
|
||||
return {
|
||||
baseValue: effectToRounded(baseEffect * 10),
|
||||
value: effectToRounded(effect * 10),
|
||||
modifiedBy: SWIM_SPEED_ABILITY,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ export interface MainWeaponParams {
|
|||
/** Replacing default values of the ability json for this specific weapon */
|
||||
overwrites?: Record<string, Partial<Record<"High" | "Mid" | "Low", number>>>;
|
||||
SpecialPoint: number;
|
||||
/** Weapon's weight class. "Light/Heavy weapon" */
|
||||
WeaponSpeedType?: "Slow" | "Fast";
|
||||
/** 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? */
|
||||
|
|
@ -125,5 +127,9 @@ export interface AnalyzedBuild {
|
|||
subWeaponWhiteInkFrames: number;
|
||||
fullInkTankOptions: Array<FullInkTankOption>;
|
||||
squidFormInkRecoverySeconds: Stat;
|
||||
runSpeed: Stat;
|
||||
// xxx: missing from json
|
||||
// shootingRunSpeed: Stat;
|
||||
swimSpeed: Stat;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,24 +4,28 @@
|
|||
"SpecialPoint": 180,
|
||||
"subWeaponId": 6,
|
||||
"specialWeaponId": 11,
|
||||
"WeaponSpeedType": "Fast",
|
||||
"InkConsume": 0.008
|
||||
},
|
||||
"10": {
|
||||
"SpecialPoint": 180,
|
||||
"subWeaponId": 0,
|
||||
"specialWeaponId": 2,
|
||||
"WeaponSpeedType": "Fast",
|
||||
"InkConsume": 0.0043
|
||||
},
|
||||
"20": {
|
||||
"SpecialPoint": 200,
|
||||
"subWeaponId": 2,
|
||||
"specialWeaponId": 12,
|
||||
"WeaponSpeedType": "Fast",
|
||||
"InkConsume": 0.008
|
||||
},
|
||||
"30": {
|
||||
"SpecialPoint": 200,
|
||||
"subWeaponId": 5,
|
||||
"specialWeaponId": 13,
|
||||
"WeaponSpeedType": "Fast",
|
||||
"InkConsume": 0.0055
|
||||
},
|
||||
"40": {
|
||||
|
|
@ -46,6 +50,7 @@
|
|||
"SpecialPoint": 200,
|
||||
"subWeaponId": 1,
|
||||
"specialWeaponId": 15,
|
||||
"WeaponSpeedType": "Fast",
|
||||
"InkConsume": 0.008
|
||||
},
|
||||
"70": {
|
||||
|
|
@ -75,6 +80,7 @@
|
|||
"Mid": 0.5
|
||||
}
|
||||
},
|
||||
"WeaponSpeedType": "Fast",
|
||||
"InkConsume": 0.075
|
||||
},
|
||||
"210": {
|
||||
|
|
@ -108,6 +114,7 @@
|
|||
"Mid": 0.5
|
||||
}
|
||||
},
|
||||
"WeaponSpeedType": "Fast",
|
||||
"InkConsume": 0.04
|
||||
},
|
||||
"240": {
|
||||
|
|
@ -154,6 +161,7 @@
|
|||
"SpecialPoint": 180,
|
||||
"subWeaponId": 7,
|
||||
"specialWeaponId": 3,
|
||||
"WeaponSpeedType": "Fast",
|
||||
"InkConsume_WeaponSwingParam": 0.0396
|
||||
},
|
||||
"1010": {
|
||||
|
|
@ -166,6 +174,7 @@
|
|||
"SpecialPoint": 190,
|
||||
"subWeaponId": 3,
|
||||
"specialWeaponId": 15,
|
||||
"WeaponSpeedType": "Slow",
|
||||
"InkConsume_WeaponSwingParam": 0.18
|
||||
},
|
||||
"1030": {
|
||||
|
|
@ -179,6 +188,7 @@
|
|||
"SpecialPoint": 180,
|
||||
"subWeaponId": 0,
|
||||
"specialWeaponId": 9,
|
||||
"WeaponSpeedType": "Fast",
|
||||
"InkConsume_WeaponSwingParam": 0.02
|
||||
},
|
||||
"1110": {
|
||||
|
|
@ -212,6 +222,7 @@
|
|||
"SpecialPoint": 200,
|
||||
"subWeaponId": 10,
|
||||
"specialWeaponId": 7,
|
||||
"WeaponSpeedType": "Slow",
|
||||
"InkConsumeFullCharge": 0.25,
|
||||
"InkConsumeMinCharge": 0.0225
|
||||
},
|
||||
|
|
@ -219,6 +230,7 @@
|
|||
"SpecialPoint": 200,
|
||||
"subWeaponId": 10,
|
||||
"specialWeaponId": 7,
|
||||
"WeaponSpeedType": "Slow",
|
||||
"InkConsumeFullCharge": 0.25,
|
||||
"InkConsumeMinCharge": 0.0225
|
||||
},
|
||||
|
|
@ -226,6 +238,7 @@
|
|||
"SpecialPoint": 200,
|
||||
"subWeaponId": 7,
|
||||
"specialWeaponId": 9,
|
||||
"WeaponSpeedType": "Fast",
|
||||
"InkConsumeFullCharge": 0.084,
|
||||
"InkConsumeMinCharge": 0.0336
|
||||
},
|
||||
|
|
@ -246,6 +259,7 @@
|
|||
"SpecialPoint": 190,
|
||||
"subWeaponId": 11,
|
||||
"specialWeaponId": 10,
|
||||
"WeaponSpeedType": "Fast",
|
||||
"InkConsumeSlosher": 0.06
|
||||
},
|
||||
"3020": {
|
||||
|
|
@ -264,6 +278,7 @@
|
|||
"SpecialPoint": 200,
|
||||
"subWeaponId": 9,
|
||||
"specialWeaponId": 5,
|
||||
"WeaponSpeedType": "Slow",
|
||||
"InkConsumeSlosher": 0.117
|
||||
},
|
||||
"4000": {
|
||||
|
|
@ -282,6 +297,7 @@
|
|||
"SpecialPoint": 190,
|
||||
"subWeaponId": 7,
|
||||
"specialWeaponId": 6,
|
||||
"WeaponSpeedType": "Slow",
|
||||
"InkConsumeFullChargeSplatling": 0.35
|
||||
},
|
||||
"4030": {
|
||||
|
|
@ -300,6 +316,7 @@
|
|||
"SpecialPoint": 180,
|
||||
"subWeaponId": 8,
|
||||
"specialWeaponId": 15,
|
||||
"WeaponSpeedType": "Fast",
|
||||
"InkConsume": 0.00663,
|
||||
"InkConsume_SideStepParam": 0.05
|
||||
},
|
||||
|
|
@ -341,6 +358,7 @@
|
|||
"SpecialPoint": 190,
|
||||
"subWeaponId": 8,
|
||||
"specialWeaponId": 8,
|
||||
"WeaponSpeedType": "Slow",
|
||||
"InkConsumeUmbrella_WeaponShelterCanopyParam": 0.3,
|
||||
"InkConsume_WeaponShelterShotgunParam": 0.11
|
||||
},
|
||||
|
|
@ -348,6 +366,7 @@
|
|||
"SpecialPoint": 180,
|
||||
"subWeaponId": 10,
|
||||
"specialWeaponId": 13,
|
||||
"WeaponSpeedType": "Fast",
|
||||
"InkConsumeUmbrella_WeaponShelterCanopyParam": 0,
|
||||
"InkConsume_WeaponShelterShotgunParam": 0.04
|
||||
},
|
||||
|
|
@ -361,6 +380,7 @@
|
|||
"SpecialPoint": 200,
|
||||
"subWeaponId": 6,
|
||||
"specialWeaponId": 4,
|
||||
"WeaponSpeedType": "Fast",
|
||||
"InkConsumeFullCharge_ChargeParam": 0.065
|
||||
},
|
||||
"8000": {
|
||||
|
|
@ -374,6 +394,7 @@
|
|||
"SpecialPoint": 180,
|
||||
"subWeaponId": 13,
|
||||
"specialWeaponId": 11,
|
||||
"WeaponSpeedType": "Fast",
|
||||
"InkConsume_SwingParam": 0.03,
|
||||
"InkConsumeFullCharge_ChargeParam": 0.06
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,6 +75,16 @@ export default function BuildAnalyzerPage() {
|
|||
subWeaponId={analyzed.weapon.subWeaponSplId}
|
||||
/>
|
||||
</StatCategory>
|
||||
<StatCategory title={t("stat.category.movement")}>
|
||||
<StatCard
|
||||
stat={analyzed.stats.swimSpeed}
|
||||
title={t("stat.swimSpeed")}
|
||||
/>
|
||||
<StatCard
|
||||
stat={analyzed.stats.runSpeed}
|
||||
title={t("stat.runSpeed")}
|
||||
/>
|
||||
</StatCategory>
|
||||
<StatCategory title={t("stat.category.misc")}>
|
||||
<StatCard
|
||||
stat={analyzed.stats.squidFormInkRecoverySeconds}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,14 @@
|
|||
"stat.category.sub": "Sub weapon",
|
||||
"stat.category.special": "Special weapon",
|
||||
"stat.category.actionsPerInkTank": "Actions per ink tank",
|
||||
"stat.category.movement": "Movement",
|
||||
"stat.category.misc": "Miscellaneous",
|
||||
"stat.specialPoints": "Points to special",
|
||||
"stat.specialLost": "Special lost when splatted",
|
||||
"stat.whiteInkFrames": "Frames of no ink recovery after usage",
|
||||
"stat.squidFormInkRecoverySeconds": "Ink tank full recovery time (squid form)",
|
||||
"stat.swimSpeed": "Swim speed (units per frame)",
|
||||
"stat.runSpeed": "Run speed (units per frame)",
|
||||
"stat.consumption.NORMAL": "Shots",
|
||||
"stat.consumption.SWING": "Swings",
|
||||
"stat.consumption.SLOSH": "Sloshes",
|
||||
|
|
|
|||
|
|
@ -120,6 +120,7 @@ function parametersToMainWeaponResult(
|
|||
subWeaponId: resolveSubWeaponId(weapon),
|
||||
specialWeaponId: resolveSpecialWeaponId(weapon),
|
||||
overwrites: resolveOverwrites(params),
|
||||
WeaponSpeedType: params["MainWeaponSetting"]?.["WeaponSpeedType"],
|
||||
InkConsume,
|
||||
InkConsumeSlosher,
|
||||
InkConsumeFullCharge: params["WeaponParam"]?.["InkConsumeFullCharge"],
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user