Wave Breaker SPU effect

This commit is contained in:
Kalle
2022-09-19 17:58:38 +03:00
parent 5b64515976
commit 059d738340
4 changed files with 44 additions and 0 deletions

View File

@@ -119,6 +119,7 @@ export function buildStats({
specialReticleRadius: specialReticleRadius(input),
specialThrowDistance: specialThrowDistance(input),
specialAutoChargeRate: specialAutoChargeRate(input),
specialMaxRadius: specialMaxRadius(input),
},
};
}
@@ -1215,3 +1216,32 @@ function specialAutoChargeRate(
modifiedBy: SPECIAL_AUTO_CHARGE_RATE_KEY,
};
}
function specialMaxRadius(
args: StatFunctionInput
): AnalyzedBuild["stats"]["specialMaxRadius"] {
if (
!hasEffect({
key: "MaxRadius",
weapon: args.specialWeaponParams,
})
) {
return;
}
const SPECIAL_MAX_RADIUS_KEY = "SPU";
const { baseEffect, effect } = abilityPointsToEffects({
abilityPoints: apFromMap({
abilityPoints: args.abilityPoints,
ability: SPECIAL_MAX_RADIUS_KEY,
}),
key: "MaxRadius",
weapon: args.specialWeaponParams,
});
return {
baseValue: roundToTwoDecimalPlaces(baseEffect),
value: roundToTwoDecimalPlaces(effect),
modifiedBy: SPECIAL_MAX_RADIUS_KEY,
};
}

View File

@@ -236,6 +236,7 @@ export interface AnalyzedBuild {
specialReticleRadius?: Stat;
specialThrowDistance?: Stat;
specialAutoChargeRate?: Stat;
specialMaxRadius?: Stat;
};
}

View File

@@ -368,6 +368,17 @@ export default function BuildAnalyzerPage() {
})}
/>
)}
{analyzed.stats.specialMaxRadius && (
<StatCard
stat={analyzed.stats.specialMaxRadius}
title={t("analyzer:stat.special.maxRadius", {
weapon: t(
`weapons:SPECIAL_${analyzed.weapon.specialWeaponSplId}`
),
})}
popoverInfo={t("analyzer:stat.special.maxRadius.explanation")}
/>
)}
</StatCategory>
<StatCategory title={t("analyzer:stat.category.subDef")}>
<StatCard

View File

@@ -62,6 +62,8 @@
"stat.special.reticleRadius": "{{weapon}} reticle radius",
"stat.special.throwDistance": "{{weapon}} throw distance",
"stat.special.autoChargeRate": "{{weapon}} auto charge rate",
"stat.special.maxRadius": "{{weapon}} wave max radius",
"stat.special.maxRadius.explanation": "Travel speed of the wave is always the same despite the increased radius.",
"damage.header.type": "Type",
"damage.header.damage": "Damage",
"damage.header.distance": "Distance",