mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 14:32:55 +08:00
Adjust edge bonuses to consider clock rate
This commit is contained in:
parent
839dd7343f
commit
be5ffdbf22
@ -24,6 +24,7 @@ namespace osu.Game.Rulesets.Catch.Difficulty.Preprocessing
|
||||
/// Milliseconds elapsed since the start time of the previous <see cref="CatchDifficultyHitObject"/>, with a minimum of 40ms.
|
||||
/// </summary>
|
||||
public readonly double StrainTime;
|
||||
public readonly double ClockRate;
|
||||
|
||||
public CatchDifficultyHitObject(HitObject hitObject, HitObject lastObject, double clockRate, float halfCatcherWidth)
|
||||
: base(hitObject, lastObject, clockRate)
|
||||
@ -36,6 +37,7 @@ 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
|
||||
StrainTime = Math.Max(40, DeltaTime);
|
||||
ClockRate = clockRate;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ namespace osu.Game.Rulesets.Catch.Difficulty.Skills
|
||||
private const double direction_change_bonus = 9.8;
|
||||
private const double antiflow_bonus = 26.0;
|
||||
|
||||
protected override double SkillMultiplier => 860;
|
||||
protected override double SkillMultiplier => 850;
|
||||
protected override double StrainDecayBase => 0.2;
|
||||
|
||||
protected override double DecayWeight => 0.94;
|
||||
@ -25,7 +25,6 @@ namespace osu.Game.Rulesets.Catch.Difficulty.Skills
|
||||
private float? lastPlayerPosition;
|
||||
private float lastDistanceMoved;
|
||||
private double lastStrainTime;
|
||||
private bool lastHyperdash;
|
||||
|
||||
protected override double StrainValueOf(DifficultyHitObject current)
|
||||
{
|
||||
@ -62,35 +61,32 @@ namespace osu.Game.Rulesets.Catch.Difficulty.Skills
|
||||
// Direction changes after jumps (antiflow) are harder
|
||||
double antiflowBonusFactor = Math.Min(Math.Abs(distanceMoved) / 70, 1);
|
||||
|
||||
distanceAddition += (antiflow_bonus / (catchCurrent.StrainTime / 17.5 + 10)) * (Math.Sqrt(Math.Abs(lastDistanceMoved)) / Math.Sqrt(lastStrainTime + 25)) * antiflowBonusFactor;
|
||||
|
||||
// Reduce strain slightly for Hyperdash chains
|
||||
if (catchCurrent.LastObject.HyperDash && lastHyperdash)
|
||||
distanceAddition *= 0.95;
|
||||
distanceAddition += (antiflow_bonus / (catchCurrent.StrainTime / 17.5 + 10)) * (Math.Sqrt(Math.Abs(lastDistanceMoved)) / Math.Sqrt(lastStrainTime + 20)) * antiflowBonusFactor;
|
||||
|
||||
// Bonus for edge dashes on direction change
|
||||
if (catchCurrent.LastObject.DistanceToHyperDash <= 14.0f / CatchPlayfield.BASE_WIDTH && !catchCurrent.LastObject.HyperDash)
|
||||
bonus += 3.0;
|
||||
bonus += 1.0;
|
||||
}
|
||||
|
||||
// Base bonus for every movement, giving some weight to streams.
|
||||
distanceAddition += 10.0 * Math.Min(Math.Abs(distanceMoved), normalized_hitobject_radius * 2) / (normalized_hitobject_radius * 6) / sqrtStrain;
|
||||
}
|
||||
|
||||
// Big bonus for edge dashes
|
||||
// Bonus for edge dashes regardless of direction change
|
||||
if (catchCurrent.LastObject.DistanceToHyperDash <= 14.0f / CatchPlayfield.BASE_WIDTH)
|
||||
{
|
||||
if (!catchCurrent.LastObject.HyperDash)
|
||||
bonus += 4.5;
|
||||
bonus += 0.9;
|
||||
else
|
||||
{
|
||||
// After a hyperdash we ARE in the correct position. Always!
|
||||
playerPosition = catchCurrent.NormalizedPosition;
|
||||
}
|
||||
|
||||
distanceAddition *= 1.0 + bonus * (14.0f - catchCurrent.LastObject.DistanceToHyperDash * CatchPlayfield.BASE_WIDTH) / 14.0f * (Math.Min(catchCurrent.StrainTime, 250) / 250); // Edge dashes are easier at lower ms values
|
||||
distanceAddition *= 1.0 + bonus * Math.Pow(14.0f - catchCurrent.LastObject.DistanceToHyperDash * CatchPlayfield.BASE_WIDTH, 1.6f) / 14.0f * (Math.Min(catchCurrent.StrainTime * catchCurrent.ClockRate, 250) / 250); // 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
|
||||
if (Math.Abs(distanceMoved) > 0.1)
|
||||
{
|
||||
if (Math.Abs(lastDistanceMoved) > 0.1 && Math.Sign(distanceMoved) != Math.Sign(lastDistanceMoved))
|
||||
@ -108,7 +104,6 @@ namespace osu.Game.Rulesets.Catch.Difficulty.Skills
|
||||
lastPlayerPosition = playerPosition;
|
||||
lastDistanceMoved = distanceMoved;
|
||||
lastStrainTime = catchCurrent.StrainTime;
|
||||
lastHyperdash = catchCurrent.LastObject.HyperDash;
|
||||
|
||||
return distanceAddition / weightedStrainTime;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user