mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
[Simulated AI] Test coverage for playing lands.
This commit is contained in:
@@ -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());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user