mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
Make BasePortion and ComboPortion constants
This commit is contained in:
@ -89,9 +89,6 @@ namespace osu.Game.Rulesets.Mania.Scoring
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private double hpMultiplier = 1;
|
private double hpMultiplier = 1;
|
||||||
|
|
||||||
protected override double BasePortion => 0.8;
|
|
||||||
protected override double ComboPortion => 0.2;
|
|
||||||
|
|
||||||
public ManiaScoreProcessor()
|
public ManiaScoreProcessor()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -16,9 +16,6 @@ namespace osu.Game.Rulesets.Osu.Scoring
|
|||||||
{
|
{
|
||||||
internal class OsuScoreProcessor : ScoreProcessor<OsuHitObject>
|
internal class OsuScoreProcessor : ScoreProcessor<OsuHitObject>
|
||||||
{
|
{
|
||||||
protected override double BasePortion => 0.3;
|
|
||||||
protected override double ComboPortion => 0.7;
|
|
||||||
|
|
||||||
public OsuScoreProcessor()
|
public OsuScoreProcessor()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -55,9 +55,6 @@ namespace osu.Game.Rulesets.Taiko.Scoring
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public override bool HasFailed => Hits == MaxHits && Health.Value <= 0.5;
|
public override bool HasFailed => Hits == MaxHits && Health.Value <= 0.5;
|
||||||
|
|
||||||
protected override double BasePortion => 0.8;
|
|
||||||
protected override double ComboPortion => 0.2;
|
|
||||||
|
|
||||||
private double hpIncreaseTick;
|
private double hpIncreaseTick;
|
||||||
private double hpIncreaseGreat;
|
private double hpIncreaseGreat;
|
||||||
private double hpIncreaseGood;
|
private double hpIncreaseGood;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Rulesets.Judgements;
|
using osu.Game.Rulesets.Judgements;
|
||||||
@ -150,15 +151,14 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
public abstract class ScoreProcessor<TObject> : ScoreProcessor
|
public abstract class ScoreProcessor<TObject> : ScoreProcessor
|
||||||
where TObject : HitObject
|
where TObject : HitObject
|
||||||
{
|
{
|
||||||
|
private const double base_portion = 0.3;
|
||||||
|
private const double combo_portion = 0.7;
|
||||||
private const double max_score = 1000000;
|
private const double max_score = 1000000;
|
||||||
|
|
||||||
public readonly Bindable<ScoringMode> Mode = new Bindable<ScoringMode>();
|
public readonly Bindable<ScoringMode> Mode = new Bindable<ScoringMode>();
|
||||||
|
|
||||||
protected sealed override bool HasCompleted => Hits == MaxHits;
|
protected sealed override bool HasCompleted => Hits == MaxHits;
|
||||||
|
|
||||||
protected virtual double BasePortion => 0.5f;
|
|
||||||
protected virtual double ComboPortion => 0.5f;
|
|
||||||
|
|
||||||
protected int MaxHits { get; private set; }
|
protected int MaxHits { get; private set; }
|
||||||
protected int Hits { get; private set; }
|
protected int Hits { get; private set; }
|
||||||
|
|
||||||
@ -174,6 +174,8 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
|
|
||||||
protected ScoreProcessor(RulesetContainer<TObject> rulesetContainer)
|
protected ScoreProcessor(RulesetContainer<TObject> rulesetContainer)
|
||||||
{
|
{
|
||||||
|
Debug.Assert(base_portion + combo_portion == 1.0);
|
||||||
|
|
||||||
rulesetContainer.OnJudgement += AddJudgement;
|
rulesetContainer.OnJudgement += AddJudgement;
|
||||||
|
|
||||||
SimulateAutoplay(rulesetContainer.Beatmap);
|
SimulateAutoplay(rulesetContainer.Beatmap);
|
||||||
@ -231,7 +233,7 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
switch (Mode.Value)
|
switch (Mode.Value)
|
||||||
{
|
{
|
||||||
case ScoringMode.Standardised:
|
case ScoringMode.Standardised:
|
||||||
TotalScore.Value = max_score * (BasePortion * baseScore / maxBaseScore + ComboPortion * HighestCombo / maxHighestCombo) + bonusScore;
|
TotalScore.Value = max_score * (base_portion * baseScore / maxBaseScore + combo_portion * HighestCombo / maxHighestCombo) + bonusScore;
|
||||||
break;
|
break;
|
||||||
case ScoringMode.Exponential:
|
case ScoringMode.Exponential:
|
||||||
TotalScore.Value = (baseScore + bonusScore) * Math.Log(HighestCombo + 1, 2);
|
TotalScore.Value = (baseScore + bonusScore) * Math.Log(HighestCombo + 1, 2);
|
||||||
|
Reference in New Issue
Block a user