From 27c0f75302599e2c3c9372c06e4be8cf4f37504a Mon Sep 17 00:00:00 2001 From: Daniel Bomar Date: Thu, 25 Feb 2021 16:39:20 -0600 Subject: [PATCH] Fixed Archfiend's Vessel not moving to exile (fixes #7622) --- .../src/mage/cards/a/ArchfiendsVessel.java | 4 +-- .../single/m21/ArchfiendsVesselTest.java | 29 ++++++++++++++++++- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/ArchfiendsVessel.java b/Mage.Sets/src/mage/cards/a/ArchfiendsVessel.java index e879c473ebf..ba8e149d4ed 100644 --- a/Mage.Sets/src/mage/cards/a/ArchfiendsVessel.java +++ b/Mage.Sets/src/mage/cards/a/ArchfiendsVessel.java @@ -113,7 +113,7 @@ class ArchfiendsVesselEffect extends OneShotEffect { if (archfiendsVessel != null) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - boolean moved = controller.moveCards(archfiendsVessel.getMainCard(), Zone.EXILED, source, game); + boolean moved = controller.moveCards(archfiendsVessel, Zone.EXILED, source, game); if (moved) { Token token = new DemonToken(); token.putOntoBattlefield(1, game, source, controller.getId()); @@ -128,4 +128,4 @@ class ArchfiendsVesselEffect extends OneShotEffect { public ArchfiendsVesselEffect copy() { return new ArchfiendsVesselEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/m21/ArchfiendsVesselTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/m21/ArchfiendsVesselTest.java index cb1f0923b04..d151dfd5f75 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/single/m21/ArchfiendsVesselTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/m21/ArchfiendsVesselTest.java @@ -26,8 +26,9 @@ public class ArchfiendsVesselTest extends CardTestPlayerBase { assertAllCommandsUsed(); assertPermanentCount(playerA, "Demon", 1); + assertPermanentCount(playerA, archfiendsVessel, 0); assertExileCount(playerA, archfiendsVessel, 1); - + assertGraveyardCount(playerA, archfiendsVessel, 0); } @Test @@ -48,7 +49,33 @@ public class ArchfiendsVesselTest extends CardTestPlayerBase { assertAllCommandsUsed(); assertPermanentCount(playerA, "Demon", 1); + assertPermanentCount(playerA, archfiendsVessel, 0); assertExileCount(playerA, archfiendsVessel, 1); + assertGraveyardCount(playerA, archfiendsVessel, 0); + } + @Test + public void diesOnStack() { + // If Archfiend’s Vessel leaves the battlefield while its triggered ability is on the stack, + // you can’t exile it from the zone it’s put into, so you won’t 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); } }