diff --git a/server/src/lib/score-import/framework/common/score-utils.test.ts b/server/src/lib/score-import/framework/common/score-utils.test.ts index d89d51bc7..b8ac74349 100644 --- a/server/src/lib/score-import/framework/common/score-utils.test.ts +++ b/server/src/lib/score-import/framework/common/score-utils.test.ts @@ -1,9 +1,4 @@ -import { - GenericCalculatePercent, - GetGradeFromPercent, - JubeatGetMusicRate, - ValidatePercent, -} from "./score-utils"; +import { GenericCalculatePercent, GetGradeFromPercent, ValidatePercent } from "./score-utils"; import t from "tap"; import { isApproximately } from "test-utils/asserts"; import { Testing511SPA } from "test-utils/test-data"; @@ -149,20 +144,3 @@ t.test("#ValidatePercent", (t) => { t.end(); }); - -t.test("#JubeatGetMusicRate", (t) => { - t.equal( - JubeatGetMusicRate(423, 136, 41, 14, 5, 619, false), - 73.0, - "Should correctly calculate jubeat music rate." - ); - t.equal(JubeatGetMusicRate(418, 158, 90, 54, 92, 818, false), 73.0); - - t.equal( - JubeatGetMusicRate(423, 136, 41, 14, 5, 619, true), - 73.0 * 1.2, - "Should correctly calculate hard mode jubeat music rate." - ); - - t.end(); -}); diff --git a/server/src/lib/score-import/framework/common/score-utils.ts b/server/src/lib/score-import/framework/common/score-utils.ts index 03bde4c5f..c439dc7d4 100644 --- a/server/src/lib/score-import/framework/common/score-utils.ts +++ b/server/src/lib/score-import/framework/common/score-utils.ts @@ -186,22 +186,6 @@ export function JubeatGetGrade(score: number): Grades["jubeat:Single"] { return "E"; } -export function JubeatGetMusicRate( - perfect: integer, - great: integer, - good: integer, - poor: integer, - miss: integer, - chartMaxCombo: integer, - hardMode: boolean -) { - const multiplier = hardMode ? 120 : 100; - - const rawMusicRate = ((perfect + 0.2 * great + 0.05 * good) / chartMaxCombo) * multiplier; - - return FloorToNDP(rawMusicRate, 1); -} - /** * Calculates the ESD for a given game + percent combo. This function returns * null if the game does not support support ESD. diff --git a/server/src/lib/score-import/import-types/common/api-cg/sdvx/converter.test.ts b/server/src/lib/score-import/import-types/common/api-cg/sdvx/converter.test.ts index d8086cec9..e7b2cc3a1 100644 --- a/server/src/lib/score-import/import-types/common/api-cg/sdvx/converter.test.ts +++ b/server/src/lib/score-import/import-types/common/api-cg/sdvx/converter.test.ts @@ -81,19 +81,19 @@ t.test("#ConverterAPICGSDVX", (t) => { }); t.test("Lamps", async (t) => { - t.hasStrict(await convert({ clearType: 0 }), { + t.hasStrict(await convert({ clearType: 1 }), { dryScore: mkOutput({ scoreData: { lamp: "FAILED" } }), }); - t.hasStrict(await convert({ clearType: 1 }), { + t.hasStrict(await convert({ clearType: 2 }), { dryScore: mkOutput({ scoreData: { lamp: "CLEAR" } }), }); - t.hasStrict(await convert({ clearType: 2 }), { + t.hasStrict(await convert({ clearType: 3 }), { dryScore: mkOutput({ scoreData: { lamp: "EXCESSIVE CLEAR" } }), }); - t.hasStrict(await convert({ clearType: 3 }), { + t.hasStrict(await convert({ clearType: 4 }), { dryScore: mkOutput({ scoreData: { lamp: "ULTIMATE CHAIN" } }), }); - t.hasStrict(await convert({ clearType: 4 }), { + t.hasStrict(await convert({ clearType: 5 }), { dryScore: mkOutput({ scoreData: { lamp: "PERFECT ULTIMATE CHAIN" } }), });