mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-06 05:48:00 +03:00
Disable score fetching temporarily and use insane as a baseline.
This commit is contained in:
@@ -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}`,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user