// 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; using osu.Game.Modes.Objects.Drawables; namespace osu.Game.Modes.Taiko.Judgements { public class TaikoJudgement : Judgement { /// /// The maximum result. /// public const TaikoHitResult MAX_HIT_RESULT = TaikoHitResult.Great; /// /// The result. /// public TaikoHitResult TaikoResult; /// /// The result value for the combo portion of the score. /// public int ResultValueForScore => Result == HitResult.Miss ? 0 : NumericResultForScore(TaikoResult); /// /// The result value for the accuracy portion of the score. /// public int ResultValueForAccuracy => Result == HitResult.Miss ? 0 : NumericResultForAccuracy(TaikoResult); /// /// The maximum result value for the combo portion of the score. /// public int MaxResultValueForScore => NumericResultForScore(MAX_HIT_RESULT); /// /// The maximum result value for the accuracy portion of the score. /// public int MaxResultValueForAccuracy => NumericResultForAccuracy(MAX_HIT_RESULT); public override string ResultString => TaikoResult.GetDescription(); public override string MaxResultString => MAX_HIT_RESULT.GetDescription(); /// /// Whether this Judgement has a secondary hit in the case of strong hits. /// public virtual bool SecondHit { get; set; } /// /// Computes the numeric result value for the combo portion of the score. /// For the accuracy portion of the score (including accuracy percentage), see . /// /// The result to compute the value for. /// The numeric result 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 result value for the accuracy portion of the score. /// For the combo portion of the score, see . /// /// The result to compute the value for. /// The numeric result value. protected virtual int NumericResultForAccuracy(TaikoHitResult result) { switch (result) { default: return 0; case TaikoHitResult.Good: return 150; case TaikoHitResult.Great: return 300; } } } }