diff --git a/osu.Game.Rulesets.Catch/Difficulty/CatchLegacyScoreSimulator.cs b/osu.Game.Rulesets.Catch/Difficulty/CatchLegacyScoreSimulator.cs index 52605ec0cc..f65b6ef381 100644 --- a/osu.Game.Rulesets.Catch/Difficulty/CatchLegacyScoreSimulator.cs +++ b/osu.Game.Rulesets.Catch/Difficulty/CatchLegacyScoreSimulator.cs @@ -136,7 +136,7 @@ namespace osu.Game.Rulesets.Catch.Difficulty if (isBonus) { legacyBonusScore += scoreIncrease; - standardisedBonusScore += scoreProcessor.GetRawBonusScore(bonusResult); + standardisedBonusScore += scoreProcessor.GetBaseScoreForResult(bonusResult); } else attributes.AccuracyScore += scoreIncrease; diff --git a/osu.Game.Rulesets.Catch/Scoring/CatchScoreProcessor.cs b/osu.Game.Rulesets.Catch/Scoring/CatchScoreProcessor.cs index 023369badc..4b3d378889 100644 --- a/osu.Game.Rulesets.Catch/Scoring/CatchScoreProcessor.cs +++ b/osu.Game.Rulesets.Catch/Scoring/CatchScoreProcessor.cs @@ -33,7 +33,7 @@ namespace osu.Game.Rulesets.Catch.Scoring } protected override double GetComboScoreChange(JudgementResult result) - => GetRawComboScore(result.Type) * Math.Min(Math.Max(0.5, Math.Log(result.ComboAfterJudgement, combo_base)), Math.Log(combo_cap, combo_base)); + => GetBaseScoreForResult(result.Type) * Math.Min(Math.Max(0.5, Math.Log(result.ComboAfterJudgement, combo_base)), Math.Log(combo_cap, combo_base)); public override ScoreRank RankFromAccuracy(double accuracy) { diff --git a/osu.Game.Rulesets.Mania/Scoring/ManiaScoreProcessor.cs b/osu.Game.Rulesets.Mania/Scoring/ManiaScoreProcessor.cs index d059d99d9f..1947d86a97 100644 --- a/osu.Game.Rulesets.Mania/Scoring/ManiaScoreProcessor.cs +++ b/osu.Game.Rulesets.Mania/Scoring/ManiaScoreProcessor.cs @@ -31,7 +31,12 @@ namespace osu.Game.Rulesets.Mania.Scoring + bonusPortion; } - public override int GetRawAccuracyScore(HitResult result) + protected override double GetComboScoreChange(JudgementResult result) + { + return getBaseComboScoreForResult(result.Type) * Math.Min(Math.Max(0.5, Math.Log(result.ComboAfterJudgement, combo_base)), Math.Log(400, combo_base)); + } + + public override int GetBaseScoreForResult(HitResult result) { switch (result) { @@ -39,10 +44,10 @@ namespace osu.Game.Rulesets.Mania.Scoring return 305; } - return base.GetRawAccuracyScore(result); + return base.GetBaseScoreForResult(result); } - public override int GetRawComboScore(HitResult result) + private int getBaseComboScoreForResult(HitResult result) { switch (result) { @@ -50,12 +55,9 @@ namespace osu.Game.Rulesets.Mania.Scoring return 300; } - return base.GetRawComboScore(result); + return GetBaseScoreForResult(result); } - protected override double GetComboScoreChange(JudgementResult result) - => GetRawComboScore(result.Type) * Math.Min(Math.Max(0.5, Math.Log(result.ComboAfterJudgement, combo_base)), Math.Log(400, combo_base)); - private class JudgementOrderComparer : IComparer { public static readonly JudgementOrderComparer DEFAULT = new JudgementOrderComparer(); diff --git a/osu.Game.Rulesets.Osu.Tests/TestSceneSpinnerRotation.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneSpinnerRotation.cs index fd445bc1ac..6706d20080 100644 --- a/osu.Game.Rulesets.Osu.Tests/TestSceneSpinnerRotation.cs +++ b/osu.Game.Rulesets.Osu.Tests/TestSceneSpinnerRotation.cs @@ -134,7 +134,7 @@ namespace osu.Game.Rulesets.Osu.Tests // multipled by 2 to nullify the score multiplier. (autoplay mod selected) long totalScore = scoreProcessor.TotalScore.Value * 2; - return totalScore == (int)(drawableSpinner.Result.TotalRotation / 360) * scoreProcessor.GetRawBonusScore(new SpinnerTick().CreateJudgement().MaxResult); + return totalScore == (int)(drawableSpinner.Result.TotalRotation / 360) * scoreProcessor.GetBaseScoreForResult(new SpinnerTick().CreateJudgement().MaxResult); }); addSeekStep(0); diff --git a/osu.Game.Rulesets.Osu/Difficulty/OsuLegacyScoreSimulator.cs b/osu.Game.Rulesets.Osu/Difficulty/OsuLegacyScoreSimulator.cs index 6ac7c33275..a76054b42c 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/OsuLegacyScoreSimulator.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/OsuLegacyScoreSimulator.cs @@ -173,7 +173,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty if (isBonus) { legacyBonusScore += scoreIncrease; - standardisedBonusScore += scoreProcessor.GetRawBonusScore(bonusResult); + standardisedBonusScore += scoreProcessor.GetBaseScoreForResult(bonusResult); } else attributes.AccuracyScore += scoreIncrease; diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSpinner.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSpinner.cs index 787d5e5937..f7c1437009 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSpinner.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSpinner.cs @@ -313,7 +313,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables updateBonusScore(); } - private static readonly int score_per_tick = new OsuScoreProcessor().GetRawBonusScore(new SpinnerBonusTick.OsuSpinnerBonusTickJudgement().MaxResult); + private static readonly int score_per_tick = new OsuScoreProcessor().GetBaseScoreForResult(new SpinnerBonusTick.OsuSpinnerBonusTickJudgement().MaxResult); private void updateBonusScore() { diff --git a/osu.Game.Rulesets.Taiko/Difficulty/TaikoLegacyScoreSimulator.cs b/osu.Game.Rulesets.Taiko/Difficulty/TaikoLegacyScoreSimulator.cs index 8b34c8c808..b20aa4f2b6 100644 --- a/osu.Game.Rulesets.Taiko/Difficulty/TaikoLegacyScoreSimulator.cs +++ b/osu.Game.Rulesets.Taiko/Difficulty/TaikoLegacyScoreSimulator.cs @@ -193,7 +193,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty if (isBonus) { legacyBonusScore += scoreIncrease; - standardisedBonusScore += scoreProcessor.GetRawBonusScore(bonusResult); + standardisedBonusScore += scoreProcessor.GetBaseScoreForResult(bonusResult); } else attributes.AccuracyScore += scoreIncrease; diff --git a/osu.Game.Rulesets.Taiko/Scoring/TaikoScoreProcessor.cs b/osu.Game.Rulesets.Taiko/Scoring/TaikoScoreProcessor.cs index e81ba324bd..2fd9f070ec 100644 --- a/osu.Game.Rulesets.Taiko/Scoring/TaikoScoreProcessor.cs +++ b/osu.Game.Rulesets.Taiko/Scoring/TaikoScoreProcessor.cs @@ -28,12 +28,12 @@ namespace osu.Game.Rulesets.Taiko.Scoring protected override double GetComboScoreChange(JudgementResult result) { - return GetRawComboScore(result.Type) + return GetBaseScoreForResult(result.Type) * Math.Min(Math.Max(0.5, Math.Log(result.ComboAfterJudgement, combo_base)), Math.Log(400, combo_base)) * strongScaleValue(result); } - public override int GetRawAccuracyScore(HitResult result) + public override int GetBaseScoreForResult(HitResult result) { switch (result) { @@ -41,18 +41,7 @@ namespace osu.Game.Rulesets.Taiko.Scoring return 150; } - return base.GetRawAccuracyScore(result); - } - - public override int GetRawComboScore(HitResult result) - { - switch (result) - { - case HitResult.Ok: - return 150; - } - - return base.GetRawComboScore(result); + return base.GetBaseScoreForResult(result); } private double strongScaleValue(JudgementResult result) diff --git a/osu.Game.Tests/Gameplay/TestSceneScoreProcessor.cs b/osu.Game.Tests/Gameplay/TestSceneScoreProcessor.cs index 5d2ad8b363..1a644ad600 100644 --- a/osu.Game.Tests/Gameplay/TestSceneScoreProcessor.cs +++ b/osu.Game.Tests/Gameplay/TestSceneScoreProcessor.cs @@ -48,7 +48,7 @@ namespace osu.Game.Tests.Gameplay // Apply a judgement scoreProcessor.ApplyResult(new JudgementResult(new HitObject(), new TestJudgement(HitResult.LargeBonus)) { Type = HitResult.LargeBonus }); - Assert.That(scoreProcessor.TotalScore.Value, Is.EqualTo(scoreProcessor.GetRawBonusScore(HitResult.LargeBonus))); + Assert.That(scoreProcessor.TotalScore.Value, Is.EqualTo(scoreProcessor.GetBaseScoreForResult(HitResult.LargeBonus))); } [Test] diff --git a/osu.Game/Database/StandardisedScoreMigrationTools.cs b/osu.Game/Database/StandardisedScoreMigrationTools.cs index 5324d2569e..8a25a44b80 100644 --- a/osu.Game/Database/StandardisedScoreMigrationTools.cs +++ b/osu.Game/Database/StandardisedScoreMigrationTools.cs @@ -57,14 +57,14 @@ namespace osu.Game.Database // We are constructing a "best possible" score from the statistics provided because it's the best we can do. List sortedHits = score.Statistics .Where(kvp => kvp.Key.AffectsCombo()) - .OrderByDescending(kvp => processor.GetRawComboScore(kvp.Key)) + .OrderByDescending(kvp => processor.GetBaseScoreForResult(kvp.Key)) .SelectMany(kvp => Enumerable.Repeat(kvp.Key, kvp.Value)) .ToList(); // Attempt to use maximum statistics from the database. var maximumJudgements = score.MaximumStatistics .Where(kvp => kvp.Key.AffectsCombo()) - .OrderByDescending(kvp => processor.GetRawComboScore(kvp.Key)) + .OrderByDescending(kvp => processor.GetBaseScoreForResult(kvp.Key)) .SelectMany(kvp => Enumerable.Repeat(new FakeJudgement(kvp.Key), kvp.Value)) .ToList(); diff --git a/osu.Game/Rulesets/Scoring/ScoreProcessor.cs b/osu.Game/Rulesets/Scoring/ScoreProcessor.cs index a80a118363..5123668e54 100644 --- a/osu.Game/Rulesets/Scoring/ScoreProcessor.cs +++ b/osu.Game/Rulesets/Scoring/ScoreProcessor.cs @@ -227,12 +227,12 @@ namespace osu.Game.Rulesets.Scoring if (result.Judgement.MaxResult.AffectsAccuracy()) { - currentMaximumBaseScore += GetRawAccuracyScore(result.Judgement.MaxResult); + currentMaximumBaseScore += GetBaseScoreForResult(result.Judgement.MaxResult); currentAccuracyJudgementCount++; } if (result.Type.AffectsAccuracy()) - currentBaseScore += GetRawAccuracyScore(result.Type); + currentBaseScore += GetBaseScoreForResult(result.Type); if (result.Type.IsBonus()) currentBonusPortion += GetBonusScoreChange(result); @@ -276,12 +276,12 @@ namespace osu.Game.Rulesets.Scoring if (result.Judgement.MaxResult.AffectsAccuracy()) { - currentMaximumBaseScore -= GetRawAccuracyScore(result.Judgement.MaxResult); + currentMaximumBaseScore -= GetBaseScoreForResult(result.Judgement.MaxResult); currentAccuracyJudgementCount--; } if (result.Type.AffectsAccuracy()) - currentBaseScore -= GetRawAccuracyScore(result.Type); + currentBaseScore -= GetBaseScoreForResult(result.Type); if (result.Type.IsBonus()) currentBonusPortion -= GetBonusScoreChange(result); @@ -301,19 +301,15 @@ namespace osu.Game.Rulesets.Scoring /// Gets the final score change to be applied to the bonus portion of the score. /// /// The judgement result. - protected virtual double GetBonusScoreChange(JudgementResult result) => GetRawBonusScore(result.Type); + protected virtual double GetBonusScoreChange(JudgementResult result) => GetBaseScoreForResult(result.Type); /// /// Gets the final score change to be applied to the combo portion of the score. /// /// The judgement result. - protected virtual double GetComboScoreChange(JudgementResult result) => GetRawComboScore(result.Judgement.MaxResult) * Math.Pow(result.ComboAfterJudgement, COMBO_EXPONENT); + protected virtual double GetComboScoreChange(JudgementResult result) => GetBaseScoreForResult(result.Judgement.MaxResult) * Math.Pow(result.ComboAfterJudgement, COMBO_EXPONENT); - /// - /// Retrieves the raw score value for a hit result, in order to be applied to the combo portion. - /// - /// The hit result. - public virtual int GetRawComboScore(HitResult result) + public virtual int GetBaseScoreForResult(HitResult result) { switch (result) { @@ -338,51 +334,6 @@ namespace osu.Game.Rulesets.Scoring case HitResult.Great: case HitResult.Perfect: // Perfect doesn't actually give more score / accuracy directly. return 300; - } - } - - /// - /// Retrieves the raw score value for a hit result, in order to be applied to the accuracy portion. - /// - /// The hit result. - public virtual int GetRawAccuracyScore(HitResult result) - { - switch (result) - { - default: - return 0; - - case HitResult.SmallTickHit: - return 10; - - case HitResult.LargeTickHit: - return 30; - - case HitResult.Meh: - return 50; - - case HitResult.Ok: - return 100; - - case HitResult.Good: - return 200; - - case HitResult.Great: - case HitResult.Perfect: // Perfect doesn't actually give more score / accuracy directly. - return 300; - } - } - - /// - /// Retrieves the raw score value for a hit result, in order to be applied to the bonus portion. - /// - /// The hit result. - public virtual int GetRawBonusScore(HitResult result) - { - switch (result) - { - default: - return 0; case HitResult.SmallBonus: return 10; @@ -619,7 +570,7 @@ namespace osu.Game.Rulesets.Scoring /// /// /// Used to compute accuracy. - /// See: and . + /// See: and . /// [Key(0)] public double BaseScore { get; set; } diff --git a/osu.Game/Scoring/ScoreImporter.cs b/osu.Game/Scoring/ScoreImporter.cs index b1cba3756b..3c7ee5c86b 100644 --- a/osu.Game/Scoring/ScoreImporter.cs +++ b/osu.Game/Scoring/ScoreImporter.cs @@ -131,7 +131,7 @@ namespace osu.Game.Scoring // Populate the maximum statistics. HitResult maxBasicResult = rulesetInstance.GetHitResults() .Select(h => h.result) - .Where(h => h.IsBasic()).MaxBy(scoreProcessor.GetRawAccuracyScore); + .Where(h => h.IsBasic()).MaxBy(scoreProcessor.GetBaseScoreForResult); foreach ((HitResult result, int count) in score.Statistics) {