-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26630 from peppy/s-rank-change
Change S rank to require no miss
- Loading branch information
Showing
16 changed files
with
343 additions
and
273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using System.Collections.Generic; | ||
using osu.Game.Rulesets.Judgements; | ||
using osu.Game.Rulesets.Osu.Judgements; | ||
using osu.Game.Rulesets.Scoring; | ||
using osu.Game.Scoring; | ||
|
||
namespace osu.Game.Rulesets.Osu.Scoring | ||
{ | ||
|
@@ -14,6 +16,22 @@ public OsuScoreProcessor() | |
{ | ||
} | ||
|
||
public override ScoreRank RankFromScore(double accuracy, IReadOnlyDictionary<HitResult, int> results) | ||
{ | ||
ScoreRank rank = base.RankFromScore(accuracy, results); | ||
|
||
switch (rank) | ||
{ | ||
case ScoreRank.S: | ||
case ScoreRank.X: | ||
if (results.GetValueOrDefault(HitResult.Miss) > 0) | ||
rank = ScoreRank.A; | ||
break; | ||
} | ||
|
||
return rank; | ||
} | ||
|
||
protected override HitEvent CreateHitEvent(JudgementResult result) | ||
=> base.CreateHitEvent(result).With((result as OsuHitCircleJudgementResult)?.CursorPositionAtHit); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.