1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 18:47:27 +08:00

Make default taiko HP 1 for test scene

This commit is contained in:
smoogipoo 2020-03-02 13:25:16 +09:00
parent bb4193d985
commit e58fb3f528

View File

@ -2,8 +2,10 @@
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using NUnit.Framework; using NUnit.Framework;
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.Taiko.Mods; using osu.Game.Rulesets.Taiko.Mods;
using osu.Game.Rulesets.Taiko.Objects; using osu.Game.Rulesets.Taiko.Objects;
using osu.Game.Rulesets.Taiko.Scoring;
using osu.Game.Tests.Visual; using osu.Game.Tests.Visual;
namespace osu.Game.Rulesets.Taiko.Tests namespace osu.Game.Rulesets.Taiko.Tests
@ -11,7 +13,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
public class TestSceneTaikoModPerfect : ModPerfectTestScene public class TestSceneTaikoModPerfect : ModPerfectTestScene
{ {
public TestSceneTaikoModPerfect() public TestSceneTaikoModPerfect()
: base(new TaikoRuleset(), new TaikoModPerfect()) : base(new TestTaikoRuleset(), new TaikoModPerfect())
{ {
} }
@ -26,5 +28,20 @@ namespace osu.Game.Rulesets.Taiko.Tests
[TestCase(false)] [TestCase(false)]
[TestCase(true)] [TestCase(true)]
public void TestSwell(bool shouldMiss) => CreateHitObjectTest(new HitObjectTestCase(new Swell { StartTime = 1000, EndTime = 3000 }), shouldMiss); public void TestSwell(bool shouldMiss) => CreateHitObjectTest(new HitObjectTestCase(new Swell { StartTime = 1000, EndTime = 3000 }), shouldMiss);
private class TestTaikoRuleset : TaikoRuleset
{
public override HealthProcessor CreateHealthProcessor(double drainStartTime) => new TestTaikoHealthProcessor();
private class TestTaikoHealthProcessor : TaikoHealthProcessor
{
protected override void Reset(bool storeResults)
{
base.Reset(storeResults);
Health.Value = 1; // Don't care about the health condition (only the mod condition)
}
}
}
} }
} }