Skip to content

Commit 051b289

Browse files
committed
[+] TTM_EACHPAIRS
1 parent cdbcc0b commit 051b289

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

chart/Statistics.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ private void AddNote(Note note)
3636

3737
var res = prefix + type;
3838
_data[res] = _data.GetValueOrDefault(res) + 1;
39+
40+
// TTM_EACHPAIRS 双押数量
41+
if (note is Tap)
42+
{
43+
if (note.Time == _now && note.FalseEachIdx == _nowFalseEachIndex) TTM_EACHPAIRS++;
44+
_now = note.Time;
45+
_nowFalseEachIndex = note.FalseEachIdx;
46+
}
3947
}
4048

4149
internal Statistics(Chart chart)
@@ -107,6 +115,7 @@ public override string ToString()
107115
public int TTM_EACHPAIRS { get; private set; } = 0;
108116

109117
private Rational _now = -1; // 计算双押个数用
118+
private int _nowFalseEachIndex = 0;
110119

111120
private int getProgJudgeGrid(decimal bpm)
112121
{

tests/Statistics测试.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ internal static class Ma2StatisticsSection
5656
/// <summary>与 <see cref="MA2Generator"/> 当前实现尚未对齐的统计键,不参与等价断言。</summary>
5757
public static readonly HashSet<string> SkippedKeys =
5858
[
59-
"TTM_EACHPAIRS",
6059
"T_JUDGE_HLD",
6160
"T_JUDGE_ALL",
6261
];

0 commit comments

Comments
 (0)