mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 08:23:00 +08:00
Apply mod score multipliers
This commit is contained in:
parent
6bfac9f8e4
commit
e57663b39c
@ -217,6 +217,8 @@ namespace osu.Game.Rulesets.Scoring
|
||||
private double baseScore;
|
||||
private double bonusScore;
|
||||
|
||||
private double scoreMultiplier = 1;
|
||||
|
||||
public ScoreProcessor(DrawableRuleset<TObject> drawableRuleset)
|
||||
{
|
||||
Debug.Assert(base_portion + combo_portion == 1.0);
|
||||
@ -235,6 +237,15 @@ namespace osu.Game.Rulesets.Scoring
|
||||
}
|
||||
|
||||
Mode.ValueChanged += _ => updateScore();
|
||||
Mods.ValueChanged += mods =>
|
||||
{
|
||||
scoreMultiplier = 1;
|
||||
|
||||
foreach (var m in mods.NewValue)
|
||||
scoreMultiplier *= m.ScoreMultiplier;
|
||||
|
||||
updateScore();
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -384,7 +395,7 @@ namespace osu.Game.Rulesets.Scoring
|
||||
if (rollingMaxBaseScore != 0)
|
||||
Accuracy.Value = baseScore / rollingMaxBaseScore;
|
||||
|
||||
TotalScore.Value = getScore(Mode.Value);
|
||||
TotalScore.Value = getScore(Mode.Value) * scoreMultiplier;
|
||||
}
|
||||
|
||||
private double getScore(ScoringMode mode)
|
||||
|
Loading…
Reference in New Issue
Block a user