mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 08:33:55 +09:00
Better define minimum health targets
This commit is contained in:
@ -10,7 +10,10 @@ using osu.Game.Rulesets.Objects;
|
|||||||
namespace osu.Game.Rulesets.Scoring
|
namespace osu.Game.Rulesets.Scoring
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A <see cref="HealthProcessor"/> which continuously drains health.
|
/// A <see cref="HealthProcessor"/> which continuously drains health.<br />
|
||||||
|
/// At HP=0, the minimum health reached for a perfect play is 95%.<br />
|
||||||
|
/// At HP=5, the minimum health reached for a perfect play is 70%.<br />
|
||||||
|
/// At HP=10, the minimum health reached for a perfect play is 30%.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DrainingHealthProcessor : HealthProcessor
|
public class DrainingHealthProcessor : HealthProcessor
|
||||||
{
|
{
|
||||||
@ -19,6 +22,21 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private const double minimum_health_error = 0.01;
|
private const double minimum_health_error = 0.01;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The minimum health target at an HP drain rate of 0.
|
||||||
|
/// </summary>
|
||||||
|
private const double min_health_target = 0.95;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The minimum health target at an HP drain rate of 5.
|
||||||
|
/// </summary>
|
||||||
|
private const double mid_health_target = 0.70;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The minimum health target at an HP drain rate of 10.
|
||||||
|
/// </summary>
|
||||||
|
private const double max_health_target = 0.30;
|
||||||
|
|
||||||
private IBeatmap beatmap;
|
private IBeatmap beatmap;
|
||||||
private double gameplayEndTime;
|
private double gameplayEndTime;
|
||||||
|
|
||||||
@ -56,7 +74,7 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
if (beatmap.HitObjects.Count > 0)
|
if (beatmap.HitObjects.Count > 0)
|
||||||
gameplayEndTime = beatmap.HitObjects[^1].GetEndTime();
|
gameplayEndTime = beatmap.HitObjects[^1].GetEndTime();
|
||||||
|
|
||||||
targetMinimumHealth = BeatmapDifficulty.DifficultyRange(beatmap.BeatmapInfo.BaseDifficulty.DrainRate, 0.95, 0.70, 0.30);
|
targetMinimumHealth = BeatmapDifficulty.DifficultyRange(beatmap.BeatmapInfo.BaseDifficulty.DrainRate, min_health_target, mid_health_target, max_health_target);
|
||||||
|
|
||||||
base.ApplyBeatmap(beatmap);
|
base.ApplyBeatmap(beatmap);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user