From 774e15b89dd94efd1e7fbfd001db55e8aa611adc Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Mon, 3 Apr 2017 15:02:21 +0900 Subject: [PATCH] Set RequiredHits at conversion time to remove HitMultiplier. --- .../Beatmaps/TaikoBeatmapConverter.cs | 5 ++++- osu.Game.Modes.Taiko/Objects/Swell.cs | 19 +------------------ 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs b/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs index 693e9cadf3..ec8f64bd2f 100644 --- a/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs +++ b/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs @@ -10,6 +10,7 @@ using osu.Game.Modes.Taiko.Objects; using System; using System.Collections.Generic; using System.Linq; +using osu.Game.Database; namespace osu.Game.Modes.Taiko.Beatmaps { @@ -84,6 +85,8 @@ namespace osu.Game.Modes.Taiko.Beatmaps } else if (endTimeData != null) { + double hitMultiplier = BeatmapDifficulty.DifficultyRange(beatmap.BeatmapInfo.Difficulty.OverallDifficulty, 3, 5, 7.5) * bash_convert_factor; + // We compute the end time manually to add in the Bash convert factor yield return new Swell { @@ -92,7 +95,7 @@ namespace osu.Game.Modes.Taiko.Beatmaps IsStrong = strong, EndTime = obj.StartTime + endTimeData.Duration, - HitMultiplier = bash_convert_factor + RequiredHits = (int)Math.Max(1, endTimeData.Duration / 1000 * hitMultiplier) }; } else diff --git a/osu.Game.Modes.Taiko/Objects/Swell.cs b/osu.Game.Modes.Taiko/Objects/Swell.cs index 0b654f6ff4..f55416509a 100644 --- a/osu.Game.Modes.Taiko/Objects/Swell.cs +++ b/osu.Game.Modes.Taiko/Objects/Swell.cs @@ -1,9 +1,6 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; -using osu.Game.Beatmaps.Timing; -using osu.Game.Database; using osu.Game.Modes.Objects.Types; namespace osu.Game.Modes.Taiko.Objects @@ -14,23 +11,9 @@ namespace osu.Game.Modes.Taiko.Objects public double Duration => EndTime - StartTime; - /// - /// 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. - /// - public double HitMultiplier { get; set; } = 1; - /// /// The number of hits required to complete the swell successfully. /// - public int RequiredHits { get; protected set; } = 10; - - public override void ApplyDefaults(TimingInfo timing, BeatmapDifficulty difficulty) - { - base.ApplyDefaults(timing, difficulty); - - double baseHitMultiplier = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 3, 5, 7.5); - RequiredHits = (int)Math.Max(1, Duration / 1000f * baseHitMultiplier * HitMultiplier); - } + public int RequiredHits = 10; } } \ No newline at end of file