|
4 | 4 | using System.Collections.Generic;
|
5 | 5 | using NUnit.Framework;
|
6 | 6 | using osu.Game.Beatmaps.ControlPoints;
|
| 7 | +using osu.Game.Rulesets.Mods; |
7 | 8 | using osu.Game.Rulesets.Replays;
|
8 | 9 | using osu.Game.Rulesets.Scoring;
|
| 10 | +using osu.Game.Rulesets.Taiko.Mods; |
9 | 11 | using osu.Game.Rulesets.Taiko.Objects;
|
| 12 | +using osu.Game.Rulesets.Taiko.Objects.Drawables; |
10 | 13 | using osu.Game.Rulesets.Taiko.Replays;
|
| 14 | +using osu.Game.Rulesets.Taiko.Scoring; |
11 | 15 |
|
12 | 16 | namespace osu.Game.Rulesets.Taiko.Tests.Judgements
|
13 | 17 | {
|
@@ -157,5 +161,58 @@ public void TestHighVelocityHit()
|
157 | 161 | AssertJudgementCount(1);
|
158 | 162 | AssertResult<Hit>(0, HitResult.Ok);
|
159 | 163 | }
|
| 164 | + |
| 165 | + [Test] |
| 166 | + public void TestStrongHitOneKeyWithHidden() |
| 167 | + { |
| 168 | + const double hit_time = 1000; |
| 169 | + |
| 170 | + var beatmap = CreateBeatmap(new Hit |
| 171 | + { |
| 172 | + Type = HitType.Centre, |
| 173 | + StartTime = hit_time, |
| 174 | + IsStrong = true |
| 175 | + }); |
| 176 | + |
| 177 | + var hitWindows = new TaikoHitWindows(); |
| 178 | + hitWindows.SetDifficulty(beatmap.Difficulty.OverallDifficulty); |
| 179 | + |
| 180 | + PerformTest(new List<ReplayFrame> |
| 181 | + { |
| 182 | + new TaikoReplayFrame(0), |
| 183 | + new TaikoReplayFrame(hit_time + hitWindows.WindowFor(HitResult.Ok) - 1, TaikoAction.LeftCentre), |
| 184 | + }, beatmap, new Mod[] { new TaikoModHidden() }); |
| 185 | + |
| 186 | + AssertJudgementCount(2); |
| 187 | + AssertResult<Hit>(0, HitResult.Ok); |
| 188 | + AssertResult<Hit.StrongNestedHit>(0, HitResult.IgnoreMiss); |
| 189 | + } |
| 190 | + |
| 191 | + [Test] |
| 192 | + public void TestStrongHitTwoKeysWithHidden() |
| 193 | + { |
| 194 | + const double hit_time = 1000; |
| 195 | + |
| 196 | + var beatmap = CreateBeatmap(new Hit |
| 197 | + { |
| 198 | + Type = HitType.Centre, |
| 199 | + StartTime = hit_time, |
| 200 | + IsStrong = true |
| 201 | + }); |
| 202 | + |
| 203 | + var hitWindows = new TaikoHitWindows(); |
| 204 | + hitWindows.SetDifficulty(beatmap.Difficulty.OverallDifficulty); |
| 205 | + |
| 206 | + PerformTest(new List<ReplayFrame> |
| 207 | + { |
| 208 | + new TaikoReplayFrame(0), |
| 209 | + new TaikoReplayFrame(hit_time + hitWindows.WindowFor(HitResult.Ok) - 1, TaikoAction.LeftCentre), |
| 210 | + new TaikoReplayFrame(hit_time + hitWindows.WindowFor(HitResult.Ok) + DrawableHit.StrongNestedHit.SECOND_HIT_WINDOW - 2, TaikoAction.LeftCentre, TaikoAction.RightCentre), |
| 211 | + }, beatmap, new Mod[] { new TaikoModHidden() }); |
| 212 | + |
| 213 | + AssertJudgementCount(2); |
| 214 | + AssertResult<Hit>(0, HitResult.Ok); |
| 215 | + AssertResult<Hit.StrongNestedHit>(0, HitResult.LargeBonus); |
| 216 | + } |
160 | 217 | }
|
161 | 218 | }
|
0 commit comments