mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 07:43:00 +08:00
Move HealthIncreaseFor to Judgement
This commit is contained in:
parent
881a00f4a8
commit
1b6658f4ee
@ -21,7 +21,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
||||
}
|
||||
}
|
||||
|
||||
protected override float HealthIncreaseFor(HitResult result)
|
||||
protected override double HealthIncreaseFor(HitResult result)
|
||||
{
|
||||
switch (result)
|
||||
{
|
||||
|
@ -18,7 +18,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
||||
}
|
||||
}
|
||||
|
||||
protected override float HealthIncreaseFor(HitResult result)
|
||||
protected override double HealthIncreaseFor(HitResult result)
|
||||
{
|
||||
switch (result)
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
||||
/// </summary>
|
||||
/// <param name="result">The <see cref="HitResult"/> to find the numeric health increase for.</param>
|
||||
/// <returns>The numeric health increase of <paramref name="result"/>.</returns>
|
||||
protected virtual float HealthIncreaseFor(HitResult result)
|
||||
protected override double HealthIncreaseFor(HitResult result)
|
||||
{
|
||||
switch (result)
|
||||
{
|
||||
@ -38,13 +38,6 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the numeric health increase of a <see cref="JudgementResult"/>.
|
||||
/// </summary>
|
||||
/// <param name="result">The <see cref="JudgementResult"/> to find the numeric health increase for.</param>
|
||||
/// <returns>The numeric health increase of <paramref name="result"/>.</returns>
|
||||
public float HealthIncreaseFor(JudgementResult result) => HealthIncreaseFor(result.Type);
|
||||
|
||||
/// <summary>
|
||||
/// Whether fruit on the platter should explode or drop.
|
||||
/// Note that this is only checked if the owning object is also <see cref="IHasComboInformation.LastInCombo" />
|
||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
||||
}
|
||||
}
|
||||
|
||||
protected override float HealthIncreaseFor(HitResult result)
|
||||
protected override double HealthIncreaseFor(HitResult result)
|
||||
{
|
||||
switch (result)
|
||||
{
|
||||
|
@ -9,8 +9,16 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
||||
{
|
||||
public override bool AffectsCombo => false;
|
||||
|
||||
protected override int NumericResultFor(HitResult result) => 0;
|
||||
|
||||
protected override double HealthIncreaseFor(HitResult result) => 0;
|
||||
protected override double HealthIncreaseFor(HitResult result)
|
||||
{
|
||||
//Drum rolls can be ignored with no health penalty
|
||||
switch (result)
|
||||
{
|
||||
case HitResult.Miss:
|
||||
return 0;
|
||||
default:
|
||||
return base.HealthIncreaseFor(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
||||
switch(result)
|
||||
{
|
||||
case HitResult.Great:
|
||||
return 0.0000003;
|
||||
return 0.15;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
@ -10,11 +10,6 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
||||
{
|
||||
public override HitResult MaxResult => HitResult.Great;
|
||||
|
||||
/// <summary>
|
||||
/// Computes the numeric result value for the combo portion of the score.
|
||||
/// </summary>
|
||||
/// <param name="result">The result to compute the value for.</param>
|
||||
/// <returns>The numeric result value.</returns>
|
||||
protected override int NumericResultFor(HitResult result)
|
||||
{
|
||||
switch (result)
|
||||
@ -28,12 +23,7 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the numeric health increase of a <see cref="HitResult"/>.
|
||||
/// </summary>
|
||||
/// <param name="result">The <see cref="HitResult"/> to find the numeric health increase for.</param>
|
||||
/// <returns>The numeric health increase of <paramref name="result"/>.</returns>
|
||||
protected virtual double HealthIncreaseFor(HitResult result)
|
||||
protected override double HealthIncreaseFor(HitResult result)
|
||||
{
|
||||
switch (result)
|
||||
{
|
||||
@ -47,12 +37,5 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the numeric health increase of a <see cref="JudgementResult"/>.
|
||||
/// </summary>
|
||||
/// <param name="result">The <see cref="JudgementResult"/> to find the numeric health increase for.</param>
|
||||
/// <returns>The numeric health increase of <paramref name="result"/>.</returns>
|
||||
public double HealthIncreaseFor(JudgementResult result) => HealthIncreaseFor(result.Type);
|
||||
}
|
||||
}
|
||||
|
@ -12,8 +12,6 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
||||
{
|
||||
public class DrumRoll : TaikoHitObject, IHasEndTime
|
||||
{
|
||||
public override Judgement CreateJudgement() => new TaikoDrumRollJudgement();
|
||||
|
||||
/// <summary>
|
||||
/// Drum roll distance that results in a duration of 1 speed-adjusted beat length.
|
||||
/// </summary>
|
||||
@ -85,5 +83,7 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
||||
first = false;
|
||||
}
|
||||
}
|
||||
|
||||
public override Judgement CreateJudgement() => new TaikoDrumRollJudgement();
|
||||
}
|
||||
}
|
||||
|
@ -10,8 +10,6 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
||||
{
|
||||
public class Swell : TaikoHitObject, IHasEndTime
|
||||
{
|
||||
public override Judgement CreateJudgement() => new TaikoSwellJudgement();
|
||||
|
||||
public double EndTime => StartTime + Duration;
|
||||
|
||||
public double Duration { get; set; }
|
||||
@ -30,5 +28,7 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
||||
for (int i = 0; i < RequiredHits; i++)
|
||||
AddNested(new SwellTick());
|
||||
}
|
||||
|
||||
public override Judgement CreateJudgement() => new TaikoSwellJudgement();
|
||||
}
|
||||
}
|
||||
|
@ -44,5 +44,19 @@ namespace osu.Game.Rulesets.Judgements
|
||||
/// <param name="result">The <see cref="JudgementResult"/> to find the numeric score representation for.</param>
|
||||
/// <returns>The numeric score representation of <paramref name="result"/>.</returns>
|
||||
public int NumericResultFor(JudgementResult result) => NumericResultFor(result.Type);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the numeric health increase of a <see cref="HitResult"/>.
|
||||
/// </summary>
|
||||
/// <param name="result">The <see cref="HitResult"/> to find the numeric health increase for.</param>
|
||||
/// <returns>The numeric health increase of <paramref name="result"/>.</returns>
|
||||
protected virtual double HealthIncreaseFor(HitResult result) => 0;
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the numeric health increase of a <see cref="JudgementResult"/>.
|
||||
/// </summary>
|
||||
/// <param name="result">The <see cref="JudgementResult"/> to find the numeric health increase for.</param>
|
||||
/// <returns>The numeric health increase of <paramref name="result"/>.</returns>
|
||||
public double HealthIncreaseFor(JudgementResult result) => HealthIncreaseFor(result.Type);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user