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
|
|
|
|
|
|
2017-04-18 15:05:58 +08:00
|
|
|
|
using osu.Game.Rulesets.Judgements;
|
2017-05-26 18:22:17 +08:00
|
|
|
|
using osu.Game.Rulesets.Objects.Drawables;
|
2017-03-15 17:55:38 +08:00
|
|
|
|
|
2017-04-18 15:05:58 +08:00
|
|
|
|
namespace osu.Game.Rulesets.Mania.Judgements
|
2017-03-15 17:55:38 +08:00
|
|
|
|
{
|
2017-03-23 18:00:18 +08:00
|
|
|
|
public class ManiaJudgement : Judgement
|
2017-03-15 17:55:38 +08:00
|
|
|
|
{
|
2017-05-26 18:22:17 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The maximum possible hit result.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public const ManiaHitResult MAX_HIT_RESULT = ManiaHitResult.Perfect;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The result value for the combo portion of the score.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int ResultValueForScore => Result == HitResult.Miss ? 0 : NumericResultForScore(ManiaResult);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The result value for the accuracy portion of the score.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int ResultValueForAccuracy => Result == HitResult.Miss ? 0 : NumericResultForAccuracy(ManiaResult);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The maximum result value for the combo portion of the score.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int MaxResultValueForScore => NumericResultForScore(MAX_HIT_RESULT);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The maximum result value for the accuracy portion of the score.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int MaxResultValueForAccuracy => NumericResultForAccuracy(MAX_HIT_RESULT);
|
|
|
|
|
|
2017-03-24 08:50:18 +08:00
|
|
|
|
public override string ResultString => string.Empty;
|
2017-03-23 11:21:09 +08:00
|
|
|
|
|
2017-03-24 08:50:18 +08:00
|
|
|
|
public override string MaxResultString => string.Empty;
|
2017-05-22 13:10:37 +08:00
|
|
|
|
|
2017-05-22 15:09:32 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The hit result.
|
|
|
|
|
/// </summary>
|
2017-05-22 13:10:37 +08:00
|
|
|
|
public ManiaHitResult ManiaResult;
|
2017-05-26 18:22:17 +08:00
|
|
|
|
|
|
|
|
|
public virtual int NumericResultForScore(ManiaHitResult result)
|
|
|
|
|
{
|
|
|
|
|
switch (result)
|
|
|
|
|
{
|
|
|
|
|
default:
|
|
|
|
|
return 0;
|
|
|
|
|
case ManiaHitResult.Bad:
|
|
|
|
|
return 50;
|
|
|
|
|
case ManiaHitResult.Ok:
|
|
|
|
|
return 100;
|
|
|
|
|
case ManiaHitResult.Good:
|
|
|
|
|
return 200;
|
|
|
|
|
case ManiaHitResult.Great:
|
|
|
|
|
case ManiaHitResult.Perfect:
|
|
|
|
|
return 300;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public virtual int NumericResultForAccuracy(ManiaHitResult result)
|
|
|
|
|
{
|
|
|
|
|
switch (result)
|
|
|
|
|
{
|
|
|
|
|
default:
|
|
|
|
|
return 0;
|
|
|
|
|
case ManiaHitResult.Bad:
|
|
|
|
|
return 50;
|
|
|
|
|
case ManiaHitResult.Ok:
|
|
|
|
|
return 100;
|
|
|
|
|
case ManiaHitResult.Good:
|
|
|
|
|
return 200;
|
|
|
|
|
case ManiaHitResult.Great:
|
|
|
|
|
return 300;
|
|
|
|
|
case ManiaHitResult.Perfect:
|
|
|
|
|
return 305;
|
|
|
|
|
}
|
|
|
|
|
}
|
2017-03-15 17:55:38 +08:00
|
|
|
|
}
|
|
|
|
|
}
|