This commit is contained in:
Ivan Pavluk 2018-11-29 08:56:19 +07:00
parent 6e9da49a61
commit 36b458bdee
4 changed files with 38 additions and 3 deletions

View File

@ -0,0 +1,11 @@
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Taiko.Judgements
{
class TaikoDrumRollJudgement : TaikoJudgement
{
public override bool AffectsCombo => false;
protected override int NumericResultFor(HitResult result) => 0;
}
}

View File

@ -170,7 +170,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
ApplyResult(r => r.Type = HitResult.Miss);
return;
}
if (!userTriggered)
{
if (timeOffset > second_hit_window)
@ -179,7 +179,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
}
if (Math.Abs(MainObject.Result.TimeOffset - timeOffset) < second_hit_window)
ApplyResult(r => r.Type = HitResult.Great);
ApplyResult(r => r.Type = MainObject.Result.Type);
}
public override bool OnPressed(TaikoAction action)

View File

@ -5,11 +5,15 @@ using osu.Game.Rulesets.Objects.Types;
using System;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Taiko.Judgements;
namespace osu.Game.Rulesets.Taiko.Objects
{
public class DrumRoll : TaikoHitObject, IHasEndTime
{
public override Judgement CreateJudgement() => new TaikoDrumRollJudgement();
/// <summary>
/// Drum roll distance that results in a duration of 1 speed-adjusted beat length.
/// </summary>

View File

@ -80,7 +80,27 @@ namespace osu.Game.Rulesets.Taiko.Scoring
{
base.ApplyResult(result);
bool isTick = result.Judgement is TaikoDrumRollTickJudgement;
bool isTick = false;
bool isRoll = false;
bool isStrong = false;
isTick = result.Judgement is TaikoDrumRollTickJudgement;
if (!isTick)
{
isRoll = result.Judgement is TaikoDrumRollJudgement;
if (!isRoll)
{
isStrong = result.Judgement is TaikoStrongJudgement;
}
}
//Don't change HP based on drum roll fullness for compatibility
if (isRoll)
return;
//If the object is strong, HP change is already handled in MainObject
if (isStrong)
return;
// Apply HP changes
switch (result.Type)