From c2b91bfd61f383d1947101c94c3d0eea2b144808 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 15 Jan 2016 23:33:36 +0100 Subject: [PATCH] Added surge test. --- .../ContainmentMembrane.java | 5 ++-- .../cards/abilities/keywords/SurgeTest.java | 26 +++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/sets/oathofthegatewatch/ContainmentMembrane.java b/Mage.Sets/src/mage/sets/oathofthegatewatch/ContainmentMembrane.java index 26575a4afaf..d11e1c1ff9d 100644 --- a/Mage.Sets/src/mage/sets/oathofthegatewatch/ContainmentMembrane.java +++ b/Mage.Sets/src/mage/sets/oathofthegatewatch/ContainmentMembrane.java @@ -63,8 +63,9 @@ public class ContainmentMembrane extends CardImpl { // Enchanted creature doesn't untap during its controller's untap step. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepEnchantedEffect())); - // Surge {U} - addAbility(new SurgeAbility(this, "{U}")); } + // Surge {U} (You may cast a spell for its surge cost if you or a teammate have cast another spell in the same turn.) + addAbility(new SurgeAbility(this, "{U}")); + } public ContainmentMembrane(final ContainmentMembrane card) { super(card); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/SurgeTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/SurgeTest.java index 053f5f8492d..171781717c0 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/SurgeTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/SurgeTest.java @@ -110,4 +110,30 @@ public class SurgeTest extends CardTestPlayerBase { assertLife(playerB, 14); } + @Test + public void testContainmentMembrane() { + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1); + addCard(Zone.BATTLEFIELD, playerA, "Island", 1); + // Enchant creature + // Enchanted creature doesn't untap during its controller's untap step. + // Surge {U} (You may cast a spell for its surge cost if you or a teammate have cast another spell in the same turn.) + addCard(Zone.HAND, playerA, "Containment Membrane"); // {2}{U} + addCard(Zone.HAND, playerA, "Lightning Bolt"); + + addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1, true); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", playerB); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Containment Membrane", "Silvercoat Lion"); + + setStopAt(2, PhaseStep.PRECOMBAT_MAIN); + execute(); + + assertLife(playerB, 17); + assertGraveyardCount(playerA, "Lightning Bolt", 1); + assertPermanentCount(playerA, "Containment Membrane", 1); + + assertTapped("Silvercoat Lion", true); + + } + }