mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 13:03:21 +08:00
Reimplement classic scoring mode
This commit is contained in:
parent
3c3c812ed6
commit
a7b623f52a
@ -31,13 +31,11 @@ namespace osu.Game.Rulesets.Catch.Scoring
|
|||||||
|
|
||||||
const int tiny_droplets_portion = 400000;
|
const int tiny_droplets_portion = 400000;
|
||||||
|
|
||||||
return
|
return (
|
||||||
(int)Math.Round
|
((1000000 - tiny_droplets_portion) + tiny_droplets_portion * (1 - tinyDropletScale)) * ComboPortion / MaxComboPortion +
|
||||||
((
|
tiny_droplets_portion * tinyDropletScale * fruitHitsRatio +
|
||||||
((1000000 - tiny_droplets_portion) + tiny_droplets_portion * (1 - tinyDropletScale)) * ComboPortion / MaxComboPortion +
|
BonusPortion
|
||||||
tiny_droplets_portion * tinyDropletScale * fruitHitsRatio +
|
) * ScoreMultiplier;
|
||||||
BonusPortion
|
|
||||||
) * ScoreMultiplier);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void AddScoreChange(JudgementResult result)
|
protected override void AddScoreChange(JudgementResult result)
|
||||||
|
@ -20,13 +20,11 @@ namespace osu.Game.Rulesets.Mania.Scoring
|
|||||||
|
|
||||||
protected override double ComputeTotalScore()
|
protected override double ComputeTotalScore()
|
||||||
{
|
{
|
||||||
return
|
return (
|
||||||
(int)Math.Round
|
200000 * ComboPortion / MaxComboPortion +
|
||||||
((
|
800000 * Math.Pow(Accuracy.Value, 2 + 2 * Accuracy.Value) * ((double)CurrentBasicJudgements / MaxBasicJudgements) +
|
||||||
200000 * ComboPortion / MaxComboPortion +
|
BonusPortion
|
||||||
800000 * Math.Pow(Accuracy.Value, 2 + 2 * Accuracy.Value) * ((double)CurrentBasicJudgements / MaxBasicJudgements) +
|
) * ScoreMultiplier;
|
||||||
BonusPortion
|
|
||||||
) * ScoreMultiplier);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void AddScoreChange(JudgementResult result)
|
protected override void AddScoreChange(JudgementResult result)
|
||||||
|
@ -17,13 +17,11 @@ namespace osu.Game.Rulesets.Osu.Scoring
|
|||||||
|
|
||||||
protected override double ComputeTotalScore()
|
protected override double ComputeTotalScore()
|
||||||
{
|
{
|
||||||
return
|
return (
|
||||||
(int)Math.Round
|
700000 * ComboPortion / MaxComboPortion +
|
||||||
((
|
300000 * Math.Pow(Accuracy.Value, 10) * ((double)CurrentBasicJudgements / MaxBasicJudgements) +
|
||||||
700000 * ComboPortion / MaxComboPortion +
|
BonusPortion
|
||||||
300000 * Math.Pow(Accuracy.Value, 10) * ((double)CurrentBasicJudgements / MaxBasicJudgements) +
|
) * ScoreMultiplier;
|
||||||
BonusPortion
|
|
||||||
) * ScoreMultiplier);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,13 +21,11 @@ namespace osu.Game.Rulesets.Taiko.Scoring
|
|||||||
|
|
||||||
protected override double ComputeTotalScore()
|
protected override double ComputeTotalScore()
|
||||||
{
|
{
|
||||||
return
|
return (
|
||||||
(int)Math.Round
|
250000 * ComboPortion / MaxComboPortion +
|
||||||
((
|
750000 * Math.Pow(Accuracy.Value, 3.6) * ((double)CurrentBasicJudgements / MaxBasicJudgements) +
|
||||||
250000 * ComboPortion / MaxComboPortion +
|
BonusPortion
|
||||||
750000 * Math.Pow(Accuracy.Value, 3.6) * ((double)CurrentBasicJudgements / MaxBasicJudgements) +
|
) * ScoreMultiplier;
|
||||||
BonusPortion
|
|
||||||
) * ScoreMultiplier);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void AddScoreChange(JudgementResult result)
|
protected override void AddScoreChange(JudgementResult result)
|
||||||
|
@ -274,8 +274,20 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
{
|
{
|
||||||
Accuracy.Value = currentMaxBasicScore > 0 ? currentBasicScore / currentMaxBasicScore : 1;
|
Accuracy.Value = currentMaxBasicScore > 0 ? currentBasicScore / currentMaxBasicScore : 1;
|
||||||
|
|
||||||
// Todo: Classic/Standardised
|
double standardisedScore = ComputeTotalScore();
|
||||||
TotalScore.Value = (long)Math.Round(ComputeTotalScore());
|
|
||||||
|
if (Mode.Value == ScoringMode.Standardised)
|
||||||
|
TotalScore.Value = (long)Math.Round(standardisedScore);
|
||||||
|
else
|
||||||
|
TotalScore.Value = ConvertToClassic(standardisedScore);
|
||||||
|
}
|
||||||
|
|
||||||
|
public long ConvertToClassic(double standardised)
|
||||||
|
{
|
||||||
|
// This gives a similar feeling to osu!stable scoring (ScoreV1) while keeping classic scoring as only a constant multiple of standardised scoring.
|
||||||
|
// The invariant is important to ensure that scores don't get re-ordered on leaderboards between the two scoring modes.
|
||||||
|
double scaledRawScore = standardised / MAX_SCORE;
|
||||||
|
return (long)Math.Round(Math.Pow(scaledRawScore * Math.Max(1, MaxBasicJudgements), 2) * ClassicScoreMultiplier);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract double ComputeTotalScore();
|
protected abstract double ComputeTotalScore();
|
||||||
|
@ -107,17 +107,15 @@ namespace osu.Game.Scoring
|
|||||||
/// <returns>The total score.</returns>
|
/// <returns>The total score.</returns>
|
||||||
public long GetTotalScore([NotNull] ScoreInfo score, ScoringMode mode = ScoringMode.Standardised)
|
public long GetTotalScore([NotNull] ScoreInfo score, ScoringMode mode = ScoringMode.Standardised)
|
||||||
{
|
{
|
||||||
// TODO: This is required for playlist aggregate scores. They should likely not be getting here in the first place.
|
if (mode == ScoringMode.Standardised)
|
||||||
if (string.IsNullOrEmpty(score.BeatmapInfo.MD5Hash))
|
|
||||||
return score.TotalScore;
|
return score.TotalScore;
|
||||||
|
|
||||||
var ruleset = score.Ruleset.CreateInstance();
|
var ruleset = score.Ruleset.CreateInstance();
|
||||||
var scoreProcessor = ruleset.CreateScoreProcessor();
|
var scoreProcessor = ruleset.CreateScoreProcessor();
|
||||||
scoreProcessor.Mods.Value = score.Mods;
|
scoreProcessor.Mods.Value = score.Mods;
|
||||||
|
|
||||||
// Todo:
|
// Todo: This loses precision because we're dealing with pre-rounded total scores.
|
||||||
return 0;
|
return scoreProcessor.ConvertToClassic(score.TotalScore);
|
||||||
// return scoreProcessor.ComputeScore(mode, score);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user