2018-01-05 11:21:19 +00:00
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
2017-05-24 11:45:01 +00:00
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
2017-12-30 20:23:18 +00:00
|
|
|
using osu.Game.Rulesets.Scoring;
|
2017-09-05 10:44:59 +00:00
|
|
|
|
2017-05-24 11:45:01 +00:00
|
|
|
namespace osu.Game.Rulesets.Mania.Judgements
|
|
|
|
{
|
|
|
|
public class HoldNoteTailJudgement : ManiaJudgement
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Whether the hold note has been released too early and shouldn't give full score for the release.
|
|
|
|
/// </summary>
|
|
|
|
public bool HasBroken;
|
2017-05-26 10:28:14 +00:00
|
|
|
|
2017-09-05 10:44:59 +00:00
|
|
|
protected override int NumericResultFor(HitResult result)
|
2017-05-26 10:28:14 +00:00
|
|
|
{
|
|
|
|
switch (result)
|
|
|
|
{
|
|
|
|
default:
|
2017-09-05 10:44:59 +00:00
|
|
|
return base.NumericResultFor(result);
|
|
|
|
case HitResult.Great:
|
|
|
|
case HitResult.Perfect:
|
|
|
|
return base.NumericResultFor(HasBroken ? HitResult.Good : result);
|
2017-05-26 10:28:14 +00:00
|
|
|
}
|
|
|
|
}
|
2017-05-24 11:45:01 +00:00
|
|
|
}
|
2017-12-30 20:23:18 +00:00
|
|
|
}
|