mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 00:02:54 +08:00
Simplify standardized scoring to BasePortion (raw scoring) + ComboPortion (highest combo)
This commit is contained in:
parent
3619f7c1eb
commit
ba3e44cd71
@ -89,8 +89,8 @@ namespace osu.Game.Rulesets.Mania.Scoring
|
||||
/// </summary>
|
||||
private double hpMultiplier = 1;
|
||||
|
||||
protected override double ComboPortion => 0.2f;
|
||||
protected override double AccuracyPortion => 0.8f;
|
||||
protected override double BasePortion => 0.8;
|
||||
protected override double ComboPortion => 0.2;
|
||||
|
||||
public ManiaScoreProcessor()
|
||||
{
|
||||
|
@ -16,8 +16,8 @@ namespace osu.Game.Rulesets.Osu.Scoring
|
||||
{
|
||||
internal class OsuScoreProcessor : ScoreProcessor<OsuHitObject>
|
||||
{
|
||||
protected override double BasePortion => 0.3;
|
||||
protected override double ComboPortion => 0.7;
|
||||
protected override double AccuracyPortion => 0.3;
|
||||
|
||||
public OsuScoreProcessor()
|
||||
{
|
||||
|
@ -55,8 +55,8 @@ namespace osu.Game.Rulesets.Taiko.Scoring
|
||||
/// </summary>
|
||||
public override bool HasFailed => Hits == MaxHits && Health.Value <= 0.5;
|
||||
|
||||
protected override double BasePortion => 0.8;
|
||||
protected override double ComboPortion => 0.2;
|
||||
protected override double AccuracyPortion => 0.8;
|
||||
|
||||
private double hpIncreaseTick;
|
||||
private double hpIncreaseGreat;
|
||||
|
@ -156,16 +156,17 @@ namespace osu.Game.Rulesets.Scoring
|
||||
|
||||
protected sealed override bool HasCompleted => Hits == MaxHits;
|
||||
|
||||
protected virtual double BasePortion => 0.5f;
|
||||
protected virtual double ComboPortion => 0.5f;
|
||||
protected virtual double AccuracyPortion => 0.5f;
|
||||
|
||||
protected int MaxHits { get; private set; }
|
||||
protected int Hits { get; private set; }
|
||||
|
||||
private double maxHighestCombo;
|
||||
private double maxComboScore;
|
||||
private double rollingMaxComboScore;
|
||||
private double comboScore;
|
||||
|
||||
private double maxBaseScore;
|
||||
private double rollingMaxBaseScore;
|
||||
private double baseScore;
|
||||
|
||||
protected ScoreProcessor()
|
||||
{
|
||||
@ -216,8 +217,8 @@ namespace osu.Game.Rulesets.Scoring
|
||||
break;
|
||||
}
|
||||
|
||||
comboScore += judgement.NumericResult;
|
||||
rollingMaxComboScore += judgement.MaxNumericResult;
|
||||
baseScore += judgement.NumericResult;
|
||||
rollingMaxBaseScore += judgement.MaxNumericResult;
|
||||
}
|
||||
else if (judgement.IsHit)
|
||||
bonusScore += judgement.NumericResult;
|
||||
@ -225,20 +226,16 @@ namespace osu.Game.Rulesets.Scoring
|
||||
if (judgement.AffectsAccuracy)
|
||||
Hits++;
|
||||
|
||||
if (rollingMaxComboScore != 0)
|
||||
Accuracy.Value = comboScore / rollingMaxComboScore;
|
||||
if (rollingMaxBaseScore != 0)
|
||||
Accuracy.Value = baseScore / rollingMaxBaseScore;
|
||||
|
||||
switch (Mode.Value)
|
||||
{
|
||||
case ScoringMode.Standardised:
|
||||
TotalScore.Value =
|
||||
max_score *
|
||||
(ComboPortion * (comboScore * Math.Log(HighestCombo + 1, 2)) / (maxComboScore * Math.Log(maxHighestCombo + 1, 2))
|
||||
+ AccuracyPortion * Accuracy)
|
||||
+ bonusScore;
|
||||
TotalScore.Value = max_score * (BasePortion * baseScore / maxBaseScore + ComboPortion * HighestCombo / maxHighestCombo) + bonusScore;
|
||||
break;
|
||||
case ScoringMode.Exponential:
|
||||
TotalScore.Value = (comboScore + bonusScore) * Math.Log(HighestCombo + 1, 2);
|
||||
TotalScore.Value = (baseScore + bonusScore) * Math.Log(HighestCombo + 1, 2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -249,14 +246,14 @@ namespace osu.Game.Rulesets.Scoring
|
||||
{
|
||||
MaxHits = Hits;
|
||||
maxHighestCombo = HighestCombo;
|
||||
maxComboScore = comboScore;
|
||||
maxBaseScore = baseScore;
|
||||
}
|
||||
|
||||
base.Reset(storeResults);
|
||||
|
||||
Hits = 0;
|
||||
comboScore = 0;
|
||||
rollingMaxComboScore = 0;
|
||||
baseScore = 0;
|
||||
rollingMaxBaseScore = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user