Finished uhc progress
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { STARS } from "@/data/hypixel/uhc"
|
||||
|
||||
export function getUhcStar(score: number): number {
|
||||
export function getUhcStarValue(score: number): number {
|
||||
for (let i = STARS.length - 1; i >= 0; i--) {
|
||||
if (score >= STARS[i].value) {
|
||||
return i + 1
|
||||
@@ -8,3 +8,16 @@ export function getUhcStar(score: number): number {
|
||||
}
|
||||
return 1
|
||||
}
|
||||
|
||||
export function getUhcStar(score: number) {
|
||||
const current = getUhcStarValue(score)
|
||||
return STARS.at(current - 1)!
|
||||
}
|
||||
|
||||
export function getNextUhcStar(score: number) {
|
||||
const current = getUhcStarValue(score)
|
||||
|
||||
if (current === 15) return STARS.at(-1)!
|
||||
|
||||
return STARS.at(current)!
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user