[Simulated AI] Test coverage for playing lands.

This commit is contained in:
Myrd
2017-01-08 17:09:38 +00:00
parent 742ef8157b
commit a45e005897

View File

@@ -49,4 +49,24 @@ public class SpellAbilityPickerTest extends SimulationTestCase {
assertEquals(bearCard, sa.getTargetCard()); assertEquals(bearCard, sa.getTargetCard());
assertNull(sa.getTargets().getFirstTargetedPlayer()); assertNull(sa.getTargets().getFirstTargetedPlayer());
} }
public void testSequenceStartingWithPlayingLand() {
Game game = initAndCreateGame();
Player p = game.getPlayers().get(1);
Card mountain = addCardToZone("Mountain", p, ZoneType.Hand);
addCardToZone("Shock", p, ZoneType.Hand);
Player opponent = game.getPlayers().get(0);
addCard("Runeclaw Bear", opponent);
opponent.setLife(20, null);
game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p);
game.getAction().checkStateEffects(true);
SpellAbilityPicker picker = new SpellAbilityPicker(game, p);
SpellAbility sa = picker.chooseSpellAbilityToPlay(null);
assertEquals(game.PLAY_LAND_SURROGATE, sa);
assertEquals(mountain, sa.getHostCard());
}
} }