Added mega walls card
This commit is contained in:
@@ -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()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user