1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 23:53:21 +08:00

Changing duration is wrong, add HitMultiplier.

I don't know if this is the best way to handle this/if there's a better way, but this seems pretty sane?
This could be expanded on in the future to make swells harder/require more hits with a smaller duration.
This commit is contained in:
smoogipooo 2017-04-03 10:28:03 +09:00
parent 1a66755694
commit b027d0d3b4
2 changed files with 9 additions and 2 deletions

View File

@ -70,7 +70,8 @@ namespace osu.Game.Modes.Taiko.Beatmaps
Sample = original.Sample,
IsStrong = strong,
EndTime = original.StartTime + endTimeData.Duration * bash_convert_factor
EndTime = original.StartTime + endTimeData.Duration,
HitMultiplier = bash_convert_factor
};
}

View File

@ -14,6 +14,12 @@ namespace osu.Game.Modes.Taiko.Objects
public double Duration => EndTime - StartTime;
/// <summary>
/// The multiplier for cases in which the number of required hits by a Swell is not
/// dependent on solely the overall difficulty and the duration of the swell.
/// </summary>
public double HitMultiplier { get; set; } = 1;
/// <summary>
/// The number of hits required to complete the swell successfully.
/// </summary>
@ -24,7 +30,7 @@ namespace osu.Game.Modes.Taiko.Objects
base.ApplyDefaults(timing, difficulty);
double spinnerRotationRatio = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 3, 5, 7.5);
RequiredHits = (int)Math.Max(1, Duration / 1000f * spinnerRotationRatio);
RequiredHits = (int)Math.Max(1, Duration / 1000f * spinnerRotationRatio * HitMultiplier);
}
}
}