2020-03-02 11:42:48 +08:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
using NUnit.Framework;
|
2020-03-02 12:25:16 +08:00
|
|
|
using osu.Game.Rulesets.Scoring;
|
2020-03-02 11:42:48 +08:00
|
|
|
using osu.Game.Rulesets.Taiko.Mods;
|
|
|
|
using osu.Game.Rulesets.Taiko.Objects;
|
2020-03-02 12:25:16 +08:00
|
|
|
using osu.Game.Rulesets.Taiko.Scoring;
|
2020-03-02 11:42:48 +08:00
|
|
|
using osu.Game.Tests.Visual;
|
|
|
|
|
2020-03-03 14:30:53 +08:00
|
|
|
namespace osu.Game.Rulesets.Taiko.Tests.Mods
|
2020-03-02 11:42:48 +08:00
|
|
|
{
|
2023-12-22 15:43:09 +08:00
|
|
|
public partial class TestSceneTaikoModPerfect : ModFailConditionTestScene
|
2020-03-02 11:42:48 +08:00
|
|
|
{
|
2020-04-23 18:25:06 +08:00
|
|
|
protected override Ruleset CreatePlayerRuleset() => new TestTaikoRuleset();
|
|
|
|
|
2020-03-02 11:42:48 +08:00
|
|
|
public TestSceneTaikoModPerfect()
|
2020-04-17 15:56:01 +08:00
|
|
|
: base(new TaikoModPerfect())
|
2020-03-02 11:42:48 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
[TestCase(false)]
|
|
|
|
[TestCase(true)]
|
2020-03-23 11:08:15 +08:00
|
|
|
public void TestHit(bool shouldMiss) => CreateHitObjectTest(new HitObjectTestData(new Hit { StartTime = 1000, Type = HitType.Centre }), shouldMiss);
|
2020-03-02 11:42:48 +08:00
|
|
|
|
|
|
|
[TestCase(false)]
|
|
|
|
[TestCase(true)]
|
2022-08-05 22:30:07 +08:00
|
|
|
public void TestDrumRoll(bool shouldMiss) => CreateHitObjectTest(new HitObjectTestData(new DrumRoll { StartTime = 1000, EndTime = 3000 }, false), shouldMiss);
|
2020-03-02 11:42:48 +08:00
|
|
|
|
|
|
|
[TestCase(false)]
|
|
|
|
[TestCase(true)]
|
2022-08-05 22:30:07 +08:00
|
|
|
public void TestSwell(bool shouldMiss) => CreateHitObjectTest(new HitObjectTestData(new Swell { StartTime = 1000, EndTime = 3000 }, false), shouldMiss);
|
2020-03-02 12:25:16 +08:00
|
|
|
|
|
|
|
private partial class TestTaikoRuleset : TaikoRuleset
|
|
|
|
{
|
|
|
|
public override HealthProcessor CreateHealthProcessor(double drainStartTime) => new TestTaikoHealthProcessor();
|
|
|
|
|
|
|
|
private partial 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)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-03-02 11:42:48 +08:00
|
|
|
}
|
|
|
|
}
|