mirror of
https://github.com/ppy/osu
synced 2024-12-11 17:42:28 +00:00
5cb6963940
The underlying spin counting doesn't match stabnle, so they have been near impossible to complete until now.
33 lines
1.2 KiB
C#
33 lines
1.2 KiB
C#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
using osu.Game.Rulesets.Objects.Types;
|
|
using osu.Game.Database;
|
|
using osu.Game.Beatmaps.ControlPoints;
|
|
|
|
namespace osu.Game.Rulesets.Osu.Objects
|
|
{
|
|
public class Spinner : OsuHitObject, IHasEndTime
|
|
{
|
|
public double EndTime { get; set; }
|
|
public double Duration => EndTime - StartTime;
|
|
|
|
/// <summary>
|
|
/// Number of spins required to finish the spinner without miss.
|
|
/// </summary>
|
|
public int SpinsRequired { get; protected set; } = 1;
|
|
|
|
public override bool NewCombo => true;
|
|
|
|
public override void ApplyDefaults(ControlPointInfo controlPointInfo, BeatmapDifficulty difficulty)
|
|
{
|
|
base.ApplyDefaults(controlPointInfo, difficulty);
|
|
|
|
SpinsRequired = (int)(Duration / 1000 * BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 3, 5, 7.5));
|
|
|
|
// spinning doesn't match 1:1 with stable, so let's fudge them easier for the time being.
|
|
SpinsRequired = (int)(SpinsRequired * 0.6);
|
|
}
|
|
}
|
|
}
|