Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: additional classes for gekichumai #1219

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions client/src/lib/game-implementations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ export const GPT_CLIENT_IMPLEMENTATIONS: GPTClientImplementations = {
"linear-gradient(-45deg, #f0788a, #f48fb1, #9174c2, #79bcf2, #70a173, #f7ff99, #faca7d, #ff9d80, #f0788a)",
color: "var(--bs-dark)",
},
RAINBOW_EX: {
background:
"linear-gradient(-45deg, #0fa091, #0f98d5, #67087f, #d9007e, #f56e06)",
color: "var(--bs-light)",
},
},
dan: {
DAN_I: bgc("#3b66f1", "var(--bs-light)"),
Expand Down Expand Up @@ -369,6 +374,11 @@ export const GPT_CLIENT_IMPLEMENTATIONS: GPTClientImplementations = {
"linear-gradient(-45deg, #f0788a, #f48fb1, #9174c2, #79bcf2, #70a173, #f7ff99, #faca7d, #ff9d80, #f0788a)",
color: "var(--bs-dark)",
},
RAINBOW_EX: {
background:
"linear-gradient(-45deg, #0fa091, #0f98d5, #67087f, #d9007e, #f56e06)",
color: "var(--bs-light)",
},
},
matchingClass: {
B5: bgc("green", "var(--bs-light)"),
Expand Down Expand Up @@ -740,6 +750,16 @@ export const GPT_CLIENT_IMPLEMENTATIONS: GPTClientImplementations = {
"linear-gradient(-45deg, #f0788a, #f48fb1, #9174c2, #79bcf2, #70a173, #f7ff99, #faca7d, #ff9d80, #f0788a)",
color: "var(--bs-dark)",
},
RAINBOW_PLUS: {
background:
"linear-gradient(-45deg, #f0788a, #f48fb1, #9174c2, #79bcf2, #70a173, #f7ff99, #faca7d, #ff9d80, #f0788a)",
color: "var(--bs-dark)",
},
RAINBOW_EX: {
background:
"linear-gradient(-45deg, #0fa091, #0f98d5, #67087f, #d9007e, #f56e06)",
color: "var(--bs-light)",
},
},
},
enumColours: {
Expand Down
3 changes: 2 additions & 1 deletion common/src/config/game-support/chunithm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ export const CHUNITHMColours = [
ClassValue("SILVER", "銀", "Silver: 13.25 - 14.49 Rating"),
ClassValue("GOLD", "金", "Gold: 14.50 - 15.24 Rating"),
ClassValue("PLATINUM", "鉑", "Platinum: 15.25 - 15.99 Rating"),
ClassValue("RAINBOW", "虹", "Rainbow: >=16 Rating"),
ClassValue("RAINBOW", "虹", "Rainbow: 16 - 16.99 Rating"),
ClassValue("RAINBOW_EX", "虹(極)", "Rainbow (Extreme): >=17 Rating"),
];

export const CHUNITHMClasses = [
Expand Down
3 changes: 2 additions & 1 deletion common/src/config/game-support/maimai-dx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ const MaimaiDXColours = [
ClassValue("SILVER", "Silver", "13000 - 13999 Rating"),
ClassValue("GOLD", "Gold", "14000 - 14499 Rating"),
ClassValue("PLATINUM", "Platinum", "14500 - 14999 Rating"),
ClassValue("RAINBOW", "Rainbow", ">=15000 Rating"),
ClassValue("RAINBOW", "Rainbow", "15000 - 15999 Rating"),
ClassValue("RAINBOW_EX", "Rainbow (EX)", ">=16000 Rating"),
];

const MaimaiDXMatchingClasses = [
Expand Down
20 changes: 11 additions & 9 deletions common/src/config/game-support/ongeki.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,18 @@ export const ONGEKI_CONF = {
} as const satisfies INTERNAL_GAME_CONFIG;

export const OngekiColours = [
ClassValue("BLUE", "青", "Blue: 0 - 1.99 Rating"),
ClassValue("GREEN", "緑", "Green: 2 - 3.99 Rating"),
ClassValue("ORANGE", "橙", "Orange: 4 - 6.99 Rating"),
ClassValue("RED", "赤", "Red: 7 - 9.99 Rating"),
ClassValue("PURPLE", "紫", "Purple: 10 - 11.99 Rating"),
ClassValue("COPPER", "銅", "Copper: 12 - 12.99 Rating"),
ClassValue("SILVER", "銀", "Silver: 13 - 13.99 Rating"),
ClassValue("GOLD", "金", "Gold: 14.00 - 14.49 Rating"),
ClassValue("BLUE", "青", "Blue: 0.00 – 1.99 Rating"),
ClassValue("GREEN", "緑", "Green: 2.00 – 3.99 Rating"),
ClassValue("ORANGE", "橙", "Orange: 4.00 – 6.99 Rating"),
ClassValue("RED", "赤", "Red: 7.00 – 9.99 Rating"),
ClassValue("PURPLE", "紫", "Purple: 10.00 – 11.99 Rating"),
ClassValue("COPPER", "銅", "Copper: 12.00 – 12.99 Rating"),
ClassValue("SILVER", "銀", "Silver: 13.00 – 13.99 Rating"),
ClassValue("GOLD", "金", "Gold: 14.00 14.49 Rating"),
ClassValue("PLATINUM", "鉑", "Platinum: 14.50 - 14.99 Rating"),
ClassValue("RAINBOW", "虹", "Rainbow: >=15 Rating"),
ClassValue("RAINBOW", "虹", "Rainbow: 15.00 – 15.99 Rating"),
ClassValue("RAINBOW_PLUS", "虹+", "Rainbow +: 16.00 – 16.99 Rating"),
ClassValue("RAINBOW_EX", "虹(極)", "Rainbow (Extreme): >=17.00 Rating"),
];

export const ONGEKI_SINGLE_CONF = {
Expand Down
4 changes: 4 additions & 0 deletions common/src/constants/game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ export enum CHUNITHM_COLOURS {
GOLD = 7,
PLATINUM = 8,
RAINBOW = 9,
RAINBOW_EX = 10,
}

export enum WACCA_STAGEUPS {
Expand Down Expand Up @@ -433,6 +434,7 @@ export enum MAIMAIDX_COLOURS {
GOLD = 8,
PLATINUM = 9,
RAINBOW = 10,
RAINBOW_EX = 11,
}

export enum MAIMAIDX_DANS {
Expand Down Expand Up @@ -595,4 +597,6 @@ export enum ONGEKI_COLOURS {
GOLD = 7,
PLATINUM = 8,
RAINBOW = 9,
RAINBOW_PLUS = 10,
RAINBOW_EX = 11,
}
1 change: 1 addition & 0 deletions server/src/game-implementations/games/chunithm.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ t.test("CHUNITHM Implementation", (t) => {
f(14.5, "GOLD");
f(15.25, "PLATINUM");
f(16, "RAINBOW");
f(17, "RAINBOW_EX");

t.end();
});
Expand Down
4 changes: 3 additions & 1 deletion server/src/game-implementations/games/chunithm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ export const CHUNITHM_IMPL: GPTServerImplementation<"chunithm:Single"> = {
return null;
}

if (rating >= 16) {
if (rating >= 17) {
return "RAINBOW_EX";
} else if (rating >= 16) {
return "RAINBOW";
} else if (rating >= 15.25) {
return "PLATINUM";
Expand Down
1 change: 1 addition & 0 deletions server/src/game-implementations/games/maimaidx.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ t.test("Maimai DX Implementation", (t) => {
f(null, null);
f(0, "WHITE");

f(16000, "RAINBOW_EX");
f(15000, "RAINBOW");
f(14500, "PLATINUM");
f(14000, "GOLD");
Expand Down
4 changes: 3 additions & 1 deletion server/src/game-implementations/games/maimaidx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ export const MAIMAIDX_IMPL: GPTServerImplementation<"maimaidx:Single"> = {
return null;
}

if (rate >= 15000) {
if (rate >= 16000) {
return "RAINBOW_EX";
} else if (rate >= 15000) {
return "RAINBOW";
} else if (rate >= 14500) {
return "PLATINUM";
Expand Down
2 changes: 2 additions & 0 deletions server/src/game-implementations/games/ongeki.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ t.test("ONGEKI Implementation", (t) => {
f(14, "GOLD");
f(14.5, "PLATINUM");
f(15, "RAINBOW");
f(16, "RAINBOW_PLUS");
f(17, "RAINBOW_EX");

t.end();
});
Expand Down
6 changes: 5 additions & 1 deletion server/src/game-implementations/games/ongeki.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ export const ONGEKI_IMPL: GPTServerImplementation<"ongeki:Single"> = {
return null;
}

if (rating >= 15) {
if (rating >= 17) {
return "RAINBOW_EX";
} else if (rating >= 16) {
return "RAINBOW_PLUS";
} else if (rating >= 15) {
return "RAINBOW";
} else if (rating >= 14.5) {
return "PLATINUM";
Expand Down
Loading