implemented bounceland test and fix

This commit is contained in:
marthinwurer
2023-01-25 22:28:44 -07:00
committed by Chris H
parent 7c4b6c5f27
commit 47c9d32435
2 changed files with 34 additions and 4 deletions

View File

@@ -282,7 +282,7 @@ public class SpellAbilityPickerSimulationTest extends SimulationTest {
// start with a hand with a basic, a tapland, and a card that can't be cast
addCard("Forest", p);
addCardToZone("Forest", p, ZoneType.Hand);
Card guildgate = addCardToZone("Simic Guildgate", p, ZoneType.Hand);
Card desired = addCardToZone("Simic Guildgate", p, ZoneType.Hand);
addCardToZone("Centaur Courser", p, ZoneType.Hand);
game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p);
game.getAction().checkStateEffects(true);
@@ -290,7 +290,28 @@ public class SpellAbilityPickerSimulationTest extends SimulationTest {
// ensure that the tapland is paid
SpellAbilityPicker picker = new SpellAbilityPicker(game, p);
SpellAbility sa = picker.chooseSpellAbilityToPlay(null);
AssertJUnit.assertEquals(guildgate, sa.getHostCard());
AssertJUnit.assertEquals(desired, sa.getHostCard());
}
@Test
public void playBouncelandIfNoPlays() {
Game game = initAndCreateGame();
Player p = game.getPlayers().get(1);
// start with a hand with a basic, a bounceland, and a card that can't be cast
addCard("Forest", p);
addCardToZone("Forest", p, ZoneType.Hand);
Card desired = addCardToZone("Simic Growth Chamber", p, ZoneType.Hand);
addCardToZone("Centaur Courser", p, ZoneType.Hand);
game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p);
game.getAction().checkStateEffects(true);
System.out.println(new GameStateEvaluator().evalCard(game, null, desired));
// ensure that the tapland is paid
SpellAbilityPicker picker = new SpellAbilityPicker(game, p);
SpellAbility sa = picker.chooseSpellAbilityToPlay(null);
AssertJUnit.assertEquals(desired, sa.getHostCard());
}
@Test