|
| 1 | +package org.mage.test.cards.conditional.twofaced; |
| 2 | + |
| 3 | +import mage.constants.PhaseStep; |
| 4 | +import mage.constants.Zone; |
| 5 | +import org.junit.Test; |
| 6 | +import org.mage.test.serverside.base.CardTestPlayerBase; |
| 7 | + |
| 8 | +/** |
| 9 | + * @author matoro |
| 10 | + */ |
| 11 | +public class TwoFacedLandAllowedTest extends CardTestPlayerBase { |
| 12 | + |
| 13 | + /** |
| 14 | + * Tests that you are not allowed to play a land on the back of a transforming double-faced card. |
| 15 | + */ |
| 16 | + @Test |
| 17 | + public void testTransformingNotAllowed() { |
| 18 | + setStrictChooseMode(true); |
| 19 | + addCard(Zone.HAND, playerA, "Ojer Taq, Deepest Foundation"); |
| 20 | + checkPlayableAbility("Should not be able to play land", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Play Temple of Civilization", false); |
| 21 | + setStopAt(1, PhaseStep.END_TURN); |
| 22 | + execute(); |
| 23 | + } |
| 24 | + |
| 25 | + /** |
| 26 | + * Tests that you are still allowed to play a land on the back of a modal double-faced card. |
| 27 | + */ |
| 28 | + @Test |
| 29 | + public void testModalAllowed() { |
| 30 | + setStrictChooseMode(true); |
| 31 | + addCard(Zone.HAND, playerA, "Sink into Stupor"); |
| 32 | + checkPlayableAbility("Should be able to play land", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Play Soporific Springs", true); |
| 33 | + setStopAt(1, PhaseStep.END_TURN); |
| 34 | + execute(); |
| 35 | + } |
| 36 | + |
| 37 | + /** |
| 38 | + * Tests that you are still allowed to play a land on the front of a transforming double-faced card. |
| 39 | + */ |
| 40 | + @Test |
| 41 | + public void testTransformingFront() { |
| 42 | + setStrictChooseMode(true); |
| 43 | + addCard(Zone.HAND, playerA, "Balamb Garden, SeeD Academy"); |
| 44 | + checkPlayableAbility("Should be able to play land", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Play Balamb Garden, SeeD Academy", true); |
| 45 | + setStopAt(1, PhaseStep.END_TURN); |
| 46 | + execute(); |
| 47 | + } |
| 48 | + |
| 49 | + /** |
| 50 | + * Tests that you can still transform a nonmodal double-faced card with a land on the back. |
| 51 | + */ |
| 52 | + @Test |
| 53 | + public void testActivateTransformationAllowed() { |
| 54 | + setStrictChooseMode(true); |
| 55 | + addCard(Zone.BATTLEFIELD, playerA, "Tarrian's Journal"); |
| 56 | + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 2); |
| 57 | + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}, Discard your hand: Transform {this}."); |
| 58 | + setStopAt(1, PhaseStep.END_TURN); |
| 59 | + execute(); |
| 60 | + checkPermanentCount("Successfully transformed", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "The Tomb of Aclazotz", 1); |
| 61 | + } |
| 62 | +} |
0 commit comments