Some more rework of player.moveCard (mainly to graveyard).

This commit is contained in:
LevelX2 2015-05-23 15:35:40 +02:00
parent 039c4f22a6
commit ce64a22c15
79 changed files with 490 additions and 653 deletions

View file

@ -33,7 +33,11 @@ public class CursesTest extends CardTestPlayerBase {
public void testCurseOfEchoes() {
addCard(Zone.BATTLEFIELD, playerA, "Island", 5);
addCard(Zone.BATTLEFIELD, playerB, "Island", 5);
// Enchant player
// Whenever enchanted player casts an instant or sorcery spell, each other player may copy that
// spell and may choose new targets for the copy he or she controls.
addCard(Zone.HAND, playerA, "Curse of Echoes");
// Draw three cards.
addCard(Zone.HAND, playerB, "Jace's Ingenuity");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Curse of Echoes", playerB);
@ -49,6 +53,8 @@ public class CursesTest extends CardTestPlayerBase {
@Test
public void testCurseOfExhaustion1() {
addCard(Zone.BATTLEFIELD, playerA, "Plains", 4);
// Enchant player
// Enchanted player can't cast more than one spell each turn.
addCard(Zone.HAND, playerA, "Curse of Exhaustion");
addCard(Zone.BATTLEFIELD, playerB, "Mountain", 2);
addCard(Zone.HAND, playerB, "Lightning Bolt", 2);

View file

@ -45,7 +45,38 @@ public class DredgeTest extends CardTestPlayerBase {
*/
/**
@Test
public void testSultaiSoothsayerWithSidisiBroodTyrant() {
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 3);
addCard(Zone.BATTLEFIELD, playerA, "Forest", 1);
addCard(Zone.BATTLEFIELD, playerA, "Island", 1);
// Whenever Sidisi, Brood Tyrant enters the battlefield or attacks, put the top three cards of your library into your graveyard.
// Whenever one or more creature cards are put into your graveyard from your library, put a 2/2 black Zombie creature token onto the battlefield.
addCard(Zone.BATTLEFIELD, playerA, "Sidisi, Brood Tyrant");
// When Sultai Soothsayer enters the battlefield, look at the top four cards of your library.
// Put one of them into your hand and the rest into your graveyard.
addCard(Zone.HAND, playerA, "Sultai Soothsayer");
addCard(Zone.LIBRARY, playerA, "Silvercoat Lion", 5);
skipInitShuffling();
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Sultai Soothsayer");
addTarget(playerA, "Silvercoat Lion");
setStopAt(1, PhaseStep.BEGIN_COMBAT);
execute();
assertLife(playerA, 20);
assertLife(playerB, 20);
assertHandCount(playerA, "Silvercoat Lion", 1);
assertGraveyardCount(playerA, "Silvercoat Lion", 3);
assertPermanentCount(playerA, "Zombie", 1); // May only be one creature
}
/**
* Had a Sidisi, Brood Tyrant in play and dredge a Stinkweed Imp hitting 3 creatures.
* and Sidisi triggered 3 times instead of just one.
*/

View file

@ -10,7 +10,15 @@ import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
*
* 702.87. Rebound
* 702.87a Rebound appears on some instants and sorceries. It represents a static ability that functions while
* the spell is on the stack and may create a delayed triggered ability. "Rebound" means "If this spell was cast
* from your hand, instead of putting it into your graveyard as it resolves, exile it and, at the beginning of
* your next upkeep, you may cast this card from exile without paying its mana cost."
* 702.87b Casting a card without paying its mana cost as the result of a rebound ability follows the rules for
* paying alternative costs in rules 601.2b and 601.2eg.
* 702.87c Multiple instances of rebound on the same spell are redundant.
*
* @author jeff
*/
public class ReboundTest extends CardTestPlayerBase{
@ -104,6 +112,8 @@ public class ReboundTest extends CardTestPlayerBase{
addCard(Zone.BATTLEFIELD, playerA, "Island", 1);
// Target creature gets +1/+0 until end of turn and is unblockable this turn.
// Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep,
// you may cast this card from exile without paying its mana cost.)
addCard(Zone.HAND, playerA, "Distortion Strike");
addCard(Zone.BATTLEFIELD, playerA, "Memnite", 1);
@ -113,12 +123,12 @@ public class ReboundTest extends CardTestPlayerBase{
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Distortion Strike", "Memnite");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Lightning Bolt", "Memnite","Distortion Strike");
setStopAt(1, PhaseStep.END_TURN);
setStopAt(1, PhaseStep.BEGIN_COMBAT);
execute();
//check exile and graveyard
assertGraveyardCount(playerB, "Lightning Bolt", 1);
assertGraveyardCount(playerA, "Distortion Strike", 1);
assertGraveyardCount(playerA, "Memnite", 1);
assertGraveyardCount(playerA, "Distortion Strike", 1);
}
}