// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. namespace osu.Game.Rulesets.Scoring { /// /// A that accumulates health and causes a fail if the final health /// is less than a value required to pass the beatmap. /// public partial class AccumulatingHealthProcessor : HealthProcessor { protected override bool DefaultFailCondition => JudgedHits == MaxHits && Health.Value < requiredHealth; private readonly double requiredHealth; /// /// Creates a new . /// /// The minimum amount of health required to beatmap. public AccumulatingHealthProcessor(double requiredHealth) { this.requiredHealth = requiredHealth; } protected override void Reset(bool storeResults) { base.Reset(storeResults); Health.Value = 0; } } }