1
0
Fork 0
mirror of https://github.com/ppy/osu-tools.git synced 2025-06-09 17:44:46 +09:00

Implemented GetAccuracy override method for Mania simulate command

This commit is contained in:
Mr. HeliX 2025-02-21 10:45:04 +01:00
parent 871512a69e
commit 5903f648f4

View file

@ -98,5 +98,22 @@ namespace PerformanceCalculator.Simulate
{ HitResult.Miss, countMiss }
};
}
protected override double GetAccuracy(IBeatmap beatmap, Dictionary<HitResult, int> statistics)
{
int countPerfect = statistics[HitResult.Perfect];
int countGreat = statistics[HitResult.Great];
int countGood = statistics[HitResult.Good];
int countOk = statistics[HitResult.Ok];
int countMeh = statistics[HitResult.Meh];
int countMiss = statistics[HitResult.Miss];
double perfectWeight = Mods != null && Mods.Any(m => m == "CL") ? 300 : 305;
double total = perfectWeight * countPerfect + 300 * countGreat + 200 * countGood + 100 * countOk + 50 * countMeh;
double max = perfectWeight * (countPerfect + countGreat + countGood + countOk + countMeh + countMiss);
return total / max;
}
}
}