- 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;
@ -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);
}
}