* Fixed that continuous effects of face down creatures were applied.

This commit is contained in:
LevelX2 2015-01-31 14:46:54 +01:00
parent 8ba2136b0e
commit dbbbbc0279
2 changed files with 37 additions and 1 deletions

View file

@ -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.
// <i>(Each {G} in the mana costs of permanents you control counts towards your devotion to green.)</i>
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);
}
}

View file

@ -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