Merge branch 'main' into data-driven

This commit is contained in:
tresabhi committed 2026-10-04 16:33:53 -05:00
commit 6ebb2810ad
37 files changed
+1404 -350

No files matched your search

@@ -16,13 +16,15 @@ export async function filterTank(
owned: number[] = [],
) {
return (
((filters.showOwned && owned.includes(tank.id)) ||
((!filters.showOwned && !filters.showUnowned) ||
(filters.showOwned && owned.includes(tank.id)) ||
(filters.showUnowned && !owned.includes(tank.id))) &&
(filters.tiers.length === 0 || filters.tiers.includes(tank.tier)) &&
(filters.nations.length === 0 || filters.nations.includes(tank.nation)) &&
(filters.classes.length === 0 || filters.classes.includes(tank.class)) &&
(filters.types.length === 0 || filters.types.includes(tank.type)) &&
((filters.showTesting && tank.testing) ||
((!filters.showTesting && !filters.showNonTesting) ||
(filters.showTesting && tank.testing) ||
(filters.showNonTesting && !tank.testing)) &&
(filters.gunType.length === 0 ||
(filters.gunType.includes("regular") &&
@@ -0,0 +1,8 @@
export const SPALL_LINER_PROVISION_ID = 101;
/**
* Matches the in-game reduction Spall Liner grants against HE splash
* damage. Shared between the characteristics panel and the Dynamic
* Armor 3D viewer's damage readout so the figure isn't duplicated.
*/
export const SPALL_LINER_HE_DAMAGE_DELTA = -0.2;
@@ -24,6 +24,7 @@ import {
type TurretDefinition,
} from "@blitzkit/protos";
import type { EquipmentMatrix } from "../../stores/duel";
import { SPALL_LINER_HE_DAMAGE_DELTA } from "./spallLiner";
import { defaultEqualizer } from "./tankToDuelMember";
export type TankCharacteristics = ReturnType<typeof tankCharacteristics>;
@@ -172,7 +173,10 @@ export function tankCharacteristics(
coefficient(
[applyReactiveArmor && shell.type !== ShellType.SHELL_TYPE_HE, -0.27],
[applyDynamicArmor, -0.1],
[applySpallLiner && shell.type === ShellType.SHELL_TYPE_HE, -0.2],
[
applySpallLiner && shell.type === ShellType.SHELL_TYPE_HE,
SPALL_LINER_HE_DAMAGE_DELTA,
],
);
const assaultDamageCoefficient =
gun.assault_ranges && gun.assault_ranges.types.includes(shell.type)
@@ -420,6 +424,10 @@ export function tankCharacteristics(
: (gun.gun_type!.$case === "regular"
? gun.gun_type!.value.reload
: gun.gun_type!.value.clip_reload) * reloadCoefficient;
const peekabooDpm =
gun.gun_type!.$case === "regular"
? Math.round(damage * (60 / Math.max(shellReload!, 10)))
: undefined;
const caliber = shell.caliber;
const penetration = shell.penetration!.near * penetrationCoefficient;
const clipDamage =
@@ -547,6 +555,7 @@ export function tankCharacteristics(
shellRicochet,
dpm,
dpmEffective,
peekabooDpm,
shells,
mostOptimalShellIndex,
shellReloads,