From dbbbbc0279ff7812189f639f4a4d4e08c3840d47 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 31 Jan 2015 14:46:54 +0100 Subject: [PATCH] * Fixed that continuous effects of face down creatures were applied. --- .../abilities/keywords/ManifestTest.java | 34 ++++++++++++++++++- Mage/src/mage/abilities/AbilityImpl.java | 4 +++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ManifestTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ManifestTest.java index af1a2e7ab71..817fcf053fc 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ManifestTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ManifestTest.java @@ -134,5 +134,37 @@ public class ManifestTest extends CardTestPlayerBase { // PlayerA's Pillarfield Ox should not have get -1/-1/ assertPermanentCount(playerB, "Pillarfield Ox", 1); assertPowerToughness(playerB, "Pillarfield Ox", 2, 4); - } + } + /** + * If Doomwake Giant gets manifested, it's Constellation trigger may not trigger + */ + @Test + public void testNylea() { + addCard(Zone.BATTLEFIELD, playerB, "Island", 2); + // Exile target creature. Its controller manifests the top card of his or her library {1}{U} + addCard(Zone.HAND, playerB, "Reality Shift"); + + // As long as your devotion to white is less than five, Nylea isn't a creature. + // (Each {G} in the mana costs of permanents you control counts towards your devotion to green.) + addCard(Zone.LIBRARY, playerA, "Nylea, God of the Hunt"); + + addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion"); + + skipInitShuffling(); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Reality Shift", "Silvercoat Lion"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + // no life gain + assertLife(playerA, 20); + assertLife(playerB, 20); + assertGraveyardCount(playerB, "Reality Shift", 1); + assertExileCount("Silvercoat Lion" , 1); + // a facedown creature is on the battlefield + assertPermanentCount(playerA, "face down creature", 1); + assertPowerToughness(playerA, "face down creature", 2, 2); + + } } diff --git a/Mage/src/mage/abilities/AbilityImpl.java b/Mage/src/mage/abilities/AbilityImpl.java index 891e0d01edb..7be497ba262 100644 --- a/Mage/src/mage/abilities/AbilityImpl.java +++ b/Mage/src/mage/abilities/AbilityImpl.java @@ -797,6 +797,10 @@ public abstract class AbilityImpl implements Ability { if (!found) { return false; } + } else if (object instanceof PermanentCard) { + if (((PermanentCard)object).isFaceDown()&& !this.getWorksFaceDown()) { + return false; + } } // check against current state