Fixed Archfiend's Vessel not moving to exile (fixes #7622)

This commit is contained in:
Daniel Bomar 2021-02-25 16:39:20 -06:00
parent 1f6332d658
commit 27c0f75302
No known key found for this signature in database
GPG key ID: C86C8658F4023918
2 changed files with 30 additions and 3 deletions

View file

@ -113,7 +113,7 @@ class ArchfiendsVesselEffect extends OneShotEffect {
if (archfiendsVessel != null) { if (archfiendsVessel != null) {
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
if (controller != null) { if (controller != null) {
boolean moved = controller.moveCards(archfiendsVessel.getMainCard(), Zone.EXILED, source, game); boolean moved = controller.moveCards(archfiendsVessel, Zone.EXILED, source, game);
if (moved) { if (moved) {
Token token = new DemonToken(); Token token = new DemonToken();
token.putOntoBattlefield(1, game, source, controller.getId()); token.putOntoBattlefield(1, game, source, controller.getId());

View file

@ -26,8 +26,9 @@ public class ArchfiendsVesselTest extends CardTestPlayerBase {
assertAllCommandsUsed(); assertAllCommandsUsed();
assertPermanentCount(playerA, "Demon", 1); assertPermanentCount(playerA, "Demon", 1);
assertPermanentCount(playerA, archfiendsVessel, 0);
assertExileCount(playerA, archfiendsVessel, 1); assertExileCount(playerA, archfiendsVessel, 1);
assertGraveyardCount(playerA, archfiendsVessel, 0);
} }
@Test @Test
@ -48,7 +49,33 @@ public class ArchfiendsVesselTest extends CardTestPlayerBase {
assertAllCommandsUsed(); assertAllCommandsUsed();
assertPermanentCount(playerA, "Demon", 1); assertPermanentCount(playerA, "Demon", 1);
assertPermanentCount(playerA, archfiendsVessel, 0);
assertExileCount(playerA, archfiendsVessel, 1); assertExileCount(playerA, archfiendsVessel, 1);
assertGraveyardCount(playerA, archfiendsVessel, 0);
}
@Test
public void diesOnStack() {
// If Archfiends Vessel leaves the battlefield while its triggered ability is on the stack,
// you cant exile it from the zone its put into, so you wont create a Demon.
addCard(Zone.GRAVEYARD, playerA, archfiendsVessel);
addCard(Zone.HAND, playerA, "Exhume");
addCard(Zone.HAND, playerA, "Fatal Push");
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 3);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Exhume");
addTarget(playerA, archfiendsVessel);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Fatal Push");
addTarget(playerA, archfiendsVessel);
setStrictChooseMode(true);
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
execute();
assertAllCommandsUsed();
assertPermanentCount(playerA, "Demon", 0);
assertPermanentCount(playerA, archfiendsVessel, 0);
assertExileCount(playerA, archfiendsVessel, 0);
assertGraveyardCount(playerA, archfiendsVessel, 1);
} }
} }