From 6ef06103318b7664c95a05ef1f7418365368a222 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com>
Date: Sat, 29 Jun 2024 12:08:42 -0500
Subject: [PATCH] feat: clipping potential
---
src/app/tools/compare/page.tsx | 8 ++++++++
.../tankopedia/[id]/components/Characteristics/index.tsx | 5 +++++
src/core/blitzkit/tankCharacteristics.ts | 2 ++
3 files changed, 15 insertions(+)
diff --git a/src/app/tools/compare/page.tsx b/src/app/tools/compare/page.tsx
index ccf01ce94..1d71d1acd 100644
--- a/src/app/tools/compare/page.tsx
+++ b/src/app/tools/compare/page.tsx
@@ -1261,6 +1261,14 @@ export default function Page() {
)}
+ {hasNonRegularGun && (
+
+ )}
{stats.damage}
+ {gun.type !== 'regular' && (
+
+ {stats.clipDamage!}
+
+ )}
{stats.moduleDamage}
diff --git a/src/core/blitzkit/tankCharacteristics.ts b/src/core/blitzkit/tankCharacteristics.ts
index e8e100213..cfe3d0dcd 100644
--- a/src/core/blitzkit/tankCharacteristics.ts
+++ b/src/core/blitzkit/tankCharacteristics.ts
@@ -359,6 +359,7 @@ export function tankCharacteristics(
const penetration =
resolveNearPenetration(shell.penetration) * penetrationCoefficient;
const damage = shell.damage.armor * damageCoefficient;
+ const clipDamage = gun.type === 'regular' ? undefined : gun.count * damage;
const moduleDamage = shell.damage.module * damageCoefficient;
const explosionRadius = shell.explosionRadius;
const shellVelocity = shell.speed * shellVelocityCoefficient;
@@ -477,6 +478,7 @@ export function tankCharacteristics(
caliber,
penetration,
damage,
+ clipDamage,
moduleDamage,
explosionRadius,
shellVelocity,