- Added another complex layer test to LayerTests unit test

This commit is contained in:
jeffwadsworth 2021-07-16 16:46:42 -05:00
parent fd40085e4f
commit 29a4fbc27a

View file

@ -1,7 +1,6 @@
package org.mage.test.cards.continuous;
import mage.ObjectColor;
import mage.constants.CardType;
import mage.constants.PhaseStep;
import mage.constants.SubType;
@ -61,7 +60,7 @@ public class LayerTests extends CardTestPlayerBase {
Does the game get stuck in an endless loop of each card gaining and
losing its respective creature-ness and abilities?
Answer: No, they all die
*/
*/
addCard(Zone.HAND, playerA, "Mycosynth Lattice"); // all permanents are artifacts
addCard(Zone.HAND, playerA, "March of the Machines"); // artifacts become creatures
@ -112,7 +111,7 @@ public class LayerTests extends CardTestPlayerBase {
/*In play there is a Grizzly Bears which has already been Giant Growthed,
a Bog Wraith enchanted by a Lignify, and Figure of Destiny with its 3rd ability activated.
I then cast a Mirrorweave targeting the Figure of Destiny. What does each creature look like?
*/
*/
addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears", 1);
addCard(Zone.HAND, playerA, "Giant Growth", 1);
addCard(Zone.BATTLEFIELD, playerA, "Bog Wraith", 1);
@ -172,7 +171,7 @@ public class LayerTests extends CardTestPlayerBase {
one of his Hypnotist's abilities, targeting the Mimic. Aiden attacks with the Mimic, and
casts Inside Out before the damage step. Once Inside Out resolves, Nick activates the ability
of his other Hypnotist. How much damage will the Mimic deal?
*/
*/
addCard(Zone.HAND, playerA, "Scourge of the Nobilis", 1);
addCard(Zone.HAND, playerA, "Inside Out", 1);
addCard(Zone.BATTLEFIELD, playerA, "Battlegate Mimic", 1);
@ -193,4 +192,56 @@ public class LayerTests extends CardTestPlayerBase {
}
@Test
public void testExampleFromReddit2021() {
// Life and Limb, Humility, and Yavimaya, Cradle of Growth
// Result: all lands (including Yavimaya) will be 1/1 green Forest
// lands and Saproling creatures in addition to their other types,
// and have no abilities.
/*
All Forests and all Saprolings are 1/1 green Saproling creatures
and Forest lands in addition to their other types. (They're affected by summoning sickness.)
*/
addCard(Zone.BATTLEFIELD, playerA, "Life and Limb", 1);
/*
All creatures lose all abilities and have base power and toughness 1/1.
*/
addCard(Zone.BATTLEFIELD, playerA, "Humility", 1);
/*
Each land is a Forest in addition to its other land types.
*/
addCard(Zone.BATTLEFIELD, playerA, "Yavimaya, Cradle of Growth", 1);
// added some lands to the battlefield
addCard(Zone.BATTLEFIELD, playerA, "Plains", 1);
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1);
addCard(Zone.BATTLEFIELD, playerB, "Island", 1);
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
execute();
// all lands are forests in addition to other types
assertType("Plains", CardType.CREATURE, SubType.FOREST);
assertType("Swamp", CardType.CREATURE, SubType.FOREST);
assertType("Island", CardType.CREATURE, SubType.FOREST);
assertType("Yavimaya, Cradle of Growth", CardType.CREATURE, SubType.FOREST);
// all lands are 1/1 Saproling creatures
assertPowerToughness(playerA, "Plains", 1, 1);
assertPowerToughness(playerA, "Swamp", 1, 1);
assertPowerToughness(playerB, "Island", 1, 1);
assertPowerToughness(playerA, "Yavimaya, Cradle of Growth", 1, 1);
// all lands are green
assertColor(playerA, "Plains", ObjectColor.GREEN, true);
assertColor(playerA, "Swamp", ObjectColor.GREEN, true);
assertColor(playerB, "Island", ObjectColor.GREEN, true);
assertColor(playerA, "Yavimaya, Cradle of Growth", ObjectColor.GREEN, true);
}
}