2017-03-15 20:32:47 +08:00
|
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
|
|
|
|
using osu.Game.Modes.Judgements;
|
2017-03-15 17:55:38 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Modes.Taiko.Judgements
|
|
|
|
|
{
|
|
|
|
|
public class TaikoJudgementInfo : JudgementInfo
|
|
|
|
|
{
|
2017-03-17 16:06:34 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The maximum score value.
|
|
|
|
|
/// </summary>
|
2017-03-21 20:36:05 +08:00
|
|
|
|
public const TaikoHitResult MAX_SCORE = TaikoHitResult.Great;
|
2017-03-17 16:06:34 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The score value.
|
|
|
|
|
/// </summary>
|
2017-03-21 20:36:05 +08:00
|
|
|
|
public TaikoHitResult TaikoResult;
|
2017-03-17 16:06:34 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The score value for the combo portion of the score.
|
|
|
|
|
/// </summary>
|
2017-03-21 20:36:05 +08:00
|
|
|
|
public int ScoreValue => NumericResultForScore(TaikoResult);
|
2017-03-17 16:06:34 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The score value for the accuracy portion of the score.
|
|
|
|
|
/// </summary>
|
2017-03-21 20:36:05 +08:00
|
|
|
|
public int AccuracyScoreValue => NumericResultForAccuracy(TaikoResult);
|
2017-03-17 16:06:34 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The maximum score value for the combo portion of the score.
|
|
|
|
|
/// </summary>
|
2017-03-21 20:36:05 +08:00
|
|
|
|
public int MaxScoreValue => NumericResultForScore(MAX_SCORE);
|
2017-03-17 16:06:34 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The maximum score value for the accuracy portion of the score.
|
|
|
|
|
/// </summary>
|
2017-03-21 20:36:05 +08:00
|
|
|
|
public int MaxAccuracyScoreValue => NumericResultForAccuracy(MAX_SCORE);
|
2017-03-17 16:06:34 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether this Judgement has a secondary hit in the case of finishers.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool SecondHit;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2017-03-21 20:36:05 +08:00
|
|
|
|
/// Computes the numeric score value for the combo portion of the score.
|
|
|
|
|
/// For the accuracy portion of the score (including accuracy percentage), see <see cref="NumericResultForAccuracy(TaikoHitResult)"/>.
|
2017-03-17 16:06:34 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="result">The result to compute the score value for.</param>
|
2017-03-21 20:36:05 +08:00
|
|
|
|
/// <returns>The numeric score value.</returns>
|
|
|
|
|
protected virtual int NumericResultForScore(TaikoHitResult result)
|
2017-03-17 16:06:34 +08:00
|
|
|
|
{
|
|
|
|
|
switch (result)
|
|
|
|
|
{
|
|
|
|
|
default:
|
|
|
|
|
return 0;
|
2017-03-21 20:36:05 +08:00
|
|
|
|
case TaikoHitResult.Good:
|
2017-03-17 16:06:34 +08:00
|
|
|
|
return 100;
|
2017-03-21 20:36:05 +08:00
|
|
|
|
case TaikoHitResult.Great:
|
2017-03-17 16:06:34 +08:00
|
|
|
|
return 300;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2017-03-21 20:36:05 +08:00
|
|
|
|
/// Computes the numeric score value for the accuracy portion of the score.
|
|
|
|
|
/// For the combo portion of the score, see <see cref="NumericResultForScore(TaikoHitResult)"/>.
|
2017-03-17 16:06:34 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="result">The result to compute the score value for.</param>
|
2017-03-21 20:36:05 +08:00
|
|
|
|
/// <returns>The numeric score value.</returns>
|
|
|
|
|
protected virtual int NumericResultForAccuracy(TaikoHitResult result)
|
2017-03-17 16:06:34 +08:00
|
|
|
|
{
|
|
|
|
|
switch (result)
|
|
|
|
|
{
|
|
|
|
|
default:
|
|
|
|
|
return 0;
|
2017-03-21 20:36:05 +08:00
|
|
|
|
case TaikoHitResult.Good:
|
2017-03-17 16:06:34 +08:00
|
|
|
|
return 150;
|
2017-03-21 20:36:05 +08:00
|
|
|
|
case TaikoHitResult.Great:
|
2017-03-17 16:06:34 +08:00
|
|
|
|
return 300;
|
|
|
|
|
}
|
|
|
|
|
}
|
2017-03-15 17:55:38 +08:00
|
|
|
|
}
|
|
|
|
|
}
|