diff --git a/Mage.Sets/src/mage/sets/mirrodinbesieged/ConsecratedSphinx.java b/Mage.Sets/src/mage/sets/mirrodinbesieged/ConsecratedSphinx.java index 738f32b57bf..6dc9c35fac7 100644 --- a/Mage.Sets/src/mage/sets/mirrodinbesieged/ConsecratedSphinx.java +++ b/Mage.Sets/src/mage/sets/mirrodinbesieged/ConsecratedSphinx.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.mirrodinbesieged; import java.util.UUID; @@ -47,18 +46,22 @@ import mage.game.events.GameEvent.EventType; */ public class ConsecratedSphinx extends CardImpl { - public ConsecratedSphinx (UUID ownerId) { + public ConsecratedSphinx(UUID ownerId) { super(ownerId, 21, "Consecrated Sphinx", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{4}{U}{U}"); this.expansionSetCode = "MBS"; this.subtype.add("Sphinx"); this.power = new MageInt(4); this.toughness = new MageInt(6); + + // Flying this.addAbility(FlyingAbility.getInstance()); + + // Whenever an opponent draws a card, you may draw two cards. this.addAbility(new ConsecratedSphinxTriggeredAbility()); } - public ConsecratedSphinx (final ConsecratedSphinx card) { + public ConsecratedSphinx(final ConsecratedSphinx card) { super(card); } @@ -70,6 +73,7 @@ public class ConsecratedSphinx extends CardImpl { } class ConsecratedSphinxTriggeredAbility extends TriggeredAbilityImpl { + ConsecratedSphinxTriggeredAbility() { super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(2), true); } @@ -95,6 +99,6 @@ class ConsecratedSphinxTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever an opponent draws a card, you may draw two cards"; + return "Whenever an opponent draws a card, you may draw two cards."; } -} \ No newline at end of file +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/DrawTriggeredTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/DrawTriggeredTest.java index 38bed27ca82..ce6196e7492 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/DrawTriggeredTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/DrawTriggeredTest.java @@ -68,4 +68,26 @@ public class DrawTriggeredTest extends CardTestPlayerBase { } + /** + * Consecrated Sphinx does not trigger when "Edric, Spymaster of Trest" lets + * my opponent draw cards. + */ + @Test + public void EdricSpymasterOfTrestTest() { + // Flying + // Whenever an opponent draws a card, you may draw two cards. + addCard(Zone.BATTLEFIELD, playerA, "Consecrated Sphinx", 1); + + // Whenever a creature deals combat damage to one of your opponents, its controller may draw a card. + addCard(Zone.BATTLEFIELD, playerB, "Edric, Spymaster of Trest", 1); + + attack(2, playerB, "Edric, Spymaster of Trest"); + + setStopAt(2, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertHandCount(playerB, 2); // 1 from start of turn and 1 from Edric + assertHandCount(playerA, 4); // 2 * 2 from Sphinx = 4 + + } }