From f93524a0f75b72828e8d201fa4f3abbafec76136 Mon Sep 17 00:00:00 2001 From: Derek Monturo Date: Mon, 6 Mar 2017 16:32:40 -0500 Subject: [PATCH 1/2] #2135 added test for clever impersonator copying an aura --- .../cards/copy/CleverImpersonatorTest.java | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/copy/CleverImpersonatorTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/copy/CleverImpersonatorTest.java index 93cf580e8b4..51a66cdbe0f 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/copy/CleverImpersonatorTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/copy/CleverImpersonatorTest.java @@ -178,4 +178,41 @@ public class CleverImpersonatorTest extends CardTestPlayerBase { } + /* + * Reported bug: could not use Clever Impersonator to copy Dawn's Reflection + */ + @Test + public void dawnsReflectionCopiedByImpersonator() + { + String impersonator = "Clever Impersonator"; + String dReflection = "Dawn's Reflection"; + + /* + {3}{G} Dawn's Reflection + Enchantment - Aura, Enchant Land + Whenever enchanted land is tapped for mana, its controller adds two mana in any combination of colors to his or her mana pool (in addition to the mana the land produces). + */ + addCard(Zone.HAND, playerA, dReflection); + + /* + {2}{U}{U} Creature - Shapeshifter 0/0 + You may have Clever Impersonator enter the battlefield as a copy of any nonland permanent on the battlefield. + */ + addCard(Zone.HAND, playerA, impersonator); + addCard(Zone.BATTLEFIELD, playerA, "Island", 6); + addCard(Zone.BATTLEFIELD, playerA, "Forest", 6); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, dReflection, "Forest"); // enchant a forest + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, impersonator); + setChoice(playerA, dReflection); // have Impersonator enter as copy of Dawn's Reflection + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertHandCount(playerA, dReflection, 0); + assertHandCount(playerA, impersonator, 0); + assertPermanentCount(playerA, dReflection, 2); + assertPermanentCount(playerA, impersonator, 0); + } + } From e28dd5aef715529576a18ffa3b806eaa2c582110 Mon Sep 17 00:00:00 2001 From: Derek Monturo Date: Mon, 6 Mar 2017 16:34:52 -0500 Subject: [PATCH 2/2] minor added another assert --- .../java/org/mage/test/cards/copy/CleverImpersonatorTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/copy/CleverImpersonatorTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/copy/CleverImpersonatorTest.java index 51a66cdbe0f..836ca912273 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/copy/CleverImpersonatorTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/copy/CleverImpersonatorTest.java @@ -27,6 +27,7 @@ */ package org.mage.test.cards.copy; +import mage.constants.CardType; import mage.constants.PhaseStep; import mage.constants.Zone; import mage.counters.CounterType; @@ -213,6 +214,7 @@ public class CleverImpersonatorTest extends CardTestPlayerBase { assertHandCount(playerA, impersonator, 0); assertPermanentCount(playerA, dReflection, 2); assertPermanentCount(playerA, impersonator, 0); + assertType(dReflection, CardType.ENCHANTMENT, true); } }