Disable score fetching temporarily and use insane as a baseline.

This commit is contained in:
zkldi
2021-12-01 22:26:30 +00:00
parent f12c42077a
commit 0654a62daa
3 changed files with 17 additions and 12 deletions
+5 -12
View File
@@ -16,7 +16,7 @@ export default async function SieglindeV0Calc(tableInfo: TableRes): Promise<Calc
const dataset = [];
for (const chart of tableInfo.charts) {
const scores = await GetScoresForMD5(chart.md5);
const scores = []; // await GetScoresForMD5(chart.md5);
const ecRate = 0;
const hcRate = 0;
@@ -63,23 +63,16 @@ export default async function SieglindeV0Calc(tableInfo: TableRes): Promise<Calc
const ecValue = Math.max(0, data.baseLine - ecDiff * confidence);
const hcValue = Math.max(0, data.baseLine - hcDiff * confidence);
const gutter = data.baseLine + data.nextBaseLine;
const ecLerp = gutter * 0.5 - (ecDiff * confidence) / gutter;
const hcLerp = gutter * 0.5 - (hcDiff * confidence) / gutter;
const ecStr = data.str + ecLerp.toFixed(2);
const hcStr = data.str + hcLerp.toFixed(2);
logger.verbose(`${data.title} | EC: ${ecStr}, HC: ${hcStr}`);
const ecPrefix = ecValue < 12 ? "☆" : "🟊";
const hcPrefix = hcValue < 12 ? "☆" : "🟊";
returns.push({
md5: data.md5,
title: data.title,
ec: ecValue,
ecStr,
ecStr: `${ecPrefix}${ecValue < 12 ? ecValue : ecValue - 12}`,
hc: hcValue,
hcStr,
hcStr: `${hcPrefix}${hcValue < 12 ? hcValue : hcValue - 12}`,
});
}
+8
View File
@@ -21,6 +21,14 @@ const TableValueGetters: Record<
return n + 12;
},
Normal: (c) => {
if (c === "11+") {
return 11.5;
} else if (c === "12-") {
return 11.8;
} else if (c === "12+") {
return 12.5;
}
const n = Number(c);
if (Number.isNaN(n)) {
+4
View File
@@ -32,9 +32,13 @@ function WriteOut(data: string) {
if (version === 0) {
const tableInfo = await GetTableData();
logger.info(`Starting...`);
const calcData = await Promise.all(tableInfo.map(SieglindeV0Calc));
WriteOut(JSON.stringify(calcData));
logger.info(`Finished!`);
} else {
logger.error(`Unsupported/Unknown version ${version}.`);
process.exit(-1);