mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 06:12:56 +08:00
Fixed taiko swell hp and scoring
This commit is contained in:
parent
35d57f74bf
commit
2ca9864301
@ -9,6 +9,8 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
|||||||
{
|
{
|
||||||
public override bool AffectsCombo => false;
|
public override bool AffectsCombo => false;
|
||||||
|
|
||||||
|
public override bool AffectsHP => false;
|
||||||
|
|
||||||
protected override int NumericResultFor(HitResult result) => 0;
|
protected override int NumericResultFor(HitResult result) => 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
||||||
|
|
||||||
using osu.Game.Rulesets.Scoring;
|
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Taiko.Judgements
|
|
||||||
{
|
|
||||||
public class TaikoIntermediateSwellJudgement : TaikoJudgement
|
|
||||||
{
|
|
||||||
public override HitResult MaxResult => HitResult.Great;
|
|
||||||
|
|
||||||
public override bool AffectsCombo => false;
|
|
||||||
|
|
||||||
/// <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) => 0;
|
|
||||||
}
|
|
||||||
}
|
|
@ -10,6 +10,11 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
|||||||
{
|
{
|
||||||
public override HitResult MaxResult => HitResult.Great;
|
public override HitResult MaxResult => HitResult.Great;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether this <see cref="TaikoJudgement"/> should affect user's hitpoints.
|
||||||
|
/// </summary>
|
||||||
|
public virtual bool AffectsHP => true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Computes the numeric result value for the combo portion of the score.
|
/// Computes the numeric result value for the combo portion of the score.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -5,6 +5,9 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
|||||||
{
|
{
|
||||||
public class TaikoStrongJudgement : TaikoJudgement
|
public class TaikoStrongJudgement : TaikoJudgement
|
||||||
{
|
{
|
||||||
|
// MainObject already changes the HP
|
||||||
|
public override bool AffectsHP => false;
|
||||||
|
|
||||||
public override bool AffectsCombo => false;
|
public override bool AffectsCombo => false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
14
osu.Game.Rulesets.Taiko/Judgements/TaikoSwellJudgement.cs
Normal file
14
osu.Game.Rulesets.Taiko/Judgements/TaikoSwellJudgement.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using osu.Game.Rulesets.Scoring;
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Taiko.Judgements
|
||||||
|
{
|
||||||
|
public class TaikoSwellJudgement : TaikoJudgement
|
||||||
|
{
|
||||||
|
public override bool AffectsCombo => false;
|
||||||
|
|
||||||
|
protected override int NumericResultFor(HitResult result) => 0;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using osu.Game.Rulesets.Scoring;
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Taiko.Judgements
|
||||||
|
{
|
||||||
|
public class TaikoSwellTickJudgement : TaikoJudgement
|
||||||
|
{
|
||||||
|
public override bool AffectsCombo => false;
|
||||||
|
|
||||||
|
public override bool AffectsHP => false;
|
||||||
|
|
||||||
|
protected override int NumericResultFor(HitResult result)
|
||||||
|
{
|
||||||
|
switch (result)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
case HitResult.Great:
|
||||||
|
return 300;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -6,11 +6,11 @@ using osu.Game.Rulesets.Scoring;
|
|||||||
|
|
||||||
namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||||
{
|
{
|
||||||
public class DrawableSwellTick : DrawableTaikoHitObject
|
public class DrawableSwellTick : DrawableTaikoHitObject<SwellTick>
|
||||||
{
|
{
|
||||||
public override bool DisplayResult => false;
|
public override bool DisplayResult => false;
|
||||||
|
|
||||||
public DrawableSwellTick(TaikoHitObject hitObject)
|
public DrawableSwellTick(SwellTick hitObject)
|
||||||
: base(hitObject)
|
: base(hitObject)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -3,11 +3,15 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using osu.Game.Rulesets.Objects.Types;
|
using osu.Game.Rulesets.Objects.Types;
|
||||||
|
using osu.Game.Rulesets.Judgements;
|
||||||
|
using osu.Game.Rulesets.Taiko.Judgements;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Taiko.Objects
|
namespace osu.Game.Rulesets.Taiko.Objects
|
||||||
{
|
{
|
||||||
public class Swell : TaikoHitObject, IHasEndTime
|
public class Swell : TaikoHitObject, IHasEndTime
|
||||||
{
|
{
|
||||||
|
public override Judgement CreateJudgement() => new TaikoSwellJudgement();
|
||||||
|
|
||||||
public double EndTime => StartTime + Duration;
|
public double EndTime => StartTime + Duration;
|
||||||
|
|
||||||
public double Duration { get; set; }
|
public double Duration { get; set; }
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using osu.Game.Rulesets.Judgements;
|
||||||
|
using osu.Game.Rulesets.Taiko.Judgements;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Taiko.Objects
|
namespace osu.Game.Rulesets.Taiko.Objects
|
||||||
{
|
{
|
||||||
public class SwellTick : TaikoHitObject
|
public class SwellTick : TaikoHitObject
|
||||||
{
|
{
|
||||||
|
public override Judgement CreateJudgement() => new TaikoSwellTickJudgement();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -80,26 +80,14 @@ namespace osu.Game.Rulesets.Taiko.Scoring
|
|||||||
{
|
{
|
||||||
base.ApplyResult(result);
|
base.ApplyResult(result);
|
||||||
|
|
||||||
bool isRoll = false;
|
if (!((TaikoJudgement)result.Judgement).AffectsHP)
|
||||||
bool isStrong = false;
|
return;
|
||||||
|
|
||||||
|
bool isSwell = false;
|
||||||
bool isTick = result.Judgement is TaikoDrumRollTickJudgement;
|
bool isTick = result.Judgement is TaikoDrumRollTickJudgement;
|
||||||
|
|
||||||
if(!isTick)
|
if(!isTick)
|
||||||
{
|
isSwell = result.Judgement is TaikoSwellJudgement;
|
||||||
isRoll = result.Judgement is TaikoDrumRollJudgement;
|
|
||||||
if (!isRoll)
|
|
||||||
{
|
|
||||||
isStrong = result.Judgement is TaikoStrongJudgement;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Don't change HP based on drum roll fullness for compatibility
|
|
||||||
if (isRoll)
|
|
||||||
return;
|
|
||||||
|
|
||||||
//If the object is strong, HP change is already handled in MainObject
|
|
||||||
if (isStrong)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Apply HP changes
|
// Apply HP changes
|
||||||
switch (result.Type)
|
switch (result.Type)
|
||||||
@ -110,12 +98,14 @@ namespace osu.Game.Rulesets.Taiko.Scoring
|
|||||||
Health.Value += hpIncreaseMiss;
|
Health.Value += hpIncreaseMiss;
|
||||||
break;
|
break;
|
||||||
case HitResult.Good:
|
case HitResult.Good:
|
||||||
|
// Swells shouldn't increase HP
|
||||||
|
if (!isSwell)
|
||||||
Health.Value += hpIncreaseGood;
|
Health.Value += hpIncreaseGood;
|
||||||
break;
|
break;
|
||||||
case HitResult.Great:
|
case HitResult.Great:
|
||||||
if (isTick)
|
if (isTick)
|
||||||
Health.Value += hpIncreaseTick;
|
Health.Value += hpIncreaseTick;
|
||||||
else
|
else if(!isSwell)
|
||||||
Health.Value += hpIncreaseGreat;
|
Health.Value += hpIncreaseGreat;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user