// Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Game.Modes.Judgements; using osu.Framework.Extensions; namespace osu.Game.Modes.Taiko.Judgements { public class TaikoJudgement : Judgement { /// /// 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); public override string ScoreString => TaikoResult.GetDescription(); public override string MaxScoreString => MAX_HIT_RESULT.GetDescription(); /// /// 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; } } } }