Updated skywars to use new prestiges

This commit is contained in:
2025-09-06 11:57:06 +02:00
parent a76cdace06
commit 8dc7fa8259
4 changed files with 482 additions and 83 deletions

View File

@@ -32,22 +32,14 @@ export function concatSkywarsStats(...stats: SkywarsModeStats[]) {
]
}
export function getTextColor(level: number) {
const floored = floorLevel(level, 5)
export function getPrestige(level: number) {
const floored = floorLevel(level, 10)
if (level > 150) {
return {
text: PRESTIGES.at(-1)?.color ?? "gray",
brackets: PRESTIGES.at(-1)?.b_color ?? "gray"
}
if (level > PRESTIGES.at(-1)!.level) {
PRESTIGES.at(-1)!
}
const pres = PRESTIGES.find(p => p.level === floored)
return {
text: pres?.color ?? "gray",
brackets: pres?.b_color ?? "gray"
}
return PRESTIGES.find(p => p.level === floored)!
}
export function getSkyWarsIcon(icon?: string) {
@@ -60,14 +52,6 @@ export function getSkyWarsIcon(icon?: string) {
return icons[icon] ?? ICONS.default
}
export function getPrestigeName(level: number) {
const floored = floorLevel(level, 5)
if (level > 150) return PRESTIGES.at(-1)!.name
return PRESTIGES.find(p => p.level === floored)!.name
}
export type _SkywarsStats = Record<string, number>
type Mode =
| "normal"