Finished duels stats
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import z from "zod"
|
||||
import { title } from "process"
|
||||
import z, { object } from "zod"
|
||||
|
||||
function bedwarsModeStats() {
|
||||
const ids = [
|
||||
@@ -269,6 +270,49 @@ function duelsModeStats() {
|
||||
}
|
||||
}
|
||||
|
||||
function devisionTitles() {
|
||||
const devisions = [
|
||||
"all_modes",
|
||||
"uhc",
|
||||
"op",
|
||||
"skywars",
|
||||
"bow",
|
||||
"blitz",
|
||||
"mega_walls",
|
||||
"sumo",
|
||||
"tnt_games",
|
||||
"parkour",
|
||||
"boxing",
|
||||
"classic",
|
||||
"no_debuff",
|
||||
"combo",
|
||||
"bridge"
|
||||
] as const
|
||||
|
||||
const titles = [
|
||||
"rookie",
|
||||
"iron",
|
||||
"gold",
|
||||
"diamond",
|
||||
"master",
|
||||
"legend",
|
||||
"grandmaster",
|
||||
"godlike",
|
||||
"celestial",
|
||||
"divine",
|
||||
"ascended"
|
||||
] as const
|
||||
const entries = new Map<string, z.ZodDefault<z.ZodNumber>>()
|
||||
|
||||
for (const div of devisions) {
|
||||
for (const title of titles) {
|
||||
entries.set(`${div}_${title}_title_prestige`, z.number().default(-1))
|
||||
}
|
||||
}
|
||||
|
||||
return Object.fromEntries(entries) as Record<`${typeof devisions[number]}_${typeof titles[number]}_title_prestige`, z.ZodDefault<z.ZodNumber>>
|
||||
}
|
||||
|
||||
export const duelsStatsSchema = z.looseObject({
|
||||
wins: z.number().default(0),
|
||||
losses: z.number().default(0),
|
||||
@@ -281,18 +325,7 @@ export const duelsStatsSchema = z.looseObject({
|
||||
bow_hits: z.number().default(0),
|
||||
current_winstreak: z.number().optional(),
|
||||
best_overall_winstreak: z.number().optional(),
|
||||
//
|
||||
all_modes_rookie_title_prestige: z.number().default(-1),
|
||||
all_modes_iron_title_prestige: z.number().default(-1),
|
||||
all_modes_gold_title_prestige: z.number().default(-1),
|
||||
all_modes_diamond_title_prestige: z.number().default(-1),
|
||||
all_modes_master_title_prestige: z.number().default(-1),
|
||||
all_modes_legend_title_prestige: z.number().default(-1),
|
||||
all_modes_grandmaster_title_prestige: z.number().default(-1),
|
||||
all_modes_godlike_title_prestige: z.number().default(-1),
|
||||
all_modes_celestial_title_prestige: z.number().default(-1),
|
||||
all_modes_divine_title_prestige: z.number().default(-1),
|
||||
all_modes_ascended_title_prestige: z.number().default(-1),
|
||||
...devisionTitles(),
|
||||
...duelsModeStats().all,
|
||||
...duelsModeStats().ws,
|
||||
...duelsModeStats().bestWs,
|
||||
|
||||
Reference in New Issue
Block a user