diff --git a/Mage.Sets/src/mage/cards/c/ChainerNightmareAdept.java b/Mage.Sets/src/mage/cards/c/ChainerNightmareAdept.java index 679d07c548..9816668ce3 100644 --- a/Mage.Sets/src/mage/cards/c/ChainerNightmareAdept.java +++ b/Mage.Sets/src/mage/cards/c/ChainerNightmareAdept.java @@ -189,6 +189,6 @@ class ChainerNightmareAdeptTriggeredAbility extends EntersBattlefieldAllTriggere } CastFromHandWatcher watcher = game.getState().getWatcher(CastFromHandWatcher.class); - return watcher != null && !watcher.spellWasCastFromHand(event.getSourceId()); + return watcher != null && !watcher.spellWasCastFromHand(event.getTargetId()); } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/c19/ChainerNightmareAdeptTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/c19/ChainerNightmareAdeptTest.java index 8f0d2f762a..95f0b712f2 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/single/c19/ChainerNightmareAdeptTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/c19/ChainerNightmareAdeptTest.java @@ -13,6 +13,8 @@ public class ChainerNightmareAdeptTest extends CardTestPlayerBase { private static final String maaka = "Feral Maaka"; private static final String khenra = "Defiant Khenra"; private static final String rings = "Rings of Brighthearth"; + private static final String swamp = "Swamp"; + private static final String reanimate = "Reanimate"; @Test public void testChainer() { @@ -69,4 +71,26 @@ public class ChainerNightmareAdeptTest extends CardTestPlayerBase { assertLife(playerB, 20 - 2 - 2); } + + @Test + public void testChainerOpponent() { + addCard(Zone.BATTLEFIELD, playerA, chainer); + addCard(Zone.BATTLEFIELD, playerA, swamp); + addCard(Zone.HAND, playerA, reanimate); + addCard(Zone.GRAVEYARD, playerB, maaka); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, reanimate, maaka); + + attack(1, playerA, maaka); + + setStopAt(1, PhaseStep.END_TURN); + + execute(); + + assertPermanentCount(playerA, maaka, 1); + assertGraveyardCount(playerB, maaka, 0); + assertAbility(playerA, maaka, HasteAbility.getInstance(), true); + assertLife(playerA, 20 - 2); + assertLife(playerB, 20 - 2); + } }