diff --git a/Mage.Tests/src/test/java/org/mage/test/sba/PlaneswalkerRuleTest.java b/Mage.Tests/src/test/java/org/mage/test/sba/PlaneswalkerRuleTest.java index 44287943f60..86632760027 100644 --- a/Mage.Tests/src/test/java/org/mage/test/sba/PlaneswalkerRuleTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/sba/PlaneswalkerRuleTest.java @@ -11,10 +11,10 @@ import org.mage.test.serverside.base.CardTestPlayerBase; public class PlaneswalkerRuleTest extends CardTestPlayerBase { /** - * Check two copies of the same planeswalker will be destroyed + * Check two copies of the same planeswalker played from different players won't be destroyed */ @Test - public void testDestroySamePlaneswalkers() { + public void testDontDestroySamePlaneswalkers() { addCard(Zone.HAND, playerA, "Jace, Memory Adept"); addCard(Zone.BATTLEFIELD, playerA, "Island", 5); @@ -25,15 +25,15 @@ public class PlaneswalkerRuleTest extends CardTestPlayerBase { setStopAt(1, PhaseStep.END_COMBAT); execute(); - assertPermanentCount(playerA, "Jace, Memory Adept", 0); - assertPermanentCount(playerB, "Jace, Memory Adept", 0); + assertPermanentCount(playerA, "Jace, Memory Adept", 1); + assertPermanentCount(playerB, "Jace, Memory Adept", 1); } /** - * Check two different planeswalkers but with the same subtype will be destroyed + * Check two different planeswalkers but with the same subtype played by two different players won't be destroyed */ @Test - public void testDestroySameSubtype() { + public void testDontDestroySameSubtype() { addCard(Zone.HAND, playerA, "Jace Beleren"); addCard(Zone.BATTLEFIELD, playerA, "Island", 3); @@ -44,9 +44,25 @@ public class PlaneswalkerRuleTest extends CardTestPlayerBase { setStopAt(1, PhaseStep.END_COMBAT); execute(); - assertPermanentCount(playerA, "Jace Beleren", 0); - assertPermanentCount(playerB, "Jace, Memory Adept", 0); + assertPermanentCount(playerA, "Jace Beleren", 1); + assertPermanentCount(playerB, "Jace, Memory Adept", 1); } + /** + * Check two copies of the same planeswalker played from the same player that one must be sacrificed + */ + @Test + public void testDestroySamePlaneswalkers() { + addCard(Zone.HAND, playerA, "Jace, Memory Adept"); + addCard(Zone.BATTLEFIELD, playerA, "Island", 5); + addCard(Zone.BATTLEFIELD, playerA, "Jace, Memory Adept"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Jace, Memory Adept"); + + setStopAt(1, PhaseStep.END_COMBAT); + execute(); + + assertPermanentCount(playerA, "Jace, Memory Adept", 1); + } }