mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-07 22:38:02 +03:00
feat: better arcaea judgement cell + ptt calculation fixes (#1589)
* feat: PM judgements + correct rating calc * apparently, I forgot SQL syntax * rg-stats test case
This commit is contained in:
@@ -131,7 +131,7 @@ describe("ARCAEA_IMPL", () => {
|
||||
expect(
|
||||
ARCAEA_IMPL.scoreCalcs(scoreData, ARCAEA_IMPL.scoreDeriver(scoreData, chart), chart)
|
||||
.potential,
|
||||
).toBe(11.99);
|
||||
).toBe(11.99683);
|
||||
});
|
||||
|
||||
describe("classDerivers (naivePotential → badge)", () => {
|
||||
@@ -330,5 +330,27 @@ describe("ARCAEA_IMPL", () => {
|
||||
ARCAEA_IMPL.chartSpecificValidators.score(10_001_152, chartWithoutNotecount),
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
it("rejects inconsistent pure counts", () => {
|
||||
expect(
|
||||
runVal({
|
||||
scoreData: {
|
||||
lamp: "PURE MEMORY",
|
||||
score: 10_001_151,
|
||||
judgements: { pure: 1150, far: 0, lost: 0 },
|
||||
},
|
||||
}),
|
||||
).toEqual([`Impossible PURE MEMORY. Got ${10_001_151} with ${1150} pures.`]);
|
||||
|
||||
expect(
|
||||
runVal({
|
||||
scoreData: {
|
||||
lamp: "PURE MEMORY",
|
||||
score: 10_001_151,
|
||||
judgements: { pure: 1151, far: 0, lost: 0 },
|
||||
},
|
||||
}),
|
||||
).toBeUndefined();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -125,5 +125,19 @@ export const ARCAEA_IMPL: GameImplementation<"arcaea"> = {
|
||||
return "Cannot have a FULL RECALL with non-zero lost count.";
|
||||
}
|
||||
},
|
||||
(s) => {
|
||||
const { pure, far, lost } = s.scoreData.judgements;
|
||||
|
||||
if (
|
||||
!IsNullish(pure) &&
|
||||
(far ?? 0) + (lost ?? 0) === 0 &&
|
||||
s.scoreData.lamp === "PURE MEMORY"
|
||||
) {
|
||||
const shinyPure = s.scoreData.score - 10_000_000;
|
||||
if (shinyPure > pure) {
|
||||
return `Impossible PURE MEMORY. Got ${s.scoreData.score} with ${pure} pures.`;
|
||||
}
|
||||
}
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user