diff --git a/Mage.Tests/src/test/java/org/mage/test/AI/basic/ExileTargetTest.java b/Mage.Tests/src/test/java/org/mage/test/AI/basic/ExileTargetTest.java index d8fcb3abec..fd345c9e9b 100644 --- a/Mage.Tests/src/test/java/org/mage/test/AI/basic/ExileTargetTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/AI/basic/ExileTargetTest.java @@ -11,7 +11,6 @@ import org.mage.test.serverside.base.CardTestCommander4Players; public class ExileTargetTest extends CardTestCommander4Players { // Player order: A -> D -> C -> B - @Test public void test_chooseOpponentTargets() { // AI sometimes chooses own permanents in multiplayer game instead opponents @@ -26,12 +25,11 @@ public class ExileTargetTest extends CardTestCommander4Players { addCard(Zone.BATTLEFIELD, playerC, "Balduvian Bears", 1); // 2/2 // must select opponent's Balduvian Bears - showAvaileableAbilities("before", 1, PhaseStep.PRECOMBAT_MAIN, playerA); + // showAvaileableAbilities("before", 1, PhaseStep.PRECOMBAT_MAIN, playerA); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Oblivion Ring"); //addTarget(playerA, "Balduvian Bears"); // disable to activate AI target choose - showAvaileableAbilities("after", 1, PhaseStep.BEGIN_COMBAT, playerA); - + // showAvaileableAbilities("after", 1, PhaseStep.BEGIN_COMBAT, playerA); //setStrictChooseMode(true); // disable strict mode to activate AI for choosing setStopAt(1, PhaseStep.END_COMBAT); execute(); diff --git a/Mage.Tests/src/test/java/org/mage/test/AI/basic/TargetPriorityTest.java b/Mage.Tests/src/test/java/org/mage/test/AI/basic/TargetPriorityTest.java index 72d1166e1a..8c24dff265 100644 --- a/Mage.Tests/src/test/java/org/mage/test/AI/basic/TargetPriorityTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/AI/basic/TargetPriorityTest.java @@ -21,7 +21,6 @@ import org.mage.test.serverside.base.CardTestPlayerBaseAI; public class TargetPriorityTest extends CardTestPlayerBaseAI { // TODO: enable _target_ tests after computerPlayer.chooseTarget will be reworks like chooseTargetAmount - @Test @Ignore public void test_target_PriorityKillByBigPT() { @@ -116,7 +115,6 @@ public class TargetPriorityTest extends CardTestPlayerBaseAI { checkPermanentCounters("counters", 1, PhaseStep.BEGIN_COMBAT, playerB, "Balduvian Bears", CounterType.P1P1, 2); // AI cast avatar on turn 3 and target 1 creature to kil by 3 damage - //setStrictChooseMode(true); // AI setStopAt(3, PhaseStep.BEGIN_COMBAT); execute(); @@ -144,8 +142,7 @@ public class TargetPriorityTest extends CardTestPlayerBaseAI { addCard(Zone.BATTLEFIELD, playerB, "Battering Sliver", 1 * cardsMultiplier); // 4/4 with ability //castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt"); - - showHand("after", 1, PhaseStep.BEGIN_COMBAT, playerA); +// showHand("after", 1, PhaseStep.BEGIN_COMBAT, playerA); setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); assertAllCommandsUsed(); @@ -159,9 +156,7 @@ public class TargetPriorityTest extends CardTestPlayerBaseAI { */ } - // TARGET AMOUNT - @Test public void test_targetAmount_PriorityKillByBigPT() { addCard(Zone.HAND, playerA, "Flames of the Firebrand"); // damage 3 @@ -279,7 +274,7 @@ public class TargetPriorityTest extends CardTestPlayerBaseAI { // must damage x3 Balduvian Bears by -1 to keep alive checkDamage("pt after", 1, PhaseStep.BEGIN_COMBAT, playerA, "Balduvian Bears", 1); - showBattlefield("after", 1, PhaseStep.BEGIN_COMBAT, playerA); + // showBattlefield("after", 1, PhaseStep.BEGIN_COMBAT, playerA); setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); assertAllCommandsUsed(); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/KickerWithFlashbackTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/KickerWithFlashbackTest.java index 304e2f324c..44e1dde0c8 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/KickerWithFlashbackTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/KickerWithFlashbackTest.java @@ -11,17 +11,13 @@ import org.mage.test.serverside.base.CardTestPlayerBase; public class KickerWithFlashbackTest extends CardTestPlayerBase { // https://github.com/magefree/mage/issues/5389 - - // Burst Lightning {R} // Kicker {4} (You may pay an additional {4} as you cast this spell.) // Burst Lightning deals 2 damage to any target. If this spell was kicked, it deals 4 damage to that permanent or player instead. - // Snapcaster Mage {1}{U} // Flash // 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. (You may cast that card from your graveyard for its flashback cost. Then exile it.) - @Test public void test_SimpleKicker() { addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5); @@ -79,7 +75,7 @@ public class KickerWithFlashbackTest extends CardTestPlayerBase { addTarget(playerA, "Burst Lightning"); // cast burst by flashback - showAvaileableAbilities("after", 1, PhaseStep.BEGIN_COMBAT, playerA); + // showAvaileableAbilities("after", 1, PhaseStep.BEGIN_COMBAT, playerA); activateAbility(1, PhaseStep.BEGIN_COMBAT, playerA, "Flashback"); setChoice(playerA, "Yes"); // use kicker addTarget(playerA, playerB); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ManifestTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ManifestTest.java index 55b8347561..30dc896c76 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ManifestTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ManifestTest.java @@ -213,8 +213,8 @@ public class ManifestTest extends CardTestPlayerBase { skipInitShuffling(); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Reality Shift", "Silvercoat Lion"); - showBattlefield("A battle", 1, PhaseStep.POSTCOMBAT_MAIN, playerA); - showBattlefield("B battle", 1, PhaseStep.POSTCOMBAT_MAIN, playerB); + // showBattlefield("A battle", 1, PhaseStep.POSTCOMBAT_MAIN, playerA); + // showBattlefield("B battle", 1, PhaseStep.POSTCOMBAT_MAIN, playerB); castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Silence the Believers", EmptyNames.FACE_DOWN_CREATURE.toString()); setStopAt(1, PhaseStep.END_TURN); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/MorphTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/MorphTest.java index 8ebd4f7287..dc8ced1524 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/MorphTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/MorphTest.java @@ -362,10 +362,10 @@ public class MorphTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Sagu Mauler", NO_TARGET, "Sagu Mauler", StackClause.WHILE_NOT_ON_STACK); setChoice(playerA, "Yes"); // cast it face down as 2/2 creature - showBattlefield("A battle", 1, PhaseStep.POSTCOMBAT_MAIN, playerA); + // showBattlefield("A battle", 1, PhaseStep.POSTCOMBAT_MAIN, playerA); castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Echoing Decay", EmptyNames.FACE_DOWN_CREATURE.toString()); - showBattlefield("A battle after", 1, PhaseStep.END_TURN, playerA); + // showBattlefield("A battle after", 1, PhaseStep.END_TURN, playerA); setStopAt(1, PhaseStep.END_TURN); execute(); assertAllCommandsUsed(); @@ -540,14 +540,14 @@ public class MorphTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Akroma, Angel of Fury"); setChoice(playerA, "Yes"); // cast it face down as 2/2 creature - showBattlefield("A battle", 1, PhaseStep.POSTCOMBAT_MAIN, playerA); - showBattlefield("B battle", 1, PhaseStep.POSTCOMBAT_MAIN, playerB); +// showBattlefield("A battle", 1, PhaseStep.POSTCOMBAT_MAIN, playerA); +// showBattlefield("B battle", 1, PhaseStep.POSTCOMBAT_MAIN, playerB); castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Supplant Form"); addTarget(playerB, EmptyNames.FACE_DOWN_CREATURE.toString()); - showBattlefield("A battle end", 1, PhaseStep.END_TURN, playerA); - showBattlefield("B battle end", 1, PhaseStep.END_TURN, playerB); +// showBattlefield("A battle end", 1, PhaseStep.END_TURN, playerA); +// showBattlefield("B battle end", 1, PhaseStep.END_TURN, playerB); setStopAt(1, PhaseStep.END_TURN); execute(); @@ -718,13 +718,11 @@ public class MorphTest extends CardTestPlayerBase { * copy of the targeted creature, it should still be in the state of * "turning face up", thus triggering the ability of the Brine Elemental. *

- * combo: - * Vesuvan Shapeshifter + Brine Elemental - * Brine Elemental in play, Vesuvan Shapeshifter in hand - * 1) Cast Vesuvan Shapeshifter face-down. - * 2) Flip Vesuvan Shapeshifter for its morph cost, copying Brine Elemental. Your opponent skips his next untap. - * 3) During your upkeep, flip Vesuvan Shapeshifter face-down. - * 4) Repeat from 2. + * combo: Vesuvan Shapeshifter + Brine Elemental Brine Elemental in play, + * Vesuvan Shapeshifter in hand 1) Cast Vesuvan Shapeshifter face-down. 2) + * Flip Vesuvan Shapeshifter for its morph cost, copying Brine Elemental. + * Your opponent skips his next untap. 3) During your upkeep, flip Vesuvan + * Shapeshifter face-down. 4) Repeat from 2. */ @Test public void testVesuvanShapeshifter() { @@ -751,7 +749,6 @@ public class MorphTest extends CardTestPlayerBase { // No face up trigger and choose from Vesuvan // But brine's trigger must works on next turn 3 (skip untap) - setStrictChooseMode(true); setStopAt(2, PhaseStep.END_TURN); execute(); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/CommandersCastTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/CommandersCastTest.java index 0b0ea38011..4caf5347b1 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/CommandersCastTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/CommandersCastTest.java @@ -12,13 +12,12 @@ import org.mage.test.serverside.base.CardTestCommander4Players; public class CommandersCastTest extends CardTestCommander4Players { // Player order: A -> D -> C -> B - @Test public void test_CastToBattlefieldOneTime() { addCard(Zone.COMMAND, playerA, "Balduvian Bears", 1); // {1}{G}, 2/2, commander addCard(Zone.BATTLEFIELD, playerA, "Forest", 2); - showCommand("commanders", 1, PhaseStep.PRECOMBAT_MAIN, playerA); + // showCommand("commanders", 1, PhaseStep.PRECOMBAT_MAIN, playerA); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Balduvian Bears"); setStopAt(1, PhaseStep.END_TURN); @@ -71,7 +70,7 @@ public class CommandersCastTest extends CardTestCommander4Players { public void test_PlayAsLandOneTime() { addCard(Zone.COMMAND, playerA, "Academy Ruins", 1); - showAvaileableAbilities("before", 1, PhaseStep.PRECOMBAT_MAIN, playerA); + // showAvaileableAbilities("before", 1, PhaseStep.PRECOMBAT_MAIN, playerA); playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Academy Ruins"); //castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Academy Ruins"); @@ -114,8 +113,7 @@ public class CommandersCastTest extends CardTestCommander4Players { waitStackResolved(5, PhaseStep.POSTCOMBAT_MAIN); checkPermanentCount("after cast 2", 5, PhaseStep.POSTCOMBAT_MAIN, playerA, "Academy Ruins", 1); - showBattlefield("end battlefield", 5, PhaseStep.END_TURN, playerA); - +// showBattlefield("end battlefield", 5, PhaseStep.END_TURN, playerA); setStopAt(5, PhaseStep.END_TURN); setStrictChooseMode(true); execute(); @@ -261,7 +259,7 @@ public class CommandersCastTest extends CardTestCommander4Players { addCard(Zone.BATTLEFIELD, playerA, "Balduvian Bears", 2); // cast overload - showAvaileableAbilities("before", 1, PhaseStep.PRECOMBAT_MAIN, playerA); + // showAvaileableAbilities("before", 1, PhaseStep.PRECOMBAT_MAIN, playerA); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Weapon Surge with overload"); setChoice(playerA, "Yes"); // move to command zone checkAbility("after", 1, PhaseStep.BEGIN_COMBAT, playerA, "Balduvian Bears", FirstStrikeAbility.class, true); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/PraetorsGraspTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/PraetorsGraspTest.java index f21418d1c9..941ca49a46 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/PraetorsGraspTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/PraetorsGraspTest.java @@ -22,8 +22,7 @@ public class PraetorsGraspTest extends CardTestPlayerBase { addTarget(playerA, playerB); addTarget(playerA, "Mountain"); - showAvaileableAbilities("after", 1, PhaseStep.POSTCOMBAT_MAIN, playerA); - + // showAvaileableAbilities("after", 1, PhaseStep.POSTCOMBAT_MAIN, playerA); setStrictChooseMode(true); setStopAt(1, PhaseStep.END_TURN); execute(); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/copy/SparkDoubleTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/copy/SparkDoubleTest.java index e7f908f57c..fc01423064 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/copy/SparkDoubleTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/copy/SparkDoubleTest.java @@ -169,8 +169,7 @@ public class SparkDoubleTest extends CardTestPlayerBase { If you control two or more permanents with the same name but only one is legendary, the “legend rule” doesn’t apply. (2019-05-03) it's applier copy check - */ - + */ // addCard(Zone.HAND, playerA, "Spark Double"); // {3}{U} addCard(Zone.BATTLEFIELD, playerA, "Island", 4); @@ -193,14 +192,13 @@ public class SparkDoubleTest extends CardTestPlayerBase { checkPermanentCount("must have copy", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Akroma, Angel of Wrath", 2); // make copy of copy by CreateTokenCopyTargetEffect - showBattlefield("before last copy", 1, PhaseStep.PRECOMBAT_MAIN, playerA); +// showBattlefield("before last copy", 1, PhaseStep.PRECOMBAT_MAIN, playerA); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Quasiduplicate"); addTarget(playerA, "Akroma, Angel of Wrath[only copy]"); waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA); checkPermanentCount("must have copy", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Akroma, Angel of Wrath", 3); - showBattlefield("after all", 1, PhaseStep.BEGIN_COMBAT, playerA); - +// showBattlefield("after all", 1, PhaseStep.BEGIN_COMBAT, playerA); setStrictChooseMode(true); setStopAt(1, PhaseStep.END_COMBAT); execute(); @@ -230,20 +228,18 @@ public class SparkDoubleTest extends CardTestPlayerBase { checkPermanentCount("must have copy", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Akroma, Angel of Wrath", 2); // make copy of copy by CreateTokenCopyTargetEffect - showBattlefield("before last copy", 1, PhaseStep.PRECOMBAT_MAIN, playerA); - showAvaileableAbilities("before last copy", 1, PhaseStep.PRECOMBAT_MAIN, playerA); + // showBattlefield("before last copy", 1, PhaseStep.PRECOMBAT_MAIN, playerA); + // showAvaileableAbilities("before last copy", 1, PhaseStep.PRECOMBAT_MAIN, playerA); activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "create a token that"); addTarget(playerA, "Akroma, Angel of Wrath[only copy]"); waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA); checkPermanentCount("must have copy", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Akroma, Angel of Wrath", 3); - showBattlefield("after all", 1, PhaseStep.BEGIN_COMBAT, playerA); - + // showBattlefield("after all", 1, PhaseStep.BEGIN_COMBAT, playerA); setStrictChooseMode(true); setStopAt(1, PhaseStep.END_COMBAT); execute(); assertAllCommandsUsed(); } - } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/cost/adventure/AdventureCardsTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/cost/adventure/AdventureCardsTest.java index c2469d5628..6a888285cb 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/cost/adventure/AdventureCardsTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/cost/adventure/AdventureCardsTest.java @@ -329,7 +329,7 @@ public class AdventureCardsTest extends CardTestPlayerBase { * Creature — Human Soldier * 1/1 */ - /* + /* * Rimrock Knight {1}{R} * Creature — Dwarf Knight * Rimrock Knight can't block. @@ -397,7 +397,6 @@ public class AdventureCardsTest extends CardTestPlayerBase { * Killer. If instead you control Garruk’s Horde and the top card of your library is Giant Killer, you may cast * Giant Killer but not Chop Down. */ - @Test public void testCastTreatsToShareWithMelek() { /* @@ -483,7 +482,7 @@ public class AdventureCardsTest extends CardTestPlayerBase { removeAllCardsFromLibrary(playerA); addCard(Zone.LIBRARY, playerA, "Curious Pair"); - showAvaileableAbilities("abils", 1, PhaseStep.PRECOMBAT_MAIN, playerA); + // showAvaileableAbilities("abils", 1, PhaseStep.PRECOMBAT_MAIN, playerA); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Treats to Share"); setStopAt(1, PhaseStep.BEGIN_COMBAT); @@ -514,7 +513,7 @@ public class AdventureCardsTest extends CardTestPlayerBase { addCounters(1, PhaseStep.UPKEEP, playerA, "Wrenn and Six", CounterType.LOYALTY, 5); activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "-7: You get an emblem"); waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA); - showAvaileableAbilities("abils", 1, PhaseStep.PRECOMBAT_MAIN, playerA); + // showAvaileableAbilities("abils", 1, PhaseStep.PRECOMBAT_MAIN, playerA); // retrace - You may cast this card from your graveyard by discarding a land card as an additional cost to cast it castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Treats to Share"); @@ -551,7 +550,7 @@ public class AdventureCardsTest extends CardTestPlayerBase { activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+1: Until your next"); waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA); - showAvaileableAbilities("abils", 1, PhaseStep.BEGIN_COMBAT, playerA); + // showAvaileableAbilities("abils", 1, PhaseStep.BEGIN_COMBAT, playerA); castSpell(1, PhaseStep.BEGIN_COMBAT, playerA, "Treats to Share"); setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/OathOfLiegesTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/OathOfLiegesTest.java index 6db1d8e572..1cdb2b4280 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/OathOfLiegesTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/OathOfLiegesTest.java @@ -13,7 +13,6 @@ public class OathOfLiegesTest extends CardTestPlayerBase { //addCard(Zone.BATTLEFIELD, playerA, "Hypersonic Dragon", 1); // can cast spells at any time //addCard(Zone.HAND, playerA, "Breath of Life", 1); // {3}{W} // return creatures //addCard(Zone.HAND, playerA, "Replenish", 1); // {3}{W} // return all enchantments - @Test public void testOath_OwnCardTriggersOnOwnTurn() { // A @@ -140,7 +139,7 @@ public class OathOfLiegesTest extends CardTestPlayerBase { // turn 1 - A // cast oath A castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Replenish"); - showBattlefield("A perms", 1, PhaseStep.POSTCOMBAT_MAIN, playerA); +// showBattlefield("A perms", 1, PhaseStep.POSTCOMBAT_MAIN, playerA); // cast oath copy castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Copy Enchantment"); setChoice(playerA, "Yes"); // use copy effect @@ -194,15 +193,14 @@ public class OathOfLiegesTest extends CardTestPlayerBase { // turn 1 - A // nothing - // turn 2 - B // cast oath A castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerA, "Replenish"); // cast oath copy by opponent - showBattlefield("A perms", 2, PhaseStep.POSTCOMBAT_MAIN, playerA); - showBattlefield("B perms", 2, PhaseStep.POSTCOMBAT_MAIN, playerB); - showAvaileableAbilities("B abils", 2, PhaseStep.POSTCOMBAT_MAIN, playerB); - showHand("B hand", 2, PhaseStep.POSTCOMBAT_MAIN, playerB); + // showBattlefield("A perms", 2, PhaseStep.POSTCOMBAT_MAIN, playerA); + // showBattlefield("B perms", 2, PhaseStep.POSTCOMBAT_MAIN, playerB); + // showAvaileableAbilities("B abils", 2, PhaseStep.POSTCOMBAT_MAIN, playerB); + // showHand("B hand", 2, PhaseStep.POSTCOMBAT_MAIN, playerB); castSpell(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "Copy Enchantment"); setChoice(playerB, "Yes"); // use copy effect setChoice(playerB, "Oath of Lieges"); // target for copy @@ -210,7 +208,7 @@ public class OathOfLiegesTest extends CardTestPlayerBase { checkPermanentCount("B have 1 oath", 2, PhaseStep.END_TURN, playerA, "Oath of Lieges", 1); checkPermanentCount("A have 10 plains", 2, PhaseStep.END_TURN, playerA, "Plains", 10); checkPermanentCount("B have 12 plains", 2, PhaseStep.END_TURN, playerB, "Plains", 12); - showLibrary("lib B", 2, PhaseStep.END_TURN, playerB); + // showLibrary("lib B", 2, PhaseStep.END_TURN, playerB); // turn 3 - A // oath A triggers for A and activates diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/mana/ManaPoolTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/mana/ManaPoolTest.java index 3cccb1cdf0..7e3d76fa30 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/mana/ManaPoolTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/mana/ManaPoolTest.java @@ -241,7 +241,7 @@ public class ManaPoolTest extends CardTestPlayerBase { checkManaPool("mana", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "R", 4); // use for ability - showAvaileableAbilities("before ability", 1, PhaseStep.PRECOMBAT_MAIN, playerA); + // showAvaileableAbilities("before ability", 1, PhaseStep.PRECOMBAT_MAIN, playerA); activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{X}:", playerB); setChoice(playerA, "X=3"); waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/SpellskiteTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/SpellskiteTest.java index af57b93243..976276de27 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/SpellskiteTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/SpellskiteTest.java @@ -233,7 +233,7 @@ public class SpellskiteTest extends CardTestPlayerBase { once for each instances of the word “target” in the text of a spell or ability. In this case, the target can't be changed due to Spellskite already being a target. - */ + */ addCard(Zone.BATTLEFIELD, playerA, "Plains", 1); addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1); addCard(Zone.BATTLEFIELD, playerA, "Forest", 1); @@ -258,8 +258,6 @@ public class SpellskiteTest extends CardTestPlayerBase { activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerB, "{U/P}: Change a target", "Fiery Justice", "Fiery Justice"); setChoice(playerB, "Yes"); // pay 2 life - showBattlefield("B battle", 1, PhaseStep.BEGIN_COMBAT, playerB); - showGraveyard("B grave", 1, PhaseStep.BEGIN_COMBAT, playerB); setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); assertAllCommandsUsed(); @@ -274,7 +272,7 @@ public class SpellskiteTest extends CardTestPlayerBase { public void testThatSplitDamageCanGetRedirected() { /* Standard redirect test The Spellskite should die from the 5 damage that was redirected to it - */ + */ addCard(Zone.BATTLEFIELD, playerA, "Plains", 1); addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1); addCard(Zone.BATTLEFIELD, playerA, "Forest", 1); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/damage/SyrCarahTheBoldTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/damage/SyrCarahTheBoldTest.java index cd13e24b61..a8d5eb50e5 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/damage/SyrCarahTheBoldTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/damage/SyrCarahTheBoldTest.java @@ -70,7 +70,7 @@ public class SyrCarahTheBoldTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerB, "Island", 3); // equip to copy abilities - showAvaileableAbilities("abils", 2, PhaseStep.PRECOMBAT_MAIN, playerB); + // showAvaileableAbilities("abils", 2, PhaseStep.PRECOMBAT_MAIN, playerB); activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Equip {3}", "Embermage Goblin"); setChoice(playerB, "No"); // no new target diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/BrainMaggotTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/BrainMaggotTest.java index 02a8f7760c..02ca241e29 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/BrainMaggotTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/BrainMaggotTest.java @@ -12,8 +12,8 @@ public class BrainMaggotTest extends CardTestPlayerBase { /** * When Brain Maggot enters the battlefield, target opponent reveals their - * hand and you choose a nonland card from it. Exile that card until - * Brain Maggot leaves the battlefield. + * hand and you choose a nonland card from it. Exile that card until Brain + * Maggot leaves the battlefield. */ @Test public void testCardFromHandWillBeExiled() { @@ -48,7 +48,7 @@ public class BrainMaggotTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Brain Maggot"); addTarget(playerA, playerB); setChoice(playerA, "Bloodflow Connoisseur"); - showExile("exile", 1, PhaseStep.BEGIN_COMBAT, playerB); +// showExile("exile", 1, PhaseStep.BEGIN_COMBAT, playerB); checkExileCount("blood must be in exile", 1, PhaseStep.BEGIN_COMBAT, playerB, "Bloodflow Connoisseur", 1); // return diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/TidehollowScullerTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/TidehollowScullerTest.java index 7661906c85..2fd417ba20 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/TidehollowScullerTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/TidehollowScullerTest.java @@ -8,14 +8,12 @@ import org.mage.test.serverside.base.CardTestPlayerBase; /** * @author LevelX2, JayDi85 */ - public class TidehollowScullerTest extends CardTestPlayerBase { /** * Test if the same Tidehollow Sculler is cast multiple times, the correct * corresponding exiled cards are returned */ - @Test public void test_CastOneCardFromHandWillBeExiled() { addCard(Zone.BATTLEFIELD, playerA, "Swamp", 2); @@ -30,7 +28,6 @@ public class TidehollowScullerTest extends CardTestPlayerBase { // addCard(Zone.HAND, playerB, "Bloodflow Connoisseur", 1); - // cast and exile from hand checkHandCardCount("B hand must have blood", 1, PhaseStep.UPKEEP, playerB, "Bloodflow Connoisseur", 1); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Tidehollow Sculler"); @@ -86,7 +83,7 @@ public class TidehollowScullerTest extends CardTestPlayerBase { checkPermanentCount("A must have 2 tide", 2, PhaseStep.UPKEEP, playerA, "Tidehollow Sculler", 2); checkHandCardCount("B hand must have 0 blood", 2, PhaseStep.UPKEEP, playerB, "Bloodflow Connoisseur", 0); castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", "@tide.1"); - showHand("B hand", 2, PhaseStep.BEGIN_COMBAT, playerB); +// showHand("B hand", 2, PhaseStep.BEGIN_COMBAT, playerB); checkPermanentCount("A must have 1 tide", 2, PhaseStep.BEGIN_COMBAT, playerA, "Tidehollow Sculler", 1); checkHandCardCount("B hand must have 1 blood", 2, PhaseStep.BEGIN_COMBAT, playerB, "Bloodflow Connoisseur", 1); // destroy 2 and return card to hand @@ -115,4 +112,4 @@ public class TidehollowScullerTest extends CardTestPlayerBase { } } -} \ No newline at end of file +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/WhisperwoodElementalTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/WhisperwoodElementalTest.java index ceb219a29b..dbd6e9cbec 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/WhisperwoodElementalTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/WhisperwoodElementalTest.java @@ -7,17 +7,18 @@ import org.junit.Test; import org.mage.test.serverside.base.CardTestPlayerBase; /** - * Whisperwood Elemental - Elemental {3}{G}{G} - * At the beginning of your end step, manifest the top card of your library. - * Sacrifice Whisperwood Elemental: Until end of turn, face-up, nontoken creatures you control gain "When this creature dies, manifest the top card of your library." + * Whisperwood Elemental - Elemental {3}{G}{G} At the beginning of your end + * step, manifest the top card of your library. Sacrifice Whisperwood Elemental: + * Until end of turn, face-up, nontoken creatures you control gain "When this + * creature dies, manifest the top card of your library." * * @author LevelX2 */ public class WhisperwoodElementalTest extends CardTestPlayerBase { /** - * Tests that the dies triggered ability of silvercoat lion (gained by sacrificed Whisperwood Elemental) - * triggers as he dies from Lightning Bolt + * Tests that the dies triggered ability of silvercoat lion (gained by + * sacrificed Whisperwood Elemental) triggers as he dies from Lightning Bolt */ @Test public void testDiesTriggeredAbility() { @@ -29,8 +30,6 @@ public class WhisperwoodElementalTest extends CardTestPlayerBase { activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Sacrifice {this}: Until end of turn, face-up, nontoken creatures you control gain \"When this creature dies, manifest the top card of your library."); castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Lightning Bolt", "Silvercoat Lion"); - showBattlefield("A battle", 1, PhaseStep.END_TURN, playerA); - showGraveyard("A grave", 1, PhaseStep.END_TURN, playerA); setStopAt(1, PhaseStep.END_TURN); execute(); assertAllCommandsUsed(); diff --git a/Mage.Tests/src/test/java/org/mage/test/commander/duel/OpalPalaceTest.java b/Mage.Tests/src/test/java/org/mage/test/commander/duel/OpalPalaceTest.java index 8061ad716d..e0d3d48582 100644 --- a/Mage.Tests/src/test/java/org/mage/test/commander/duel/OpalPalaceTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/commander/duel/OpalPalaceTest.java @@ -27,10 +27,9 @@ public class OpalPalaceTest extends CardTestCommanderDuelBase { // equal to the number of times it's been cast from the command zone this game. addCard(Zone.BATTLEFIELD, playerA, "Opal Palace", 1); - showHand("hand", 1, PhaseStep.PRECOMBAT_MAIN, playerA); - showCommand("command", 1, PhaseStep.PRECOMBAT_MAIN, playerA); - showAvaileableAbilities("abi", 1, PhaseStep.PRECOMBAT_MAIN, playerA); - + // showHand("hand", 1, PhaseStep.PRECOMBAT_MAIN, playerA); + // showCommand("command", 1, PhaseStep.PRECOMBAT_MAIN, playerA); + // showAvaileableAbilities("abi", 1, PhaseStep.PRECOMBAT_MAIN, playerA); activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {G}"); activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}, {T}"); setChoice(playerA, "Opal Palace"); // activate mana replace effect first (+3 counters) diff --git a/Mage.Tests/src/test/java/org/mage/test/testapi/TestAliases.java b/Mage.Tests/src/test/java/org/mage/test/testapi/TestAliases.java index 13d6915f92..a140bac5f7 100644 --- a/Mage.Tests/src/test/java/org/mage/test/testapi/TestAliases.java +++ b/Mage.Tests/src/test/java/org/mage/test/testapi/TestAliases.java @@ -11,7 +11,6 @@ import org.mage.test.serverside.base.CardTestPlayerBase; /** * @author JayDi85 */ - public class TestAliases extends CardTestPlayerBase { @Test @@ -54,7 +53,7 @@ public class TestAliases extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Swamp@battle", 1); addCard(Zone.GRAVEYARD, playerA, "Swamp@grave", 1); - showAliases("A aliases", 1, PhaseStep.UPKEEP, playerA); +// showAliases("A aliases", 1, PhaseStep.UPKEEP, playerA); checkAliasZone("lib", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "lib", Zone.LIBRARY); checkAliasZone("hand", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "hand", Zone.HAND); checkAliasZone("battle", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "battle", Zone.BATTLEFIELD); @@ -77,8 +76,8 @@ public class TestAliases extends CardTestPlayerBase { checkPermanentCount("Plains must exists", 1, PhaseStep.UPKEEP, playerB, "Plains", 5); checkPermanentCount("Mountain must exists", 1, PhaseStep.UPKEEP, playerB, "Mountain", 5); // - showAliases("A aliases", 1, PhaseStep.UPKEEP, playerA); - showAliases("B aliases", 1, PhaseStep.UPKEEP, playerB); +// showAliases("A aliases", 1, PhaseStep.UPKEEP, playerA); +// showAliases("B aliases", 1, PhaseStep.UPKEEP, playerB); // A checkAliasZone("Swamp must not", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Swamp", Zone.BATTLEFIELD, false); checkAliasZone("Swamp.1 must not", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Swamp.1", Zone.BATTLEFIELD, false); @@ -111,7 +110,7 @@ public class TestAliases extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", "@lion.3"); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", "@lion.5"); - showAliases("A aliases", 1, PhaseStep.POSTCOMBAT_MAIN, playerA); +// showAliases("A aliases", 1, PhaseStep.POSTCOMBAT_MAIN, playerA); checkAliasZone("1", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "lion.1", Zone.BATTLEFIELD, false); checkAliasZone("2", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "lion.2", Zone.BATTLEFIELD, true); checkAliasZone("3", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "lion.3", Zone.BATTLEFIELD, false); @@ -125,4 +124,4 @@ public class TestAliases extends CardTestPlayerBase { assertGraveyardCount(playerA, "Lightning Bolt", 3); assertGraveyardCount(playerA, "Silvercoat Lion", 3); } -} \ No newline at end of file +} diff --git a/Mage/src/main/java/mage/abilities/condition/common/PlayLandCondition.java b/Mage/src/main/java/mage/abilities/condition/common/PlayLandCondition.java index cab3b23a32..b528a8dca6 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/PlayLandCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/PlayLandCondition.java @@ -1,20 +1,23 @@ -package mage.abilities.condition.common; - -import mage.abilities.Ability; -import mage.abilities.condition.Condition; -import mage.game.Game; -import mage.watchers.common.PlayLandWatcher; - -/** - * @author jeffwadsworth - */ -public enum PlayLandCondition implements Condition { - instance; - - @Override - public boolean apply(Game game, Ability source) { - PlayLandWatcher watcher = game.getState().getWatcher(PlayLandWatcher.class); - return watcher != null - && watcher.landPlayed(source.getControllerId()); - } -} +package mage.abilities.condition.common; + +import mage.abilities.Ability; +import mage.abilities.condition.Condition; +import mage.game.Game; +import mage.watchers.common.PlayLandWatcher; + +/** + * @author jeffwadsworth + */ +public enum PlayLandCondition implements Condition { + instance; + + @Override + public boolean apply(Game game, Ability source) { + if (game.getTurn().getPhase() == null) { // only for getFrameColor for River of Tears before game started + return false; + } + PlayLandWatcher watcher = game.getState().getWatcher(PlayLandWatcher.class); + return watcher != null + && watcher.landPlayed(source.getControllerId()); + } +}