1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 20:07:25 +08:00

Add repeat bonus to Flashlight, move repeat multiplier to AimEvaluator

This commit is contained in:
MBmasher 2022-07-17 16:56:05 +10:00
parent a950deb7db
commit dae698638c
3 changed files with 14 additions and 3 deletions

View File

@ -4,6 +4,7 @@
#nullable disable
using System;
using System.Diagnostics;
using osu.Game.Rulesets.Difficulty.Preprocessing;
using osu.Game.Rulesets.Osu.Difficulty.Preprocessing;
using osu.Game.Rulesets.Osu.Objects;
@ -120,10 +121,15 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
velocityChangeBonus *= Math.Pow(Math.Min(osuCurrObj.StrainTime, osuLastObj.StrainTime) / Math.Max(osuCurrObj.StrainTime, osuLastObj.StrainTime), 2);
}
if (osuLastObj.TravelTime != 0)
if (osuLastObj.BaseObject is Slider)
{
Debug.Assert(osuLastObj.TravelTime > 0);
// Reward sliders based on velocity.
sliderBonus = osuLastObj.TravelDistance / osuLastObj.TravelTime;
Slider osuSlider = (Slider)(osuLastObj.BaseObject);
sliderBonus *= (float)Math.Pow(1 + osuSlider.RepeatCount / 2.5, 1.0 / 2.5); // Bonus for repeat sliders until a better per nested object strain system can be achieved.
}
// Add in acute angle bonus or wide angle bonus + velocity change bonus, whichever is larger.

View File

@ -18,6 +18,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
private const double min_velocity = 0.5;
private const double slider_multiplier = 1.3;
private const double repeat_bonus = 3.0;
/// <summary>
/// Evaluates the difficulty of memorising and hitting an object, based on:
@ -83,6 +84,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
{
Debug.Assert(osuCurrent.TravelTime > 0);
Slider osuSlider = (Slider)(osuCurrent.BaseObject);
// Invert the scaling factor to determine the true travel distance independent of circle size.
double pixelTravelDistance = osuCurrent.TravelDistance / scalingFactor;
@ -91,6 +94,10 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
// Longer sliders require more memorisation.
sliderBonus *= pixelTravelDistance;
// Reward sliders with repeats.
if (osuSlider.RepeatCount > 0)
sliderBonus *= repeat_bonus;
}
result += sliderBonus * slider_multiplier;

View File

@ -252,8 +252,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
if (i == slider.NestedHitObjects.Count - 1)
slider.LazyEndPosition = currCursorPosition;
}
slider.LazyTravelDistance *= (float)Math.Pow(1 + slider.RepeatCount / 2.5, 1.0 / 2.5); // Bonus for repeat sliders until a better per nested object strain system can be achieved.
}
private Vector2 getEndCursorPosition(OsuHitObject hitObject)