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

Review feedback

This commit is contained in:
Mr. HeliX 2025-02-21 21:50:38 +01:00
parent d30663ae8f
commit 4ef51a1b09
5 changed files with 8 additions and 8 deletions

View file

@ -68,7 +68,7 @@ namespace PerformanceCalculator.Simulate
};
}
protected override double GetAccuracy(IBeatmap beatmap, Dictionary<HitResult, int> statistics)
protected override double GetAccuracy(IBeatmap beatmap, Dictionary<HitResult, int> statistics, Mod[] mods)
{
double hits = statistics[HitResult.Great] + statistics[HitResult.LargeTickHit] + statistics[HitResult.SmallTickHit];
double total = hits + statistics[HitResult.Miss] + statistics[HitResult.SmallTickMiss];

View file

@ -42,7 +42,7 @@ namespace PerformanceCalculator.Simulate
{
// One judgement per normal note. Two judgements per hold note (head + tail).
int totalHits = beatmap.HitObjects.Count;
if (!mods.Any(m => m.Acronym == "CL"))
if (!mods.Any(m => m is ModClassic))
totalHits += beatmap.HitObjects.Count(ho => ho is HoldNote);
if (countMeh != null || countOk != null || countGood != null || countGreat != null)
@ -99,7 +99,7 @@ namespace PerformanceCalculator.Simulate
};
}
protected override double GetAccuracy(IBeatmap beatmap, Dictionary<HitResult, int> statistics)
protected override double GetAccuracy(IBeatmap beatmap, Dictionary<HitResult, int> statistics, Mod[] mods)
{
int countPerfect = statistics[HitResult.Perfect];
int countGreat = statistics[HitResult.Great];
@ -108,7 +108,7 @@ namespace PerformanceCalculator.Simulate
int countMeh = statistics[HitResult.Meh];
int countMiss = statistics[HitResult.Miss];
int perfectWeight = Mods != null && Mods.Any(m => m == "CL") ? 300 : 305;
int perfectWeight = mods.Any(m => m is ModClassic) ? 300 : 305;
double total = perfectWeight * countPerfect + 300 * countGreat + 200 * countGood + 100 * countOk + 50 * countMeh;
double max = perfectWeight * (countPerfect + countGreat + countGood + countOk + countMeh + countMiss);

View file

@ -151,7 +151,7 @@ namespace PerformanceCalculator.Simulate
return result;
}
protected override double GetAccuracy(IBeatmap beatmap, Dictionary<HitResult, int> statistics)
protected override double GetAccuracy(IBeatmap beatmap, Dictionary<HitResult, int> statistics, Mod[] mods)
{
int countGreat = statistics[HitResult.Great];
int countGood = statistics[HitResult.Ok];

View file

@ -70,7 +70,7 @@ namespace PerformanceCalculator.Simulate
var statistics = GenerateHitResults(beatmap, mods);
var scoreInfo = new ScoreInfo(beatmap.BeatmapInfo, ruleset.RulesetInfo)
{
Accuracy = GetAccuracy(beatmap, statistics),
Accuracy = GetAccuracy(beatmap, statistics, mods),
MaxCombo = Combo ?? (int)Math.Round(PercentCombo / 100 * beatmapMaxCombo),
Statistics = statistics,
Mods = mods
@ -86,6 +86,6 @@ namespace PerformanceCalculator.Simulate
protected abstract Dictionary<HitResult, int> GenerateHitResults(IBeatmap beatmap, Mod[] mods);
protected virtual double GetAccuracy(IBeatmap beatmap, Dictionary<HitResult, int> statistics) => 0;
protected virtual double GetAccuracy(IBeatmap beatmap, Dictionary<HitResult, int> statistics, Mod[] mods) => 0;
}
}

View file

@ -60,7 +60,7 @@ namespace PerformanceCalculator.Simulate
};
}
protected override double GetAccuracy(IBeatmap beatmap, Dictionary<HitResult, int> statistics)
protected override double GetAccuracy(IBeatmap beatmap, Dictionary<HitResult, int> statistics, Mod[] mods)
{
int countGreat = statistics[HitResult.Great];
int countGood = statistics[HitResult.Ok];