mirror of
https://github.com/ppy/osu.git
synced 2025-01-23 22:13:02 +08:00
Make mania award SS even if there are GREAT judgements
This commit is contained in:
parent
d4bfbe5917
commit
d59d5685d0
@ -9,6 +9,7 @@ using osu.Game.Rulesets.Judgements;
|
|||||||
using osu.Game.Rulesets.Mania.Objects;
|
using osu.Game.Rulesets.Mania.Objects;
|
||||||
using osu.Game.Rulesets.Objects;
|
using osu.Game.Rulesets.Objects;
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
|
using osu.Game.Scoring;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Mania.Scoring
|
namespace osu.Game.Rulesets.Mania.Scoring
|
||||||
{
|
{
|
||||||
@ -58,6 +59,24 @@ namespace osu.Game.Rulesets.Mania.Scoring
|
|||||||
return GetBaseScoreForResult(result);
|
return GetBaseScoreForResult(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override ScoreRank RankFromScore(double accuracy, IReadOnlyDictionary<HitResult, int> results)
|
||||||
|
{
|
||||||
|
ScoreRank rank = base.RankFromScore(accuracy, results);
|
||||||
|
|
||||||
|
if (rank != ScoreRank.S)
|
||||||
|
return rank;
|
||||||
|
|
||||||
|
// SS is expected as long as all hitobjects have been hit with either a GREAT or PERFECT result.
|
||||||
|
|
||||||
|
bool anyImperfect =
|
||||||
|
results.GetValueOrDefault(HitResult.Good) > 0
|
||||||
|
|| results.GetValueOrDefault(HitResult.Ok) > 0
|
||||||
|
|| results.GetValueOrDefault(HitResult.Meh) > 0
|
||||||
|
|| results.GetValueOrDefault(HitResult.Miss) > 0;
|
||||||
|
|
||||||
|
return anyImperfect ? rank : ScoreRank.X;
|
||||||
|
}
|
||||||
|
|
||||||
private class JudgementOrderComparer : IComparer<HitObject>
|
private class JudgementOrderComparer : IComparer<HitObject>
|
||||||
{
|
{
|
||||||
public static readonly JudgementOrderComparer DEFAULT = new JudgementOrderComparer();
|
public static readonly JudgementOrderComparer DEFAULT = new JudgementOrderComparer();
|
||||||
|
Loading…
Reference in New Issue
Block a user