From 94db2c9159e8dc565d2e4727f6966cdeedfb0ad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Tue, 13 Aug 2024 19:52:33 -0500 Subject: [PATCH] fix: additive camouflage values (Synx, you better be right!) --- src/core/blitzkit/tankCharacteristics.ts | 38 +++++++++++++++++------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/src/core/blitzkit/tankCharacteristics.ts b/src/core/blitzkit/tankCharacteristics.ts index d263ec194..314366b21 100644 --- a/src/core/blitzkit/tankCharacteristics.ts +++ b/src/core/blitzkit/tankCharacteristics.ts @@ -257,7 +257,18 @@ export function tankCharacteristics( [hasGearOil, 2], [hasImprovedGearOil, 4], ); - const camouflageCoefficientMoving = coefficient( + const camouflageCoefficientMoving = sum( + [ + true, + coefficient([ + camouflage, + tank.class === 'AT-SPG' + ? 0.04 + : tank.class === 'heavyTank' + ? 0.03 + : 0.02, + ]), + ], [ hasCamouflageNet, tank.class === 'heavyTank' @@ -268,12 +279,22 @@ export function tankCharacteristics( ? 0.07 : 0.1, ], - [ - camouflage, - tank.class === 'AT-SPG' ? 0.04 : tank.class === 'heavyTank' ? 0.03 : 0.02, - ], ); - const camouflageCoefficientStill = coefficient( + const camouflageCoefficientStill = sum( + [ + true, + coefficient( + [ + camouflage, + tank.class === 'AT-SPG' + ? 0.04 + : tank.class === 'heavyTank' + ? 0.03 + : 0.02, + ], + [true, crewSkills.camouflage * (3 / 100)], + ), + ], [ hasCamouflageNet, tank.class === 'heavyTank' @@ -284,11 +305,6 @@ export function tankCharacteristics( ? 0.14 : 0.2, ], - [ - camouflage, - tank.class === 'AT-SPG' ? 0.04 : tank.class === 'heavyTank' ? 0.03 : 0.02, - ], - [true, crewSkills.camouflage * (3 / 100)], ); const size = normalizeBoundingBox(