From bc4fa60f6722edcdc04a0e2a8bd45eddc73282ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Sun, 11 Feb 2024 14:21:51 -0600 Subject: [PATCH] fix: camo net now affects all stats --- .../[id]/components/Characteristics/index.tsx | 71 +++++++------------ 1 file changed, 27 insertions(+), 44 deletions(-) diff --git a/src/app/tools/tankopedia/[id]/components/Characteristics/index.tsx b/src/app/tools/tankopedia/[id]/components/Characteristics/index.tsx index 344751a96..140bc1819 100644 --- a/src/app/tools/tankopedia/[id]/components/Characteristics/index.tsx +++ b/src/app/tools/tankopedia/[id]/components/Characteristics/index.tsx @@ -55,6 +55,13 @@ export function Characteristics() { const hasImprovedVerticalStabilizer = useEquipment(122); const hasImprovedSuspension = useEquipment(123); const penetrationDistanceInput = useRef(null); + const camouflageNetBonus = hasCamouflageNet + ? tank.type === 'heavy' + ? 1.03 + : tank.type === 'tankDestroyer' + ? 1.07 + : 1.05 + : 1; /** * TODO: @@ -429,53 +436,29 @@ export function Characteristics() { : 1)} - + + {tank.camouflage.still * camouflageNetBonus * 100} + + + {tank.camouflage.moving * camouflageNetBonus * 100} + + {tank.camouflage.still * - 100 * - (hasCamouflageNet - ? tank.type === 'heavy' - ? 1.03 - : tank.type === 'tankDestroyer' - ? 1.07 - : 1.05 - : 1)} + gun.camouflageLoss * + camouflageNetBonus * + 100} - - {tank.camouflage.moving * 100} + + {tank.camouflage.moving * + gun.camouflageLoss * + camouflageNetBonus * + 100} - - {tank.camouflage.still * gun.camouflageLoss * 100} - - - {tank.camouflage.moving * gun.camouflageLoss * 100} - - - {tank.camouflage.onFire * tank.camouflage.still * 100} + + {tank.camouflage.onFire * + tank.camouflage.still * + camouflageNetBonus * + 100} {size[0].toFixed(2)} x {size[2].toFixed(2)} x {size[1].toFixed(2)}