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:
parent
d30663ae8f
commit
4ef51a1b09
5 changed files with 8 additions and 8 deletions
|
@ -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 hits = statistics[HitResult.Great] + statistics[HitResult.LargeTickHit] + statistics[HitResult.SmallTickHit];
|
||||||
double total = hits + statistics[HitResult.Miss] + statistics[HitResult.SmallTickMiss];
|
double total = hits + statistics[HitResult.Miss] + statistics[HitResult.SmallTickMiss];
|
||||||
|
|
|
@ -42,7 +42,7 @@ namespace PerformanceCalculator.Simulate
|
||||||
{
|
{
|
||||||
// One judgement per normal note. Two judgements per hold note (head + tail).
|
// One judgement per normal note. Two judgements per hold note (head + tail).
|
||||||
int totalHits = beatmap.HitObjects.Count;
|
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);
|
totalHits += beatmap.HitObjects.Count(ho => ho is HoldNote);
|
||||||
|
|
||||||
if (countMeh != null || countOk != null || countGood != null || countGreat != null)
|
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 countPerfect = statistics[HitResult.Perfect];
|
||||||
int countGreat = statistics[HitResult.Great];
|
int countGreat = statistics[HitResult.Great];
|
||||||
|
@ -108,7 +108,7 @@ namespace PerformanceCalculator.Simulate
|
||||||
int countMeh = statistics[HitResult.Meh];
|
int countMeh = statistics[HitResult.Meh];
|
||||||
int countMiss = statistics[HitResult.Miss];
|
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 total = perfectWeight * countPerfect + 300 * countGreat + 200 * countGood + 100 * countOk + 50 * countMeh;
|
||||||
double max = perfectWeight * (countPerfect + countGreat + countGood + countOk + countMeh + countMiss);
|
double max = perfectWeight * (countPerfect + countGreat + countGood + countOk + countMeh + countMiss);
|
||||||
|
|
|
@ -151,7 +151,7 @@ namespace PerformanceCalculator.Simulate
|
||||||
return result;
|
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 countGreat = statistics[HitResult.Great];
|
||||||
int countGood = statistics[HitResult.Ok];
|
int countGood = statistics[HitResult.Ok];
|
||||||
|
|
|
@ -70,7 +70,7 @@ namespace PerformanceCalculator.Simulate
|
||||||
var statistics = GenerateHitResults(beatmap, mods);
|
var statistics = GenerateHitResults(beatmap, mods);
|
||||||
var scoreInfo = new ScoreInfo(beatmap.BeatmapInfo, ruleset.RulesetInfo)
|
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),
|
MaxCombo = Combo ?? (int)Math.Round(PercentCombo / 100 * beatmapMaxCombo),
|
||||||
Statistics = statistics,
|
Statistics = statistics,
|
||||||
Mods = mods
|
Mods = mods
|
||||||
|
@ -86,6 +86,6 @@ namespace PerformanceCalculator.Simulate
|
||||||
|
|
||||||
protected abstract Dictionary<HitResult, int> GenerateHitResults(IBeatmap beatmap, Mod[] mods);
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 countGreat = statistics[HitResult.Great];
|
||||||
int countGood = statistics[HitResult.Ok];
|
int countGood = statistics[HitResult.Ok];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue