1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:17:26 +08:00

Implement relax checks

This commit is contained in:
apollo-dw 2021-10-03 11:27:17 +01:00
parent df50695021
commit bc1ff019da
2 changed files with 20 additions and 0 deletions

View File

@ -90,6 +90,12 @@ namespace osu.Game.Rulesets.Osu.Difficulty
aimValue *= lengthBonus; aimValue *= lengthBonus;
if (mods.Any(h => h is OsuModRelax))
{
aimValue *= 0.75;
countMiss += countOk + countMeh;
}
// Penalize misses by assessing # of misses relative to the total # of objects. Default a 3% reduction for any # of misses. // Penalize misses by assessing # of misses relative to the total # of objects. Default a 3% reduction for any # of misses.
if (countMiss > 0) if (countMiss > 0)
aimValue *= 0.97 * Math.Pow(1 - Math.Pow((double)countMiss / totalHits, 0.775), countMiss); aimValue *= 0.97 * Math.Pow(1 - Math.Pow((double)countMiss / totalHits, 0.775), countMiss);
@ -126,6 +132,12 @@ namespace osu.Game.Rulesets.Osu.Difficulty
{ {
double speedValue = Math.Pow(5.0 * Math.Max(1.0, Attributes.SpeedStrain / 0.0675) - 4.0, 3.0) / 100000.0; double speedValue = Math.Pow(5.0 * Math.Max(1.0, Attributes.SpeedStrain / 0.0675) - 4.0, 3.0) / 100000.0;
if (mods.Any(h => h is OsuModRelax))
{
speedValue *= 0.75;
countMiss += countOk + countMeh;
}
// Longer maps are worth more. // Longer maps are worth more.
double lengthBonus = 0.95 + 0.4 * Math.Min(1.0, totalHits / 2000.0) + double lengthBonus = 0.95 + 0.4 * Math.Min(1.0, totalHits / 2000.0) +
(totalHits > 2000 ? Math.Log10(totalHits / 2000.0) * 0.5 : 0.0); (totalHits > 2000 ? Math.Log10(totalHits / 2000.0) * 0.5 : 0.0);
@ -160,6 +172,9 @@ namespace osu.Game.Rulesets.Osu.Difficulty
private double computeAccuracyValue() private double computeAccuracyValue()
{ {
if (mods.Any(h => h is OsuModRelax))
return 0.0;
// This percentage only considers HitCircles of any value - in this part of the calculation we focus on hitting the timing hit window. // This percentage only considers HitCircles of any value - in this part of the calculation we focus on hitting the timing hit window.
double betterAccuracyPercentage; double betterAccuracyPercentage;
int amountHitObjectsWithAccuracy = Attributes.HitCircleCount; int amountHitObjectsWithAccuracy = Attributes.HitCircleCount;

View File

@ -7,6 +7,8 @@ using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Osu.Difficulty.Preprocessing; using osu.Game.Rulesets.Osu.Difficulty.Preprocessing;
using osu.Game.Rulesets.Osu.Objects; using osu.Game.Rulesets.Osu.Objects;
using osu.Framework.Utils; using osu.Framework.Utils;
using System.Linq;
using osu.Game.Rulesets.Osu.Mods;
namespace osu.Game.Rulesets.Osu.Difficulty.Skills namespace osu.Game.Rulesets.Osu.Difficulty.Skills
{ {
@ -79,6 +81,9 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
} }
} }
if (Mods.Any(m => m is OsuModRelax))
speedBonus = 0.0;
return (1 + (speedBonus - 1) * 0.75) return (1 + (speedBonus - 1) * 0.75)
* angleBonus * angleBonus
* (0.95 + speedBonus * Math.Pow(distance / single_spacing_threshold, 3.5)) * (0.95 + speedBonus * Math.Pow(distance / single_spacing_threshold, 3.5))