mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
Merge origin/master
Conflicts: Mage/src/main/java/mage/players/PlayerImpl.java
This commit is contained in:
commit
b7b3bc4474
51 changed files with 979 additions and 396 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package org.mage.test.AI.basic;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
|
|
@ -8,7 +7,6 @@ import org.junit.Test;
|
|||
import org.mage.test.serverside.base.CardTestPlayerBaseAI;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class CastCreaturesTest extends CardTestPlayerBaseAI {
|
||||
|
|
@ -173,7 +171,7 @@ public class CastCreaturesTest extends CardTestPlayerBaseAI {
|
|||
|
||||
/**
|
||||
* Tests that the creature is cast if enough mana is available.
|
||||
*
|
||||
* <p>
|
||||
* Once Ammit Eternal is cast against a computer AI opponent, the AI just
|
||||
* decides to sit there and only play basic lands. I've sat there and decked
|
||||
* it because it just plays lands. It's like it views giving the Ammit
|
||||
|
|
@ -194,8 +192,11 @@ public class CastCreaturesTest extends CardTestPlayerBaseAI {
|
|||
addCard(Zone.BATTLEFIELD, playerB, "Swamp", 3);
|
||||
|
||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Ammit Eternal");
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(3, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertPermanentCount(playerB, "Ammit Eternal", 1);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package org.mage.test.cards.abilities.activated;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
|
|
@ -7,7 +6,6 @@ import org.junit.Test;
|
|||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class LightningStormTest extends CardTestPlayerBase {
|
||||
|
|
@ -16,10 +14,9 @@ public class LightningStormTest extends CardTestPlayerBase {
|
|||
* So, this just happened to me. My opponent cast Lightning Storm and while
|
||||
* it was on the stack I couldn't use the ability despite having land in
|
||||
* hand which isn't something I've had an issue with before.
|
||||
*
|
||||
* <p>
|
||||
* My opponent had a Leyline of Sanctity in play, so perhaps that was
|
||||
* causing the issue somehow? Does anyone want to try and replicate it?
|
||||
*
|
||||
*/
|
||||
@Test
|
||||
public void ActivateByBothPlayersTest() {
|
||||
|
|
@ -31,22 +28,32 @@ public class LightningStormTest extends CardTestPlayerBase {
|
|||
addCard(Zone.HAND, playerA, "Mountain");
|
||||
addCard(Zone.HAND, playerB, "Mountain");
|
||||
|
||||
// A activate
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Storm", playerB);
|
||||
|
||||
// B discard and re-target
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Discard");
|
||||
setChoice(playerB, "playerA");
|
||||
setChoice(playerB, "Mountain");
|
||||
setChoice(playerB, "Yes");
|
||||
addTarget(playerB, playerA);
|
||||
|
||||
// A discard and re-target
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Discard");
|
||||
setChoice(playerA, "playerB");
|
||||
setChoice(playerA, "Mountain");
|
||||
setChoice(playerA, "Yes");
|
||||
addTarget(playerA, playerB);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.PRECOMBAT_MAIN);
|
||||
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertGraveyardCount(playerA, "Lightning Storm", 1);
|
||||
assertGraveyardCount(playerB, "Mountain", 1);
|
||||
assertGraveyardCount(playerA, "Mountain", 1);
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 13);
|
||||
assertLife(playerB, 20 - 3 - 2 - 2);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,128 @@
|
|||
package org.mage.test.cards.asthough;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author JayDi85
|
||||
*/
|
||||
public class PlayTopCardFromLibraryTest extends CardTestPlayerBase {
|
||||
|
||||
/*
|
||||
Bolas's Citadel
|
||||
{3}{B}{B}{B}
|
||||
You may look at the top card of your library any time.
|
||||
You may play the top card of your library. If you cast a spell this way, pay life equal to its converted mana cost rather than pay its mana cost.
|
||||
{T}, Sacrifice ten nonland permanents: Each opponent loses 10 life.
|
||||
*/
|
||||
|
||||
@Test
|
||||
public void test_CreaturePlay() {
|
||||
removeAllCardsFromLibrary(playerA);
|
||||
addCard(Zone.LIBRARY, playerA, "Balduvian Bears", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Bolas's Citadel", 1);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Balduvian Bears"); // 2 CMC
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertPermanentCount(playerA, "Balduvian Bears", 1);
|
||||
assertLife(playerA, 20 - 2);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_CreaturePlay2() {
|
||||
removeAllCardsFromLibrary(playerA);
|
||||
addCard(Zone.LIBRARY, playerA, "Balduvian Bears", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Vizier of the Menagerie", 1);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Balduvian Bears");
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertPermanentCount(playerA, "Balduvian Bears", 1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_ManaCostmodifications() {
|
||||
//
|
||||
// {5}{B}{B}
|
||||
// You may cast Scourge of Nel Toth from your graveyard by paying {B}{B} and sacrificing two creatures rather than paying its mana cost.
|
||||
addCard(Zone.GRAVEYARD, playerA, "Scourge of Nel Toth", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Kitesail Corsair", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 2);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Scourge of Nel Toth");
|
||||
setChoice(playerA, "Kitesail Corsair");
|
||||
setChoice(playerA, "Kitesail Corsair");
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertPermanentCount(playerA, "Scourge of Nel Toth", 1);
|
||||
assertLife(playerA, 20);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_SplitRightPlay() {
|
||||
// https://github.com/magefree/mage/issues/5912
|
||||
// Bolas's citadel requires you to pay mana instead of life for a split card on top of library.
|
||||
//
|
||||
// Steps to reproduce:
|
||||
//
|
||||
// Bolas's Citadel in play, Revival//Revenge on top of library.
|
||||
// Cast Revenge, choose target
|
||||
// receive prompt to pay 4WB.
|
||||
//
|
||||
// Expected outcome
|
||||
//
|
||||
// No prompt for mana payment, payment of six life instead.
|
||||
|
||||
removeAllCardsFromLibrary(playerA);
|
||||
addCard(Zone.LIBRARY, playerA, "Revival // Revenge", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Bolas's Citadel", 1);
|
||||
|
||||
// Double your life total. Target opponent loses half their life, rounded up.
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Revenge", playerB); // {4}{W}{B} = 6 life
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertLife(playerA, (20 - 6) * 2);
|
||||
assertLife(playerB, 20 / 2);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_SplitLeftPlay() {
|
||||
removeAllCardsFromLibrary(playerA);
|
||||
addCard(Zone.LIBRARY, playerA, "Revival // Revenge", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Bolas's Citadel", 1);
|
||||
addCard(Zone.GRAVEYARD, playerA, "Balduvian Bears", 1);
|
||||
|
||||
// Return target creature card with converted mana cost 3 or less from your graveyard to the battlefield.
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Revival", "Balduvian Bears"); // {W/B}{W/B} = 2 life
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertLife(playerA, 20 - 2);
|
||||
assertLife(playerB, 20);
|
||||
assertGraveyardCount(playerA, "Balduvian Bears", 0);
|
||||
assertPermanentCount(playerA, "Balduvian Bears", 1);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package org.mage.test.cards.asthough;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
|
|
@ -7,7 +6,6 @@ import org.junit.Test;
|
|||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class SpendOtherManaTest extends CardTestPlayerBase {
|
||||
|
|
@ -47,7 +45,7 @@ public class SpendOtherManaTest extends CardTestPlayerBase {
|
|||
/**
|
||||
* Tron mana doesn't work with Oath of Nissa. (e.g. can't cast Chandra,
|
||||
* Flamecaller with Urza's Tower, Power Plant, and Mine.)
|
||||
*
|
||||
* <p>
|
||||
* AI don't get the Planeswalker as playable card (probably because of the
|
||||
* as thought effect)
|
||||
*/
|
||||
|
|
@ -76,7 +74,7 @@ public class SpendOtherManaTest extends CardTestPlayerBase {
|
|||
* I was unable to cast Nissa, Voice of Zendikar using black mana with Oath
|
||||
* of Nissa in play. Pretty sure Oath is working usually, so here were the
|
||||
* conditions in my game:
|
||||
*
|
||||
* <p>
|
||||
* -Cast Dark Petition with spell mastery -Attempt to cast Nissa, Voice of
|
||||
* Zendikar using the triple black mana from Dark Petition
|
||||
*/
|
||||
|
|
@ -122,20 +120,84 @@ public class SpendOtherManaTest extends CardTestPlayerBase {
|
|||
addCard(Zone.HAND, playerA, "Hostage Taker"); // {2}{U}{B}
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Hostage Taker");
|
||||
setChoice(playerA, "Silvercoat Lion");
|
||||
addTarget(playerA, "Silvercoat Lion");
|
||||
|
||||
// red mana must be used as any mana
|
||||
activateManaAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{T}: Add {R}."); // red mana to pool
|
||||
activateManaAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{T}: Add {R}."); // red mana to pool
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Silvercoat Lion"); // cast it from exile with red mana from pool
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertPermanentCount(playerA, "Hostage Taker", 1);
|
||||
assertTappedCount("Mountain", true, 4);
|
||||
|
||||
assertPermanentCount(playerA, "Silvercoat Lion", 1);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_QuicksilverElemental_Normal() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
|
||||
|
||||
// {U}: Quicksilver Elemental gains all activated abilities of target creature until end of turn.
|
||||
// You may spend blue mana as though it were mana of any color to pay the activation costs of Quicksilver Elemental’s abilities.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Quicksilver Elemental"); // Creature {1}{W}
|
||||
// {R}, {T}: Anaba Shaman deals 1 damage to any target.
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Anaba Shaman");
|
||||
|
||||
// gain abilities
|
||||
checkPlayableAbility("must not have", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "{R}, {T}:", false);
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{U}:", "Anaba Shaman");
|
||||
|
||||
// use ability
|
||||
checkPlayableAbility("must have new ability", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{R}, {T}:", true);
|
||||
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{R}, {T}:", playerB);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 20 - 1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_QuicksilverElemental_Flicker() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
|
||||
|
||||
// {U}: Quicksilver Elemental gains all activated abilities of target creature until end of turn.
|
||||
// You may spend blue mana as though it were mana of any color to pay the activation costs of Quicksilver Elemental’s abilities.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Quicksilver Elemental"); // Creature {1}{W}
|
||||
// {R}, {T}: Anaba Shaman deals 1 damage to any target.
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Anaba Shaman");
|
||||
// Exile target nontoken permanent, then return it to the battlefield under its owner’s control.
|
||||
addCard(Zone.HAND, playerA, "Flicker"); // {1}{W}
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 2);
|
||||
|
||||
// gain abilities
|
||||
checkPlayableAbility("must not have", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "{R}, {T}:", false);
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{U}:", "Anaba Shaman");
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA);
|
||||
checkPlayableAbility("must have new ability", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "{R}, {T}:", true);
|
||||
|
||||
// renew target
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Flicker", "Anaba Shaman");
|
||||
|
||||
// use ability
|
||||
checkPlayableAbility("must save ability", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{R}, {T}:", true);
|
||||
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{R}, {T}:", playerB);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertGraveyardCount(playerA, "Flicker", 1);
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 20 - 1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package org.mage.test.cards.continuous;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
|
|
@ -7,7 +6,6 @@ import org.junit.Test;
|
|||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
|
|
@ -23,20 +21,22 @@ public class PsychicIntrusionTest extends CardTestPlayerBase {
|
|||
// Target opponent reveals their hand. You choose a nonland card from that player's
|
||||
// graveyard or hand and exile it. You may cast that card for as long as it remains exiled,
|
||||
// and you may spend mana as though it were mana of any color to cast that spell.
|
||||
addCard(Zone.HAND, playerA, "Psychic Intrusion", 1);
|
||||
addCard(Zone.HAND, playerA, "Psychic Intrusion", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 3);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 3);
|
||||
|
||||
addCard(Zone.HAND, playerB, "Elspeth, Sun's Champion", 1);
|
||||
|
||||
addCard(Zone.HAND, playerB, "Elspeth, Sun's Champion", 1); // {4}{W}{W}
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Psychic Intrusion", playerB);
|
||||
addTarget(playerA, "Elspeth, Sun's Champion");
|
||||
|
||||
setChoice(playerA, "Elspeth, Sun's Champion");
|
||||
|
||||
// cast from exile with any mana
|
||||
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Elspeth, Sun's Champion");
|
||||
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(3, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertGraveyardCount(playerA, "Psychic Intrusion", 1);
|
||||
assertHandCount(playerB, "Elspeth, Sun's Champion", 0);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import mage.constants.Zone;
|
|||
import mage.counters.CounterType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
|
|
@ -282,7 +281,8 @@ public class AdventureCardsTest extends CardTestPlayerBase {
|
|||
addCard(Zone.HAND, playerB, "Curious Pair");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Psychic Intrusion", playerB);
|
||||
playerA.addChoice("Curious Pair");
|
||||
setChoice(playerA, "Curious Pair");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Treats to Share");
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Curious Pair");
|
||||
|
||||
|
|
@ -462,6 +462,7 @@ public class AdventureCardsTest extends CardTestPlayerBase {
|
|||
removeAllCardsFromLibrary(playerA);
|
||||
addCard(Zone.LIBRARY, playerA, "Curious Pair");
|
||||
|
||||
showAvaileableAbilities("abils", 1, PhaseStep.PRECOMBAT_MAIN, playerA);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Treats to Share");
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
|
|
@ -473,7 +474,7 @@ public class AdventureCardsTest extends CardTestPlayerBase {
|
|||
}
|
||||
|
||||
@Test
|
||||
@Ignore("Not yet working correctly.")
|
||||
//@Ignore("Not yet working correctly.")
|
||||
public void testCastTreatsToShareWithWrennAndSixEmblem() {
|
||||
/*
|
||||
* Wrenn and Six {R}{G}
|
||||
|
|
@ -487,11 +488,16 @@ public class AdventureCardsTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerA, "Forest");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Wrenn and Six");
|
||||
addCard(Zone.GRAVEYARD, playerA, "Curious Pair");
|
||||
addCard(Zone.HAND, playerA, "Forest");
|
||||
addCard(Zone.HAND, playerA, "Forest"); // pay for retrace
|
||||
|
||||
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);
|
||||
|
||||
// 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");
|
||||
setChoice(playerA, "Forest");
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
|
@ -523,6 +529,8 @@ public class AdventureCardsTest extends CardTestPlayerBase {
|
|||
addCard(Zone.HAND, playerA, "Curious Pair");
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+1: Until your next");
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA);
|
||||
showAvaileableAbilities("abils", 1, PhaseStep.BEGIN_COMBAT, playerA);
|
||||
castSpell(1, PhaseStep.BEGIN_COMBAT, playerA, "Treats to Share");
|
||||
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ public class BolassCitadelTest extends CardTestPlayerBase {
|
|||
}
|
||||
|
||||
@Test
|
||||
@Ignore("This is broken for now.")
|
||||
public void testCastAdventure() {
|
||||
/*
|
||||
* Curious Pair {1}{G}
|
||||
|
|
@ -44,7 +43,6 @@ public class BolassCitadelTest extends CardTestPlayerBase {
|
|||
* Create a Food token.
|
||||
*/
|
||||
setStrictChooseMode(true);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Bolas's Citadel");
|
||||
removeAllCardsFromLibrary(playerA);
|
||||
addCard(Zone.LIBRARY, playerA, "Curious Pair");
|
||||
|
|
@ -54,7 +52,6 @@ public class BolassCitadelTest extends CardTestPlayerBase {
|
|||
execute();
|
||||
|
||||
assertAllCommandsUsed();
|
||||
assertTapped("Forest", false);
|
||||
assertHandCount(playerA, 0);
|
||||
assertPermanentCount(playerA, "Food", 1);
|
||||
assertExileCount(playerA, "Curious Pair", 1);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import mage.constants.Zone;
|
|||
import mage.filter.Filter;
|
||||
import mage.game.permanent.Permanent;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
|
|
@ -117,4 +118,48 @@ public class StarfieldOfNyxTest extends CardTestPlayerBase {
|
|||
Assert.assertFalse(emrakul.getAbilities().contains(FlyingAbility.getInstance())); // loses flying though
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* So Starfield of Nyx in play. Detention Sphere with a Song of the Dryads
|
||||
* under it. Wrath of god on the stack. In response I Parallax Wave Honden
|
||||
* of life's Web, Mirrari's Wake, Sphere of Safety, Aura Shards, and
|
||||
* Enchantress's Presence to save them. Wrath resolves and Song of the
|
||||
* Dryads come back along with the 5 named enchantments. Opp targets
|
||||
* Starfield of Nyx with Song of the Dryads. When song of the dryads
|
||||
* attaches all my enchantments stay creatures but as 1/1's instead of cmc.
|
||||
* I untap draw and cast Humility. All my 1/1 enchantments die while opp's
|
||||
* bruna, light of alabaster keeps her abilities. After mirrari's wake dies
|
||||
* due to this I still have double mana. So yea, something broke big time
|
||||
* there.
|
||||
*/
|
||||
@Test
|
||||
@Ignore
|
||||
public void testStarfieldOfNyxAndSongOfTheDryads() {
|
||||
// Nontoken creatures you control get +1/+1 and have vigilance.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Always Watching", 5);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 5);
|
||||
// At the beginning of your upkeep, you may return target enchantment card from your graveyard to the battlefield.
|
||||
// As long as you control five or more enchantments, each other non-Aura enchantment you control is a creature in
|
||||
// addition to its other types and has base power and base toughness each equal to its converted mana cost.
|
||||
addCard(Zone.HAND, playerA, "Starfield of Nyx"); // "{4}{W}"
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Forest", 3);
|
||||
// Enchanted permanent is a colorless Forest land.
|
||||
addCard(Zone.HAND, playerB, "Song of the Dryads"); // Enchant Permanent {2}{G}
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Starfield of Nyx");
|
||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Song of the Dryads", "Starfield of Nyx");
|
||||
|
||||
setStopAt(2, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Always Watching", 5);
|
||||
assertPermanentCount(playerB, "Song of the Dryads", 1);
|
||||
|
||||
assertPowerToughness(playerA, "Always Watching", 0, 0, Filter.ComparisonScope.All);
|
||||
|
||||
assertPermanentCount(playerA, "Forest", 1);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import org.junit.Test;
|
|||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
*
|
||||
* also tests regenerate and tests that permanents with protection can be
|
||||
* sacrificed
|
||||
*
|
||||
|
|
@ -46,10 +45,13 @@ public class FiendOfTheShadowsTest extends CardTestPlayerBase {
|
|||
addCard(Zone.HAND, playerB, "Swamp");
|
||||
|
||||
attack(1, playerA, "Fiend of the Shadows");
|
||||
addTarget(playerB, "Swamp");
|
||||
playLand(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Swamp");
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 17);
|
||||
|
|
|
|||
|
|
@ -2374,20 +2374,25 @@ public class TestPlayer implements Player {
|
|||
}
|
||||
|
||||
@Override
|
||||
public UUID getCastSourceIdWithAlternateMana() {
|
||||
public Set<UUID> getCastSourceIdWithAlternateMana() {
|
||||
return computerPlayer.getCastSourceIdWithAlternateMana();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManaCosts getCastSourceIdManaCosts() {
|
||||
public Map<UUID, ManaCosts<ManaCost>> getCastSourceIdManaCosts() {
|
||||
return computerPlayer.getCastSourceIdManaCosts();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Costs<Cost> getCastSourceIdCosts() {
|
||||
public Map<UUID, Costs<Cost>> getCastSourceIdCosts() {
|
||||
return computerPlayer.getCastSourceIdCosts();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearCastSourceIdManaCosts() {
|
||||
computerPlayer.clearCastSourceIdManaCosts();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInPayManaMode() {
|
||||
return computerPlayer.isInPayManaMode();
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ import mage.counters.Counter;
|
|||
import mage.counters.Counters;
|
||||
import mage.designations.Designation;
|
||||
import mage.designations.DesignationType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.FilterMana;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.Graveyard;
|
||||
import mage.game.Table;
|
||||
|
|
@ -1208,7 +1208,7 @@ public class PlayerStub implements Player {
|
|||
}
|
||||
|
||||
@Override
|
||||
public UUID getCastSourceIdWithAlternateMana() {
|
||||
public Set<UUID> getCastSourceIdWithAlternateMana() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -1218,15 +1218,20 @@ public class PlayerStub implements Player {
|
|||
}
|
||||
|
||||
@Override
|
||||
public ManaCosts getCastSourceIdManaCosts() {
|
||||
public Map<UUID, Costs<Cost>> getCastSourceIdCosts() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Costs<Cost> getCastSourceIdCosts() {
|
||||
public Map<UUID, ManaCosts<ManaCost>> getCastSourceIdManaCosts() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearCastSourceIdManaCosts() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addPermissionToShowHandCards(UUID watcherUserId) {
|
||||
|
||||
|
|
@ -1374,19 +1379,19 @@ public class PlayerStub implements Player {
|
|||
|
||||
@Override
|
||||
public void addPhyrexianToColors(FilterMana colors) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removePhyrexianFromColors(FilterMana colors) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public FilterMana getPhyrexianColors() {
|
||||
return (new FilterMana());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SpellAbility chooseAbilityForCast(Card card, Game game, boolean noMana) {
|
||||
return card.getSpellAbility();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue