diff --git a/osu.Game.Modes.Taiko/Judgements/TaikoJudgementInfo.cs b/osu.Game.Modes.Taiko/Judgements/TaikoJudgementInfo.cs index 38b9d784dd..8c42023648 100644 --- a/osu.Game.Modes.Taiko/Judgements/TaikoJudgementInfo.cs +++ b/osu.Game.Modes.Taiko/Judgements/TaikoJudgementInfo.cs @@ -7,5 +7,76 @@ namespace osu.Game.Modes.Taiko.Judgements { public class TaikoJudgementInfo : JudgementInfo { + /// + /// The maximum score value. + /// + public const TaikoScoreResult MAX_SCORE = TaikoScoreResult.Great; + + /// + /// The score value. + /// + public TaikoScoreResult Score; + + /// + /// The score value for the combo portion of the score. + /// + public int ScoreValue => ScoreToInt(Score); + + /// + /// The score value for the accuracy portion of the score. + /// + public int AccuracyScoreValue => AccuracyScoreToInt(Score); + + /// + /// The maximum score value for the combo portion of the score. + /// + public int MaxScoreValue => ScoreToInt(MAX_SCORE); + + /// + /// The maximum score value for the accuracy portion of the score. + /// + public int MaxAccuracyScoreValue => AccuracyScoreToInt(MAX_SCORE); + + /// + /// Whether this Judgement has a secondary hit in the case of finishers. + /// + public bool SecondHit; + + /// + /// Computes the score value for the combo portion of the score. + /// For the accuracy portion of the score (including accuracy percentage), see . + /// + /// The result to compute the score value for. + /// The int score value. + protected virtual int ScoreToInt(TaikoScoreResult result) + { + switch (result) + { + default: + return 0; + case TaikoScoreResult.Good: + return 100; + case TaikoScoreResult.Great: + return 300; + } + } + + /// + /// Computes the score value for the accurac portion of the score. + /// + /// The result to compute the score value for. + /// The int score value. + protected virtual int AccuracyScoreToInt(TaikoScoreResult result) + { + switch (result) + { + default: + return 0; + case TaikoScoreResult.Good: + return 150; + case TaikoScoreResult.Great: + return 300; + } + } } } diff --git a/osu.Game.Modes.Taiko/Judgements/TaikoScoreResult.cs b/osu.Game.Modes.Taiko/Judgements/TaikoScoreResult.cs new file mode 100644 index 0000000000..004b9c4973 --- /dev/null +++ b/osu.Game.Modes.Taiko/Judgements/TaikoScoreResult.cs @@ -0,0 +1,11 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +namespace osu.Game.Modes.Taiko.Judgements +{ + public enum TaikoScoreResult + { + Good, + Great + } +} diff --git a/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj b/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj index dbd58d4666..3a79d721c6 100644 --- a/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj +++ b/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj @@ -50,6 +50,7 @@ +