mirror of
https://github.com/ppy/osu.git
synced 2025-03-05 16:02:56 +08:00
General fixes
This commit is contained in:
parent
0c76c07731
commit
21e62c37d8
@ -19,7 +19,7 @@ namespace osu.Game.Rulesets.Catch.Difficulty
|
|||||||
{
|
{
|
||||||
public class CatchDifficultyCalculator : DifficultyCalculator
|
public class CatchDifficultyCalculator : DifficultyCalculator
|
||||||
{
|
{
|
||||||
private const double star_scaling_factor = 0.15;
|
private const double star_scaling_factor = 0.153;
|
||||||
|
|
||||||
protected override int SectionLength => 750;
|
protected override int SectionLength => 750;
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@ namespace osu.Game.Rulesets.Catch.Difficulty.Preprocessing
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly double StrainTime;
|
public readonly double StrainTime;
|
||||||
public readonly double ClockRate;
|
public readonly double ClockRate;
|
||||||
public readonly double HalfCatcherWidth;
|
|
||||||
|
|
||||||
public CatchDifficultyHitObject(HitObject hitObject, HitObject lastObject, double clockRate, float halfCatcherWidth)
|
public CatchDifficultyHitObject(HitObject hitObject, HitObject lastObject, double clockRate, float halfCatcherWidth)
|
||||||
: base(hitObject, lastObject, clockRate)
|
: base(hitObject, lastObject, clockRate)
|
||||||
@ -39,8 +38,6 @@ namespace osu.Game.Rulesets.Catch.Difficulty.Preprocessing
|
|||||||
// Every strain interval is hard capped at the equivalent of 375 BPM streaming speed as a safety measure
|
// Every strain interval is hard capped at the equivalent of 375 BPM streaming speed as a safety measure
|
||||||
StrainTime = Math.Max(40, DeltaTime);
|
StrainTime = Math.Max(40, DeltaTime);
|
||||||
ClockRate = clockRate;
|
ClockRate = clockRate;
|
||||||
HalfCatcherWidth = halfCatcherWidth;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@ namespace osu.Game.Rulesets.Catch.Difficulty.Skills
|
|||||||
protected override double StrainValueOf(DifficultyHitObject current)
|
protected override double StrainValueOf(DifficultyHitObject current)
|
||||||
{
|
{
|
||||||
var catchCurrent = (CatchDifficultyHitObject)current;
|
var catchCurrent = (CatchDifficultyHitObject)current;
|
||||||
double halfCatcherWidth = catchCurrent.HalfCatcherWidth;
|
|
||||||
|
|
||||||
if (lastPlayerPosition == null)
|
if (lastPlayerPosition == null)
|
||||||
lastPlayerPosition = catchCurrent.LastNormalizedPosition;
|
lastPlayerPosition = catchCurrent.LastNormalizedPosition;
|
||||||
@ -46,17 +45,17 @@ namespace osu.Game.Rulesets.Catch.Difficulty.Skills
|
|||||||
double distanceAddition = (Math.Pow(Math.Abs(distanceMoved), 1.3) / 510);
|
double distanceAddition = (Math.Pow(Math.Abs(distanceMoved), 1.3) / 510);
|
||||||
double sqrtStrain = Math.Sqrt(weightedStrainTime);
|
double sqrtStrain = Math.Sqrt(weightedStrainTime);
|
||||||
|
|
||||||
double bonus = 0;
|
double edgeDashBonus = 0;
|
||||||
|
|
||||||
// Direction changes give an extra point!
|
// Direction changes give an extra point!
|
||||||
if (Math.Abs(distanceMoved) > 0.1)
|
if (Math.Abs(distanceMoved) > 0.1)
|
||||||
{
|
{
|
||||||
if (Math.Abs(lastDistanceMoved) > 0.1 && Math.Sign(distanceMoved) != Math.Sign(lastDistanceMoved))
|
if (Math.Abs(lastDistanceMoved) > 0.1 && Math.Sign(distanceMoved) != Math.Sign(lastDistanceMoved))
|
||||||
{
|
{
|
||||||
double bonusFactor = Math.Min(halfCatcherWidth, Math.Abs(distanceMoved)) / halfCatcherWidth;
|
double bonusFactor = Math.Min(50, Math.Abs(distanceMoved)) / 50;
|
||||||
double antiflowFactor = Math.Max(Math.Min(halfCatcherWidth, Math.Abs(lastDistanceMoved)) / halfCatcherWidth, 0.3);
|
double antiflowFactor = Math.Max(Math.Min(70, Math.Abs(lastDistanceMoved)) / 70, 0.3);
|
||||||
|
|
||||||
distanceAddition += direction_change_bonus / Math.Sqrt(lastStrainTime + 18) * bonusFactor * antiflowFactor * Math.Max(1 - Math.Pow(weightedStrainTime / 1000, 2), 0);
|
distanceAddition += direction_change_bonus / Math.Sqrt(lastStrainTime + 18) * bonusFactor * antiflowFactor * Math.Max(1 - Math.Pow(weightedStrainTime / 1000, 3), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Base bonus for every movement, giving some weight to streams.
|
// Base bonus for every movement, giving some weight to streams.
|
||||||
@ -67,14 +66,14 @@ namespace osu.Game.Rulesets.Catch.Difficulty.Skills
|
|||||||
if (catchCurrent.LastObject.DistanceToHyperDash <= 20.0f / CatchPlayfield.BASE_WIDTH)
|
if (catchCurrent.LastObject.DistanceToHyperDash <= 20.0f / CatchPlayfield.BASE_WIDTH)
|
||||||
{
|
{
|
||||||
if (!catchCurrent.LastObject.HyperDash)
|
if (!catchCurrent.LastObject.HyperDash)
|
||||||
bonus += 5.7;
|
edgeDashBonus += 5.7;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// After a hyperdash we ARE in the correct position. Always!
|
// After a hyperdash we ARE in the correct position. Always!
|
||||||
playerPosition = catchCurrent.NormalizedPosition;
|
playerPosition = catchCurrent.NormalizedPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
distanceAddition *= 1.0 + bonus * ((20 - catchCurrent.LastObject.DistanceToHyperDash * CatchPlayfield.BASE_WIDTH) / 20) * Math.Pow((Math.Min(catchCurrent.StrainTime, 265) / 265), 1.5);
|
distanceAddition *= 1.0 + edgeDashBonus * ((20 - catchCurrent.LastObject.DistanceToHyperDash * CatchPlayfield.BASE_WIDTH) / 20) * Math.Pow((Math.Min(catchCurrent.StrainTime * catchCurrent.ClockRate, 265) / 265), 1.5); // Edge Dashes are easier at lower ms values
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent wide dense stacks of notes which fit on the catcher from greatly increasing SR
|
// Prevent wide dense stacks of notes which fit on the catcher from greatly increasing SR
|
||||||
|
Loading…
Reference in New Issue
Block a user