Use SliderTailHit result for slider tails (non-classic-mod)

This commit is contained in:
Dan Balasescu 2023-12-30 10:24:59 +09:00
parent 807443b648
commit 17a531209c
No known key found for this signature in database
6 changed files with 13 additions and 11 deletions

View File

@ -51,7 +51,7 @@ public void TestHitEarlyMoveIntoFollowRegion()
assertHeadJudgement(HitResult.Meh);
assertTickJudgement(HitResult.LargeTickHit);
assertTailJudgement(HitResult.LargeTickHit);
assertTailJudgement(HitResult.SliderTailHit);
assertSliderJudgement(HitResult.IgnoreHit);
}

View File

@ -467,13 +467,13 @@ private void assertAllMaxJudgements()
private void assertHeadMissTailTracked()
{
AddAssert("Tracking retained", () => judgementResults[^2].Type, () => Is.EqualTo(HitResult.LargeTickHit));
AddAssert("Tracking retained", () => judgementResults[^2].Type, () => Is.EqualTo(HitResult.SliderTailHit));
AddAssert("Slider head missed", () => judgementResults.First().IsHit, () => Is.False);
}
private void assertMidSliderJudgements()
{
AddAssert("Tracking acquired", () => judgementResults[^2].Type, () => Is.EqualTo(HitResult.LargeTickHit));
AddAssert("Tracking acquired", () => judgementResults[^2].Type, () => Is.EqualTo(HitResult.SliderTailHit));
}
private void assertMidSliderJudgementFail()

View File

@ -57,7 +57,7 @@ public void TestHitLateInRangeTracks()
});
assertHeadJudgement(HitResult.Ok);
assertTailJudgement(HitResult.LargeTickHit);
assertTailJudgement(HitResult.SliderTailHit);
assertSliderJudgement(HitResult.IgnoreHit);
}
@ -103,7 +103,7 @@ public void TestHitLateInRangeHitsTicks()
assertTickJudgement(1, HitResult.LargeTickHit);
assertTickJudgement(2, HitResult.LargeTickHit);
assertTickJudgement(3, HitResult.LargeTickHit);
assertTailJudgement(HitResult.LargeTickHit);
assertTailJudgement(HitResult.SliderTailHit);
assertSliderJudgement(HitResult.IgnoreHit);
}
@ -182,7 +182,7 @@ public void TestHitLateShortSliderHitsAll()
assertHeadJudgement(HitResult.Meh);
assertAllTickJudgements(HitResult.LargeTickHit);
assertRepeatJudgement(HitResult.LargeTickHit);
assertTailJudgement(HitResult.LargeTickHit);
assertTailJudgement(HitResult.SliderTailHit);
assertSliderJudgement(HitResult.IgnoreHit);
}
@ -210,7 +210,7 @@ public void TestHitLateInRangeHitsRepeat()
assertHeadJudgement(HitResult.Meh);
assertRepeatJudgement(HitResult.LargeTickHit);
assertTailJudgement(HitResult.LargeTickHit);
assertTailJudgement(HitResult.SliderTailHit);
assertSliderJudgement(HitResult.IgnoreHit);
}
@ -245,7 +245,7 @@ public void TestHitLateDoesNotHitTicksIfAnyOutOfRange()
assertAllTickJudgements(HitResult.LargeTickMiss);
// This particular test actually starts tracking the slider just before the end, so the tail should be hit because of its leniency.
assertTailJudgement(HitResult.LargeTickHit);
assertTailJudgement(HitResult.SliderTailHit);
assertSliderJudgement(HitResult.IgnoreHit);
}
@ -276,7 +276,7 @@ public void TestHitLateInRangeDoesNotHitOutOfRangeTick()
assertHeadJudgement(HitResult.Meh);
assertTickJudgement(0, HitResult.LargeTickMiss);
assertTailJudgement(HitResult.LargeTickHit);
assertTailJudgement(HitResult.SliderTailHit);
assertSliderJudgement(HitResult.IgnoreHit);
}
@ -307,7 +307,7 @@ public void TestHitLateInRangeDoesNotHitOutOfRangeTickAndTrackingLimitedToBall()
assertHeadJudgement(HitResult.Meh);
assertTickJudgement(0, HitResult.LargeTickMiss);
assertTickJudgement(1, HitResult.LargeTickMiss);
assertTailJudgement(HitResult.LargeTickHit);
assertTailJudgement(HitResult.SliderTailHit);
assertSliderJudgement(HitResult.IgnoreHit);
}

View File

@ -29,7 +29,7 @@ public class LegacyTailJudgement : OsuJudgement
public class TailJudgement : SliderEndJudgement
{
public override HitResult MaxResult => HitResult.LargeTickHit;
public override HitResult MaxResult => HitResult.SliderTailHit;
public override HitResult MinResult => HitResult.IgnoreMiss;
}
}

View File

@ -91,6 +91,7 @@ private double getHealthIncreaseFor(JudgementResult result)
// When classic slider mechanics are enabled, this result comes from the tail.
return 0.02;
case HitResult.SliderTailHit:
case HitResult.LargeTickHit:
switch (result.HitObject)
{

View File

@ -57,6 +57,7 @@ protected override double GetHealthIncreaseFor(HitObject hitObject, HitResult re
increase = 0.02;
break;
case HitResult.SliderTailHit:
case HitResult.LargeTickHit:
// This result comes from either a slider tick or repeat.
increase = hitObject is SliderTick ? 0.015 : 0.02;