Merge pull request #233 from karelpak1/fix-hp-equalizer

This commit is contained in:
TrèsAbhi authored and GitHub committed 2026-04-04 19:52:21 -05:00
commit c8ce26d6a7
1 file changed
+9 -1
@@ -27,6 +27,8 @@ import { defaultEqualizer } from "./tankToDuelMember";
export type TankCharacteristics = ReturnType<typeof tankCharacteristics>;
export type TankCharacteristicsKey = keyof TankCharacteristics;
const EQUALIZER_HEALTH_EPSILON = 50;
export function tankCharacteristics(
{
tank,
@@ -506,7 +508,13 @@ export function tankCharacteristics(
hullTraverseCoefficient *
(track.resistance_hard / softTerrainCoefficientRaw) *
(stockWeight / weightKg);
const health = (tank.health + turret.health) * healthCoefficient;
let health = (tank.health + turret.health) * healthCoefficient;
if (equalize) {
health =
EQUALIZER_HEALTH_EPSILON * Math.round(health / EQUALIZER_HEALTH_EPSILON);
}
const fireChance = engine.fire_chance * fireChanceCoefficient;
const viewRange = turret.view_range * viewRangeCoefficient;
const camouflageStill = tank.camouflage_still * camouflageCoefficientStill;