mirror of https://github.com/ppy/osu
Add gap of two whole spins before achieving bonus score
This commit is contained in:
parent
d614e745b8
commit
3bcddf3cc8
|
@ -312,7 +312,7 @@ private void updateBonusScore()
|
|||
tick.TriggerResult(true);
|
||||
|
||||
if (tick is DrawableSpinnerBonusTick)
|
||||
gainedBonus.Value = score_per_tick * (spins - HitObject.SpinsRequired);
|
||||
gainedBonus.Value = score_per_tick * (spins - HitObject.FirstBonusSpin);
|
||||
}
|
||||
|
||||
currentSpins++;
|
||||
|
|
|
@ -31,11 +31,21 @@ public double EndTime
|
|||
/// </summary>
|
||||
public int SpinsRequired { get; protected set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// The gap between spinner completion and the first bonus-awarding spin.
|
||||
/// </summary>
|
||||
private const int bonus_spins_gap = 2;
|
||||
|
||||
/// <summary>
|
||||
/// Number of spins available to give bonus, beyond <see cref="SpinsRequired"/>.
|
||||
/// </summary>
|
||||
public int MaximumBonusSpins { get; protected set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// The first spin awarding bonus score.
|
||||
/// </summary>
|
||||
public int FirstBonusSpin => SpinsRequired + bonus_spins_gap;
|
||||
|
||||
public override Vector2 StackOffset => Vector2.Zero;
|
||||
|
||||
protected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, IBeatmapDifficultyInfo difficulty)
|
||||
|
@ -48,14 +58,14 @@ protected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, I
|
|||
double minimumRotationsPerSecond = IBeatmapDifficultyInfo.DifficultyRange(difficulty.OverallDifficulty, 1.5, 2.5, 3.75);
|
||||
|
||||
SpinsRequired = (int)(secondsDuration * minimumRotationsPerSecond);
|
||||
MaximumBonusSpins = (int)((maximum_rotations_per_second - minimumRotationsPerSecond) * secondsDuration);
|
||||
MaximumBonusSpins = (int)((maximum_rotations_per_second - minimumRotationsPerSecond) * secondsDuration) - bonus_spins_gap;
|
||||
}
|
||||
|
||||
protected override void CreateNestedHitObjects(CancellationToken cancellationToken)
|
||||
{
|
||||
base.CreateNestedHitObjects(cancellationToken);
|
||||
|
||||
int totalSpins = MaximumBonusSpins + SpinsRequired;
|
||||
int totalSpins = MaximumBonusSpins + SpinsRequired + bonus_spins_gap;
|
||||
|
||||
for (int i = 0; i < totalSpins; i++)
|
||||
{
|
||||
|
@ -63,7 +73,7 @@ protected override void CreateNestedHitObjects(CancellationToken cancellationTok
|
|||
|
||||
double startTime = StartTime + (float)(i + 1) / totalSpins * Duration;
|
||||
|
||||
AddNested(i < SpinsRequired
|
||||
AddNested(i < FirstBonusSpin
|
||||
? new SpinnerTick { StartTime = startTime, SpinnerDuration = Duration }
|
||||
: new SpinnerBonusTick { StartTime = startTime, SpinnerDuration = Duration, Samples = new[] { CreateHitSampleInfo("spinnerbonus") } });
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue