Rename to use new hit result namings

This commit is contained in:
smoogipoo 2018-05-16 12:44:11 +09:00
parent de63a1b578
commit edbb3a5a57

View File

@ -18,11 +18,11 @@ namespace osu.Game.Rulesets.Mania.Difficulty
// Score after being scaled by non-difficulty-increasing mods // Score after being scaled by non-difficulty-increasing mods
private double scaledScore; private double scaledScore;
private int countGeki; private int countPerfect;
private int countKatu; private int countGreat;
private int count300; private int countGood;
private int count100; private int countOk;
private int count50; private int countMeh;
private int countMiss; private int countMiss;
public ManiaPerformanceCalculator(Ruleset ruleset, IBeatmap beatmap, Score score) public ManiaPerformanceCalculator(Ruleset ruleset, IBeatmap beatmap, Score score)
@ -34,11 +34,11 @@ namespace osu.Game.Rulesets.Mania.Difficulty
{ {
mods = Score.Mods; mods = Score.Mods;
scaledScore = Score.TotalScore; scaledScore = Score.TotalScore;
countGeki = Convert.ToInt32(Score.Statistics[HitResult.Perfect]); countPerfect = Convert.ToInt32(Score.Statistics[HitResult.Perfect]);
countKatu = Convert.ToInt32(Score.Statistics[HitResult.Ok]); countGreat = Convert.ToInt32(Score.Statistics[HitResult.Great]);
count300 = Convert.ToInt32(Score.Statistics[HitResult.Great]); countGood = Convert.ToInt32(Score.Statistics[HitResult.Good]);
count100 = Convert.ToInt32(Score.Statistics[HitResult.Good]); countOk = Convert.ToInt32(Score.Statistics[HitResult.Ok]);
count50 = Convert.ToInt32(Score.Statistics[HitResult.Meh]); countMeh = Convert.ToInt32(Score.Statistics[HitResult.Meh]);
countMiss = Convert.ToInt32(Score.Statistics[HitResult.Miss]); countMiss = Convert.ToInt32(Score.Statistics[HitResult.Miss]);
if (mods.Any(m => !m.Ranked)) if (mods.Any(m => !m.Ranked))
@ -105,13 +105,13 @@ namespace osu.Game.Rulesets.Mania.Difficulty
private double computeAccuracyValue(double strainValue) private double computeAccuracyValue(double strainValue)
{ {
double hitWindow300 = (Beatmap.HitObjects.First().HitWindows.Great / 2 - 0.5) / TimeRate; double hitWindowGreat = (Beatmap.HitObjects.First().HitWindows.Great / 2 - 0.5) / TimeRate;
if (hitWindow300 <= 0) if (hitWindowGreat <= 0)
return 0; return 0;
// Lots of arbitrary values from testing. // Lots of arbitrary values from testing.
// Considering to use derivation from perfect accuracy in a probabilistic manner - assume normal distribution // Considering to use derivation from perfect accuracy in a probabilistic manner - assume normal distribution
double accuracyValue = Math.Max(0.0, 0.2 - (hitWindow300 - 34) * 0.006667) double accuracyValue = Math.Max(0.0, 0.2 - (hitWindowGreat - 34) * 0.006667)
* strainValue * strainValue
* Math.Pow(Math.Max(0.0, scaledScore - 960000) / 40000, 1.1); * Math.Pow(Math.Max(0.0, scaledScore - 960000) / 40000, 1.1);
@ -121,6 +121,6 @@ namespace osu.Game.Rulesets.Mania.Difficulty
return accuracyValue; return accuracyValue;
} }
private double totalHits => countGeki + countKatu + count300 + count100 + count50 + countMiss; private double totalHits => countPerfect + countOk + countGreat + countGood + countMeh + countMiss;
} }
} }