mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Make mod selfcontained
This commit is contained in:
@ -9,10 +9,6 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
|||||||
{
|
{
|
||||||
public class TaikoDrumRollJudgement : TaikoJudgement
|
public class TaikoDrumRollJudgement : TaikoJudgement
|
||||||
{
|
{
|
||||||
public bool IsBonus = false;
|
|
||||||
|
|
||||||
public override HitResult MaxResult => IsBonus ? HitResult.LargeBonus : HitResult.Great;
|
|
||||||
|
|
||||||
protected override double HealthIncreaseFor(HitResult result)
|
protected override double HealthIncreaseFor(HitResult result)
|
||||||
{
|
{
|
||||||
// Drum rolls can be ignored with no health penalty
|
// Drum rolls can be ignored with no health penalty
|
||||||
|
@ -9,9 +9,7 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
|||||||
{
|
{
|
||||||
public class TaikoDrumRollTickJudgement : TaikoJudgement
|
public class TaikoDrumRollTickJudgement : TaikoJudgement
|
||||||
{
|
{
|
||||||
public bool IsBonus = false;
|
public override HitResult MaxResult => HitResult.SmallTickHit;
|
||||||
|
|
||||||
public override HitResult MaxResult => IsBonus ? HitResult.LargeBonus : HitResult.SmallTickHit;
|
|
||||||
|
|
||||||
protected override double HealthIncreaseFor(HitResult result)
|
protected override double HealthIncreaseFor(HitResult result)
|
||||||
{
|
{
|
||||||
|
@ -9,10 +9,6 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
|||||||
{
|
{
|
||||||
public class TaikoSwellJudgement : TaikoJudgement
|
public class TaikoSwellJudgement : TaikoJudgement
|
||||||
{
|
{
|
||||||
public bool IsBonus = false;
|
|
||||||
|
|
||||||
public override HitResult MaxResult => IsBonus ? HitResult.LargeBonus : HitResult.Great;
|
|
||||||
|
|
||||||
protected override double HealthIncreaseFor(HitResult result)
|
protected override double HealthIncreaseFor(HitResult result)
|
||||||
{
|
{
|
||||||
switch (result)
|
switch (result)
|
||||||
|
@ -3,15 +3,22 @@
|
|||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading;
|
||||||
|
using osu.Game.Beatmaps;
|
||||||
|
using osu.Game.Rulesets.Judgements;
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
using osu.Game.Rulesets.Objects;
|
using osu.Game.Rulesets.Scoring;
|
||||||
|
using osu.Game.Rulesets.Taiko.Beatmaps;
|
||||||
|
using osu.Game.Rulesets.Taiko.Judgements;
|
||||||
using osu.Game.Rulesets.Taiko.Objects;
|
using osu.Game.Rulesets.Taiko.Objects;
|
||||||
|
using osu.Game.Rulesets.Taiko.Objects.Drawables;
|
||||||
using osu.Game.Rulesets.Taiko.UI;
|
using osu.Game.Rulesets.Taiko.UI;
|
||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Taiko.Mods
|
namespace osu.Game.Rulesets.Taiko.Mods
|
||||||
{
|
{
|
||||||
public class TaikoModClassic : ModClassic, IApplicableToDrawableRuleset<TaikoHitObject>, IUpdatableByPlayfield, IApplicableToHitObject
|
public class TaikoModClassic : ModClassic, IApplicableToDrawableRuleset<TaikoHitObject>, IUpdatableByPlayfield, IApplicableAfterBeatmapConversion
|
||||||
{
|
{
|
||||||
private DrawableTaikoRuleset drawableTaikoRuleset;
|
private DrawableTaikoRuleset drawableTaikoRuleset;
|
||||||
|
|
||||||
@ -19,14 +26,177 @@ namespace osu.Game.Rulesets.Taiko.Mods
|
|||||||
{
|
{
|
||||||
drawableTaikoRuleset = (DrawableTaikoRuleset)drawableRuleset;
|
drawableTaikoRuleset = (DrawableTaikoRuleset)drawableRuleset;
|
||||||
drawableTaikoRuleset.LockPlayfieldAspect.Value = false;
|
drawableTaikoRuleset.LockPlayfieldAspect.Value = false;
|
||||||
|
|
||||||
|
drawableTaikoRuleset.Playfield.RegisterPool<ClassicDrumRoll, ClassicDrawableDrumRoll>(5);
|
||||||
|
drawableTaikoRuleset.Playfield.RegisterPool<ClassicDrumRollTick, DrawableDrumRollTick>(100);
|
||||||
|
drawableTaikoRuleset.Playfield.RegisterPool<ClassicSwell, ClassicDrawableSwell>(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ApplyToHitObject(HitObject hitObject)
|
public void ApplyToBeatmap(IBeatmap beatmap)
|
||||||
{
|
{
|
||||||
if (hitObject is DrumRoll drumRoll)
|
var taikoBeatmap = (TaikoBeatmap)beatmap;
|
||||||
drumRoll.SetBonus(true);
|
|
||||||
else if (hitObject is Swell swell)
|
if (taikoBeatmap.HitObjects.Count == 0) return;
|
||||||
swell.SetBonus(true);
|
|
||||||
|
var hitObjects = taikoBeatmap.HitObjects.Select(ho =>
|
||||||
|
{
|
||||||
|
if (ho is DrumRoll drumRoll)
|
||||||
|
{
|
||||||
|
var newDrumRoll = new ClassicDrumRoll(drumRoll);
|
||||||
|
return newDrumRoll;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ho is Swell swell)
|
||||||
|
{
|
||||||
|
var newSwell = new ClassicSwell(swell);
|
||||||
|
return newSwell;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ho;
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
|
taikoBeatmap.HitObjects = hitObjects;
|
||||||
|
}
|
||||||
|
|
||||||
|
private class ClassicDrumRoll : DrumRoll
|
||||||
|
{
|
||||||
|
public ClassicDrumRoll(DrumRoll original)
|
||||||
|
{
|
||||||
|
StartTime = original.StartTime;
|
||||||
|
Samples = original.Samples;
|
||||||
|
EndTime = original.EndTime;
|
||||||
|
Duration = original.Duration;
|
||||||
|
TickRate = original.TickRate;
|
||||||
|
RequiredGoodHits = original.RequiredGoodHits;
|
||||||
|
RequiredGreatHits = original.RequiredGreatHits;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Judgement CreateJudgement() => new TaikoClassicDrumRollJudgement();
|
||||||
|
|
||||||
|
protected override void CreateTicks(CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
if (TickSpacing == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
bool first = true;
|
||||||
|
|
||||||
|
for (double t = StartTime; t < EndTime + TickSpacing / 2; t += TickSpacing)
|
||||||
|
{
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
|
|
||||||
|
AddNested(new ClassicDrumRollTick
|
||||||
|
{
|
||||||
|
FirstTick = first,
|
||||||
|
TickSpacing = TickSpacing,
|
||||||
|
StartTime = t,
|
||||||
|
IsStrong = IsStrong
|
||||||
|
});
|
||||||
|
|
||||||
|
first = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class ClassicDrumRollTick : DrumRollTick
|
||||||
|
{
|
||||||
|
public override Judgement CreateJudgement() => new TaikoClassicDrumRollTickJudgement();
|
||||||
|
}
|
||||||
|
|
||||||
|
private class ClassicSwell : Swell
|
||||||
|
{
|
||||||
|
public ClassicSwell(Swell original)
|
||||||
|
{
|
||||||
|
StartTime = original.StartTime;
|
||||||
|
Samples = original.Samples;
|
||||||
|
EndTime = original.EndTime;
|
||||||
|
Duration = original.Duration;
|
||||||
|
RequiredHits = original.RequiredHits;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Judgement CreateJudgement() => new TaikoClassicSwellJudgement();
|
||||||
|
}
|
||||||
|
|
||||||
|
private class TaikoClassicDrumRollJudgement : TaikoDrumRollJudgement
|
||||||
|
{
|
||||||
|
public override HitResult MaxResult => HitResult.LargeBonus;
|
||||||
|
}
|
||||||
|
|
||||||
|
private class TaikoClassicDrumRollTickJudgement : TaikoDrumRollTickJudgement
|
||||||
|
{
|
||||||
|
public override HitResult MaxResult => HitResult.LargeBonus;
|
||||||
|
}
|
||||||
|
|
||||||
|
private class TaikoClassicSwellJudgement : TaikoSwellJudgement
|
||||||
|
{
|
||||||
|
public override HitResult MaxResult => HitResult.LargeBonus;
|
||||||
|
}
|
||||||
|
|
||||||
|
private class ClassicDrawableDrumRoll : DrawableDrumRoll
|
||||||
|
{
|
||||||
|
public override bool DisplayResult => false;
|
||||||
|
|
||||||
|
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||||
|
{
|
||||||
|
if (userTriggered)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (timeOffset < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
ApplyResult(r => r.Type = HitResult.IgnoreMiss);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class ClassicDrawableSwell : DrawableSwell
|
||||||
|
{
|
||||||
|
public override bool DisplayResult => false;
|
||||||
|
|
||||||
|
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||||
|
{
|
||||||
|
if (userTriggered)
|
||||||
|
{
|
||||||
|
DrawableSwellTick nextTick = null;
|
||||||
|
|
||||||
|
foreach (var t in Ticks)
|
||||||
|
{
|
||||||
|
if (!t.Result.HasResult)
|
||||||
|
{
|
||||||
|
nextTick = t;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
nextTick?.TriggerResult(true);
|
||||||
|
|
||||||
|
int numHits = Ticks.Count(r => r.IsHit);
|
||||||
|
|
||||||
|
AnimateCompletion(numHits);
|
||||||
|
|
||||||
|
if (numHits == HitObject.RequiredHits)
|
||||||
|
ApplyResult(r => r.Type = HitResult.LargeBonus);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (timeOffset < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
int numHits = 0;
|
||||||
|
|
||||||
|
foreach (var tick in Ticks)
|
||||||
|
{
|
||||||
|
if (tick.IsHit)
|
||||||
|
{
|
||||||
|
numHits++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!tick.Result.HasResult)
|
||||||
|
tick.TriggerResult(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
ApplyResult(r => r.Type = numHits > HitObject.RequiredHits / 2 ? HitResult.SmallBonus : HitResult.IgnoreMiss);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Update(Playfield playfield)
|
public void Update(Playfield playfield)
|
||||||
|
@ -144,14 +144,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
|
|
||||||
if (countHit >= HitObject.RequiredGoodHits)
|
if (countHit >= HitObject.RequiredGoodHits)
|
||||||
{
|
{
|
||||||
ApplyResult(r =>
|
ApplyResult(r => r.Type = countHit >= HitObject.RequiredGreatHits ? HitResult.Great : HitResult.Ok);
|
||||||
{
|
|
||||||
// With the Classic mod, don't award points for a finished drum roll, only for ticks.
|
|
||||||
if (r.Judgement.MaxResult == HitResult.LargeBonus)
|
|
||||||
r.Type = HitResult.IgnoreMiss;
|
|
||||||
else
|
|
||||||
r.Type = countHit >= HitObject.RequiredGreatHits ? HitResult.Great : HitResult.Ok;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ApplyResult(r => r.Type = r.Judgement.MinResult);
|
ApplyResult(r => r.Type = r.Judgement.MinResult);
|
||||||
|
@ -34,7 +34,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private const double ring_appear_offset = 100;
|
private const double ring_appear_offset = 100;
|
||||||
|
|
||||||
private readonly Container<DrawableSwellTick> ticks;
|
protected readonly Container<DrawableSwellTick> Ticks;
|
||||||
private readonly Container bodyContainer;
|
private readonly Container bodyContainer;
|
||||||
private readonly CircularContainer targetRing;
|
private readonly CircularContainer targetRing;
|
||||||
private readonly CircularContainer expandingRing;
|
private readonly CircularContainer expandingRing;
|
||||||
@ -114,7 +114,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
AddInternal(ticks = new Container<DrawableSwellTick> { RelativeSizeAxes = Axes.Both });
|
AddInternal(Ticks = new Container<DrawableSwellTick> { RelativeSizeAxes = Axes.Both });
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
@ -132,6 +132,20 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
protected void AnimateCompletion(int numHits)
|
||||||
|
{
|
||||||
|
float completion = (float)numHits / HitObject.RequiredHits;
|
||||||
|
|
||||||
|
expandingRing
|
||||||
|
.FadeTo(expandingRing.Alpha + Math.Clamp(completion / 16, 0.1f, 0.6f), 50)
|
||||||
|
.Then()
|
||||||
|
.FadeTo(completion / 8, 2000, Easing.OutQuint);
|
||||||
|
|
||||||
|
MainPiece.Drawable.RotateTo((float)(completion * HitObject.Duration / 8), 4000, Easing.OutQuint);
|
||||||
|
|
||||||
|
expandingRing.ScaleTo(1f + Math.Min(target_ring_scale - 1f, (target_ring_scale - 1f) * completion * 1.3f), 260, Easing.OutQuint);
|
||||||
|
}
|
||||||
|
|
||||||
protected override void OnFree()
|
protected override void OnFree()
|
||||||
{
|
{
|
||||||
base.OnFree();
|
base.OnFree();
|
||||||
@ -148,7 +162,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
switch (hitObject)
|
switch (hitObject)
|
||||||
{
|
{
|
||||||
case DrawableSwellTick tick:
|
case DrawableSwellTick tick:
|
||||||
ticks.Add(tick);
|
Ticks.Add(tick);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -156,7 +170,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
protected override void ClearNestedHitObjects()
|
protected override void ClearNestedHitObjects()
|
||||||
{
|
{
|
||||||
base.ClearNestedHitObjects();
|
base.ClearNestedHitObjects();
|
||||||
ticks.Clear(false);
|
Ticks.Clear(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override DrawableHitObject CreateNestedHitObject(HitObject hitObject)
|
protected override DrawableHitObject CreateNestedHitObject(HitObject hitObject)
|
||||||
@ -176,7 +190,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
{
|
{
|
||||||
DrawableSwellTick nextTick = null;
|
DrawableSwellTick nextTick = null;
|
||||||
|
|
||||||
foreach (var t in ticks)
|
foreach (var t in Ticks)
|
||||||
{
|
{
|
||||||
if (!t.Result.HasResult)
|
if (!t.Result.HasResult)
|
||||||
{
|
{
|
||||||
@ -187,21 +201,12 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
|
|
||||||
nextTick?.TriggerResult(true);
|
nextTick?.TriggerResult(true);
|
||||||
|
|
||||||
int numHits = ticks.Count(r => r.IsHit);
|
int numHits = Ticks.Count(r => r.IsHit);
|
||||||
|
|
||||||
float completion = (float)numHits / HitObject.RequiredHits;
|
AnimateCompletion(numHits);
|
||||||
|
|
||||||
expandingRing
|
|
||||||
.FadeTo(expandingRing.Alpha + Math.Clamp(completion / 16, 0.1f, 0.6f), 50)
|
|
||||||
.Then()
|
|
||||||
.FadeTo(completion / 8, 2000, Easing.OutQuint);
|
|
||||||
|
|
||||||
MainPiece.Drawable.RotateTo((float)(completion * HitObject.Duration / 8), 4000, Easing.OutQuint);
|
|
||||||
|
|
||||||
expandingRing.ScaleTo(1f + Math.Min(target_ring_scale - 1f, (target_ring_scale - 1f) * completion * 1.3f), 260, Easing.OutQuint);
|
|
||||||
|
|
||||||
if (numHits == HitObject.RequiredHits)
|
if (numHits == HitObject.RequiredHits)
|
||||||
ApplyResult(r => r.Type = r.Judgement.MaxResult);
|
ApplyResult(r => r.Type = HitResult.Great);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -210,7 +215,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
|
|
||||||
int numHits = 0;
|
int numHits = 0;
|
||||||
|
|
||||||
foreach (var tick in ticks)
|
foreach (var tick in Ticks)
|
||||||
{
|
{
|
||||||
if (tick.IsHit)
|
if (tick.IsHit)
|
||||||
{
|
{
|
||||||
@ -222,14 +227,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
tick.TriggerResult(false);
|
tick.TriggerResult(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
ApplyResult(r =>
|
ApplyResult(r => r.Type = numHits > HitObject.RequiredHits / 2 ? HitResult.Ok : r.Judgement.MinResult);
|
||||||
{
|
|
||||||
// With the Classic mod, don't award combo or accuracy for a finished swell.
|
|
||||||
if (r.Judgement.MaxResult == HitResult.LargeBonus)
|
|
||||||
r.Type = numHits > HitObject.RequiredHits / 2 ? HitResult.LargeBonus : r.Judgement.MinResult;
|
|
||||||
else
|
|
||||||
r.Type = numHits > HitObject.RequiredHits / 2 ? HitResult.Ok : r.Judgement.MinResult;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,16 +52,11 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public double RequiredGreatHits { get; protected set; }
|
public double RequiredGreatHits { get; protected set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Defines if drum rolls are affected by the Classic mod, making them bonus only.
|
|
||||||
/// </summary>
|
|
||||||
private bool isBonus;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The length (in milliseconds) between ticks of this drumroll.
|
/// The length (in milliseconds) between ticks of this drumroll.
|
||||||
/// <para>Half of this value is the hit window of the ticks.</para>
|
/// <para>Half of this value is the hit window of the ticks.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private double tickSpacing = 100;
|
protected double TickSpacing = 100;
|
||||||
|
|
||||||
private float overallDifficulty = BeatmapDifficulty.DEFAULT_DIFFICULTY;
|
private float overallDifficulty = BeatmapDifficulty.DEFAULT_DIFFICULTY;
|
||||||
|
|
||||||
@ -74,13 +69,13 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
|||||||
double scoringDistance = base_distance * difficulty.SliderMultiplier * DifficultyControlPoint.SliderVelocity;
|
double scoringDistance = base_distance * difficulty.SliderMultiplier * DifficultyControlPoint.SliderVelocity;
|
||||||
Velocity = scoringDistance / timingPoint.BeatLength;
|
Velocity = scoringDistance / timingPoint.BeatLength;
|
||||||
|
|
||||||
tickSpacing = timingPoint.BeatLength / TickRate;
|
TickSpacing = timingPoint.BeatLength / TickRate;
|
||||||
overallDifficulty = difficulty.OverallDifficulty;
|
overallDifficulty = difficulty.OverallDifficulty;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void CreateNestedHitObjects(CancellationToken cancellationToken)
|
protected override void CreateNestedHitObjects(CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
createTicks(cancellationToken);
|
CreateTicks(cancellationToken);
|
||||||
|
|
||||||
RequiredGoodHits = NestedHitObjects.Count * Math.Min(0.15, 0.05 + 0.10 / 6 * overallDifficulty);
|
RequiredGoodHits = NestedHitObjects.Count * Math.Min(0.15, 0.05 + 0.10 / 6 * overallDifficulty);
|
||||||
RequiredGreatHits = NestedHitObjects.Count * Math.Min(0.30, 0.10 + 0.20 / 6 * overallDifficulty);
|
RequiredGreatHits = NestedHitObjects.Count * Math.Min(0.30, 0.10 + 0.20 / 6 * overallDifficulty);
|
||||||
@ -88,21 +83,21 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
|||||||
base.CreateNestedHitObjects(cancellationToken);
|
base.CreateNestedHitObjects(cancellationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createTicks(CancellationToken cancellationToken)
|
protected virtual void CreateTicks(CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
if (tickSpacing == 0)
|
if (TickSpacing == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool first = true;
|
bool first = true;
|
||||||
|
|
||||||
for (double t = StartTime; t < EndTime + tickSpacing / 2; t += tickSpacing)
|
for (double t = StartTime; t < EndTime + TickSpacing / 2; t += TickSpacing)
|
||||||
{
|
{
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
|
|
||||||
AddNested(new DrumRollTick
|
AddNested(new DrumRollTick
|
||||||
{
|
{
|
||||||
FirstTick = first,
|
FirstTick = first,
|
||||||
TickSpacing = tickSpacing,
|
TickSpacing = TickSpacing,
|
||||||
StartTime = t,
|
StartTime = t,
|
||||||
IsStrong = IsStrong
|
IsStrong = IsStrong
|
||||||
});
|
});
|
||||||
@ -111,18 +106,7 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetBonus(bool bonus)
|
public override Judgement CreateJudgement() => new TaikoDrumRollJudgement();
|
||||||
{
|
|
||||||
isBonus = bonus;
|
|
||||||
|
|
||||||
foreach (HitObject hitObject in NestedHitObjects)
|
|
||||||
{
|
|
||||||
if (hitObject is DrumRollTick drumRollTick)
|
|
||||||
drumRollTick.IsBonus = bonus;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Judgement CreateJudgement() => new TaikoDrumRollJudgement { IsBonus = isBonus };
|
|
||||||
|
|
||||||
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
|
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
|
||||||
|
|
||||||
|
@ -27,12 +27,7 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public double HitWindow => TickSpacing / 2;
|
public double HitWindow => TickSpacing / 2;
|
||||||
|
|
||||||
/// <summary>
|
public override Judgement CreateJudgement() => new TaikoDrumRollTickJudgement();
|
||||||
/// Defines if ticks are affected by the Classic mod, making them bonus only.
|
|
||||||
/// </summary>
|
|
||||||
public bool IsBonus = false;
|
|
||||||
|
|
||||||
public override Judgement CreateJudgement() => new TaikoDrumRollTickJudgement { IsBonus = IsBonus };
|
|
||||||
|
|
||||||
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
|
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
|
||||||
|
|
||||||
|
@ -26,16 +26,6 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int RequiredHits = 10;
|
public int RequiredHits = 10;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Defines if swells are affected by the Classic mod, making them bonus only.
|
|
||||||
/// </summary>
|
|
||||||
private bool isBonus;
|
|
||||||
|
|
||||||
public void SetBonus(bool bonus)
|
|
||||||
{
|
|
||||||
isBonus = bonus;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void CreateNestedHitObjects(CancellationToken cancellationToken)
|
protected override void CreateNestedHitObjects(CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
base.CreateNestedHitObjects(cancellationToken);
|
base.CreateNestedHitObjects(cancellationToken);
|
||||||
@ -47,7 +37,7 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Judgement CreateJudgement() => new TaikoSwellJudgement { IsBonus = isBonus };
|
public override Judgement CreateJudgement() => new TaikoSwellJudgement();
|
||||||
|
|
||||||
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
|
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
|
||||||
}
|
}
|
||||||
|
@ -295,15 +295,6 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// Don't draw judgement results for bonus sliderticks with the Classic mod.
|
|
||||||
switch (result.Type)
|
|
||||||
{
|
|
||||||
case HitResult.IgnoreHit:
|
|
||||||
case HitResult.IgnoreMiss:
|
|
||||||
case HitResult.LargeBonus:
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
judgementContainer.Add(judgementPools[result.Type].Get(j =>
|
judgementContainer.Add(judgementPools[result.Type].Get(j =>
|
||||||
{
|
{
|
||||||
j.Apply(result, judgedObject);
|
j.Apply(result, judgedObject);
|
||||||
|
Reference in New Issue
Block a user