Added mega walls card

This commit is contained in:
2025-09-07 11:36:19 +02:00
parent 4612222207
commit 33d02113da
6 changed files with 195 additions and 1 deletions

View File

@@ -553,3 +553,60 @@ export const tntGamesStatsSchema = z.looseObject({
deaths_capture: z.number().default(0),
...tntGamesModeStats()
})
function megawallsModeStats() {
const ids = [
"angel",
"arcanist",
"assassin",
"automaton",
"blaze",
"cow",
"creeper",
"dragon",
"dreadlord",
"enderman",
"golem",
"herobrine",
"hunter",
"moleman",
"phoenix",
"pigman",
"pirate",
"renegade",
"shaman",
"shark",
"sheep",
"skeleton",
"snowman",
"spider",
"squid",
"werewolf",
"zombie"
] as const
const stats = [
"wins",
"losses"
] as const
const entries = new Map<string, z.ZodDefault<z.ZodNumber>>()
for (const id of ids) {
for (const stat of stats) {
entries.set(`${id}_${stat}`, z.number().default(0))
}
}
return Object.fromEntries(entries) as Record<`${typeof ids[number]}_${typeof stats[number]}`, z.ZodDefault<z.ZodNumber>>
}
export const megawallsStats = z.looseObject({
kills: z.number().default(0),
deaths: z.number().default(0),
wins: z.number().default(0),
losses: z.number().default(0),
final_kills: z.number().default(0),
final_deaths: z.number().default(0),
...megawallsModeStats()
})