mirror of
https://github.com/magefree/mage.git
synced 2025-12-30 07:22:03 -08:00
* Modal Double Faces cards - fixed that a second side can't be played from non hand zones in some cases (#7200);
Play lands from graveyard effect - reworked as AsThoughEffect;
This commit is contained in:
parent
24e2728fca
commit
c1e7a08c68
9 changed files with 210 additions and 62 deletions
|
|
@ -0,0 +1,48 @@
|
|||
package org.mage.test.cards.asthough;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBaseWithAIHelps;
|
||||
|
||||
/**
|
||||
* @author JayDi85
|
||||
*/
|
||||
public class PlayLandsFromGraveyardTest extends CardTestPlayerBaseWithAIHelps {
|
||||
|
||||
@Test
|
||||
public void test_CrucibleOfWorlds() {
|
||||
removeAllCardsFromHand(playerA);
|
||||
removeAllCardsFromLibrary(playerA);
|
||||
|
||||
// You may play lands from your graveyard.
|
||||
addCard(Zone.HAND, playerA, "Crucible of Worlds"); // {3}
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
|
||||
//
|
||||
addCard(Zone.GRAVEYARD, playerA, "Island", 1);
|
||||
//
|
||||
addCard(Zone.GRAVEYARD, playerA, "Balduvian Bears");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2);
|
||||
|
||||
checkGraveyardCount("graveyard before", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Balduvian Bears", 1);
|
||||
checkGraveyardCount("graveyard before", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Island", 1);
|
||||
checkPlayableAbility("can't play as creature", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Balduvian Bears", false);
|
||||
checkPlayableAbility("can't play as land", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Play Island", false);
|
||||
|
||||
// play artifact and apply play from graveyard effect
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Crucible of Worlds");
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN);
|
||||
checkPlayableAbility("can't play as creature", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Balduvian Bears", false);
|
||||
checkPlayableAbility("can play as land", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Play Island", true);
|
||||
|
||||
// play land
|
||||
playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Island");
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertPermanentCount(playerA, "Island", 1);
|
||||
}
|
||||
}
|
||||
|
|
@ -118,8 +118,8 @@ public class ModalDoubleFacesCardsTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerA, "Bolas's Citadel");
|
||||
|
||||
checkLibraryCount("library before", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Akoum Warrior", 1);
|
||||
checkPlayableAbility("can play as land", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Akoum Warrior", true);
|
||||
checkPlayableAbility("can play as creature", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Play Akoum Teeth", true);
|
||||
checkPlayableAbility("can play as creature", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Akoum Warrior", true);
|
||||
checkPlayableAbility("can play as land", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Play Akoum Teeth", true);
|
||||
|
||||
// play as creature
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Akoum Warrior");
|
||||
|
|
@ -136,6 +136,64 @@ public class ModalDoubleFacesCardsTest extends CardTestPlayerBase {
|
|||
assertLife(playerA, 20 - 6); // creature life pay instead mana
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_PlayFromNonHand_SecondSideAsLand_ByRadhaHeartOfKeld() {
|
||||
removeAllCardsFromHand(playerA);
|
||||
removeAllCardsFromLibrary(playerA);
|
||||
|
||||
// Akoum Warrior {5}{R} - creature
|
||||
// Akoum Teeth - land
|
||||
addCard(Zone.LIBRARY, playerA, "Akoum Warrior");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 6);
|
||||
//
|
||||
// You may look at the top card of your library any time, and you may play lands from the top of your library.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Radha, Heart of Keld");
|
||||
|
||||
checkLibraryCount("library before", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Akoum Warrior", 1);
|
||||
checkPlayableAbility("can't play as creature", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Akoum Warrior", false);
|
||||
checkPlayableAbility("can play as land", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Play Akoum Teeth", true);
|
||||
|
||||
// play as land
|
||||
playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Akoum Teeth");
|
||||
checkLibraryCount("library after", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Akoum Warrior", 0);
|
||||
checkPermanentCount("after cast", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Akoum Warrior", 0);
|
||||
checkPermanentCount("after cast", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Akoum Teeth", 1);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_PlayFromNonHand_SecondSideAsLand_CrucibleOfWorlds() {
|
||||
removeAllCardsFromHand(playerA);
|
||||
removeAllCardsFromLibrary(playerA);
|
||||
|
||||
// Akoum Warrior {5}{R} - creature
|
||||
// Akoum Teeth - land
|
||||
addCard(Zone.GRAVEYARD, playerA, "Akoum Warrior");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 6);
|
||||
//
|
||||
// You may play lands from your graveyard.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Crucible of Worlds");
|
||||
|
||||
checkGraveyardCount("graveyard before", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Akoum Warrior", 1);
|
||||
checkPlayableAbility("can't play as creature", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Akoum Warrior", false);
|
||||
checkPlayableAbility("can play as land", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Play Akoum Teeth", true);
|
||||
|
||||
// play as land
|
||||
playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Akoum Teeth");
|
||||
checkLibraryCount("library after", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Akoum Warrior", 0);
|
||||
checkPermanentCount("after cast", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Akoum Warrior", 0);
|
||||
checkPermanentCount("after cast", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Akoum Teeth", 1);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_PlayFromNonHand_GraveyardByYawgmothsAgenda() {
|
||||
removeAllCardsFromHand(playerA);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue