mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-14 01:59:05 +03:00
feat: use vf7 to calculate vfclass now (#1622)
* feat: use vf7 to calculate vfclass now * fix: usc
This commit is contained in:
@@ -66,6 +66,10 @@ export const GAME_USC_CONTROLLER_CONF = {
|
||||
description: "VOLFORCE as it is implemented in SDVX6.",
|
||||
formatter: ToDecimalPlaces(3),
|
||||
},
|
||||
VF7: {
|
||||
description: "VOLFORCE as it is implemented in SDVX7.",
|
||||
formatter: ToDecimalPlaces(3),
|
||||
},
|
||||
},
|
||||
sessionRatingAlgs: {
|
||||
ProfileVF6: {
|
||||
@@ -73,6 +77,11 @@ export const GAME_USC_CONTROLLER_CONF = {
|
||||
"The average of your best 10 VF6s this session, multiplied to be on the same scale as profile VOLFORCE.",
|
||||
formatter: ToDecimalPlaces(3),
|
||||
},
|
||||
ProfileVF7: {
|
||||
description:
|
||||
"The average of your best 10 VF7s this session, multiplied to be on the same scale as profile VOLFORCE.",
|
||||
formatter: ToDecimalPlaces(3),
|
||||
},
|
||||
},
|
||||
profileRatingAlgs: {
|
||||
VF6: {
|
||||
@@ -80,11 +89,16 @@ export const GAME_USC_CONTROLLER_CONF = {
|
||||
formatter: ToDecimalPlaces(3),
|
||||
associatedScoreAlgs: ["VF6"],
|
||||
},
|
||||
VF7: {
|
||||
description: "Your best 50 VF7 values added together.",
|
||||
formatter: ToDecimalPlaces(3),
|
||||
associatedScoreAlgs: ["VF7"],
|
||||
},
|
||||
},
|
||||
|
||||
defaultScoreRatingAlg: "VF6",
|
||||
defaultSessionRatingAlg: "ProfileVF6",
|
||||
defaultProfileRatingAlg: "VF6",
|
||||
defaultScoreRatingAlg: "VF7",
|
||||
defaultSessionRatingAlg: "ProfileVF7",
|
||||
defaultProfileRatingAlg: "VF7",
|
||||
|
||||
difficulties: {
|
||||
type: "FIXED",
|
||||
|
||||
@@ -94,7 +94,7 @@ export const IIDXLIKE_PB_RANKING_VALUES: PBRankingValuesFunction<IIDXLikes> = (p
|
||||
tb5: null,
|
||||
});
|
||||
|
||||
export function VF6ToClass(vf: number): SpecificUserGameStats<"sdvx">["classes"]["vfClass"] {
|
||||
export function VF7ToClass(vf: number): SpecificUserGameStats<"sdvx">["classes"]["vfClass"] {
|
||||
// jesus christ man
|
||||
if (vf >= 23) {
|
||||
return "IMPERIAL_IV";
|
||||
@@ -200,7 +200,7 @@ export const SDVXLIKE_PROFILE_CALCS: GPTProfileCalcs<SDVXLikes> = async (game, u
|
||||
});
|
||||
|
||||
export const SDVXLIKE_CLASS_DERIVERS: GPTClassDerivers<SDVXLikes> = (ratings) => ({
|
||||
vfClass: IsNullish(ratings.VF6) ? null : VF6ToClass(ratings.VF6),
|
||||
vfClass: IsNullish(ratings.VF7) ? null : VF7ToClass(ratings.VF7),
|
||||
});
|
||||
|
||||
export const SDVXLIKE_GOAL_FMT: GPTGoalFormatters<SDVXLikes> = {
|
||||
|
||||
@@ -129,11 +129,11 @@ describe("SDVX_IMPL", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("classDerivers (VF6 → vfClass)", () => {
|
||||
describe("classDerivers (VF7 → vfClass)", () => {
|
||||
const vf = (
|
||||
v: number | null,
|
||||
expected: ReturnType<typeof SDVX_IMPL.classDerivers>["vfClass"],
|
||||
) => expect(SDVX_IMPL.classDerivers({ VF6: v }).vfClass).toBe(expected);
|
||||
) => expect(SDVX_IMPL.classDerivers({ VF7: v }).vfClass).toBe(expected);
|
||||
|
||||
it("maps VOLFORCE to VF class tiers", () => {
|
||||
vf(null, null);
|
||||
|
||||
@@ -121,9 +121,9 @@ describe.each([
|
||||
});
|
||||
});
|
||||
|
||||
describe("classDerivers (VF6 → vfClass)", () => {
|
||||
describe("classDerivers (VF7 → vfClass)", () => {
|
||||
const vf = (v: number | null, expected: ReturnType<typeof impl.classDerivers>["vfClass"]) =>
|
||||
expect(impl.classDerivers({ VF6: v }).vfClass).toBe(expected);
|
||||
expect(impl.classDerivers({ VF7: v }).vfClass).toBe(expected);
|
||||
|
||||
it("maps VOLFORCE to VF class tiers", () => {
|
||||
vf(null, null);
|
||||
|
||||
Reference in New Issue
Block a user