fix: correct chart scoring weights for v1.0.3

This commit is contained in:
2026-08-19 16:57:54 +09:00
parent e259f82b69
commit bd9d5a6ba6
374 changed files with 1551 additions and 1485 deletions
File diff suppressed because it is too large Load Diff
+1 -7
View File
@@ -54,13 +54,7 @@ function finalNoteScore(score: number, percent: number): number {
}
function scoreNotes(chart: ExactSongChart): ExactSongChart['notes'] {
const countedMidTimes = new Set<number>();
return chart.notes.filter((note) => {
if (note.type !== 'mid') return true;
if (countedMidTimes.has(note.timeSeconds)) return false;
countedMidTimes.add(note.timeSeconds);
return true;
});
return chart.notes;
}
function prepareModel(
+5 -5
View File
@@ -20,14 +20,14 @@ test('종합력과 악곡 비율로 PERFECT 1노트 기본점수를 계산한다
assert.equal(perfectNoteScoreFromPower(0, 200, 777), 777);
});
test('플릭 1.05배와 같은 시각 홀드 중간 판정의 단일 가중치로 환산비율을 계산한다', () => {
test('플릭 1.05배와 홀드 중간 판정 각각의 가중치로 환산비율을 계산한다', () => {
const ratio = scoreRatioFromNotes([
{ timeSeconds: 1, type: 'regular', isFlick: false },
{ timeSeconds: 2, type: 'regular', isFlick: true },
{ timeSeconds: 3, type: 'mid', isFlick: false },
{ timeSeconds: 3, type: 'mid', isFlick: false }
]);
assert.ok(Math.abs(ratio - 2.15 * 0.3713416563352296) < 1e-12);
assert.ok(Math.abs(ratio - 2.25 * 0.3713416563352296) < 1e-12);
});
test('기본점수의 소수점을 유지하고 가창 보너스 적용 후 노트별로 올림한다', () => {
@@ -51,13 +51,13 @@ test('홀드 중간 노트는 10%, 플릭은 1.05배로 계산한다', () => {
assert.equal(result.baselineScore, 60 + 630);
});
test('같은 시각에 중복된 홀드 중간 판정은 한 번만 계산한다', () => {
test('같은 시각의 여러 홀드 중간 판정을 각각 계산한다', () => {
const result = calculateExactScore([inactiveCard], {}, chart([
{ timeSeconds: 1, type: 'mid', isFlick: false },
{ timeSeconds: 1, type: 'mid', isFlick: false }
]), { perfectNoteScore: 600 });
assert.equal(result.baselineScore, 60);
assert.equal(result.notes.length, 1);
assert.equal(result.baselineScore, 120);
assert.equal(result.notes.length, 2);
});
test('액티브 발동 확률과 스페셜 스코어 서포트를 기대 점수에 반영한다', () => {
+1 -10
View File
@@ -18,13 +18,10 @@ type ActiveCandidate = {
export const CHART_SCORE_WEIGHT_COEFFICIENT = 0.3713416563352296;
export function scoreRatioFromNotes(notes: ExactSongChart['notes']): number {
const countedMidTimes = new Set<number>();
let weight = 0;
for (const note of notes) {
if (note.type === 'mid') {
if (countedMidTimes.has(note.timeSeconds)) continue;
countedMidTimes.add(note.timeSeconds);
weight += 0.1;
continue;
}
@@ -129,13 +126,7 @@ export function calculateExactScore(
options: ExactScoreOptions
): ExactScoreResult {
const directBonus = options.directSongScoreBonusPercent ?? 0;
const countedMidTimes = new Set<number>();
const scoreNotes = chart.notes.filter((note) => {
if (note.type !== 'mid') return true;
if (countedMidTimes.has(note.timeSeconds)) return false;
countedMidTimes.add(note.timeSeconds);
return true;
});
const scoreNotes = chart.notes;
const notePoints = scoreNotes.map((note, index) => {
const combo = index + 1;
const baseNoteScore = note.type === 'mid'