mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 19:43:22 +08:00
Consider all accuracy judgements in accuracy progress
This commit is contained in:
parent
f8101fbbc7
commit
8570f825ed
@ -110,14 +110,14 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
private double currentBaseScore;
|
private double currentBaseScore;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The count of all basic judgements in the beatmap.
|
/// The count of all accuracy-affecting judgements in the beatmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private int maximumCountBasicJudgements;
|
private int maximumCountAccuracyJudgements;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The count of basic judgements at the current point in time.
|
/// The count of accuracy-affecting judgements at the current point in time.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private int currentCountBasicJudgements;
|
private int currentCountAccuracyJudgements;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The maximum combo score in the beatmap.
|
/// The maximum combo score in the beatmap.
|
||||||
@ -207,13 +207,11 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
|
|
||||||
result.ComboAfterJudgement = Combo.Value;
|
result.ComboAfterJudgement = Combo.Value;
|
||||||
|
|
||||||
if (result.Type.IsBasic())
|
|
||||||
currentCountBasicJudgements++;
|
|
||||||
|
|
||||||
if (result.Type.AffectsAccuracy())
|
if (result.Type.AffectsAccuracy())
|
||||||
{
|
{
|
||||||
currentMaximumBaseScore += Judgement.ToNumericResult(result.Judgement.MaxResult);
|
currentMaximumBaseScore += Judgement.ToNumericResult(result.Judgement.MaxResult);
|
||||||
currentBaseScore += Judgement.ToNumericResult(result.Type);
|
currentBaseScore += Judgement.ToNumericResult(result.Type);
|
||||||
|
currentCountAccuracyJudgements++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.Type.IsBonus())
|
if (result.Type.IsBonus())
|
||||||
@ -250,13 +248,11 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
if (!result.Type.IsScorable())
|
if (!result.Type.IsScorable())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (result.Type.IsBasic())
|
|
||||||
currentCountBasicJudgements--;
|
|
||||||
|
|
||||||
if (result.Type.AffectsAccuracy())
|
if (result.Type.AffectsAccuracy())
|
||||||
{
|
{
|
||||||
currentMaximumBaseScore -= Judgement.ToNumericResult(result.Judgement.MaxResult);
|
currentMaximumBaseScore -= Judgement.ToNumericResult(result.Judgement.MaxResult);
|
||||||
currentBaseScore -= Judgement.ToNumericResult(result.Type);
|
currentBaseScore -= Judgement.ToNumericResult(result.Type);
|
||||||
|
currentCountAccuracyJudgements--;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.Type.IsBonus())
|
if (result.Type.IsBonus())
|
||||||
@ -290,7 +286,7 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
Accuracy.Value = currentMaximumBaseScore > 0 ? currentBaseScore / currentMaximumBaseScore : 1;
|
Accuracy.Value = currentMaximumBaseScore > 0 ? currentBaseScore / currentMaximumBaseScore : 1;
|
||||||
|
|
||||||
double comboProgress = maximumComboPortion > 0 ? currentComboPortion / maximumComboPortion : 1;
|
double comboProgress = maximumComboPortion > 0 ? currentComboPortion / maximumComboPortion : 1;
|
||||||
double accuracyProcess = maximumCountBasicJudgements > 0 ? (double)currentCountBasicJudgements / maximumCountBasicJudgements : 1;
|
double accuracyProcess = maximumCountAccuracyJudgements > 0 ? (double)currentCountAccuracyJudgements / maximumCountAccuracyJudgements : 1;
|
||||||
|
|
||||||
TotalScore.Value = (long)Math.Round(ComputeTotalScore(comboProgress, accuracyProcess, currentBonusPortion) * scoreMultiplier);
|
TotalScore.Value = (long)Math.Round(ComputeTotalScore(comboProgress, accuracyProcess, currentBonusPortion) * scoreMultiplier);
|
||||||
}
|
}
|
||||||
@ -316,7 +312,7 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
if (storeResults)
|
if (storeResults)
|
||||||
{
|
{
|
||||||
maximumComboPortion = currentComboPortion;
|
maximumComboPortion = currentComboPortion;
|
||||||
maximumCountBasicJudgements = currentCountBasicJudgements;
|
maximumCountAccuracyJudgements = currentCountAccuracyJudgements;
|
||||||
|
|
||||||
maximumResultCounts.Clear();
|
maximumResultCounts.Clear();
|
||||||
maximumResultCounts.AddRange(scoreResultCounts);
|
maximumResultCounts.AddRange(scoreResultCounts);
|
||||||
@ -328,7 +324,7 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
|
|
||||||
currentBaseScore = 0;
|
currentBaseScore = 0;
|
||||||
currentMaximumBaseScore = 0;
|
currentMaximumBaseScore = 0;
|
||||||
currentCountBasicJudgements = 0;
|
currentCountAccuracyJudgements = 0;
|
||||||
currentComboPortion = 0;
|
currentComboPortion = 0;
|
||||||
currentBonusPortion = 0;
|
currentBonusPortion = 0;
|
||||||
|
|
||||||
@ -405,7 +401,7 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
{
|
{
|
||||||
MaximumBaseScore = currentMaximumBaseScore,
|
MaximumBaseScore = currentMaximumBaseScore,
|
||||||
BaseScore = currentBaseScore,
|
BaseScore = currentBaseScore,
|
||||||
CountBasicJudgements = currentCountBasicJudgements,
|
CountAccuracyJudgements = currentCountAccuracyJudgements,
|
||||||
ComboPortion = currentComboPortion,
|
ComboPortion = currentComboPortion,
|
||||||
BonusPortion = currentBonusPortion
|
BonusPortion = currentBonusPortion
|
||||||
};
|
};
|
||||||
@ -414,7 +410,7 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
{
|
{
|
||||||
currentMaximumBaseScore = statistics.MaximumBaseScore;
|
currentMaximumBaseScore = statistics.MaximumBaseScore;
|
||||||
currentBaseScore = statistics.BaseScore;
|
currentBaseScore = statistics.BaseScore;
|
||||||
currentCountBasicJudgements = statistics.CountBasicJudgements;
|
currentCountAccuracyJudgements = statistics.CountAccuracyJudgements;
|
||||||
currentComboPortion = statistics.ComboPortion;
|
currentComboPortion = statistics.ComboPortion;
|
||||||
currentBonusPortion = statistics.BonusPortion;
|
currentBonusPortion = statistics.BonusPortion;
|
||||||
}
|
}
|
||||||
@ -502,7 +498,7 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
public double BaseScore { get; set; }
|
public double BaseScore { get; set; }
|
||||||
|
|
||||||
[Key(2)]
|
[Key(2)]
|
||||||
public int CountBasicJudgements { get; set; }
|
public int CountAccuracyJudgements { get; set; }
|
||||||
|
|
||||||
[Key(3)]
|
[Key(3)]
|
||||||
public double ComboPortion { get; set; }
|
public double ComboPortion { get; set; }
|
||||||
|
Loading…
Reference in New Issue
Block a user