- Added extra test for Starfield of Nyx.

This commit is contained in:
Achilles 2018-01-16 17:48:26 -06:00
parent 83cd11e51b
commit 6c59c2e4fd

View file

@ -27,6 +27,7 @@
*/
package org.mage.test.cards.enchantments;
import mage.abilities.keyword.FlyingAbility;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import mage.filter.Filter;
@ -122,4 +123,26 @@ public class StarfieldOfNyxTest extends CardTestPlayerBase {
Assert.assertEquals("Singing Bell Strike not on the battlefield", false, true);
}
}
@Test
public void testStarfieldOfNyxLayers() {
addCard(Zone.BATTLEFIELD, playerA, "Starfield of Nyx"); // enchantments you control become creatures
addCard(Zone.BATTLEFIELD, playerA, "Humility"); // creatures lose all abilities and are 1/1
addCard(Zone.BATTLEFIELD, playerA, "Pharika, God of Affliction"); // enchantment
addCard(Zone.BATTLEFIELD, playerA, "Emrakul, the Aeons Torn"); //15/15 creature
addCard(Zone.BATTLEFIELD, playerA, "Crusade", 4); // enchantments to fulfill requirement of Starfield of Nyx
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
execute();
assertPowerToughness(playerA, "Pharika, God of Affliction", 3, 3, Filter.ComparisonScope.All);
assertPowerToughness(playerA, "Humility", 4, 4, Filter.ComparisonScope.All);
// Humility loses its ability in layer 6. Layer 7 never gets Humility's effect
assertPowerToughness(playerA, "Emrakul, the Aeons Torn", 15, 15, Filter.ComparisonScope.All); // PT not affected
Permanent emrakul = getPermanent("Emrakul, the Aeons Torn", playerA.getId());
Assert.assertNotNull(emrakul);
Assert.assertFalse(emrakul.getAbilities().contains(FlyingAbility.getInstance())); // loses flying though
}
}