From 3892698d155f37a3a3a21d0ff96cdb8a65ba9f03 Mon Sep 17 00:00:00 2001
From: Taken
Date: Sun, 21 Sep 2025 21:35:17 +0200
Subject: [PATCH] Added vampz and walls stats
---
src/app/(stats)/player/[ign]/_client.tsx | 4 +-
.../player/[ign]/_stats/classic/classic.tsx | 15 +++++-
.../player/[ign]/_stats/classic/stats.tsx | 53 +++++++++++++++++++
.../player/[ign]/_stats/classic/vampirez.tsx | 42 +++++++++++++++
.../player/[ign]/_stats/classic/walls.tsx | 42 +++++++++++++++
src/lib/schema/player.ts | 6 ++-
src/lib/schema/stats/classic.ts | 19 +++++++
7 files changed, 177 insertions(+), 4 deletions(-)
create mode 100644 src/app/(stats)/player/[ign]/_stats/classic/vampirez.tsx
create mode 100644 src/app/(stats)/player/[ign]/_stats/classic/walls.tsx
diff --git a/src/app/(stats)/player/[ign]/_client.tsx b/src/app/(stats)/player/[ign]/_client.tsx
index eca7c19..893c00e 100644
--- a/src/app/(stats)/player/[ign]/_client.tsx
+++ b/src/app/(stats)/player/[ign]/_client.tsx
@@ -104,7 +104,9 @@ export function PlayerStats(
)
diff --git a/src/app/(stats)/player/[ign]/_stats/classic/classic.tsx b/src/app/(stats)/player/[ign]/_stats/classic/classic.tsx
index c18c35d..8dffcfc 100644
--- a/src/app/(stats)/player/[ign]/_stats/classic/classic.tsx
+++ b/src/app/(stats)/player/[ign]/_stats/classic/classic.tsx
@@ -5,8 +5,19 @@ import { cn } from "@/lib/utils"
import CollapsedStats from "../../_components/CollapsedStats"
import ArenaBrawlStats from "./arenabrawl"
import PaintballStats from "./paintball"
+import VampireZStats from "./vampirez"
+import WallsStats from "./walls"
-export default function ClassicStats({ stats }: { stats: { arena: NonNullStats["ArenaBrawl"], paintball: NonNullStats["Paintball"] } }) {
+export default function ClassicStats(
+ { stats }: {
+ stats: {
+ arena: NonNullStats["ArenaBrawl"]
+ paintball: NonNullStats["Paintball"]
+ walls: NonNullStats["Walls"]
+ vampirez: NonNullStats["VampireZ"]
+ }
+ }
+) {
return (
@@ -27,6 +38,8 @@ export default function ClassicStats({ stats }: { stats: { arena: NonNullStats["
+
+
)
diff --git a/src/app/(stats)/player/[ign]/_stats/classic/stats.tsx b/src/app/(stats)/player/[ign]/_stats/classic/stats.tsx
index a30748f..f516e94 100644
--- a/src/app/(stats)/player/[ign]/_stats/classic/stats.tsx
+++ b/src/app/(stats)/player/[ign]/_stats/classic/stats.tsx
@@ -34,3 +34,56 @@ export function PaintballGeneralStats({ stats }: { stats: NonNullable
)
}
+
+export function WallsGeneralStats({ stats }: { stats: NonNullable }) {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ )
+}
+
+export function VampireZGeneralStats({ stats }: { stats: NonNullable }) {
+ return (
+ <>
+
+
+
+
+ >
+ )
+}
diff --git a/src/app/(stats)/player/[ign]/_stats/classic/vampirez.tsx b/src/app/(stats)/player/[ign]/_stats/classic/vampirez.tsx
new file mode 100644
index 0000000..6009a58
--- /dev/null
+++ b/src/app/(stats)/player/[ign]/_stats/classic/vampirez.tsx
@@ -0,0 +1,42 @@
+import { Separator } from "@/components/ui/separator"
+import { formatNumber } from "@/lib/formatters"
+import { devide } from "@/lib/hypixel/general"
+import { NonNullStats } from "@/lib/schema/player"
+import GeneralStats from "../GeneralStats"
+import { VampireZGeneralStats } from "./stats"
+
+export default function VampireZStats({ stats }: { stats: NonNullStats["VampireZ"] }) {
+ if (!stats) return null
+
+ const vkd = formatNumber(devide(stats.human_kills, stats.vampire_deaths))
+ const hkd = formatNumber(devide(stats.vampire_kills, stats.human_deaths))
+
+ return (
+ Vampire KD
,
+ stat: {vkd}
+ },
+ {
+ title: Human KD
,
+ stat: {hkd}
+ },
+ {
+ title: Vampire Wins
,
+ stat: {formatNumber(stats.vampire_wins)}
+ },
+ {
+ title: Human Wins
,
+ stat: {formatNumber(stats.human_wins)}
+ }
+ ]}
+ >
+
+
+
+
+ )
+}
diff --git a/src/app/(stats)/player/[ign]/_stats/classic/walls.tsx b/src/app/(stats)/player/[ign]/_stats/classic/walls.tsx
new file mode 100644
index 0000000..941246f
--- /dev/null
+++ b/src/app/(stats)/player/[ign]/_stats/classic/walls.tsx
@@ -0,0 +1,42 @@
+import { Separator } from "@/components/ui/separator"
+import { formatNumber } from "@/lib/formatters"
+import { devide } from "@/lib/hypixel/general"
+import { NonNullStats } from "@/lib/schema/player"
+import GeneralStats from "../GeneralStats"
+import { WallsGeneralStats } from "./stats"
+
+export default function WallsStats({ stats }: { stats: NonNullStats["Walls"] }) {
+ if (!stats) return null
+
+ const kd = formatNumber(devide(stats.kills, stats.deaths))
+ const wl = formatNumber(devide(stats.wins, stats.losses))
+
+ return (
+ Kills,
+ stat: {formatNumber(stats.kills)}
+ },
+ {
+ title: KD
,
+ stat: {kd}
+ },
+ {
+ title: Wins
,
+ stat: {formatNumber(stats.wins)}
+ },
+ {
+ title: WL
,
+ stat: {wl}
+ }
+ ]}
+ >
+
+
+
+
+ )
+}
diff --git a/src/lib/schema/player.ts b/src/lib/schema/player.ts
index c5c410e..c8bd2d4 100644
--- a/src/lib/schema/player.ts
+++ b/src/lib/schema/player.ts
@@ -3,7 +3,7 @@ import { arcadeStatsSchema } from "./stats/arcade"
import { bedwarsStatsSchema } from "./stats/bedwars"
import { blitzStatsSchema } from "./stats/blitz"
import { buildBattleStatsSchema } from "./stats/build-battle"
-import { arenaBrawlStatsSchema, paintBallStatsSchema } from "./stats/classic"
+import { arenaBrawlStatsSchema, paintBallStatsSchema, vampireZStatsSchema, wallsStatsSchema } from "./stats/classic"
import { copsAndCrimsStatsSchema } from "./stats/copsandcrims"
import { duelsStatsSchema } from "./stats/duels"
import { megawallsStats } from "./stats/megawalls"
@@ -47,7 +47,9 @@ export const playerSchema = z.looseObject({
SuperSmash: smashHerosStats.optional(),
Battleground: warlordsStatsSchema.optional(),
Arena: arenaBrawlStatsSchema.optional(),
- Paintball: paintBallStatsSchema
+ Paintball: paintBallStatsSchema.optional(),
+ Walls: wallsStatsSchema.optional(),
+ VampireZ: vampireZStatsSchema.optional()
}).transform(({ Walls3, MCGO, HungerGames, SuperSmash, Battleground, Arena, ...rest }) => {
return {
MegaWalls: Walls3,
diff --git a/src/lib/schema/stats/classic.ts b/src/lib/schema/stats/classic.ts
index 84f8986..4152786 100644
--- a/src/lib/schema/stats/classic.ts
+++ b/src/lib/schema/stats/classic.ts
@@ -29,3 +29,22 @@ export const paintBallStatsSchema = z.object({
killstreaks: z.number().default(0),
shots_fired: z.number().default(0)
})
+
+export const wallsStatsSchema = z.object({
+ coins: z.number().default(0),
+ kills: z.number().default(0),
+ deaths: z.number().default(0),
+ wins: z.number().default(0),
+ losses: z.number().default(0)
+})
+
+export const vampireZStatsSchema = z.object({
+ coins: z.number().default(0),
+ vampire_kills: z.number().default(0),
+ vampire_deaths: z.number().default(0),
+ vampire_wins: z.number().default(0),
+ human_kills: z.number().default(0),
+ human_deaths: z.number().default(0),
+ human_wins: z.number().default(0),
+ zombie_kills: z.number().default(0)
+})