tests: allow cards to be added to exile during a card test (#11739)

This commit is contained in:
Matthew Wilson 2024-01-31 08:50:04 +02:00 committed by GitHub
parent 9aae17d3f0
commit 0db2599fa5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 33 additions and 3 deletions

View file

@ -268,7 +268,9 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement
TestPlayer testPlayer = (TestPlayer) player;
currentGame.cheat(testPlayer.getId(), getCommands(testPlayer));
currentGame.cheat(testPlayer.getId(), getLibraryCards(testPlayer), getHandCards(testPlayer),
getBattlefieldCards(testPlayer), getGraveCards(testPlayer), getCommandCards(testPlayer));
getBattlefieldCards(testPlayer), getGraveCards(testPlayer), getCommandCards(testPlayer),
getExiledCards(testPlayer));
}
}

View file

@ -92,4 +92,26 @@ public class AddCardApiTest extends CardTestPlayerBase {
public void test_CardNameWithSetCode_RaiseErrorOnUnknownSet() {
addCard(Zone.BATTLEFIELD, playerA, "SS4-Plains", 1);
}
// Add card to exile added for #11738
@Test
public void test_AddCardExiled() {
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 4);
addCard(Zone.HAND, playerA, "Mind Raker");
addCard(Zone.EXILED, playerB, "Llanowar Elves");
checkExileCount("llanowar elves in exile", 1, PhaseStep.PRECOMBAT_MAIN, playerB, "Llanowar Elves", 1);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Mind Raker");
setChoice(playerA, true);
addTarget(playerA, "Llanowar Elves");
setStrictChooseMode(true);
setStopAt(1, PhaseStep.END_TURN);
execute();
assertExileCount(playerB, "Llanowar Elves", 0);
assertGraveyardCount(playerB, "Llanowar Elves", 1);
}
}