mirror of
https://github.com/correl/mage.git
synced 2024-11-25 03:00:11 +00:00
Enabled assertAllCommandsUsed by default and fixed remaining tests
This commit is contained in:
parent
28c3e65fcd
commit
3c0951c350
77 changed files with 360 additions and 282 deletions
|
@ -28,13 +28,15 @@ public class PutToGraveyardTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion");
|
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion");
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Stasis Snare");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Stasis Snare");
|
||||||
addTarget(playerA, "Silvercoat Lion");
|
addTarget(playerA, "Silvercoat Lion");
|
||||||
|
|
||||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}{G},", TestPlayer.NO_TARGET, "");
|
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{1}{G},", TestPlayer.NO_TARGET, "");
|
||||||
addTarget(playerA, "Silvercoat Lion");
|
addTarget(playerA, "Silvercoat Lion");
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
execute();
|
execute();
|
||||||
|
|
||||||
assertPermanentCount(playerA, "Stasis Snare", 1);
|
assertPermanentCount(playerA, "Stasis Snare", 1);
|
||||||
|
|
|
@ -104,7 +104,7 @@ public class BanisherPriestTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion");
|
addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion");
|
||||||
|
|
||||||
addCard(Zone.GRAVEYARD, playerB, "Banisher Priest");
|
addCard(Zone.GRAVEYARD, playerB, "Banisher Priest");
|
||||||
/**
|
/*
|
||||||
* Seance
|
* Seance
|
||||||
* {2}{W}{W}
|
* {2}{W}{W}
|
||||||
* Enchantment
|
* Enchantment
|
||||||
|
@ -114,8 +114,12 @@ public class BanisherPriestTest extends CardTestPlayerBase {
|
||||||
* Exile it at the beginning of the next end step.
|
* Exile it at the beginning of the next end step.
|
||||||
*/
|
*/
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Seance");
|
addCard(Zone.BATTLEFIELD, playerB, "Seance");
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
|
setChoice(playerB, "Yes");
|
||||||
addTarget(playerB, "Banisher Priest"); // Return the Banisher Priest from graveyard with Seance
|
addTarget(playerB, "Banisher Priest"); // Return the Banisher Priest from graveyard with Seance
|
||||||
// The Silvercoat Lion is autochosen for Banisher Priest's ETB since it's the only creature on the opponent's board
|
addTarget(playerB, "Silvercoat Lion");
|
||||||
|
|
||||||
setStopAt(2, PhaseStep.PRECOMBAT_MAIN);
|
setStopAt(2, PhaseStep.PRECOMBAT_MAIN);
|
||||||
execute();
|
execute();
|
||||||
|
|
|
@ -9,17 +9,14 @@ import mage.constants.Zone;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
|
|
||||||
/**
|
/* Gather Specimens - Instant {3}{U}{U}{U}
|
||||||
|
*
|
||||||
|
* If a creature would enter the battlefield under an opponent's control this turn, it enters the battlefield under your control instead.
|
||||||
*
|
*
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
*/
|
*/
|
||||||
public class GatherSpecimensTest extends CardTestPlayerBase {
|
public class GatherSpecimensTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
/* Gather Specimens - Instant {3}{U}{U}{U}
|
|
||||||
*
|
|
||||||
* If a creature would enter the battlefield under an opponent's control this turn, it enters the battlefield under your control instead.
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testFromHandEffect() {
|
public void testFromHandEffect() {
|
||||||
setStrictChooseMode(true);
|
setStrictChooseMode(true);
|
||||||
|
@ -44,11 +41,10 @@ public class GatherSpecimensTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
assertPermanentCount(playerA, "Memnite", 1);
|
assertPermanentCount(playerA, "Memnite", 1);
|
||||||
assertPermanentCount(playerB, "Memnite", 0);
|
assertPermanentCount(playerB, "Memnite", 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testTokenCreatedFromSpellEffect() {
|
public void testTokenCreatedFromSpellEffect() {
|
||||||
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 6);
|
addCard(Zone.BATTLEFIELD, playerA, "Island", 6);
|
||||||
addCard(Zone.HAND, playerA, "Gather Specimens", 1);
|
addCard(Zone.HAND, playerA, "Gather Specimens", 1);
|
||||||
|
|
||||||
|
@ -65,12 +61,10 @@ public class GatherSpecimensTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
assertPermanentCount(playerA, "Spirit Token", 3);
|
assertPermanentCount(playerA, "Spirit Token", 3);
|
||||||
assertPermanentCount(playerB, "Spirit Token", 0);
|
assertPermanentCount(playerB, "Spirit Token", 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testFromGraveyardEffect() {
|
public void testFromGraveyardEffect() {
|
||||||
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 6);
|
addCard(Zone.BATTLEFIELD, playerA, "Island", 6);
|
||||||
addCard(Zone.HAND, playerA, "Gather Specimens", 1);
|
addCard(Zone.HAND, playerA, "Gather Specimens", 1);
|
||||||
addCard(Zone.LIBRARY, playerA, "Memnite", 10);
|
addCard(Zone.LIBRARY, playerA, "Memnite", 10);
|
||||||
|
@ -90,12 +84,10 @@ public class GatherSpecimensTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
assertPermanentCount(playerA, "Memnite", 1);
|
assertPermanentCount(playerA, "Memnite", 1);
|
||||||
assertPermanentCount(playerB, "Memnite", 0);
|
assertPermanentCount(playerB, "Memnite", 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testFromExileEffect() {
|
public void testFromExileEffect() {
|
||||||
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 10);
|
addCard(Zone.BATTLEFIELD, playerA, "Plains", 10);
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 10);
|
addCard(Zone.BATTLEFIELD, playerA, "Island", 10);
|
||||||
addCard(Zone.HAND, playerA, "Disenchant", 1);
|
addCard(Zone.HAND, playerA, "Disenchant", 1);
|
||||||
|
@ -106,6 +98,8 @@ public class GatherSpecimensTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Memnite", 1);
|
addCard(Zone.BATTLEFIELD, playerB, "Memnite", 1);
|
||||||
addCard(Zone.LIBRARY, playerB, "Plains", 10);
|
addCard(Zone.LIBRARY, playerB, "Plains", 10);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
// If a creature would enter the battlefield under an opponent's control this turn, it enters the battlefield under your control instead.
|
// If a creature would enter the battlefield under an opponent's control this turn, it enters the battlefield under your control instead.
|
||||||
castSpell(1, PhaseStep.UPKEEP, playerA, "Gather Specimens");
|
castSpell(1, PhaseStep.UPKEEP, playerA, "Gather Specimens");
|
||||||
|
|
||||||
|
@ -120,8 +114,5 @@ public class GatherSpecimensTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
assertPermanentCount(playerB, "Memnite", 0);
|
assertPermanentCount(playerB, "Memnite", 0);
|
||||||
assertPermanentCount(playerA, "Memnite", 1);
|
assertPermanentCount(playerA, "Memnite", 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ public class GreenbeltRampagerTest extends CardTestPlayerBase {
|
||||||
skipInitShuffling();
|
skipInitShuffling();
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Gonti, Lord of Luxury");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Gonti, Lord of Luxury");
|
||||||
addTarget(playerA, playerB);
|
// addTarget(playerA, playerB); playerB is autochosen since only option
|
||||||
setChoice(playerA, "Greenbelt Rampager");
|
setChoice(playerA, "Greenbelt Rampager");
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Greenbelt Rampager");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Greenbelt Rampager");
|
||||||
|
|
|
@ -21,7 +21,7 @@ public class SkylineCascadeTest extends CardTestPlayerBase {
|
||||||
// {W} 2/1
|
// {W} 2/1
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Savannah Lions");
|
addCard(Zone.BATTLEFIELD, playerA, "Savannah Lions");
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Skyline Cascade enters the battlefield tapped.
|
* Skyline Cascade enters the battlefield tapped.
|
||||||
* When Skyline Cascade enters the battlefield, target creature an opponent controls doesn't untap during its controller's next untap step.
|
* When Skyline Cascade enters the battlefield, target creature an opponent controls doesn't untap during its controller's next untap step.
|
||||||
* Tap: Add {U} .
|
* Tap: Add {U} .
|
||||||
|
@ -31,7 +31,7 @@ public class SkylineCascadeTest extends CardTestPlayerBase {
|
||||||
attack(1, playerA, "Savannah Lions");
|
attack(1, playerA, "Savannah Lions");
|
||||||
|
|
||||||
playLand(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Skyline Cascade");
|
playLand(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Skyline Cascade");
|
||||||
addTarget(playerB, "Savannah Lions");
|
// Savannah Lions is autochosen
|
||||||
|
|
||||||
setStopAt(3, PhaseStep.PRECOMBAT_MAIN);
|
setStopAt(3, PhaseStep.PRECOMBAT_MAIN);
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ public class SkylineCascadeTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.HAND, playerB, "Skyline Cascade");
|
addCard(Zone.HAND, playerB, "Skyline Cascade");
|
||||||
|
|
||||||
playLand(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Skyline Cascade");
|
playLand(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Skyline Cascade");
|
||||||
addTarget(playerB, "Savannah Lions");
|
// Savannah Lions is autochosen
|
||||||
|
|
||||||
setStopAt(3, PhaseStep.PRECOMBAT_MAIN);
|
setStopAt(3, PhaseStep.PRECOMBAT_MAIN);
|
||||||
|
|
||||||
|
|
|
@ -307,15 +307,13 @@ public class CloudshiftTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
|
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
|
||||||
// Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn.
|
// Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn.
|
||||||
addCard(Zone.HAND, playerA, "Act of Treason");
|
addCard(Zone.HAND, playerA, "Act of Treason");
|
||||||
|
|
||||||
// At the beginning of your end step, you may exile target creature you control, then return that card to the battlefield under your control
|
// At the beginning of your end step, you may exile target creature you control, then return that card to the battlefield under your control
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Conjurer's Closet");
|
addCard(Zone.BATTLEFIELD, playerA, "Conjurer's Closet");
|
||||||
|
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion");
|
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion");
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Act of Treason", "Silvercoat Lion");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Act of Treason", "Silvercoat Lion");
|
||||||
|
// Silvercoat Lion is autochosen
|
||||||
addTarget(playerA, "Silvercoat Lion");
|
|
||||||
|
|
||||||
setStopAt(2, PhaseStep.PRECOMBAT_MAIN);
|
setStopAt(2, PhaseStep.PRECOMBAT_MAIN);
|
||||||
execute();
|
execute();
|
||||||
|
|
|
@ -150,7 +150,7 @@ public class ChangelingTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.HAND, playerA, "Merfolk Trickster");
|
addCard(Zone.HAND, playerA, "Merfolk Trickster");
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Merfolk Trickster");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Merfolk Trickster");
|
||||||
addTarget(playerA, "Game-Trail Changeling");
|
// Game-Trail Changeling autochosen
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.END_TURN);
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
execute();
|
execute();
|
||||||
|
|
|
@ -73,6 +73,8 @@ public class EmbalmTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, yOx);
|
addCard(Zone.BATTLEFIELD, playerB, yOx);
|
||||||
addCard(Zone.BATTLEFIELD, playerB, wKnight);
|
addCard(Zone.BATTLEFIELD, playerB, wKnight);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, aSanctions);
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, aSanctions);
|
||||||
addTarget(playerA, yOx);
|
addTarget(playerA, yOx);
|
||||||
castSpell(1, PhaseStep.BEGIN_COMBAT, playerB, dBlade);
|
castSpell(1, PhaseStep.BEGIN_COMBAT, playerB, dBlade);
|
||||||
|
@ -122,7 +124,8 @@ public class EmbalmTest extends CardTestPlayerBase {
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, aSanctions);
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, aSanctions);
|
||||||
addTarget(playerA, yOx);
|
addTarget(playerA, yOx);
|
||||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, dBlade);
|
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, dBlade);
|
||||||
addTarget(playerB, aSanctions);
|
// Angel of Sanction is auto-chosen since only option
|
||||||
|
waitStackResolved(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||||
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Embalm");
|
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Embalm");
|
||||||
addTarget(playerA, wKnight);
|
addTarget(playerA, wKnight);
|
||||||
castSpell(1, PhaseStep.END_TURN, playerB, dBlade);
|
castSpell(1, PhaseStep.END_TURN, playerB, dBlade);
|
||||||
|
|
|
@ -109,6 +109,8 @@ public class EscalateTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.HAND, playerA, "Collective Defiance"); // {1}{R}{R} sorcery
|
addCard(Zone.HAND, playerA, "Collective Defiance"); // {1}{R}{R} sorcery
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5);
|
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Collective Defiance", "mode=2Wall of Omens");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Collective Defiance", "mode=2Wall of Omens");
|
||||||
setModeChoice(playerA, "1"); // opponent discards hand and draws that many
|
setModeChoice(playerA, "1"); // opponent discards hand and draws that many
|
||||||
setModeChoice(playerA, "2"); // deal 4 dmg to target creature (Wall of Omens)
|
setModeChoice(playerA, "2"); // deal 4 dmg to target creature (Wall of Omens)
|
||||||
|
|
|
@ -114,7 +114,6 @@ public class EvolveTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testMultipleCreaturesComeIntoPlay() {
|
public void testMultipleCreaturesComeIntoPlay() {
|
||||||
|
|
||||||
// Cloudfin Raptor gets one +1/+1 because itself and other creatur return from exile
|
// Cloudfin Raptor gets one +1/+1 because itself and other creatur return from exile
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 6);
|
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 6);
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Judge's Familiar", 1);
|
addCard(Zone.BATTLEFIELD, playerA, "Judge's Familiar", 1);
|
||||||
|
@ -124,8 +123,11 @@ public class EvolveTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Plains", 6);
|
addCard(Zone.BATTLEFIELD, playerB, "Plains", 6);
|
||||||
addCard(Zone.HAND, playerB, "Banisher Priest", 2);
|
addCard(Zone.HAND, playerB, "Banisher Priest", 2);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Banisher Priest");
|
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Banisher Priest");
|
||||||
addTarget(playerB, "Cloudfin Raptor");
|
addTarget(playerB, "Cloudfin Raptor");
|
||||||
|
waitStackResolved(2, PhaseStep.PRECOMBAT_MAIN);
|
||||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Banisher Priest");
|
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Banisher Priest");
|
||||||
addTarget(playerB, "Judge's Familiar");
|
addTarget(playerB, "Judge's Familiar");
|
||||||
|
|
||||||
|
@ -139,7 +141,7 @@ public class EvolveTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
assertPermanentCount(playerB, "Banisher Priest", 0);
|
assertPermanentCount(playerB, "Banisher Priest", 0);
|
||||||
|
|
||||||
assertGraveyardCount(playerB, 2);
|
assertGraveyardCount(playerB, "Banisher Priest", 2);
|
||||||
assertGraveyardCount(playerA, 1);
|
assertGraveyardCount(playerA, 1);
|
||||||
|
|
||||||
assertPermanentCount(playerA, "Cloudfin Raptor", 1);
|
assertPermanentCount(playerA, "Cloudfin Raptor", 1);
|
||||||
|
|
|
@ -93,7 +93,7 @@ public class ExploitTest extends CardTestPlayerBase {
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Qarsi Sadist");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Qarsi Sadist");
|
||||||
setChoice(playerA, true);
|
setChoice(playerA, true);
|
||||||
addTarget(playerA, "Qarsi Sadist"); // sacrifice to Exploit
|
addTarget(playerA, "Qarsi Sadist"); // sacrifice to Exploit
|
||||||
addTarget(playerA, playerB); // Target for lose life
|
// Player B is auto-chosen to lose two life since only option
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
|
|
@ -83,6 +83,8 @@ public class FlashbackTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.HAND, playerA, "Snapcaster Mage", 1);
|
addCard(Zone.HAND, playerA, "Snapcaster Mage", 1);
|
||||||
addCard(Zone.GRAVEYARD, playerA, "Repeal", 1);
|
addCard(Zone.GRAVEYARD, playerA, "Repeal", 1);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Snapcaster Mage");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Snapcaster Mage");
|
||||||
addTarget(playerA, "Repeal");
|
addTarget(playerA, "Repeal");
|
||||||
|
|
||||||
|
@ -113,6 +115,8 @@ public class FlashbackTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.HAND, playerA, "Snapcaster Mage", 1);
|
addCard(Zone.HAND, playerA, "Snapcaster Mage", 1);
|
||||||
addCard(Zone.GRAVEYARD, playerA, "Blaze", 1);
|
addCard(Zone.GRAVEYARD, playerA, "Blaze", 1);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Snapcaster Mage");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Snapcaster Mage");
|
||||||
addTarget(playerA, "Blaze");
|
addTarget(playerA, "Blaze");
|
||||||
|
|
||||||
|
@ -154,6 +158,8 @@ public class FlashbackTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
addCard(Zone.HAND, playerB, "Lightning Bolt", 1);
|
addCard(Zone.HAND, playerB, "Lightning Bolt", 1);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Unburial Rites", "Iona, Shield of Emeria");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Unburial Rites", "Iona, Shield of Emeria");
|
||||||
setChoice(playerA, "Red");
|
setChoice(playerA, "Red");
|
||||||
|
|
||||||
|
@ -253,6 +259,8 @@ public class FlashbackTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
|
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Snapcaster Mage");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Snapcaster Mage");
|
||||||
addTarget(playerA, "Ancestral Vision");
|
addTarget(playerA, "Ancestral Vision");
|
||||||
|
|
||||||
|
@ -346,6 +354,8 @@ public class FlashbackTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Icefall Regent", 1);
|
addCard(Zone.BATTLEFIELD, playerB, "Icefall Regent", 1);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
// When Snapcaster Mage enters the battlefield, target instant or sorcery card in your graveyard gains flashback until end of turn.
|
// When Snapcaster Mage enters the battlefield, target instant or sorcery card in your graveyard gains flashback until end of turn.
|
||||||
// The flashback cost is equal to its mana cost.
|
// The flashback cost is equal to its mana cost.
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Snapcaster Mage");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Snapcaster Mage");
|
||||||
|
@ -507,7 +517,7 @@ public class FlashbackTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, memnite);
|
addCard(Zone.BATTLEFIELD, playerA, memnite);
|
||||||
|
|
||||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Flashback"); // Flashback Dread Return
|
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Flashback"); // Flashback Dread Return
|
||||||
addTarget(playerA, bSable); // return to battlefield
|
// Bronze Sable is auto-chosen since only possible target
|
||||||
// Only 3 creature under playerA's control, let them be auto-sac'ed to pay
|
// Only 3 creature under playerA's control, let them be auto-sac'ed to pay
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
|
|
|
@ -7,32 +7,29 @@ import org.junit.Test;
|
||||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* 702.56. Forecast 702.56a A forecast ability is a special kind of activated
|
||||||
|
* ability that can be activated only from a player's hand. It's written
|
||||||
|
* "Forecast - [Activated ability]."
|
||||||
|
*
|
||||||
|
* 702.56b A forecast ability may be activated only during the upkeep step of
|
||||||
|
* the card's owner and only once each turn. The controller of the forecast
|
||||||
|
* ability reveals the card with that ability from their hand as the
|
||||||
|
* ability is activated. That player plays with that card revealed in their
|
||||||
|
* hand until it leaves the player's hand or until a step or phase that isn't an
|
||||||
|
* upkeep step begins, whichever comes first.
|
||||||
*
|
*
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class ForecastTest extends CardTestPlayerBase {
|
public class ForecastTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
/**
|
|
||||||
* 702.56. Forecast 702.56a A forecast ability is a special kind of activated
|
|
||||||
* ability that can be activated only from a player's hand. It's written
|
|
||||||
* "Forecast - [Activated ability]."
|
|
||||||
*
|
|
||||||
* 702.56b A forecast ability may be activated only during the upkeep step of
|
|
||||||
* the card's owner and only once each turn. The controller of the forecast
|
|
||||||
* ability reveals the card with that ability from their hand as the
|
|
||||||
* ability is activated. That player plays with that card revealed in their
|
|
||||||
* hand until it leaves the player's hand or until a step or phase that isn't an
|
|
||||||
* upkeep step begins, whichever comes first.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testPaladinOfPrahv() {
|
public void testPaladinOfPrahv() {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 2);
|
addCard(Zone.BATTLEFIELD, playerA, "Plains", 2);
|
||||||
addCard(Zone.HAND, playerA, "Silvercoat Lion");
|
addCard(Zone.HAND, playerA, "Silvercoat Lion");
|
||||||
addCard(Zone.HAND, playerA, "Paladin of Prahv");
|
addCard(Zone.HAND, playerA, "Paladin of Prahv");
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Silvercoat Lion");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Silvercoat Lion");
|
||||||
|
|
||||||
activateAbility(3, PhaseStep.UPKEEP, playerA, "Forecast");
|
activateAbility(3, PhaseStep.UPKEEP, playerA, "Forecast");
|
||||||
|
@ -48,8 +45,5 @@ public class ForecastTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
assertLife(playerA, 22);
|
assertLife(playerA, 22);
|
||||||
assertLife(playerB, 18);
|
assertLife(playerB, 18);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,6 +114,8 @@ public class InfectTest extends CardTestPlayerBase {
|
||||||
// Target creature gets +6/+6 until end of turn.
|
// Target creature gets +6/+6 until end of turn.
|
||||||
addCard(Zone.HAND, playerA, "Become Immense", 1);
|
addCard(Zone.HAND, playerA, "Become Immense", 1);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}: {this} becomes");
|
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}: {this} becomes");
|
||||||
attack(1, playerA, "Inkmoth Nexus");
|
attack(1, playerA, "Inkmoth Nexus");
|
||||||
castSpell(1, PhaseStep.DECLARE_ATTACKERS, playerA, "Become Immense");
|
castSpell(1, PhaseStep.DECLARE_ATTACKERS, playerA, "Become Immense");
|
||||||
|
@ -129,7 +131,6 @@ public class InfectTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testInkmothPumpedByBecomeImmense2() {
|
public void testInkmothPumpedByBecomeImmense2() {
|
||||||
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 7);
|
addCard(Zone.BATTLEFIELD, playerA, "Forest", 7);
|
||||||
// {1}: Inkmoth Nexus becomes a 1/1 Blinkmoth artifact creature with flying and infect until end of turn. It's still a land.
|
// {1}: Inkmoth Nexus becomes a 1/1 Blinkmoth artifact creature with flying and infect until end of turn. It's still a land.
|
||||||
// (It deals damage to creatures in the form of -1/-1 counters and to players in the form of poison counters.)
|
// (It deals damage to creatures in the form of -1/-1 counters and to players in the form of poison counters.)
|
||||||
|
@ -145,15 +146,15 @@ public class InfectTest extends CardTestPlayerBase {
|
||||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}: {this} becomes");
|
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}: {this} becomes");
|
||||||
attack(1, playerA, "Inkmoth Nexus");
|
attack(1, playerA, "Inkmoth Nexus");
|
||||||
castSpell(1, PhaseStep.DECLARE_ATTACKERS, playerA, "Mutagenic Growth");
|
castSpell(1, PhaseStep.DECLARE_ATTACKERS, playerA, "Mutagenic Growth");
|
||||||
addTarget(playerA, "Inkmoth Nexus");
|
// Inkmoth Nexus is auto-chosen since it's the only possible target
|
||||||
castSpell(1, PhaseStep.DECLARE_ATTACKERS, playerA, "Might of Old Krosa");
|
castSpell(1, PhaseStep.DECLARE_ATTACKERS, playerA, "Might of Old Krosa");
|
||||||
addTarget(playerA, "Inkmoth Nexus");
|
// Inkmoth Nexus is auto-chosen since it's the only possible target
|
||||||
// +5 poison
|
// +5 poison
|
||||||
|
|
||||||
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}: {this} becomes");
|
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}: {this} becomes");
|
||||||
attack(3, playerA, "Inkmoth Nexus");
|
attack(3, playerA, "Inkmoth Nexus");
|
||||||
castSpell(3, PhaseStep.DECLARE_ATTACKERS, playerA, "Become Immense");
|
castSpell(3, PhaseStep.DECLARE_ATTACKERS, playerA, "Become Immense");
|
||||||
addTarget(playerA, "Inkmoth Nexus");
|
// Inkmoth Nexus is auto-chosen since it's the only possible target
|
||||||
// +7 poison
|
// +7 poison
|
||||||
|
|
||||||
setStopAt(3, PhaseStep.END_COMBAT);
|
setStopAt(3, PhaseStep.END_COMBAT);
|
||||||
|
|
|
@ -533,6 +533,8 @@ public class MorphTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.HAND, playerB, "Supplant Form", 1);
|
addCard(Zone.HAND, playerB, "Supplant Form", 1);
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 6);
|
addCard(Zone.BATTLEFIELD, playerB, "Island", 6);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Akroma, Angel of Fury");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Akroma, Angel of Fury");
|
||||||
setChoice(playerA, true); // cast it face down as 2/2 creature
|
setChoice(playerA, true); // cast it face down as 2/2 creature
|
||||||
// showBattlefield("A battle", 1, PhaseStep.POSTCOMBAT_MAIN, playerA);
|
// showBattlefield("A battle", 1, PhaseStep.POSTCOMBAT_MAIN, playerA);
|
||||||
|
|
|
@ -24,7 +24,7 @@ public class ProvokeTest extends CardTestPlayerBase{
|
||||||
attack(2, playerB, "Silvercoat Lion"); // So it's tapped
|
attack(2, playerB, "Silvercoat Lion"); // So it's tapped
|
||||||
|
|
||||||
attack(3, playerA, "Brontotherium");
|
attack(3, playerA, "Brontotherium");
|
||||||
addTarget(playerA, "Silvercoat Lion");
|
// Silvercoat Lion is auto-chosen since only target
|
||||||
|
|
||||||
setStopAt(3, PhaseStep.POSTCOMBAT_MAIN);
|
setStopAt(3, PhaseStep.POSTCOMBAT_MAIN);
|
||||||
execute();
|
execute();
|
||||||
|
@ -52,7 +52,7 @@ public class ProvokeTest extends CardTestPlayerBase{
|
||||||
attack(2, playerB, "Putrid Imp"); // So it's tapped
|
attack(2, playerB, "Putrid Imp"); // So it's tapped
|
||||||
|
|
||||||
attack(3, playerA, "Brontotherium");
|
attack(3, playerA, "Brontotherium");
|
||||||
addTarget(playerA, "Putrid Imp");
|
// Putrid Imp is auto-chosen sicne only target
|
||||||
|
|
||||||
setStopAt(3, PhaseStep.POSTCOMBAT_MAIN);
|
setStopAt(3, PhaseStep.POSTCOMBAT_MAIN);
|
||||||
execute();
|
execute();
|
||||||
|
@ -62,6 +62,5 @@ public class ProvokeTest extends CardTestPlayerBase{
|
||||||
|
|
||||||
assertLife(playerA, 18); // one attack from Imp
|
assertLife(playerA, 18); // one attack from Imp
|
||||||
assertLife(playerB, 15); // Not blocked
|
assertLife(playerB, 15); // Not blocked
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -392,15 +392,14 @@ public class SoulbondKeywordTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
Permanent trustedForcemange = getPermanent("Trusted Forcemage", playerA.getId());
|
Permanent trustedForcemange = getPermanent("Trusted Forcemage", playerA.getId());
|
||||||
Permanent eliteVanguard = getPermanent("Elite Vanguard", playerA.getId());
|
Permanent eliteVanguard = getPermanent("Elite Vanguard", playerA.getId());
|
||||||
Assert.assertEquals(trustedForcemange.getPairedCard(), null);
|
Assert.assertNull(trustedForcemange.getPairedCard());
|
||||||
Assert.assertEquals(eliteVanguard.getPairedCard(), null);
|
Assert.assertNull(eliteVanguard.getPairedCard());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reported bug: Soulbond should use the stack, but unable to use instant speed removal since no trigger occurs
|
* Reported bug: Soulbond should use the stack, but unable to use instant speed removal since no trigger occurs
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
// Soulbond does not currently use the stack, so this test will fail until then
|
|
||||||
public void testRespondToSoulboundWithRemoval() {
|
public void testRespondToSoulboundWithRemoval() {
|
||||||
// When Palinchron enters the battlefield, untap up to seven lands.
|
// When Palinchron enters the battlefield, untap up to seven lands.
|
||||||
// {2}{U}{U}: Return Palinchron to its owner's hand.
|
// {2}{U}{U}: Return Palinchron to its owner's hand.
|
||||||
|
@ -414,17 +413,17 @@ public class SoulbondKeywordTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Swamp", 2);
|
addCard(Zone.BATTLEFIELD, playerB, "Swamp", 2);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Deadeye Navigator");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Deadeye Navigator");
|
||||||
setChoice(playerA, true);
|
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, 1);
|
||||||
setChoice(playerA, "Palinchron");
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Doom Blade", "Deadeye Navigator");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Doom Blade", "Deadeye Navigator");
|
||||||
|
|
||||||
// Deadeye's ability should not be usable since was destroyed before Soulbond trigger resolved
|
// Deadeye's ability should not be usable since was destroyed before Soulbond trigger resolved
|
||||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}{U}:");
|
checkPlayableAbility("Can't activate", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}{U}:", false);
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
|
||||||
Permanent palinchron = getPermanent("Palinchron", playerA);
|
Permanent palinchron = getPermanent("Palinchron", playerA);
|
||||||
Assert.assertEquals(null, palinchron.getPairedCard()); // should not be paired
|
Assert.assertNull(palinchron.getPairedCard()); // should not be paired
|
||||||
assertGraveyardCount(playerA, "Deadeye Navigator", 1);
|
assertGraveyardCount(playerA, "Deadeye Navigator", 1);
|
||||||
assertGraveyardCount(playerB, "Doom Blade", 1);
|
assertGraveyardCount(playerB, "Doom Blade", 1);
|
||||||
assertPermanentCount(playerA, "Palinchron", 1);
|
assertPermanentCount(playerA, "Palinchron", 1);
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class SpliceOnArcaneTest extends CardTestPlayerBase {
|
||||||
// activate splice: yes -> card with splice ability -> new target for spliced ability
|
// activate splice: yes -> card with splice ability -> new target for spliced ability
|
||||||
setChoice(playerA, true);
|
setChoice(playerA, true);
|
||||||
addTarget(playerA, "Torrent of Stone");
|
addTarget(playerA, "Torrent of Stone");
|
||||||
addTarget(playerA, "Silvercoat Lion"); // target for spliced ability: 4 damage
|
// Silvercoat Lion is auto-chosen is only possible target
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
|
|
@ -76,7 +76,7 @@ public class AddingCountersToPermanentsTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Pillarfield Ox", 1);
|
addCard(Zone.BATTLEFIELD, playerB, "Pillarfield Ox", 1);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Soulstinger");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Soulstinger");
|
||||||
addTarget(playerA, "Soulstinger");
|
// Soulstinger auto-chosen since only target
|
||||||
|
|
||||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Turn to Slag", "Soulstinger");
|
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Turn to Slag", "Soulstinger");
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,7 @@ public class MovingCounterTest extends CardTestPlayerBase {
|
||||||
attack(3, playerA, "Leech Bonder");
|
attack(3, playerA, "Leech Bonder");
|
||||||
|
|
||||||
activateAbility(3, PhaseStep.POSTCOMBAT_MAIN, playerA, "{U},", "Leech Bonder");
|
activateAbility(3, PhaseStep.POSTCOMBAT_MAIN, playerA, "{U},", "Leech Bonder");
|
||||||
addTarget(playerA, "Ley Druid");
|
// Ley Druid auto-chosen since only target
|
||||||
|
|
||||||
setStopAt(3, PhaseStep.END_TURN);
|
setStopAt(3, PhaseStep.END_TURN);
|
||||||
execute();
|
execute();
|
||||||
|
@ -111,6 +111,5 @@ public class MovingCounterTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
assertGraveyardCount(playerB, "Ley Druid", 1);
|
assertGraveyardCount(playerB, "Ley Druid", 1);
|
||||||
assertPowerToughness(playerA, "Leech Bonder", 2, 2);
|
assertPowerToughness(playerA, "Leech Bonder", 2, 2);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ public class SatyrFiredancerTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion");
|
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion");
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", playerB);
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", playerB);
|
||||||
addTarget(playerA, "Silvercoat Lion");
|
// Silvercoat Lion autochosen since only option
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class FiendHunterTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Primeval Titan");
|
addCard(Zone.BATTLEFIELD, playerB, "Primeval Titan");
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Fiend Hunter");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Fiend Hunter");
|
||||||
addTarget(playerA, "Primeval Titan");
|
// Target autochosen since only one option
|
||||||
|
|
||||||
setStopAt(2, PhaseStep.PRECOMBAT_MAIN);
|
setStopAt(2, PhaseStep.PRECOMBAT_MAIN);
|
||||||
execute();
|
execute();
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class OblivionSowerTest extends CardTestPlayerBase {
|
||||||
skipInitShuffling();
|
skipInitShuffling();
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Oblivion Sower");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Oblivion Sower");
|
||||||
addTarget(playerA, playerB);
|
// addTarget(playerA, playerB); Auto-chosen since only option
|
||||||
|
|
||||||
addTarget(playerA, "Canopy Vista^Canopy Vista^Canopy Vista");
|
addTarget(playerA, "Canopy Vista^Canopy Vista^Canopy Vista");
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,8 @@ public class SoulConduitTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, soulConduit);
|
addCard(Zone.BATTLEFIELD, playerA, soulConduit);
|
||||||
addCard(Zone.HAND, playerA, liveFast);
|
addCard(Zone.HAND, playerA, liveFast);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, liveFast); // to force losing two life
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, liveFast); // to force losing two life
|
||||||
activateAbility(1, PhaseStep.BEGIN_COMBAT, playerA, "{6}");
|
activateAbility(1, PhaseStep.BEGIN_COMBAT, playerA, "{6}");
|
||||||
addTarget(playerA, playerA);
|
addTarget(playerA, playerA);
|
||||||
|
|
|
@ -31,15 +31,12 @@ public class CastFromLibraryTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 8);
|
addCard(Zone.BATTLEFIELD, playerA, "Forest", 8);
|
||||||
|
|
||||||
addCard(Zone.LIBRARY, playerA, "Silvercoat Lion", 2);
|
addCard(Zone.LIBRARY, playerA, "Silvercoat Lion", 2);
|
||||||
// You may look at the top card of your library. (You may do this at any time.)
|
|
||||||
// You may cast the top card of your library if it's a creature card.
|
|
||||||
// You may spend mana as though it were mana of any type to cast creature spells.
|
|
||||||
addCard(Zone.HAND, playerA, "Vizier of the Menagerie", 1); // Creature 3/4 {3}{G}
|
addCard(Zone.HAND, playerA, "Vizier of the Menagerie", 1); // Creature 3/4 {3}{G}
|
||||||
|
|
||||||
skipInitShuffling();
|
skipInitShuffling();
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Vizier of the Menagerie");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Vizier of the Menagerie");
|
||||||
castSpell(1, PhaseStep.BEGIN_COMBAT, playerA, "Silvercoat Lion");
|
checkPlayableAbility("Can't cast at instant speed", 1, PhaseStep.BEGIN_COMBAT, playerA, "Cast Silvercoat Lion", false);
|
||||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Silvercoat Lion");
|
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Silvercoat Lion");
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.END_TURN);
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
|
|
|
@ -90,12 +90,14 @@ public class LegendarySorceryTest extends CardTestPlayerBase {
|
||||||
// Exile all nonland permanents that aren't legendary.
|
// Exile all nonland permanents that aren't legendary.
|
||||||
addCard(Zone.GRAVEYARD, playerB, "Urza's Ruinous Blast"); // Sorcery Legendary {4}{W}
|
addCard(Zone.GRAVEYARD, playerB, "Urza's Ruinous Blast"); // Sorcery Legendary {4}{W}
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Dire Fleet Daredevil");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Dire Fleet Daredevil");
|
||||||
addTarget(playerA, "Urza's Ruinous Blast");
|
addTarget(playerA, "Urza's Ruinous Blast");
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Urza's Ruinous Blast");
|
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Urza's Ruinous Blast");
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
execute();
|
execute();
|
||||||
|
|
||||||
assertExileCount(playerB, "Urza's Ruinous Blast", 1);
|
assertExileCount(playerB, "Urza's Ruinous Blast", 1);
|
||||||
|
|
|
@ -26,7 +26,7 @@ public class ManaWasSpentToCastTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Abzan Banner");
|
addCard(Zone.BATTLEFIELD, playerB, "Abzan Banner");
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Tin Street Hooligan");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Tin Street Hooligan");
|
||||||
addTarget(playerA, "Abzan Banner");
|
// Abzan Banner is auto-chosen since only possible target
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
|
||||||
|
|
|
@ -75,10 +75,11 @@ public class TragicSlipTest extends CardTestPlayerBase {
|
||||||
assertPermanentCount(playerA, "Pillarfield Ox", 0);
|
assertPermanentCount(playerA, "Pillarfield Ox", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
Killed an opponent's Young Pyromancer with Ulcerate then flashed back Tragic Slip with Snapcaster Mage targeting their Tarmogoyf.
|
* Reported bug:
|
||||||
Morbid didn't seem to work and only applied -1/-1 to the Tarmogoyf.
|
* Killed an opponent's Young Pyromancer with Ulcerate then flashed back Tragic Slip with Snapcaster Mage targeting their Tarmogoyf.
|
||||||
*/
|
* Morbid didn't seem to work and only applied -1/-1 to the Tarmogoyf.
|
||||||
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testPlayedWithFlashbackAgain() {
|
public void testPlayedWithFlashbackAgain() {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 3);
|
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 3);
|
||||||
|
@ -101,14 +102,17 @@ public class TragicSlipTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Tarmogoyf");
|
addCard(Zone.BATTLEFIELD, playerB, "Tarmogoyf");
|
||||||
addCard(Zone.GRAVEYARD, playerB, "Mountain");
|
addCard(Zone.GRAVEYARD, playerB, "Mountain");
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Tragic Slip", "Silvercoat Lion");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Tragic Slip", "Silvercoat Lion");
|
||||||
|
|
||||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Snapcaster Mage");
|
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Snapcaster Mage");
|
||||||
addTarget(playerA, "Tragic Slip");
|
addTarget(playerA, "Tragic Slip");
|
||||||
|
waitStackResolved(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Lightning Bolt", "Snapcaster Mage");
|
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Lightning Bolt", "Snapcaster Mage");
|
||||||
|
waitStackResolved(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||||
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Flashback {B}"); // now snapcaster mage is died so -13/-13
|
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Flashback {B}"); // now snapcaster mage is ded so -13/-13
|
||||||
addTarget(playerA, "Tarmogoyf");
|
addTarget(playerA, "Tarmogoyf");
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.END_TURN);
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
|
|
|
@ -81,11 +81,12 @@ public class MerfolkTricksterTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 2);
|
addCard(Zone.BATTLEFIELD, playerB, "Island", 2);
|
||||||
addCard(Zone.HAND, playerB, mTrickster);
|
addCard(Zone.HAND, playerB, mTrickster);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
attack(1, playerA, "Footlight Fiend");
|
attack(1, playerA, "Footlight Fiend");
|
||||||
castSpell(1, PhaseStep.DECLARE_ATTACKERS, playerB, mTrickster);
|
castSpell(1, PhaseStep.DECLARE_ATTACKERS, playerB, mTrickster);
|
||||||
addTarget(playerB, "Footlight Fiend");
|
addTarget(playerB, "Footlight Fiend");
|
||||||
block(1, playerB, mTrickster, "Footlight Fiend");
|
block(1, playerB, mTrickster, "Footlight Fiend");
|
||||||
addTarget(playerA, mTrickster);
|
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.END_COMBAT);
|
setStopAt(1, PhaseStep.END_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
@ -95,7 +96,6 @@ public class MerfolkTricksterTest extends CardTestPlayerBase {
|
||||||
assertTappedCount("Island", true, 2);
|
assertTappedCount("Island", true, 2);
|
||||||
assertPermanentCount(playerB, mTrickster, 1);
|
assertPermanentCount(playerB, mTrickster, 1);
|
||||||
assertDamageReceived(playerB, mTrickster, 1);
|
assertDamageReceived(playerB, mTrickster, 1);
|
||||||
//assertAllCommandsUsed(); // uncommenting this will force a failure since PlayerA cannot do a command to target Trickster, as expected
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -110,13 +110,14 @@ public class MerfolkTricksterTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 2);
|
addCard(Zone.BATTLEFIELD, playerB, "Island", 2);
|
||||||
addCard(Zone.HAND, playerB, mTrickster);
|
addCard(Zone.HAND, playerB, mTrickster);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "-2:");
|
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "-2:");
|
||||||
|
|
||||||
attack(3, playerA, "Devil Token");
|
attack(3, playerA, "Devil Token");
|
||||||
castSpell(3, PhaseStep.DECLARE_ATTACKERS, playerB, mTrickster);
|
castSpell(3, PhaseStep.DECLARE_ATTACKERS, playerB, mTrickster);
|
||||||
addTarget(playerB, "Devil Token");
|
addTarget(playerB, "Devil Token");
|
||||||
block(3, playerB, mTrickster, "Devil Token");
|
block(3, playerB, mTrickster, "Devil Token");
|
||||||
addTarget(playerA, mTrickster);
|
|
||||||
|
|
||||||
setStopAt(3, PhaseStep.END_COMBAT);
|
setStopAt(3, PhaseStep.END_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
@ -127,6 +128,5 @@ public class MerfolkTricksterTest extends CardTestPlayerBase {
|
||||||
assertTappedCount("Island", true, 2);
|
assertTappedCount("Island", true, 2);
|
||||||
assertPermanentCount(playerB, mTrickster, 1);
|
assertPermanentCount(playerB, mTrickster, 1);
|
||||||
assertDamageReceived(playerB, mTrickster, 1);
|
assertDamageReceived(playerB, mTrickster, 1);
|
||||||
// assertAllCommandsUsed(); // uncommenting this should force a failure since PlayerA cannot do a command to target Trickster, as expected
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ public class BronzeBombshellTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.HAND, playerA, "Hero's Downfall"); // {1}{B}{B}
|
addCard(Zone.HAND, playerA, "Hero's Downfall"); // {1}{B}{B}
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Hero's Downfall", "Bronze Bombshell");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Hero's Downfall", "Bronze Bombshell");
|
||||||
addTarget(playerA, playerB);
|
// playerB is autochosen since only possible target
|
||||||
|
|
||||||
setStopAt(2, PhaseStep.UPKEEP);
|
setStopAt(2, PhaseStep.UPKEEP);
|
||||||
execute();
|
execute();
|
||||||
|
@ -38,7 +38,5 @@ public class BronzeBombshellTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
assertLife(playerA, 20);
|
assertLife(playerA, 20);
|
||||||
assertLife(playerB, 13);
|
assertLife(playerB, 13);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -216,6 +216,8 @@ public class GainControlTargetEffectTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5);
|
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5);
|
||||||
addCard(Zone.BATTLEFIELD, playerB, aLight);
|
addCard(Zone.BATTLEFIELD, playerB, aLight);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, oGorger);
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, oGorger);
|
||||||
setChoice(playerA, true); // opt to use Kirin's ability
|
setChoice(playerA, true); // opt to use Kirin's ability
|
||||||
addTarget(playerA, aLight); // target Angel of Light with Kirin's take control ability
|
addTarget(playerA, aLight); // target Angel of Light with Kirin's take control ability
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class GontiLordOfLuxuryEffectTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion");
|
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion");
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Gonti, Lord of Luxury");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Gonti, Lord of Luxury");
|
||||||
addTarget(playerA, playerB);
|
// Player B is autochosen since only option
|
||||||
setChoice(playerA, "Rashmi, Eternities Crafter");
|
setChoice(playerA, "Rashmi, Eternities Crafter");
|
||||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Rashmi, Eternities Crafter");
|
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Rashmi, Eternities Crafter");
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ public class GontiLordOfLuxuryEffectTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.HAND, playerB, "Cyclonic Rift", 1); // Intant {1}{U}
|
addCard(Zone.HAND, playerB, "Cyclonic Rift", 1); // Intant {1}{U}
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Gonti, Lord of Luxury");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Gonti, Lord of Luxury");
|
||||||
addTarget(playerA, playerB);
|
// Player B is autochosen since only option
|
||||||
setChoice(playerA, "Mirari's Wake");
|
setChoice(playerA, "Mirari's Wake");
|
||||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Mirari's Wake");
|
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Mirari's Wake");
|
||||||
castSpell(1, PhaseStep.END_TURN, playerB, "Cyclonic Rift", "Mirari's Wake");
|
castSpell(1, PhaseStep.END_TURN, playerB, "Cyclonic Rift", "Mirari's Wake");
|
||||||
|
@ -124,7 +124,7 @@ public class GontiLordOfLuxuryEffectTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Swamp", 2);
|
addCard(Zone.BATTLEFIELD, playerB, "Swamp", 2);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Gonti, Lord of Luxury");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Gonti, Lord of Luxury");
|
||||||
addTarget(playerA, playerB);
|
// Player B is autochosen since only option
|
||||||
setChoice(playerA, "Lingering Souls");
|
setChoice(playerA, "Lingering Souls");
|
||||||
|
|
||||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Lingering Souls");
|
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Lingering Souls");
|
||||||
|
@ -174,7 +174,7 @@ public class GontiLordOfLuxuryEffectTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Dross Crocodile", 2); // Creature 5/1
|
addCard(Zone.BATTLEFIELD, playerB, "Dross Crocodile", 2); // Creature 5/1
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Gonti, Lord of Luxury");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Gonti, Lord of Luxury");
|
||||||
addTarget(playerA, playerB);
|
// Player B is autochosen since only option
|
||||||
setChoice(playerA, "Ob Nixilis Reignited");
|
setChoice(playerA, "Ob Nixilis Reignited");
|
||||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Ob Nixilis Reignited");
|
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Ob Nixilis Reignited");
|
||||||
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "-3:", "Dross Crocodile");
|
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "-3:", "Dross Crocodile");
|
||||||
|
|
|
@ -71,7 +71,7 @@ public class CopyCreatureCardToTokenImplTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Thrashing Brontodon");
|
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Thrashing Brontodon");
|
||||||
activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{1}, Sacrifice");
|
activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{1}, Sacrifice");
|
||||||
addTarget(playerB, "Alpha Myr");
|
// Alpha Myr is auto-chosen since only valid target
|
||||||
|
|
||||||
setStopAt(2, PhaseStep.BEGIN_COMBAT);
|
setStopAt(2, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
|
|
@ -359,7 +359,7 @@ public class CopySpellTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
|
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
|
||||||
// Flying, vigilance, deathtouch, lifelink
|
// Flying, vigilance, deathtouch, lifelink
|
||||||
// At the beginning of your end step, proliferate.
|
// At the beginning of your end step, proliferate.
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Atraxa, Praetors' Voice", 4);
|
addCard(Zone.BATTLEFIELD, playerA, "Atraxa, Praetors' Voice", 1);
|
||||||
// Walking Ballista enters the battlefield with X +1/+1 counters on it.
|
// Walking Ballista enters the battlefield with X +1/+1 counters on it.
|
||||||
// {4}: Put a +1/+1 counter on Walking Ballista.
|
// {4}: Put a +1/+1 counter on Walking Ballista.
|
||||||
// Remove a +1/+1 counter from Walking Ballista: It deals 1 damage to any target.
|
// Remove a +1/+1 counter from Walking Ballista: It deals 1 damage to any target.
|
||||||
|
@ -373,6 +373,8 @@ public class CopySpellTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.HAND, playerB, "Dualcaster Mage"); // Creature {1}{R}{R}
|
addCard(Zone.HAND, playerB, "Dualcaster Mage"); // Creature {1}{R}{R}
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Mountain", 4);
|
addCard(Zone.BATTLEFIELD, playerB, "Mountain", 4);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Walking Ballista");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Walking Ballista");
|
||||||
setChoice(playerA, "X=1");
|
setChoice(playerA, "X=1");
|
||||||
setChoice(playerA, "Walking Ballista"); // for proliferate
|
setChoice(playerA, "Walking Ballista"); // for proliferate
|
||||||
|
|
|
@ -131,7 +131,6 @@ public class CryptoplasmTest extends CardTestPlayerBase {
|
||||||
assertLife(playerA, 25);
|
assertLife(playerA, 25);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testTransformMultipleTime() {
|
public void testTransformMultipleTime() {
|
||||||
// At the beginning of your upkeep, you may have Cryptoplasm become a copy of another target creature. If you do, Cryptoplasm gains this ability.
|
// At the beginning of your upkeep, you may have Cryptoplasm become a copy of another target creature. If you do, Cryptoplasm gains this ability.
|
||||||
|
@ -141,10 +140,17 @@ public class CryptoplasmTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1); // 6/4
|
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1); // 6/4
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Craw Wurm", 1); // 6/4
|
addCard(Zone.BATTLEFIELD, playerB, "Craw Wurm", 1); // 6/4
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cryptoplasm");
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
|
// Turn 1
|
||||||
|
setChoice(playerA, "Yes");
|
||||||
addTarget(playerA, "Silvercoat Lion");
|
addTarget(playerA, "Silvercoat Lion");
|
||||||
|
|
||||||
|
// Turn 3
|
||||||
|
setChoice(playerA, "Yes");
|
||||||
addTarget(playerA, "Craw Wurm");
|
addTarget(playerA, "Craw Wurm");
|
||||||
setStopAt(5, PhaseStep.PRECOMBAT_MAIN);
|
|
||||||
|
setStopAt(3, PhaseStep.PRECOMBAT_MAIN);
|
||||||
execute();
|
execute();
|
||||||
|
|
||||||
assertLife(playerA, 20);
|
assertLife(playerA, 20);
|
||||||
|
|
|
@ -25,6 +25,8 @@ public class SweepTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Raging Goblin");
|
addCard(Zone.BATTLEFIELD, playerA, "Raging Goblin");
|
||||||
addCard(Zone.HAND, playerA, "Plow Through Reito");
|
addCard(Zone.HAND, playerA, "Plow Through Reito");
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Plow Through Reito");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Plow Through Reito");
|
||||||
addTarget(playerA, "Raging Goblin"); // target to boost
|
addTarget(playerA, "Raging Goblin"); // target to boost
|
||||||
addTarget(playerA, "Plains"); // targets to sweep
|
addTarget(playerA, "Plains"); // targets to sweep
|
||||||
|
@ -43,6 +45,8 @@ public class SweepTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Raging Goblin");
|
addCard(Zone.BATTLEFIELD, playerA, "Raging Goblin");
|
||||||
addCard(Zone.HAND, playerA, "Plow Through Reito");
|
addCard(Zone.HAND, playerA, "Plow Through Reito");
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Plow Through Reito");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Plow Through Reito");
|
||||||
addTarget(playerA, "Raging Goblin"); // target to boost
|
addTarget(playerA, "Raging Goblin"); // target to boost
|
||||||
addTarget(playerA, "Plains^Plains"); // targets to sweep
|
addTarget(playerA, "Plains^Plains"); // targets to sweep
|
||||||
|
@ -61,6 +65,8 @@ public class SweepTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Raging Goblin");
|
addCard(Zone.BATTLEFIELD, playerA, "Raging Goblin");
|
||||||
addCard(Zone.HAND, playerA, "Plow Through Reito");
|
addCard(Zone.HAND, playerA, "Plow Through Reito");
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Plow Through Reito");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Plow Through Reito");
|
||||||
addTarget(playerA, "Raging Goblin"); // target to boost
|
addTarget(playerA, "Raging Goblin"); // target to boost
|
||||||
addTarget(playerA, "Plains^Plains^Plains"); // targets to sweep
|
addTarget(playerA, "Plains^Plains^Plains"); // targets to sweep
|
||||||
|
|
|
@ -44,7 +44,10 @@ public class AnimateDeadTest extends CardTestPlayerBase {
|
||||||
// Enchanted creature gets -1/-0.
|
// Enchanted creature gets -1/-0.
|
||||||
addCard(Zone.HAND, playerA, "Animate Dead"); // {1}{B}
|
addCard(Zone.HAND, playerA, "Animate Dead"); // {1}{B}
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Animate Dead", "Eternal Witness");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Animate Dead", "Eternal Witness");
|
||||||
|
setChoice(playerA, "Yes");
|
||||||
addTarget(playerA, "Silvercoat Lion");
|
addTarget(playerA, "Silvercoat Lion");
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
|
@ -80,7 +83,10 @@ public class AnimateDeadTest extends CardTestPlayerBase {
|
||||||
// Enchanted creature gets -1/-0.
|
// Enchanted creature gets -1/-0.
|
||||||
addCard(Zone.HAND, playerA, "Animate Dead"); // {1}{B}
|
addCard(Zone.HAND, playerA, "Animate Dead"); // {1}{B}
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Animate Dead", "Eternal Witness");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Animate Dead", "Eternal Witness");
|
||||||
|
setChoice(playerA, "Yes");
|
||||||
addTarget(playerA, "Silvercoat Lion");
|
addTarget(playerA, "Silvercoat Lion");
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Lightning Bolt", "Eternal Witness");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Lightning Bolt", "Eternal Witness");
|
||||||
|
|
|
@ -49,11 +49,9 @@ public class AuraMovingTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Alexi's Cloak", "Bruna, Light of Alabaster");
|
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Alexi's Cloak", "Bruna, Light of Alabaster");
|
||||||
attack(2, playerB, "Bruna, Light of Alabaster");
|
attack(2, playerB, "Bruna, Light of Alabaster");
|
||||||
|
setChoice(playerB, "Yes");
|
||||||
|
setChoice(playerB, "Yes");
|
||||||
|
|
||||||
setChoice(playerB, true);
|
|
||||||
addTarget(playerB, "Hostile Realm");
|
|
||||||
setChoice(playerB, true);
|
|
||||||
addTarget(playerB, "Unholy Strength");
|
|
||||||
|
|
||||||
setStopAt(2, PhaseStep.POSTCOMBAT_MAIN);
|
setStopAt(2, PhaseStep.POSTCOMBAT_MAIN);
|
||||||
execute();
|
execute();
|
||||||
|
|
|
@ -12,43 +12,44 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
*/
|
*/
|
||||||
public class SagesReverieTest extends CardTestPlayerBase {
|
public class SagesReverieTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
/*
|
/**
|
||||||
21:11: MarioPineda casts Sage's Reverie [26d] targeting face down creature
|
* 21:11: MarioPineda casts Sage's Reverie [26d] targeting face down creature
|
||||||
21:11: Ability triggers: Sage's Reverie [26d] - When Sage's Reverie [26d] enters the battlefield, draw a card for each aura you control that's attached to a creature.
|
* 21:11: Ability triggers: Sage's Reverie [26d] - When Sage's Reverie [26d] enters the battlefield, draw a card for each aura you control that's attached to a creature.
|
||||||
21:11: mbvash casts Crackling Doom [b78]
|
* 21:11: mbvash casts Crackling Doom [b78]
|
||||||
21:11: MarioPineda loses 2 life
|
* 21:11: MarioPineda loses 2 life
|
||||||
21:11: MarioPineda sacrificed face down creature
|
* 21:11: MarioPineda sacrificed face down creature
|
||||||
21:11: mbvash puts Crackling Doom [b78] from stack into their graveyard
|
* 21:11: mbvash puts Crackling Doom [b78] from stack into their graveyard
|
||||||
21:11: Cloudform [9cd] is put into graveyard from battlefield
|
* 21:11: Cloudform [9cd] is put into graveyard from battlefield
|
||||||
21:11: Sage's Reverie [26d] is put into graveyard from battlefield
|
* 21:11: Sage's Reverie [26d] is put into graveyard from battlefield
|
||||||
21:11: MarioPineda draws two cards
|
* 21:11: MarioPineda draws two cards
|
||||||
|
*
|
||||||
There were two other Auras on the battlefield, and Sage's Reverie made me draw two cards even though the creature it was going to enchant left the battlefield.
|
* There were two other Auras on the battlefield, and Sage's Reverie made me draw two cards even though the creature it was going to enchant left the battlefield.
|
||||||
|
*
|
||||||
http://www.mtgsalvation.com/forums/magic-fundamentals/magic-rulings/604851-sages-reverie-question
|
* http://www.mtgsalvation.com/forums/magic-fundamentals/magic-rulings/604851-sages-reverie-question
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testNoCardDrawIfTargetIllegal() {
|
public void testNoCardDrawIfTargetIllegal() {
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion", 1);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Pillarfield Ox", 1);
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 5);
|
addCard(Zone.BATTLEFIELD, playerA, "Plains", 5);
|
||||||
// Enchant creature
|
// Enchant creature
|
||||||
// When Sage's Reverie enters the battlefield, draw a card for each aura you control that's attached to a creature.
|
// When Sage's Reverie enters the battlefield, draw a card for each aura you control that's attached to a creature.
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Sage's Reverie", 1); // {3}{W}
|
addCard(Zone.HAND, playerA, "Sage's Reverie", 1); // {3}{W}
|
||||||
// Enchant creature
|
// Enchant creature
|
||||||
// Enchanted creature has lifelink
|
// Enchanted creature has lifelink
|
||||||
addCard(Zone.HAND, playerA, "Lifelink", 1); // {W}
|
addCard(Zone.HAND, playerA, "Lifelink", 1); // {W}
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion", 1);
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Pillarfield Ox", 1);
|
|
||||||
|
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Swamp", 3);
|
addCard(Zone.BATTLEFIELD, playerB, "Swamp", 3);
|
||||||
// Destroy target creature or planeswalker.
|
// Destroy target creature or planeswalker.
|
||||||
addCard(Zone.HAND, playerB, "Hero's Downfall"); // {1}{B}{B}
|
addCard(Zone.HAND, playerB, "Hero's Downfall"); // {1}{B}{B}
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lifelink", "Silvercoat Lion");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lifelink", "Silvercoat Lion");
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Sage's Reverie", "Pillarfield Ox");
|
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Sage's Reverie", "Pillarfield Ox");
|
||||||
|
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Hero's Downfall", "Pillarfield Ox", "Sage's Reverie");
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Hero's Downfall", "Pillarfield Ox");
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
|
||||||
execute();
|
execute();
|
||||||
|
|
||||||
assertPermanentCount(playerA, "Lifelink", 1);
|
assertPermanentCount(playerA, "Lifelink", 1);
|
||||||
|
|
|
@ -83,8 +83,10 @@ public class StarfieldOfNyxTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Silumgar, the Drifting Death", 1);
|
addCard(Zone.BATTLEFIELD, playerB, "Silumgar, the Drifting Death", 1);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Starfield of Nyx");
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Starfield of Nyx");
|
||||||
|
setChoice(playerA, "Yes");
|
||||||
addTarget(playerA, "Singing Bell Strike");
|
addTarget(playerA, "Singing Bell Strike");
|
||||||
setChoice(playerA, "Silumgar, the Drifting Death");
|
setChoice(playerA, "Silumgar, the Drifting Death");
|
||||||
|
|
||||||
|
@ -97,9 +99,9 @@ public class StarfieldOfNyxTest extends CardTestPlayerBase {
|
||||||
Permanent enchantment = getPermanent("Singing Bell Strike", playerA);
|
Permanent enchantment = getPermanent("Singing Bell Strike", playerA);
|
||||||
if (enchantment != null && enchantment.getAttachedTo() != null) {
|
if (enchantment != null && enchantment.getAttachedTo() != null) {
|
||||||
Permanent enchanted = currentGame.getPermanent(enchantment.getAttachedTo());
|
Permanent enchanted = currentGame.getPermanent(enchantment.getAttachedTo());
|
||||||
Assert.assertEquals("Silumgar was enchanted", enchanted.getName().equals("Silumgar, the Drifting Death"), true);
|
Assert.assertEquals("Silumgar was enchanted", "Silumgar, the Drifting Death", enchanted.getName());
|
||||||
} else {
|
} else {
|
||||||
Assert.assertEquals("Singing Bell Strike not on the battlefield", false, true);
|
Assert.fail("Singing Bell Strike not on the battlefield");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,9 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
*/
|
*/
|
||||||
public class ChandrasEmbercatTest extends CardTestPlayerBase {
|
public class ChandrasEmbercatTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
// Make sure we can use the mana to cast elementals
|
/**
|
||||||
|
* Make sure we can use the mana to cast elementals
|
||||||
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testCanCastElementalWithMana() {
|
public void testCanCastElementalWithMana() {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 1);
|
addCard(Zone.BATTLEFIELD, playerA, "Plains", 1);
|
||||||
|
@ -36,7 +38,9 @@ public class ChandrasEmbercatTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure we can use the mana to cast Chandra Planeswalkers
|
/**
|
||||||
|
* Make sure we can use the mana to cast Chandra Planeswalkers
|
||||||
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testCanCastChandraPlaneswalkerWithMana() {
|
public void testCanCastChandraPlaneswalkerWithMana() {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 3);
|
addCard(Zone.BATTLEFIELD, playerA, "Plains", 3);
|
||||||
|
@ -54,7 +58,9 @@ public class ChandrasEmbercatTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure we cant use the mana to cast non-Chandra Planeswalkers
|
/**
|
||||||
|
* Make sure we can't use the mana to cast non-Chandra Planeswalkers.
|
||||||
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testCantCastNonChandraPlaneswalkerWithMana() {
|
public void testCantCastNonChandraPlaneswalkerWithMana() {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 3);
|
addCard(Zone.BATTLEFIELD, playerA, "Island", 3);
|
||||||
|
@ -63,7 +69,7 @@ public class ChandrasEmbercatTest extends CardTestPlayerBase {
|
||||||
//A non-Chandra planeswalker that costs {2}{U}{U}
|
//A non-Chandra planeswalker that costs {2}{U}{U}
|
||||||
addCard(Zone.HAND, playerA, "Jace, the Mind Sculptor", 1);
|
addCard(Zone.HAND, playerA, "Jace, the Mind Sculptor", 1);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Jace, the Mind Sculptor");
|
checkPlayableAbility("Mana should be restricted", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Jace", false);
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
@ -72,7 +78,9 @@ public class ChandrasEmbercatTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure we cant use the mana to cast non-Elemental creatures
|
/**
|
||||||
|
* Make sure we can't use the mana to cast non-Elemental creatures.
|
||||||
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testCantCastNonElementalCreatureWithMana() {
|
public void testCantCastNonElementalCreatureWithMana() {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 1);
|
addCard(Zone.BATTLEFIELD, playerA, "Island", 1);
|
||||||
|
@ -81,13 +89,11 @@ public class ChandrasEmbercatTest extends CardTestPlayerBase {
|
||||||
//A non-elemental creature that costs {1}{R}
|
//A non-elemental creature that costs {1}{R}
|
||||||
addCard(Zone.HAND, playerA, "Raptor Hatchling", 1);
|
addCard(Zone.HAND, playerA, "Raptor Hatchling", 1);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Raptor Hatchling");
|
checkPlayableAbility("Mana should be restricted", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Raptor", false);
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
|
||||||
assertPermanentCount(playerA, "Raptor Hatchling", 0);
|
assertPermanentCount(playerA, "Raptor Hatchling", 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,12 +57,10 @@ public class EldraziTempleTest extends CardTestPlayerBase {
|
||||||
// If a land is tapped for two or more mana, it produces {C} instead of any other type and amount.
|
// If a land is tapped for two or more mana, it produces {C} instead of any other type and amount.
|
||||||
// Each spell a player casts costs {1} more to cast for each other spell that player has cast this turn.
|
// Each spell a player casts costs {1} more to cast for each other spell that player has cast this turn.
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Damping Sphere", 1);
|
addCard(Zone.BATTLEFIELD, playerB, "Damping Sphere", 1);
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Barrage Tyrant");
|
checkPlayableAbility("Damping Sphere effective", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Barrage Tyrant", false);
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
|
||||||
assertPermanentCount(playerA, "Barrage Tyrant", 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -105,8 +105,9 @@ public class ConditionalManaTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 4);
|
addCard(Zone.BATTLEFIELD, playerB, "Island", 4);
|
||||||
|
|
||||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Snapping Drake");
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
|
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Snapping Drake");
|
||||||
activateManaAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "{T}: Add {C}{C}{C}{C}");
|
activateManaAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "{T}: Add {C}{C}{C}{C}");
|
||||||
|
|
||||||
activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "{X}, {T}: Untap");
|
activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "{X}, {T}: Untap");
|
||||||
|
|
|
@ -3,6 +3,7 @@ package org.mage.test.cards.planeswalker;
|
||||||
import mage.constants.PhaseStep;
|
import mage.constants.PhaseStep;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
|
|
||||||
|
@ -36,7 +37,16 @@ public class LilianaDefiantNecromancerTest extends CardTestPlayerBase {
|
||||||
setChoice(playerA, "X=1");
|
setChoice(playerA, "X=1");
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.END_TURN);
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
execute();
|
|
||||||
|
try {
|
||||||
|
execute();
|
||||||
|
|
||||||
|
Assert.fail("must throw exception on execute");
|
||||||
|
} catch (Throwable e) {
|
||||||
|
if (!e.getMessage().contains("Player PlayerA must have 0 actions but found 1")) {
|
||||||
|
Assert.fail("Should have thrown error about cannot attack, but got:\n" + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
assertGraveyardCount(playerB, "Lightning Bolt", 1);
|
assertGraveyardCount(playerB, "Lightning Bolt", 1);
|
||||||
assertPermanentCount(playerA, "Liliana, Heretical Healer", 0);
|
assertPermanentCount(playerA, "Liliana, Heretical Healer", 0);
|
||||||
|
@ -65,10 +75,7 @@ public class LilianaDefiantNecromancerTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
// Transformed into Liliana, Defiant Necromancer with (3) loyalty to start
|
// Transformed into Liliana, Defiant Necromancer with (3) loyalty to start
|
||||||
// -X: Return target nonlegendary creature with converted mana cost X from your graveyard to the battlefield.
|
// -X: Return target nonlegendary creature with converted mana cost X from your graveyard to the battlefield.
|
||||||
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "-X:");
|
checkPlayableAbility("Can't -X", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "-X:", false);
|
||||||
setChoice(playerA, "X=3");
|
|
||||||
addTarget(playerA, "Alesha, Who Smiles at Death"); // dunno which to use for returning from grave, both target/choice seem to work
|
|
||||||
setChoice(playerA, "Alesha, Who Smiles at Death");
|
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.END_TURN);
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
execute();
|
execute();
|
||||||
|
@ -103,8 +110,7 @@ public class LilianaDefiantNecromancerTest extends CardTestPlayerBase {
|
||||||
// -X: Return target nonlegendary creature with converted mana cost X from your graveyard to the battlefield.
|
// -X: Return target nonlegendary creature with converted mana cost X from your graveyard to the battlefield.
|
||||||
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "-X:");
|
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "-X:");
|
||||||
setChoice(playerA, "X=2");
|
setChoice(playerA, "X=2");
|
||||||
addTarget(playerA, "Bronze Sable"); // dunno which to use for returning from grave, both target/choice seem to work
|
// Bronze Sable is auto-chosen since only option
|
||||||
setChoice(playerA, "Bronze Sable");
|
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.END_TURN);
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
execute();
|
execute();
|
||||||
|
|
|
@ -58,7 +58,7 @@ public class WinLoseEffectsTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 6);
|
addCard(Zone.BATTLEFIELD, playerB, "Island", 6);
|
||||||
|
|
||||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Set Adrift");
|
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Set Adrift");
|
||||||
addTarget(playerB, "Platinum Angel");
|
// Platinum Angel is auto-chosen since only possible target
|
||||||
|
|
||||||
setStopAt(2, PhaseStep.BEGIN_COMBAT);
|
setStopAt(2, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
|
|
@ -112,6 +112,8 @@ public class DeflectingPalmTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Mountain");
|
addCard(Zone.BATTLEFIELD, playerB, "Mountain");
|
||||||
addCard(Zone.HAND, playerB, "Lightning Bolt");
|
addCard(Zone.HAND, playerB, "Lightning Bolt");
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Lightning Bolt", playerA);
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Lightning Bolt", playerA);
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Deflecting Palm", null, "Lightning Bolt");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Deflecting Palm", null, "Lightning Bolt");
|
||||||
setChoice(playerA, "Lightning Bolt");
|
setChoice(playerA, "Lightning Bolt");
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class ReflectorMageTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Bronze Sable", 1);
|
addCard(Zone.BATTLEFIELD, playerB, "Bronze Sable", 1);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Reflector Mage");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Reflector Mage");
|
||||||
addTarget(playerA, "Bronze Sable");
|
// Bronze Sable is auto-chosen since only option
|
||||||
|
|
||||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Bronze Sable");
|
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Bronze Sable");
|
||||||
|
|
||||||
|
@ -48,7 +48,6 @@ public class ReflectorMageTest extends CardTestPlayerBase {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testReflectorMageRestrictionEffect() {
|
public void testReflectorMageRestrictionEffect() {
|
||||||
|
|
||||||
// {1}{W}{U} When Reflector Mage enters the battlefield, return target creature an opponent controls to its owner's hand.
|
// {1}{W}{U} When Reflector Mage enters the battlefield, return target creature an opponent controls to its owner's hand.
|
||||||
// That creature's owner can't cast spells with the same name as that creature until your next turn.
|
// That creature's owner can't cast spells with the same name as that creature until your next turn.
|
||||||
addCard(Zone.HAND, playerA, "Reflector Mage"); // 2/3
|
addCard(Zone.HAND, playerA, "Reflector Mage"); // 2/3
|
||||||
|
@ -59,7 +58,7 @@ public class ReflectorMageTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Bronze Sable", 1); // (2) 2/1
|
addCard(Zone.BATTLEFIELD, playerB, "Bronze Sable", 1); // (2) 2/1
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Reflector Mage");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Reflector Mage");
|
||||||
addTarget(playerA, "Bronze Sable");
|
// Bronze Sable is auto-chosen since only option
|
||||||
|
|
||||||
checkPlayableAbility("sable not available", 2, PhaseStep.PRECOMBAT_MAIN, playerB, "Cast Bronze", false);
|
checkPlayableAbility("sable not available", 2, PhaseStep.PRECOMBAT_MAIN, playerB, "Cast Bronze", false);
|
||||||
setStopAt(2, PhaseStep.END_TURN);
|
setStopAt(2, PhaseStep.END_TURN);
|
||||||
|
|
|
@ -174,29 +174,31 @@ public class CantCastTest extends CardTestPlayerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test that panic can only be cast during the correct pahse/steü
|
* Test that panic can only be cast during the correct phase/step
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testPanic() {
|
public void testPanic() {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4);
|
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2);
|
||||||
|
|
||||||
// Cast Panic only during combat before blockers are declared.
|
// Cast Panic only during combat before blockers are declared.
|
||||||
// Target creature can't block this turn.
|
// Target creature can't block this turn.
|
||||||
// Draw a card at the beginning of the next turn's upkeep.
|
// Draw a card at the beginning of the next turn's upkeep.
|
||||||
addCard(Zone.HAND, playerA, "Panic", 4); // Instant - {R}
|
addCard(Zone.HAND, playerA, "Panic", 2); // Instant - {R}
|
||||||
|
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Akroan Conscriptor", 1);
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1);
|
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Panic", "Silvercoat Lion");
|
checkPlayableAbility("not in precombat", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Panic", false);
|
||||||
|
attack(1, playerA, "Akroan Conscriptor");
|
||||||
castSpell(1, PhaseStep.DECLARE_ATTACKERS, playerA, "Panic", "Silvercoat Lion");
|
castSpell(1, PhaseStep.DECLARE_ATTACKERS, playerA, "Panic", "Silvercoat Lion");
|
||||||
castSpell(1, PhaseStep.DECLARE_BLOCKERS, playerA, "Panic", "Silvercoat Lion");
|
checkPlayableAbility("not on declare blockers", 1, PhaseStep.DECLARE_BLOCKERS, playerA, "Cast Panic", false);
|
||||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Panic", "Silvercoat Lion");
|
checkPlayableAbility("not in postcombat", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Cast Panic", false);
|
||||||
|
|
||||||
setStopAt(2, PhaseStep.PRECOMBAT_MAIN);
|
setStopAt(2, PhaseStep.PRECOMBAT_MAIN);
|
||||||
execute();
|
execute();
|
||||||
|
|
||||||
assertHandCount(playerA, "Panic", 3);
|
assertHandCount(playerA, "Panic", 1);
|
||||||
assertHandCount(playerA, 4);
|
assertHandCount(playerA, 2);
|
||||||
assertGraveyardCount(playerA, "Panic", 1);
|
assertGraveyardCount(playerA, "Panic", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,12 @@ public class HopeOfGhirapurTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Mountain", 1);
|
addCard(Zone.BATTLEFIELD, playerB, "Mountain", 1);
|
||||||
addCard(Zone.HAND, playerB, "Shock");
|
addCard(Zone.HAND, playerB, "Shock");
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
attack(1, playerA, "Hope of Ghirapur");
|
attack(1, playerA, "Hope of Ghirapur");
|
||||||
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Sacrifice", playerB);
|
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Sacrifice", playerB);
|
||||||
|
|
||||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Shock", playerA);
|
checkPlayableAbility("Can't Shock", 2, PhaseStep.PRECOMBAT_MAIN, playerB, "Shock", false);
|
||||||
|
|
||||||
setStopAt(2, PhaseStep.BEGIN_COMBAT);
|
setStopAt(2, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
@ -31,8 +33,10 @@ public class HopeOfGhirapurTest extends CardTestPlayerBase {
|
||||||
assertPermanentCount(playerA, "Hope of Ghirapur", 0);
|
assertPermanentCount(playerA, "Hope of Ghirapur", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test that ability cannot be activated if after damage Hope of Ghirapur was removed
|
/**
|
||||||
// from the battlefield and returned back.
|
* Test that ability cannot be activated if after damage Hope of Ghirapur was removed
|
||||||
|
* from the battlefield and returned back.
|
||||||
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testWhenHopeOfGhirapurWasRemovedAndReturnedBack() {
|
public void testWhenHopeOfGhirapurWasRemovedAndReturnedBack() {
|
||||||
// Flying
|
// Flying
|
||||||
|
@ -47,7 +51,7 @@ public class HopeOfGhirapurTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
attack(1, playerA, "Hope of Ghirapur");
|
attack(1, playerA, "Hope of Ghirapur");
|
||||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Cloudshift", "Hope of Ghirapur");
|
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Cloudshift", "Hope of Ghirapur");
|
||||||
activateAbility(1, PhaseStep.END_TURN, playerA, "Sacrifice", playerB);
|
checkPlayableAbility("Hope of Ghirapur died", 1, PhaseStep.END_TURN, playerA, "Sacrifice", false);
|
||||||
|
|
||||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Shock", playerA);
|
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Shock", playerA);
|
||||||
|
|
||||||
|
@ -58,5 +62,4 @@ public class HopeOfGhirapurTest extends CardTestPlayerBase {
|
||||||
assertLife(playerB, 19);
|
assertLife(playerB, 19);
|
||||||
assertPermanentCount(playerA, "Hope of Ghirapur", 1);
|
assertPermanentCount(playerA, "Hope of Ghirapur", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ package org.mage.test.cards.single.akh;
|
||||||
|
|
||||||
import mage.constants.PhaseStep;
|
import mage.constants.PhaseStep;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
|
|
||||||
|
@ -25,7 +26,17 @@ public class BontuTheGlorifiedTest extends CardTestPlayerBase {
|
||||||
attack(1, playerA, bontu);
|
attack(1, playerA, bontu);
|
||||||
|
|
||||||
setStopAt(4, PhaseStep.POSTCOMBAT_MAIN);
|
setStopAt(4, PhaseStep.POSTCOMBAT_MAIN);
|
||||||
execute();
|
|
||||||
|
try {
|
||||||
|
execute();
|
||||||
|
assertAllCommandsUsed();
|
||||||
|
|
||||||
|
Assert.fail("must throw exception on execute");
|
||||||
|
} catch (Throwable e) {
|
||||||
|
if (!e.getMessage().contains("Player PlayerA must have 0 actions but found 1")) {
|
||||||
|
Assert.fail("must throw error about having 0 actions, but got:\n" + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
assertLife(playerB, 20);
|
assertLife(playerB, 20);
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ package org.mage.test.cards.single.avr;
|
||||||
|
|
||||||
import mage.constants.PhaseStep;
|
import mage.constants.PhaseStep;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
|
|
||||||
|
@ -19,10 +20,9 @@ public class CavernOfSoulsTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.HAND, playerA, "Cavern of Souls");
|
addCard(Zone.HAND, playerA, "Cavern of Souls");
|
||||||
addCard(Zone.HAND, playerA, "Azure Drake");
|
addCard(Zone.HAND, playerA, "Azure Drake");
|
||||||
|
|
||||||
setChoice(playerA, "Drake");
|
|
||||||
setChoice(playerA, "Blue");
|
|
||||||
|
|
||||||
playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cavern of Souls");
|
playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cavern of Souls");
|
||||||
|
setChoice(playerA, "Drake");
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Azure Drake");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Azure Drake");
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
|
@ -32,30 +32,29 @@ public class CavernOfSoulsTest extends CardTestPlayerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests "Cavern of Souls" with "Human" creature type chosen. Then tests
|
* Tests "Cavern of Souls" with "Human" creature type chosen.
|
||||||
* casting Azure Drake (should fail) and Elite Vanguard (should be ok as it
|
* Then tests casting Abuna Acolyte (should fail) and Elite Vanguard (should be ok as ithas "Human" subtype)
|
||||||
* has "Human" subtype)
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testNoCastBecauseOfCreatureType() {
|
public void testNoCastBecauseOfCreatureType() {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
|
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
|
||||||
addCard(Zone.HAND, playerA, "Cavern of Souls");
|
addCard(Zone.HAND, playerA, "Cavern of Souls");
|
||||||
addCard(Zone.HAND, playerA, "Abuna Acolyte");
|
addCard(Zone.HAND, playerA, "Abuna Acolyte");
|
||||||
addCard(Zone.HAND, playerA, "Elite Vanguard");
|
|
||||||
|
|
||||||
setChoice(playerA, "Human");
|
|
||||||
setChoice(playerA, "White");
|
|
||||||
setChoice(playerA, "White");
|
|
||||||
|
|
||||||
playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cavern of Souls"); // choose Human
|
playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cavern of Souls"); // choose Human
|
||||||
|
setChoice(playerA, "Human");
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Abuna Acolyte"); // not Human but Cat Cleric
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Abuna Acolyte"); // not Human but Cat Cleric
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Elite Vanguard"); // Human
|
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
|
||||||
|
|
||||||
assertPermanentCount(playerA, "Abuna Acolyte", 0);
|
try {
|
||||||
assertPermanentCount(playerA, "Elite Vanguard", 1);
|
execute();
|
||||||
|
} catch (Throwable e) {
|
||||||
|
if (!e.getMessage().contains("Player PlayerA must have 0 actions but found 1")) {
|
||||||
|
Assert.fail("Should have had error playerA having too many actions, but got:\n" + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -149,35 +148,38 @@ public class CavernOfSoulsTest extends CardTestPlayerBase {
|
||||||
public void testConditionlManaWorksIfCavernIsReplayed() {
|
public void testConditionlManaWorksIfCavernIsReplayed() {
|
||||||
addCard(Zone.HAND, playerA, "Cavern of Souls");
|
addCard(Zone.HAND, playerA, "Cavern of Souls");
|
||||||
addCard(Zone.HAND, playerA, "Gladecover Scout"); // Elf costing {G}
|
addCard(Zone.HAND, playerA, "Gladecover Scout"); // Elf costing {G}
|
||||||
// addCard(Zone.HAND, playerA, "Fume Spitter"); // Horror costing {B}
|
addCard(Zone.HAND, playerA, "Fume Spitter"); // Horror costing {B}
|
||||||
|
|
||||||
// Instant - {U}{U} - Return target permanent to its owner's hand.
|
// Instant - {U}{U} - Return target permanent to its owner's hand.
|
||||||
addCard(Zone.HAND, playerB, "Boomerang");
|
addCard(Zone.HAND, playerB, "Boomerang");
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 2);
|
addCard(Zone.BATTLEFIELD, playerB, "Island", 2);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cavern of Souls");
|
playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cavern of Souls");
|
||||||
setChoice(playerA, "Elf");
|
setChoice(playerA, "Elf");
|
||||||
|
|
||||||
// getting green mana for Elf into pool
|
// getting green mana for Elf into pool
|
||||||
activateManaAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add 1 mana of any one color. Spend this mana only to cast a creature spell of the chosen type, and that spell can't be countered.");
|
activateManaAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add one mana of ");
|
||||||
setChoice(playerA, "Green");
|
setChoice(playerA, "Green");
|
||||||
|
|
||||||
// return cavern to hand
|
// return cavern to hand
|
||||||
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerB, "Boomerang", "Cavern of Souls");
|
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerB, "Boomerang", "Cavern of Souls");
|
||||||
|
waitStackResolved(3, PhaseStep.PRECOMBAT_MAIN);
|
||||||
// playing the cavern again choose different creature type
|
|
||||||
playLand(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Cavern of Souls");
|
|
||||||
setChoice(playerA, "Horror");
|
|
||||||
|
|
||||||
// the green mana usable for Elf should be in the mana pool
|
// the green mana usable for Elf should be in the mana pool
|
||||||
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Gladecover Scout");
|
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Gladecover Scout");
|
||||||
|
|
||||||
activateManaAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add 1 mana of any one color. Spend this mana only to cast a creature spell of the chosen type, and that spell can't be countered.");
|
// playing the cavern again choose different creature type
|
||||||
setChoice(playerA, "Black");
|
playLand(3, PhaseStep.POSTCOMBAT_MAIN, playerA, "Cavern of Souls");
|
||||||
|
setChoice(playerA, "Horror");
|
||||||
|
|
||||||
// the black mana usable for Horror should be in the mana pool
|
// the black mana usable for Horror should be in the mana pool
|
||||||
// castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Fume Spitter");
|
activateManaAbility(3, PhaseStep.POSTCOMBAT_MAIN, playerA, "{T}: Add one mana of ");
|
||||||
setStopAt(3, PhaseStep.BEGIN_COMBAT);
|
setChoice(playerA, "Black");
|
||||||
|
castSpell(3, PhaseStep.POSTCOMBAT_MAIN, playerA, "Fume Spitter");
|
||||||
|
|
||||||
|
setStopAt(3, PhaseStep.END_TURN);
|
||||||
execute();
|
execute();
|
||||||
|
|
||||||
assertGraveyardCount(playerB, "Boomerang", 1);
|
assertGraveyardCount(playerB, "Boomerang", 1);
|
||||||
|
@ -186,7 +188,7 @@ public class CavernOfSoulsTest extends CardTestPlayerBase {
|
||||||
// Check the elf was cast
|
// Check the elf was cast
|
||||||
assertPermanentCount(playerA, "Gladecover Scout", 1);
|
assertPermanentCount(playerA, "Gladecover Scout", 1);
|
||||||
// Check Horror on the Battlefield
|
// Check Horror on the Battlefield
|
||||||
// assertPermanentCount(playerA, "Fume Spitter", 1);
|
assertPermanentCount(playerA, "Fume Spitter", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -212,7 +214,7 @@ public class CavernOfSoulsTest extends CardTestPlayerBase {
|
||||||
setChoice(playerA, "Drake");
|
setChoice(playerA, "Drake");
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Return to the Ranks");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Return to the Ranks");
|
||||||
setChoice(playerA, "X=1");
|
setChoice(playerA, "X=1");
|
||||||
addTarget(playerA, "Silvercoat Lion");
|
// Silvercoat Lion is auto-chosen since only target
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Counterspell", "Return to the Ranks");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Counterspell", "Return to the Ranks");
|
||||||
|
|
||||||
|
@ -224,7 +226,6 @@ public class CavernOfSoulsTest extends CardTestPlayerBase {
|
||||||
assertGraveyardCount(playerB, "Counterspell", 1);
|
assertGraveyardCount(playerB, "Counterspell", 1);
|
||||||
assertGraveyardCount(playerA, "Silvercoat Lion", 1);
|
assertGraveyardCount(playerA, "Silvercoat Lion", 1);
|
||||||
assertPermanentCount(playerA, "Silvercoat Lion", 0);
|
assertPermanentCount(playerA, "Silvercoat Lion", 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -242,14 +243,13 @@ public class CavernOfSoulsTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cavern of Souls");
|
playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cavern of Souls");
|
||||||
setChoice(playerA, "Drake");
|
setChoice(playerA, "Drake");
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Desert Drake");
|
checkPlayableAbility("Can't cast the drak", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Desert", false);
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
|
||||||
assertPermanentCount(playerA, "Cavern of Souls", 1);
|
assertPermanentCount(playerA, "Cavern of Souls", 1);
|
||||||
assertPermanentCount(playerA, "Desert Drake", 0);
|
assertPermanentCount(playerA, "Desert Drake", 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -39,8 +39,11 @@ public class EmeriaShepherdTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.GRAVEYARD, playerA, bruna);
|
addCard(Zone.GRAVEYARD, playerA, bruna);
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 7);
|
addCard(Zone.BATTLEFIELD, playerA, "Plains", 7);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Plains");
|
playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Plains");
|
||||||
setChoice(playerA, true); // opt to use Emeria's triggered ability
|
setChoice(playerA, true); // opt to use Emeria's triggered ability
|
||||||
|
setChoice(playerA, true); // opt to put it onto the battlefield instead of the hand
|
||||||
addTarget(playerA, bruna); // target Bruna in grave
|
addTarget(playerA, bruna); // target Bruna in grave
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
|
|
|
@ -27,7 +27,7 @@ public class NephaliaAcademyTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Nephalia Academy", 1);
|
addCard(Zone.BATTLEFIELD, playerB, "Nephalia Academy", 1);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Duress");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Duress");
|
||||||
addTarget(playerA, playerB);
|
// playerB is auto-chosen since only possible target
|
||||||
setChoice(playerA, "Giant Growth"); // choose to discard Giant Growth
|
setChoice(playerA, "Giant Growth"); // choose to discard Giant Growth
|
||||||
setChoice(playerB, true); // replacement effect, choose to reveal the card and place on top of library
|
setChoice(playerB, true); // replacement effect, choose to reveal the card and place on top of library
|
||||||
execute();
|
execute();
|
||||||
|
@ -49,7 +49,7 @@ public class NephaliaAcademyTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Nephalia Academy", 1);
|
addCard(Zone.BATTLEFIELD, playerB, "Nephalia Academy", 1);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Duress");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Duress");
|
||||||
addTarget(playerA, playerB);
|
// playerB is auto-chosen since only possible target
|
||||||
setChoice(playerA, "Giant Growth"); // choose to discard Giant Growth
|
setChoice(playerA, "Giant Growth"); // choose to discard Giant Growth
|
||||||
setChoice(playerB, false); // decline the replacement effect, allow the discard to happen
|
setChoice(playerB, false); // decline the replacement effect, allow the discard to happen
|
||||||
execute();
|
execute();
|
||||||
|
|
|
@ -27,6 +27,8 @@ public class SoulSeparatorTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 5);
|
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 5);
|
||||||
addCard(Zone.GRAVEYARD, playerA, "Sylvan Advocate"); // 2/3 vigilance
|
addCard(Zone.GRAVEYARD, playerA, "Sylvan Advocate"); // 2/3 vigilance
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{5}");
|
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{5}");
|
||||||
addTarget(playerA, "Sylvan Advocate");
|
addTarget(playerA, "Sylvan Advocate");
|
||||||
|
|
||||||
|
@ -61,6 +63,8 @@ public class SoulSeparatorTest extends CardTestPlayerBase {
|
||||||
// {tap}: Exchange target opponent's life total with Tree of Perdition's toughness.
|
// {tap}: Exchange target opponent's life total with Tree of Perdition's toughness.
|
||||||
addCard(Zone.GRAVEYARD, playerA, "Tree of Perdition");
|
addCard(Zone.GRAVEYARD, playerA, "Tree of Perdition");
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{5}");
|
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{5}");
|
||||||
addTarget(playerA, "Tree of Perdition");
|
addTarget(playerA, "Tree of Perdition");
|
||||||
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Exchange");
|
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Exchange");
|
||||||
|
|
|
@ -6,6 +6,14 @@ import org.junit.Test;
|
||||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* {@link mage.cards.s.SpellQueller Spell Queller}
|
||||||
|
* {1}{W}{U}
|
||||||
|
* Spirit
|
||||||
|
* Flash Flying
|
||||||
|
*
|
||||||
|
* When Spell Queller enters the battlefield, exile target spell with converted mana cost 4 or less.
|
||||||
|
* When Spell Queller leaves the battlefield, the exiled card's owner may cast that card without paying its mana cost.
|
||||||
|
* 2/3
|
||||||
*
|
*
|
||||||
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
|
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
|
||||||
*/
|
*/
|
||||||
|
@ -13,10 +21,6 @@ public class SpellQuellerTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testExileSpellCMCFour() {
|
public void testExileSpellCMCFour() {
|
||||||
|
|
||||||
// {1}{W}{U} Flash Flying 2/3 Spirit
|
|
||||||
// When Spell Queller enters the battlefield, exile target spell with converted mana cost 4 or less.
|
|
||||||
// When Spell Queller leaves the battlefield, the exiled card's owner may cast that card without paying its mana cost.
|
|
||||||
addCard(Zone.HAND, playerB, "Spell Queller");
|
addCard(Zone.HAND, playerB, "Spell Queller");
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Plains", 1);
|
addCard(Zone.BATTLEFIELD, playerB, "Plains", 1);
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 2);
|
addCard(Zone.BATTLEFIELD, playerB, "Island", 2);
|
||||||
|
@ -26,7 +30,7 @@ public class SpellQuellerTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Languish");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Languish");
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Spell Queller");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Spell Queller");
|
||||||
addTarget(playerB, "Languish");
|
// Languish is auto-chosen since only possible target
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
@ -37,10 +41,6 @@ public class SpellQuellerTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAttemptExileSpellCMCFive() {
|
public void testAttemptExileSpellCMCFive() {
|
||||||
|
|
||||||
// {1}{W}{U} Flash Flying 2/3 Spirit
|
|
||||||
// When Spell Queller enters the battlefield, exile target spell with converted mana cost 4 or less.
|
|
||||||
// When Spell Queller leaves the battlefield, the exiled card's owner may cast that card without paying its mana cost.
|
|
||||||
addCard(Zone.HAND, playerB, "Spell Queller");
|
addCard(Zone.HAND, playerB, "Spell Queller");
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Plains", 1);
|
addCard(Zone.BATTLEFIELD, playerB, "Plains", 1);
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 2);
|
addCard(Zone.BATTLEFIELD, playerB, "Island", 2);
|
||||||
|
@ -50,7 +50,7 @@ public class SpellQuellerTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Battle Sliver");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Battle Sliver");
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Spell Queller");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Spell Queller");
|
||||||
addTarget(playerB, "Battle Sliver");
|
// Battle Sliver is auto-chosen since only possible target
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
@ -62,10 +62,6 @@ public class SpellQuellerTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testExileSpellAndDiesAllowsFreeCast() {
|
public void testExileSpellAndDiesAllowsFreeCast() {
|
||||||
|
|
||||||
// {1}{W}{U} Flash Flying 2/3 Spirit
|
|
||||||
// When Spell Queller enters the battlefield, exile target spell with converted mana cost 4 or less.
|
|
||||||
// When Spell Queller leaves the battlefield, the exiled card's owner may cast that card without paying its mana cost.
|
|
||||||
addCard(Zone.HAND, playerB, "Spell Queller");
|
addCard(Zone.HAND, playerB, "Spell Queller");
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Plains", 1);
|
addCard(Zone.BATTLEFIELD, playerB, "Plains", 1);
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 2);
|
addCard(Zone.BATTLEFIELD, playerB, "Island", 2);
|
||||||
|
@ -77,11 +73,11 @@ public class SpellQuellerTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Divination");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Divination");
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Spell Queller");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Spell Queller");
|
||||||
addTarget(playerB, "Divination");
|
// Divination is autochosen since only possible target
|
||||||
|
|
||||||
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Murder");
|
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Murder");
|
||||||
addTarget(playerA, "Spell Queller");
|
// Spell Queller is auto-chosen since only possible target
|
||||||
setChoice(playerB, true); // elect to cast exiled card (divination) for free
|
setChoice(playerA, "Yes"); // elect to cast exiled card (divination) for free
|
||||||
|
|
||||||
setStopAt(3, PhaseStep.BEGIN_COMBAT);
|
setStopAt(3, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
@ -93,16 +89,15 @@ public class SpellQuellerTest extends CardTestPlayerBase {
|
||||||
assertHandCount(playerA, 3); // card drawn on draw step + 2 from divination
|
assertHandCount(playerA, 3); // card drawn on draw step + 2 from divination
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
Reported bug: "...Spell Queller exiled my Nissa, Vastwood Seeker. Next turn they processed Nissa with Wasteland Strangler and killed my Tireless Tracker.
|
* Reported bug:
|
||||||
I then cast Quarantine Field, targeting Spell Queller and Wasteland Strangler. That's when the error message occurred. (fatal exception)"
|
* "...Spell Queller exiled my Nissa, Vastwood Seeker.
|
||||||
*/
|
* Next turn they processed Nissa with Wasteland Strangler and killed my Tireless Tracker.
|
||||||
|
* I then cast Quarantine Field, targeting Spell Queller and Wasteland Strangler.
|
||||||
|
* That's when the error message occurred. (fatal exception)"
|
||||||
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testExiledSpellProcessedThenQuellerDies() {
|
public void testExiledSpellProcessedThenQuellerDies() {
|
||||||
|
|
||||||
// {1}{W}{U} Flash Flying 2/3 Spirit
|
|
||||||
// When Spell Queller enters the battlefield, exile target spell with converted mana cost 4 or less.
|
|
||||||
// When Spell Queller leaves the battlefield, the exiled card's owner may cast that card without paying its mana cost.
|
|
||||||
addCard(Zone.HAND, playerB, "Spell Queller");
|
addCard(Zone.HAND, playerB, "Spell Queller");
|
||||||
|
|
||||||
// {2}{B} 3/2 Eldrazi (devoid)
|
// {2}{B} 3/2 Eldrazi (devoid)
|
||||||
|
@ -119,13 +114,15 @@ public class SpellQuellerTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 2);
|
addCard(Zone.BATTLEFIELD, playerA, "Plains", 2);
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Sylvan Advocate"); // {1}{G} 2/3 vigilance
|
addCard(Zone.BATTLEFIELD, playerA, "Sylvan Advocate"); // {1}{G} 2/3 vigilance
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Centaur Courser");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Centaur Courser");
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Spell Queller");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Spell Queller");
|
||||||
addTarget(playerB, "Centaur Courser"); // exiles courser
|
addTarget(playerB, "Centaur Courser"); // exiles courser
|
||||||
|
|
||||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Wasteland Strangler");
|
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Wasteland Strangler");
|
||||||
setChoice(playerB, true);
|
setChoice(playerB, true);
|
||||||
setChoice(playerB, "Centaur Courser"); // put courser from exile into grave from ETB ability
|
addTarget(playerB, "Centaur Courser"); // put courser from exile into grave from ETB ability
|
||||||
addTarget(playerB, "Sylvan Advocate"); // gives -3/-3 to Advocate
|
addTarget(playerB, "Sylvan Advocate"); // gives -3/-3 to Advocate
|
||||||
|
|
||||||
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Wrath of God"); // kill queller and strangler
|
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Wrath of God"); // kill queller and strangler
|
||||||
|
@ -140,5 +137,4 @@ public class SpellQuellerTest extends CardTestPlayerBase {
|
||||||
assertGraveyardCount(playerB, "Wasteland Strangler", 1);
|
assertGraveyardCount(playerB, "Wasteland Strangler", 1);
|
||||||
assertExileCount(playerA, 0);
|
assertExileCount(playerA, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class TreeOfPerditionTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD,playerB,"Island",1);
|
addCard(Zone.BATTLEFIELD,playerB,"Island",1);
|
||||||
|
|
||||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Exchange");
|
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Exchange");
|
||||||
addTarget(playerA, playerB);
|
// Player B is auto-targeted since they're the only option
|
||||||
|
|
||||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Unsummon");
|
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Unsummon");
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ public class TreeOfPerditionTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 4);
|
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 4);
|
||||||
|
|
||||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Exchange");
|
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Exchange");
|
||||||
addTarget(playerA, playerB);
|
// Player B is auto-targeted since they're the only option
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
|
|
@ -33,6 +33,8 @@ public class JacesMindseekerTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.LIBRARY, playerB, "Silvercoat Lion", 2);
|
addCard(Zone.LIBRARY, playerB, "Silvercoat Lion", 2);
|
||||||
skipInitShuffling();
|
skipInitShuffling();
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Jace's Mindseeker");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Jace's Mindseeker");
|
||||||
addTarget(playerA, playerB);
|
addTarget(playerA, playerB);
|
||||||
setChoice(playerA, true);
|
setChoice(playerA, true);
|
||||||
|
|
|
@ -49,6 +49,7 @@ public class CullingScalesTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Plains", 5);
|
addCard(Zone.BATTLEFIELD, playerB, "Plains", 5);
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Culling Scales"); // CMC = 3
|
addCard(Zone.BATTLEFIELD, playerA, "Culling Scales"); // CMC = 3
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
// On upkeep Culling Scales targets Elvish Visionary
|
// On upkeep Culling Scales targets Elvish Visionary
|
||||||
addTarget(playerA, "Elvish Visionary");
|
addTarget(playerA, "Elvish Visionary");
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ public class ThoughtKnotSeerTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Wastes", 4);
|
addCard(Zone.BATTLEFIELD, playerB, "Wastes", 4);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Reflector Mage");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Reflector Mage");
|
||||||
addTarget(playerA, "Thought-Knot Seer");
|
// Thought-Knot Seer is auto-chosen since only target
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
@ -56,7 +56,7 @@ public class ThoughtKnotSeerTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Wastes", 4);
|
addCard(Zone.BATTLEFIELD, playerB, "Wastes", 4);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Unsummon");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Unsummon");
|
||||||
addTarget(playerA, "Thought-Knot Seer");
|
// Thought-Knot Seer is auto-chosen since only target
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
@ -83,7 +83,7 @@ public class ThoughtKnotSeerTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Wastes", 4);
|
addCard(Zone.BATTLEFIELD, playerB, "Wastes", 4);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Doom Blade");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Doom Blade");
|
||||||
addTarget(playerA, "Thought-Knot Seer");
|
// Thought-Knot Seer is auto-chosen since only target
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class BriarbridgePatrolTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 2);
|
addCard(Zone.BATTLEFIELD, playerA, "Forest", 2);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Rabid Bite", "Briarbridge Patrol");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Rabid Bite", "Briarbridge Patrol");
|
||||||
addTarget(playerA, "Wall of Roots");
|
// Wall of Roots is auto-chosen since only target
|
||||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||||
execute();
|
execute();
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class NightSideCMCTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Repeal");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Repeal");
|
||||||
setChoice(playerB, "X=1");
|
setChoice(playerB, "X=1");
|
||||||
addTarget(playerB, insect);
|
// Insectile Aberration is auto-chosen since only target
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
|
|
@ -45,8 +45,8 @@ public class LaquatussChampionTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDoubleZoneChange() {
|
public void testDoubleZoneChange() {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 6);
|
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 2);
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 1);
|
addCard(Zone.BATTLEFIELD, playerA, "Plains", 5);
|
||||||
addCard(Zone.HAND, playerA, "Laquatus's Champion");
|
addCard(Zone.HAND, playerA, "Laquatus's Champion");
|
||||||
addCard(Zone.HAND, playerA, "Cloudshift");
|
addCard(Zone.HAND, playerA, "Cloudshift");
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ public class JourneyToNowhereTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1);
|
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Journey to Nowhere");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Journey to Nowhere");
|
||||||
addTarget(playerA, "Silvercoat Lion");
|
// Silvercoat Lion is auto-chosen since only target
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ public class JourneyToNowhereTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Plains", 2);
|
addCard(Zone.BATTLEFIELD, playerB, "Plains", 2);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Journey to Nowhere");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Journey to Nowhere");
|
||||||
addTarget(playerA, "Silvercoat Lion");
|
// Silvercoat Lion is auto-chosen since it's the only possible target
|
||||||
|
|
||||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Disenchant", "Journey to Nowhere");
|
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Disenchant", "Journey to Nowhere");
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ public class JourneyToNowhereTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Plains", 2);
|
addCard(Zone.BATTLEFIELD, playerB, "Plains", 2);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Journey to Nowhere");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Journey to Nowhere");
|
||||||
addTarget(playerA, "Silvercoat Lion");
|
// Silvercoat Lion" is auto-chosen since only target
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Disenchant", "Journey to Nowhere");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Disenchant", "Journey to Nowhere");
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
|
@ -107,7 +107,7 @@ public class JourneyToNowhereTest extends CardTestPlayerBase {
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Boomerang", "Journey to Nowhere", "Journey to Nowhere", StackClause.WHILE_NOT_ON_STACK);
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Boomerang", "Journey to Nowhere", "Journey to Nowhere", StackClause.WHILE_NOT_ON_STACK);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Journey to Nowhere");
|
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Journey to Nowhere");
|
||||||
addTarget(playerA, "Pillarfield Ox");
|
// Pillarfield Ox is auto-chosen since only possible target
|
||||||
|
|
||||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Disenchant", "Journey to Nowhere");
|
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Disenchant", "Journey to Nowhere");
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class MasterOfCrueltiesTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
attack(2, playerB, "Alesha, Who Smiles at Death");
|
attack(2, playerB, "Alesha, Who Smiles at Death");
|
||||||
setChoice(playerB, true);
|
setChoice(playerB, true);
|
||||||
addTarget(playerB, "Master of Cruelties");
|
// Master of Cruelties is autochosen since only target
|
||||||
|
|
||||||
block(2, playerA, "Silvercoat Lion", "Master of Cruelties");
|
block(2, playerA, "Silvercoat Lion", "Master of Cruelties");
|
||||||
|
|
||||||
|
@ -48,7 +48,5 @@ public class MasterOfCrueltiesTest extends CardTestPlayerBase {
|
||||||
assertLife(playerB, 20);
|
assertLife(playerB, 20);
|
||||||
|
|
||||||
assertGraveyardCount(playerA, "Silvercoat Lion", 1);
|
assertGraveyardCount(playerA, "Silvercoat Lion", 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,10 +11,10 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
*/
|
*/
|
||||||
public class SilkwrapTest extends CardTestPlayerBase {
|
public class SilkwrapTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Reported bug - Silkwrap does not exile Hangarback.
|
* Reported bug - Silkwrap does not exile Hangarback.
|
||||||
Cards with X CMC are considered 0 CMC on the battlefield.
|
* Cards with X CMC are considered 0 CMC on the battlefield.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testHangarback() {
|
public void testHangarback() {
|
||||||
|
|
||||||
|
@ -23,6 +23,8 @@ public class SilkwrapTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.HAND, playerB, "Silkwrap", 1);
|
addCard(Zone.HAND, playerB, "Silkwrap", 1);
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Plains", 2);
|
addCard(Zone.BATTLEFIELD, playerB, "Plains", 2);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Hangarback Walker");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Hangarback Walker");
|
||||||
setChoice(playerA, "X=4");
|
setChoice(playerA, "X=4");
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,7 @@ public class SoulWardenTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Elite Vanguard"); // 2/1 creature
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Elite Vanguard"); // 2/1 creature
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Raise the Alarm"); // put two 1/1 soldiers on the battlefield
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Raise the Alarm"); // put two 1/1 soldiers on the battlefield
|
||||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Lightning Bolt");
|
castSpell(1, PhaseStep.DECLARE_ATTACKERS, playerA, "Lightning Bolt", "Soul Warden");
|
||||||
addTarget(playerA, "Soul Warden");
|
|
||||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Elite Vanguard"); // should not gain life now that soul warden is dead
|
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Elite Vanguard"); // should not gain life now that soul warden is dead
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.END_TURN);
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
|
@ -37,6 +36,8 @@ public class SoulWardenTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
assertGraveyardCount(playerA, "Lightning Bolt", 1);
|
assertGraveyardCount(playerA, "Lightning Bolt", 1);
|
||||||
assertGraveyardCount(playerA, "Soul Warden", 1);
|
assertGraveyardCount(playerA, "Soul Warden", 1);
|
||||||
|
assertPermanentCount(playerA, "Soldier Token", 2);
|
||||||
|
assertPermanentCount(playerA, "Elite Vanguard", 2);
|
||||||
assertLife(playerA, 23);
|
assertLife(playerA, 23);
|
||||||
assertLife(playerB, 20);
|
assertLife(playerB, 20);
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class ChronozoaTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Chronozoa");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Chronozoa");
|
||||||
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Sacrifice a creature");
|
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Sacrifice a creature");
|
||||||
addTarget(playerA, "Viscera Seer");
|
setChoice(playerA, "Viscera Seer");
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.END_TURN);
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
execute();
|
execute();
|
||||||
|
|
|
@ -138,12 +138,14 @@ public class ElendaTheDuskRoseTest extends CardTestPlayerBase {
|
||||||
// When Elenda dies, create X 1/1 white Vampire creature tokens with lifelink, where X is Elenda's power.
|
// When Elenda dies, create X 1/1 white Vampire creature tokens with lifelink, where X is Elenda's power.
|
||||||
addCard(Zone.HAND, playerA, "Elenda, the Dusk Rose", 1); // {2}{W}{B} 1/1
|
addCard(Zone.HAND, playerA, "Elenda, the Dusk Rose", 1); // {2}{W}{B} 1/1
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Elenda, the Dusk Rose");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Elenda, the Dusk Rose");
|
||||||
|
|
||||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Sweltering Suns");
|
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Sweltering Suns");
|
||||||
|
setChoice(playerA, "Whenever a creature is put");
|
||||||
|
setChoice(playerA, "Whenever a creature is put");
|
||||||
|
setChoice(playerA, "When ");
|
||||||
setChoice(playerA, true); // use Angelic Renewal on Elenda, the Dusk Rose
|
setChoice(playerA, true); // use Angelic Renewal on Elenda, the Dusk Rose
|
||||||
setChoice(playerA, false); // use Angelic Renewal on Silvercoat Lion
|
|
||||||
|
|
||||||
setStopAt(2, PhaseStep.END_TURN);
|
setStopAt(2, PhaseStep.END_TURN);
|
||||||
execute();
|
execute();
|
||||||
|
|
|
@ -16,7 +16,6 @@ public class ServantOfTheScaleTest extends CardTestPlayerBase {
|
||||||
/**
|
/**
|
||||||
* Tests that the dies triggered ability distributes
|
* Tests that the dies triggered ability distributes
|
||||||
* the +1/+1 counters on Servant of the Scale
|
* the +1/+1 counters on Servant of the Scale
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testDiesTriggeredAbility() {
|
public void testDiesTriggeredAbility() {
|
||||||
|
@ -29,6 +28,8 @@ public class ServantOfTheScaleTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Mountain");
|
addCard(Zone.BATTLEFIELD, playerB, "Mountain");
|
||||||
addCard(Zone.HAND, playerB, "Lightning Bolt");
|
addCard(Zone.HAND, playerB, "Lightning Bolt");
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Servant of the Scale");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Servant of the Scale");
|
||||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Lightning Bolt", "Servant of the Scale");
|
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Lightning Bolt", "Servant of the Scale");
|
||||||
addTarget(playerA, "Silvercoat Lion");
|
addTarget(playerA, "Silvercoat Lion");
|
||||||
|
@ -42,10 +43,7 @@ public class ServantOfTheScaleTest extends CardTestPlayerBase {
|
||||||
assertGraveyardCount(playerB, "Lightning Bolt", 1);
|
assertGraveyardCount(playerB, "Lightning Bolt", 1);
|
||||||
assertGraveyardCount(playerA, "Servant of the Scale", 1);
|
assertGraveyardCount(playerA, "Servant of the Scale", 1);
|
||||||
|
|
||||||
|
|
||||||
assertPermanentCount(playerA, "Silvercoat Lion", 1);
|
assertPermanentCount(playerA, "Silvercoat Lion", 1);
|
||||||
assertPowerToughness(playerA, "Silvercoat Lion", 3,3);
|
assertPowerToughness(playerA, "Silvercoat Lion", 3,3);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,21 +18,23 @@ public class CurseOfTheSwineTest extends CardTestCommanderDuelBase {
|
||||||
setDecknamePlayerA("CommanderDuel_UW.dck"); // Commander = Daxos of Meletis
|
setDecknamePlayerA("CommanderDuel_UW.dck"); // Commander = Daxos of Meletis
|
||||||
return super.createNewGameAndPlayers();
|
return super.createNewGameAndPlayers();
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
In a Commander game, if a commander is put into the command zone
|
/**
|
||||||
instead of being exiled by Curse of the Swine, its controller will
|
* In a Commander game, if a commander is put into the command zone
|
||||||
still get a Boar token.
|
* instead of being exiled by Curse of the Swine, its controller will
|
||||||
|
* still get a Boar token.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void TestCurseOfTheSwine()
|
public void TestCurseOfTheSwine() {
|
||||||
{
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
|
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 1);
|
addCard(Zone.BATTLEFIELD, playerA, "Plains", 1);
|
||||||
addCard(Zone.HAND, playerA, "Curse of the Swine");
|
addCard(Zone.HAND, playerA, "Curse of the Swine");
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Daxos of Meletis");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Daxos of Meletis");
|
||||||
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Curse of the Swine");
|
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Curse of the Swine");
|
||||||
setChoice(playerA, "X=1");
|
setChoice(playerA, "X=1");
|
||||||
addTarget(playerA, "Daxos of Meletis");
|
// Daxos of Meletis is auto-chosen since only target
|
||||||
|
|
||||||
setStopAt(3, PhaseStep.BEGIN_COMBAT);
|
setStopAt(3, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
|
||||||
|
|
|
@ -156,7 +156,6 @@ public class PlayerLeftGameRangeAllTest extends CardTestMultiPlayerBase {
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Confiscate", "Jace, Unraveler of Secrets");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Confiscate", "Jace, Unraveler of Secrets");
|
||||||
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "-8: You get an emblem with");
|
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "-8: You get an emblem with");
|
||||||
|
|
||||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerA, "Blind with Anger", "Rootwater Commando");
|
|
||||||
attack(2, playerD, "Silvercoat Lion", playerC);
|
attack(2, playerD, "Silvercoat Lion", playerC);
|
||||||
|
|
||||||
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerB, "Silvercoat Lion");
|
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerB, "Silvercoat Lion");
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class VindictiveLichTest extends CardTestMultiPlayerBase {
|
||||||
setModeChoice(playerA, "2");
|
setModeChoice(playerA, "2");
|
||||||
addTarget(playerA, playerC);
|
addTarget(playerA, playerC);
|
||||||
setModeChoice(playerA, "3");
|
setModeChoice(playerA, "3");
|
||||||
addTarget(playerA, playerD);
|
// Player D is auto-chosen since each mode needs a different opponent
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
|
|
@ -22,6 +22,8 @@ public class DemonicPactTest extends CardTestPlayerBase {
|
||||||
// (4) - You lose the game.
|
// (4) - You lose the game.
|
||||||
addCard(Zone.HAND, playerA, "Demonic Pact"); // Enchantment {2}{B}{B}
|
addCard(Zone.HAND, playerA, "Demonic Pact"); // Enchantment {2}{B}{B}
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Demonic Pact");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Demonic Pact");
|
||||||
|
|
||||||
setModeChoice(playerA, "3");
|
setModeChoice(playerA, "3");
|
||||||
|
|
|
@ -17,12 +17,13 @@ public class StateValuesTest extends CardTestPlayerBase {
|
||||||
public void testDragonWhelpActivatedFourTimes() {
|
public void testDragonWhelpActivatedFourTimes() {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4);
|
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4);
|
||||||
// Flying
|
// Flying
|
||||||
|
// 2/3
|
||||||
// {R}: Dragon Whelp gets +1/+0 until end of turn. If this ability has been activated four or more times this turn, sacrifice Dragon Whelp at the beginning of the next end step.
|
// {R}: Dragon Whelp gets +1/+0 until end of turn. If this ability has been activated four or more times this turn, sacrifice Dragon Whelp at the beginning of the next end step.
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Dragon Whelp", 1); // 2/3
|
addCard(Zone.BATTLEFIELD, playerA, "Dragon Whelp", 1); // 2/3
|
||||||
|
|
||||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{R}: ");
|
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{R}: ");
|
||||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{R}: ");
|
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{R}: ");
|
||||||
attack(1, playerA, "Dragon Whelp");
|
attack(1, playerA, "Dragon Whelp"); // 4 damage
|
||||||
|
|
||||||
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{R}: ");
|
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{R}: ");
|
||||||
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{R}: ");
|
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{R}: ");
|
||||||
|
@ -35,7 +36,7 @@ public class StateValuesTest extends CardTestPlayerBase {
|
||||||
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{R}: ");
|
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{R}: ");
|
||||||
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{R}: ");
|
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{R}: ");
|
||||||
|
|
||||||
attack(3, playerA, "Dragon Whelp");
|
// attack(3, playerA, "Dragon Whelp");
|
||||||
rollbackAfterActionsEnd();
|
rollbackAfterActionsEnd();
|
||||||
|
|
||||||
setStopAt(4, PhaseStep.UPKEEP);
|
setStopAt(4, PhaseStep.UPKEEP);
|
||||||
|
@ -46,7 +47,6 @@ public class StateValuesTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
assertLife(playerA, 20);
|
assertLife(playerA, 20);
|
||||||
assertLife(playerB, 12);
|
assertLife(playerB, 12);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -285,8 +285,7 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement
|
||||||
logger.info(Thread.currentThread().getStackTrace()[2].getMethodName() + " has been executed. Execution time: " + (t2 - t1) / 1000000 + " ms");
|
logger.info(Thread.currentThread().getStackTrace()[2].getMethodName() + " has been executed. Execution time: " + (t2 - t1) / 1000000 + " ms");
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: 01.12.2018, JayDi85 - uncomment and fix MANY broken tests with wrong commands
|
assertAllCommandsUsed();
|
||||||
//assertAllCommandsUsed();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected TestPlayer createNewPlayer(String playerName, RangeOfInfluence rangeOfInfluence) {
|
protected TestPlayer createNewPlayer(String playerName, RangeOfInfluence rangeOfInfluence) {
|
||||||
|
|
|
@ -3,6 +3,7 @@ package org.mage.test.testapi;
|
||||||
|
|
||||||
import mage.constants.PhaseStep;
|
import mage.constants.PhaseStep;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
|
|
||||||
|
@ -16,7 +17,7 @@ public class TestAPITest extends CardTestPlayerBase {
|
||||||
* Shock should be able to remove Last Breath's target before it resolves
|
* Shock should be able to remove Last Breath's target before it resolves
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testCardTestPlayerAPIImpl1() {
|
public void testTwoInstancesInARow() {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears");
|
addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears");
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
|
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 2);
|
addCard(Zone.BATTLEFIELD, playerA, "Plains", 2);
|
||||||
|
@ -39,7 +40,7 @@ public class TestAPITest extends CardTestPlayerBase {
|
||||||
* Shock won't be even cast here as no Last Breath should resolve.
|
* Shock won't be even cast here as no Last Breath should resolve.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testCardTestPlayerAPIImpl2() {
|
public void testWhileNotOnStackWorks() {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears");
|
addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears");
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
|
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 2);
|
addCard(Zone.BATTLEFIELD, playerA, "Plains", 2);
|
||||||
|
@ -52,7 +53,14 @@ public class TestAPITest extends CardTestPlayerBase {
|
||||||
StackClause.WHILE_NOT_ON_STACK);
|
StackClause.WHILE_NOT_ON_STACK);
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.END_TURN);
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
execute();
|
|
||||||
|
try {
|
||||||
|
execute();
|
||||||
|
} catch (Throwable e) {
|
||||||
|
if (!e.getMessage().contains("Player PlayerA must have 0 actions but found 1")) {
|
||||||
|
Assert.fail("Should have had error about playerA having too many actions, but got:\n" + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
assertPermanentCount(playerA, "Grizzly Bears", 0);
|
assertPermanentCount(playerA, "Grizzly Bears", 0);
|
||||||
assertLife(playerA, 24); // gain 4 life from Last Breath
|
assertLife(playerA, 24); // gain 4 life from Last Breath
|
||||||
|
|
|
@ -46,6 +46,7 @@ public class ReturnToBattlefieldUnderOwnerControlTargetEffect extends OneShotEff
|
||||||
updateText();
|
updateText();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: This does not generate correct text, the ", then" should be from .concatBy, see Angelic Renewal for a card with incorrect text
|
||||||
private void updateText() {
|
private void updateText() {
|
||||||
this.staticText = ", then return " + this.returnName
|
this.staticText = ", then return " + this.returnName
|
||||||
+ " to the battlefield" + (tapped ? " tapped" : "")
|
+ " to the battlefield" + (tapped ? " tapped" : "")
|
||||||
|
|
Loading…
Reference in a new issue