From ef5169f669677fe4b2df32215a72dea680360d08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Sat, 13 Jul 2024 14:37:42 -0500 Subject: [PATCH] feat: percentage resistances --- src/app/tools/compare/components/Body.tsx | 6 +++--- .../tankopedia/[id]/components/Characteristics/index.tsx | 6 +++--- src/core/blitzkit/tankCharacteristics.ts | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/app/tools/compare/components/Body.tsx b/src/app/tools/compare/components/Body.tsx index 869e43813..e0f9e5ef8 100644 --- a/src/app/tools/compare/components/Body.tsx +++ b/src/app/tools/compare/components/Body.tsx @@ -243,21 +243,21 @@ export function Body({ stats }: BodyProps) { stats={stats} name="Terrain coefficient" value="hardTerrainCoefficient" - decimals={1} + decimals={0} /> - + {stats.hardTerrainCoefficient} - + {stats.mediumTerrainCoefficient} - + {stats.softTerrainCoefficient} diff --git a/src/core/blitzkit/tankCharacteristics.ts b/src/core/blitzkit/tankCharacteristics.ts index 3e8c6abf7..e39d2c9a8 100644 --- a/src/core/blitzkit/tankCharacteristics.ts +++ b/src/core/blitzkit/tankCharacteristics.ts @@ -409,11 +409,11 @@ export function tankCharacteristics( const speedBackwards = tank.speed.backwards + speedBackwardsSum; const enginePower = resolvedEnginePower; const hardTerrainCoefficient = - track.resistance.hard * resistanceHardCoefficient; + 100 / (track.resistance.hard * resistanceHardCoefficient); const mediumTerrainCoefficient = - track.resistance.medium * resistanceMediumCoefficient; + 100 / (track.resistance.medium * resistanceMediumCoefficient); const softTerrainCoefficient = - track.resistance.soft * resistanceSoftCoefficient; + 100 / (track.resistance.soft * resistanceSoftCoefficient); const powerToWeightRatioHardTerrain = resolvedEnginePower / weightTons / hardTerrainCoefficient; const powerToWeightRatioMediumTerrain =