Added zombie type stats
This commit is contained in:
@@ -912,6 +912,67 @@ function arcadeModeWins() {
|
||||
return Object.fromEntries(entries) as Record<`${typeof ids[number]}`, z.ZodDefault<z.ZodNumber>>
|
||||
}
|
||||
|
||||
function arcadeZombiesModeStats() {
|
||||
const ids = [
|
||||
"deadend",
|
||||
"badblood",
|
||||
"alienarcadium"
|
||||
] as const
|
||||
|
||||
const stats = [
|
||||
"times_knocked_down_zombies",
|
||||
"players_revived_zombies",
|
||||
"doors_opened_zombies",
|
||||
"windows_repaired_zombies",
|
||||
"zombie_kills_zombies",
|
||||
"deaths_zombies",
|
||||
"best_round_zombies",
|
||||
"wins_zombies"
|
||||
] as const
|
||||
|
||||
const entries = new Map<string, z.ZodDefault<z.ZodNumber>>()
|
||||
for (const id of ids) {
|
||||
for (const stat of stats) {
|
||||
entries.set(`${stat}_${id}`, z.number().default(0))
|
||||
}
|
||||
}
|
||||
|
||||
return Object.fromEntries(entries) as Record<`${typeof stats[number]}_${typeof ids[number]}`, z.ZodDefault<z.ZodNumber>>
|
||||
}
|
||||
|
||||
function arcadeZombiesTypeStats() {
|
||||
const ids = [
|
||||
"basic",
|
||||
"blaze",
|
||||
"empowered",
|
||||
"ender",
|
||||
"endermite",
|
||||
"fire",
|
||||
"guardian",
|
||||
"magma",
|
||||
"magma_cube",
|
||||
"pig_zombie",
|
||||
"skelefish",
|
||||
"tnt_baby",
|
||||
"tnt",
|
||||
"inferno",
|
||||
"broodmother",
|
||||
"king_slime",
|
||||
"wither",
|
||||
"herobrine",
|
||||
"mega_blob",
|
||||
"mega_magma",
|
||||
"world_ender"
|
||||
] as const
|
||||
|
||||
const entries = new Map<string, z.ZodDefault<z.ZodNumber>>()
|
||||
for (const id of ids) {
|
||||
entries.set(`${id}_zombie_kills_zombies`, z.number().default(0))
|
||||
}
|
||||
|
||||
return Object.fromEntries(entries) as Record<`${typeof ids[number]}_zombie_kills_zombies`, z.ZodDefault<z.ZodNumber>>
|
||||
}
|
||||
|
||||
export const arcadeStatsSchema = z.object({
|
||||
miniwalls_activeKit: z.string().optional(),
|
||||
wither_kills_mini_walls: z.number().default(0),
|
||||
@@ -949,5 +1010,7 @@ export const arcadeStatsSchema = z.object({
|
||||
dropper: z.object({
|
||||
wins: z.number().default(0)
|
||||
}).optional(),
|
||||
...arcadeModeWins()
|
||||
...arcadeModeWins(),
|
||||
...arcadeZombiesModeStats(),
|
||||
...arcadeZombiesTypeStats()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user