Add Tacticooler effect

This commit is contained in:
Kalle
2022-09-19 23:36:40 +03:00
parent 85e43091f2
commit 37738ad8e5
4 changed files with 43 additions and 0 deletions

View File

@@ -121,6 +121,7 @@ export function buildStats({
specialAutoChargeRate: specialAutoChargeRate(input),
specialMaxRadius: specialMaxRadius(input),
specialRadiusRange: specialRadiusRange(input),
specialPowerUpDuration: specialPowerUpDuration(input),
},
};
}
@@ -1292,3 +1293,32 @@ function specialRadiusRange(
modifiedBy: SPECIAL_RADIUS_RANGE_KEY,
};
}
function specialPowerUpDuration(
args: StatFunctionInput
): AnalyzedBuild["stats"]["specialPowerUpDuration"] {
if (
!hasEffect({
key: "PowerUpFrame",
weapon: args.specialWeaponParams,
})
) {
return;
}
const SPECIAL_POWER_UP_DURATION_KEY = "SPU";
const { baseEffect, effect } = abilityPointsToEffects({
abilityPoints: apFromMap({
abilityPoints: args.abilityPoints,
ability: SPECIAL_POWER_UP_DURATION_KEY,
}),
key: "PowerUpFrame",
weapon: args.specialWeaponParams,
});
return {
baseValue: framesToSeconds(baseEffect),
value: framesToSeconds(effect),
modifiedBy: SPECIAL_POWER_UP_DURATION_KEY,
};
}

View File

@@ -238,6 +238,7 @@ export interface AnalyzedBuild {
specialAutoChargeRate?: Stat;
specialMaxRadius?: Stat;
specialRadiusRange?: Stat<string>;
specialPowerUpDuration?: Stat;
};
}

View File

@@ -389,6 +389,17 @@ export default function BuildAnalyzerPage() {
})}
/>
)}
{analyzed.stats.specialPowerUpDuration && (
<StatCard
stat={analyzed.stats.specialPowerUpDuration}
title={t("analyzer:stat.special.powerUpDuration", {
weapon: t(
`weapons:SPECIAL_${analyzed.weapon.specialWeaponSplId}`
),
})}
suffix={t("analyzer:suffix.seconds")}
/>
)}
</StatCategory>
<StatCategory title={t("analyzer:stat.category.subDef")}>
<StatCard

View File

@@ -65,6 +65,7 @@
"stat.special.maxRadius": "{{weapon}} wave max radius",
"stat.special.maxRadius.explanation": "Travel speed of the wave is always the same despite the increased radius.",
"stat.special.radiusRange": "{{weapon}} sucking radius",
"stat.special.powerUpDuration": "{{weapon}} drink effect duration",
"damage.header.type": "Type",
"damage.header.damage": "Damage",
"damage.header.distance": "Distance",