1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-14 20:33:09 +08:00

Fix encoding repetition, parameter adjustments

This commit is contained in:
vun 2022-06-07 13:30:24 +08:00
parent 29b259ccac
commit fd49a27cf9
4 changed files with 20 additions and 29 deletions

View File

@ -16,16 +16,16 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Evaluators
TaikoDifficultyHitObject taikoCurrent = (TaikoDifficultyHitObject)current;
TaikoDifficultyHitObjectColour colour = taikoCurrent.Colour;
if (colour == null) return 0;
double objectStrain = 1;
double objectStrain = 1.6;
if (colour.Delta)
{
objectStrain /= Math.Pow(colour.DeltaRunLength, 0.25);
objectStrain /= Math.Pow(colour.DeltaRunLength, 0.7);
}
else
{
objectStrain *= sigmoid(colour.DeltaRunLength, 3, 3) * 0.3 + 0.3;
objectStrain *= sigmoid(colour.DeltaRunLength, 4, 4) * 0.5 + 0.5;
}
objectStrain *= -sigmoid(colour.RepetitionInterval, 8, 8);
objectStrain *= -sigmoid(colour.RepetitionInterval, 8, 8) * 0.5 + 0.5;
// Console.WriteLine($"{current.StartTime},{colour.GetHashCode()},{colour.Delta},{colour.DeltaRunLength},{colour.RepetitionInterval},{objectStrain}");
return objectStrain;
}

View File

@ -63,22 +63,6 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing
Rhythm = getClosestRhythm(lastObject, lastLastObject, clockRate);
HitType = currentHit?.Type;
// Need to be done after HitType is set.
if (HitType != null)
{
// Get previous hit object, while skipping one that does not have defined colour (sliders and spinners).
// Without skipping through these, sliders and spinners would have contributed to a colour change for the next note.
TaikoDifficultyHitObject previousHitObject = (TaikoDifficultyHitObject)objects.LastOrDefault();
while (previousHitObject != null && previousHitObject.Colour == null)
{
previousHitObject = (TaikoDifficultyHitObject)previousHitObject.Previous(0);
}
Colour = TaikoDifficultyHitObjectColour.GetInstanceFor(this);
this.NotePosition = noteObjects.Count();
noteObjects.Add(this);
}
if (HitType == Objects.HitType.Centre)
{
MonoPosition = centreHitObjects.Count();
@ -91,6 +75,16 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing
rimHitObjects.Add(this);
monoDifficultyHitObjects = rimHitObjects;
}
// Need to be done after HitType is set.
if (HitType != null)
{
this.NotePosition = noteObjects.Count();
noteObjects.Add(this);
// Need to be done after NotePosition is set.
Colour = TaikoDifficultyHitObjectColour.GetInstanceFor(this);
}
}
/// <summary>

View File

@ -35,7 +35,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing
/// </summary>
public static TaikoDifficultyHitObjectColour GetInstanceFor(TaikoDifficultyHitObject hitObject)
{
TaikoDifficultyHitObject lastObject = (TaikoDifficultyHitObject) hitObject.Previous(0);
TaikoDifficultyHitObject lastObject = hitObject.PreviousNote(0);
TaikoDifficultyHitObjectColour previous = lastObject?.Colour;
bool delta = lastObject == null || hitObject.HitType != lastObject.HitType;
if (previous != null && delta == previous.Delta)
@ -75,15 +75,12 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing
TaikoDifficultyHitObjectColour other = this.previous.previous;
while (other != null && interval < max_repetition_interval)
{
interval += other.DeltaRunLength;
if (other.Delta == this.Delta && other.DeltaRunLength == this.DeltaRunLength)
{
this.RepetitionInterval = Math.Max(interval, max_repetition_interval);
this.RepetitionInterval = Math.Min(interval, max_repetition_interval);
return;
}
else
{
interval += other.DeltaRunLength;
}
other = other.previous;
}

View File

@ -21,8 +21,8 @@ namespace osu.Game.Rulesets.Taiko.Difficulty
public class TaikoDifficultyCalculator : DifficultyCalculator
{
private const double rhythm_skill_multiplier = 0.017;
private const double colour_skill_multiplier = 0.027;
private const double stamina_skill_multiplier = 0.017;
private const double colour_skill_multiplier = 0.026;
private const double stamina_skill_multiplier = 0.018;
public TaikoDifficultyCalculator(IRulesetInfo ruleset, IWorkingBeatmap beatmap)
: base(ruleset, beatmap)
@ -89,7 +89,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty
// }
double combinedRating = locallyCombinedDifficulty(colour, rhythm, stamina);
double separatedRating = norm(1.5, colourRating, rhythmRating, staminaRating);
// double separatedRating = norm(2, colourRating, rhythmRating, staminaRating);
double starRating = 1.9 * combinedRating;
starRating = rescale(starRating);