mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
Merge pull request #233 from karelpak1/fix-hp-equalizer
This commit is contained in:
1 file changed
+9
-1
@@ -27,6 +27,8 @@ import { defaultEqualizer } from "./tankToDuelMember";
|
|||||||
export type TankCharacteristics = ReturnType<typeof tankCharacteristics>;
|
export type TankCharacteristics = ReturnType<typeof tankCharacteristics>;
|
||||||
export type TankCharacteristicsKey = keyof TankCharacteristics;
|
export type TankCharacteristicsKey = keyof TankCharacteristics;
|
||||||
|
|
||||||
|
const EQUALIZER_HEALTH_EPSILON = 50;
|
||||||
|
|
||||||
export function tankCharacteristics(
|
export function tankCharacteristics(
|
||||||
{
|
{
|
||||||
tank,
|
tank,
|
||||||
@@ -506,7 +508,13 @@ export function tankCharacteristics(
|
|||||||
hullTraverseCoefficient *
|
hullTraverseCoefficient *
|
||||||
(track.resistance_hard / softTerrainCoefficientRaw) *
|
(track.resistance_hard / softTerrainCoefficientRaw) *
|
||||||
(stockWeight / weightKg);
|
(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 fireChance = engine.fire_chance * fireChanceCoefficient;
|
||||||
const viewRange = turret.view_range * viewRangeCoefficient;
|
const viewRange = turret.view_range * viewRangeCoefficient;
|
||||||
const camouflageStill = tank.camouflage_still * camouflageCoefficientStill;
|
const camouflageStill = tank.camouflage_still * camouflageCoefficientStill;
|
||||||
|
|||||||
Reference in new issue
Block a user