mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-08-26 04:57:08 -05:00
Add splatted by RP user stat to analyzer (ss)
This commit is contained in:
@@ -75,7 +75,8 @@ export function buildStats({
|
||||
},
|
||||
stats: {
|
||||
specialPoint: specialPoint(input),
|
||||
specialSavedAfterDeath: specialSavedAfterDeath(input),
|
||||
specialLost: specialLost(input),
|
||||
specialLostSplattedByRP: specialLost(input, true),
|
||||
fullInkTankOptions: fullInkTankOptions(input),
|
||||
damages: damages(input),
|
||||
mainWeaponWhiteInkSeconds:
|
||||
@@ -166,11 +167,11 @@ function specialPoint({
|
||||
}
|
||||
|
||||
const OWN_RESPAWN_PUNISHER_EXTRA_SPECIAL_LOST = 0.225;
|
||||
function specialSavedAfterDeath({
|
||||
abilityPoints,
|
||||
mainWeaponParams,
|
||||
mainOnlyAbilities,
|
||||
}: StatFunctionInput): AnalyzedBuild["stats"]["specialPoint"] {
|
||||
const ENEMY_RESPAWN_PUNISHER_EXTRA_SPECIAL_LOST = 0.15;
|
||||
function specialLost(
|
||||
{ abilityPoints, mainWeaponParams, mainOnlyAbilities }: StatFunctionInput,
|
||||
splattedByRP = false
|
||||
): AnalyzedBuild["stats"]["specialPoint"] {
|
||||
const SPECIAL_SAVED_AFTER_DEATH_ABILITY = "SS";
|
||||
const hasRespawnPunisher = mainOnlyAbilities.includes("RP");
|
||||
const extraSpecialLost = hasRespawnPunisher
|
||||
@@ -190,9 +191,17 @@ function specialSavedAfterDeath({
|
||||
weapon: mainWeaponParams,
|
||||
});
|
||||
|
||||
const splattedByExtraPenalty = splattedByRP
|
||||
? ENEMY_RESPAWN_PUNISHER_EXTRA_SPECIAL_LOST
|
||||
: 0;
|
||||
|
||||
return {
|
||||
baseValue: specialSavedAfterDeathForDisplay(baseEffect),
|
||||
value: specialSavedAfterDeathForDisplay(effect - extraSpecialLost),
|
||||
baseValue: specialSavedAfterDeathForDisplay(
|
||||
baseEffect - splattedByExtraPenalty
|
||||
),
|
||||
value: specialSavedAfterDeathForDisplay(
|
||||
effect - splattedByExtraPenalty - extraSpecialLost
|
||||
),
|
||||
modifiedBy: [SPECIAL_SAVED_AFTER_DEATH_ABILITY, "RP"],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -185,8 +185,8 @@ export interface AnalyzedBuild {
|
||||
};
|
||||
stats: {
|
||||
specialPoint: Stat;
|
||||
/** % of special charge saved when dying */
|
||||
specialSavedAfterDeath: Stat;
|
||||
specialLost: Stat;
|
||||
specialLostSplattedByRP: Stat;
|
||||
mainWeaponWhiteInkSeconds?: number;
|
||||
subWeaponWhiteInkSeconds: number;
|
||||
fullInkTankOptions: Array<FullInkTankOption & { id: string }>;
|
||||
|
||||
@@ -245,10 +245,15 @@ export default function BuildAnalyzerPage() {
|
||||
suffix={t("analyzer:suffix.specialPointsShort")}
|
||||
/>
|
||||
<StatCard
|
||||
stat={analyzed.stats.specialSavedAfterDeath}
|
||||
stat={analyzed.stats.specialLost}
|
||||
title={t("analyzer:stat.specialLost")}
|
||||
suffix="%"
|
||||
/>
|
||||
<StatCard
|
||||
stat={analyzed.stats.specialLostSplattedByRP}
|
||||
title={t("analyzer:stat.specialLostSplattedByRP")}
|
||||
suffix="%"
|
||||
/>
|
||||
{analyzed.stats.specialDurationInSeconds && (
|
||||
<StatCard
|
||||
stat={analyzed.stats.specialDurationInSeconds}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"stat.maxChargeHoldSeconds": "Max charge hold time",
|
||||
"stat.specialPoints": "Points to special",
|
||||
"stat.specialLost": "Special lost when splatted",
|
||||
"stat.specialLostSplattedByRP": "Special lost when splatted by RP user",
|
||||
"stat.whiteInk": "No ink recovery time after usage",
|
||||
"stat.squidFormInkRecoverySeconds": "Ink tank full recovery time (squid form)",
|
||||
"stat.quickRespawnTime": "Quick respawn time",
|
||||
|
||||
Reference in New Issue
Block a user