diff --git a/osu.Game.Modes.Taiko/Judgements/TaikoHitResult.cs b/osu.Game.Modes.Taiko/Judgements/TaikoHitResult.cs new file mode 100644 index 0000000000..d425616b66 --- /dev/null +++ b/osu.Game.Modes.Taiko/Judgements/TaikoHitResult.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 TaikoHitResult + { + Good, + Great + } +} diff --git a/osu.Game.Modes.Taiko/Judgements/TaikoJudgementInfo.cs b/osu.Game.Modes.Taiko/Judgements/TaikoJudgementInfo.cs index 38b9d784dd..d9e81d4d77 100644 --- a/osu.Game.Modes.Taiko/Judgements/TaikoJudgementInfo.cs +++ b/osu.Game.Modes.Taiko/Judgements/TaikoJudgementInfo.cs @@ -7,5 +7,77 @@ namespace osu.Game.Modes.Taiko.Judgements { public class TaikoJudgementInfo : JudgementInfo { + /// + /// The maximum score value. + /// + public const TaikoHitResult MAX_HIT_RESULT = TaikoHitResult.Great; + + /// + /// The score value. + /// + public TaikoHitResult TaikoResult; + + /// + /// The score value for the combo portion of the score. + /// + public int ScoreValue => NumericResultForScore(TaikoResult); + + /// + /// The score value for the accuracy portion of the score. + /// + public int AccuracyScoreValue => NumericResultForAccuracy(TaikoResult); + + /// + /// The maximum score value for the combo portion of the score. + /// + public int MaxScoreValue => NumericResultForScore(MAX_HIT_RESULT); + + /// + /// The maximum score value for the accuracy portion of the score. + /// + public int MaxAccuracyScoreValue => NumericResultForAccuracy(MAX_HIT_RESULT); + + /// + /// Whether this Judgement has a secondary hit in the case of finishers. + /// + public bool SecondHit; + + /// + /// Computes the numeric 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 numeric score value. + protected virtual int NumericResultForScore(TaikoHitResult result) + { + switch (result) + { + default: + return 0; + case TaikoHitResult.Good: + return 100; + case TaikoHitResult.Great: + return 300; + } + } + + /// + /// Computes the numeric score value for the accuracy portion of the score. + /// For the combo portion of the score, see . + /// + /// The result to compute the score value for. + /// The numeric score value. + protected virtual int NumericResultForAccuracy(TaikoHitResult result) + { + switch (result) + { + default: + return 0; + case TaikoHitResult.Good: + return 150; + case TaikoHitResult.Great: + return 300; + } + } } } diff --git a/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj b/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj index 7ea6dfeadb..65ee442d33 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 @@ +