mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 11:32:00 -08:00
Some fixes/improvements to generation of available mana.
This commit is contained in:
parent
4dc70048d5
commit
0e3d4b335a
14 changed files with 674 additions and 354 deletions
|
|
@ -29,7 +29,6 @@ package org.mage.test.AI.basic;
|
|||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBaseAI;
|
||||
|
||||
|
|
@ -52,7 +51,7 @@ public class CastCreaturesTest extends CardTestPlayerBaseAI {
|
|||
|
||||
assertPermanentCount(playerA, "Silvercoat Lion", 1);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testSimpleCast2() {
|
||||
addCard(Zone.HAND, playerA, "Silvercoat Lion");
|
||||
|
|
@ -65,9 +64,8 @@ public class CastCreaturesTest extends CardTestPlayerBaseAI {
|
|||
|
||||
assertPermanentCount(playerA, "Silvercoat Lion", 2);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
@Ignore // AI should cast Myr Enforcer -> Check why it does not
|
||||
public void testSimpleCast3() {
|
||||
// Affinity for artifacts (This spell costs less to cast for each artifact you control.)
|
||||
addCard(Zone.HAND, playerA, "Myr Enforcer");
|
||||
|
|
@ -80,5 +78,84 @@ public class CastCreaturesTest extends CardTestPlayerBaseAI {
|
|||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Myr Enforcer", 1);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSimpleCast4() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain");
|
||||
addCard(Zone.HAND, playerA, "Plains");
|
||||
skipInitShuffling();
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 1);
|
||||
|
||||
addCard(Zone.HAND, playerA, "Fireshrieker");
|
||||
addCard(Zone.HAND, playerA, "Blazing Specter"); // {2}{R}{B}
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Plains", 2);
|
||||
assertPermanentCount(playerA, "Fireshrieker", 0);
|
||||
assertPermanentCount(playerA, "Blazing Specter", 1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCast4Creature() {
|
||||
addCard(Zone.LIBRARY, playerA, "Swamp", 1);
|
||||
addCard(Zone.LIBRARY, playerA, "Mountain", 1);
|
||||
addCard(Zone.LIBRARY, playerA, "Island", 1);
|
||||
addCard(Zone.HAND, playerA, "Plains");
|
||||
skipInitShuffling();
|
||||
|
||||
addCard(Zone.HAND, playerA, "Loyal Sentry"); // {W} 1/1
|
||||
addCard(Zone.HAND, playerA, "Silvercoat Lion"); // {1}{W} 2/2
|
||||
addCard(Zone.HAND, playerA, "Rootwater Commando"); // {2}{U} 2/2
|
||||
addCard(Zone.HAND, playerA, "Bog Wraith"); // {3}{B} 3/3
|
||||
|
||||
setStopAt(7, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Plains", 1);
|
||||
assertPermanentCount(playerA, "Mountain", 1);
|
||||
assertPermanentCount(playerA, "Island", 1);
|
||||
assertPermanentCount(playerA, "Swamp", 1);
|
||||
|
||||
// assertLife(playerB, 11); // 1 + 1+2 + 1+2+2 =
|
||||
assertPermanentCount(playerA, "Loyal Sentry", 1);
|
||||
assertPermanentCount(playerA, "Silvercoat Lion", 1);
|
||||
assertPermanentCount(playerA, "Rootwater Commando", 1);
|
||||
assertPermanentCount(playerA, "Bog Wraith", 1);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCast4Creature2() {
|
||||
addCard(Zone.LIBRARY, playerA, "Swamp", 1);
|
||||
addCard(Zone.LIBRARY, playerA, "Swamp", 1);
|
||||
addCard(Zone.LIBRARY, playerA, "Plains", 1);
|
||||
|
||||
addCard(Zone.HAND, playerA, "Island", 1);
|
||||
addCard(Zone.HAND, playerA, "Plains");
|
||||
skipInitShuffling();
|
||||
|
||||
addCard(Zone.HAND, playerA, "Loyal Sentry"); // {W} 1/1
|
||||
addCard(Zone.HAND, playerA, "Steadfast Guard"); // {W}{W} 2/2
|
||||
addCard(Zone.HAND, playerA, "Rootwater Commando"); // {2}{U} 2/2
|
||||
addCard(Zone.HAND, playerA, "Bog Wraith"); // {3}{B} 3/3
|
||||
|
||||
setStopAt(7, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Plains", 2);
|
||||
assertPermanentCount(playerA, "Island", 1);
|
||||
assertPermanentCount(playerA, "Swamp", 1);
|
||||
|
||||
// assertLife(playerB, 11); // 1 + 1+2 + 1+2+2 =
|
||||
assertPermanentCount(playerA, "Loyal Sentry", 1);
|
||||
assertPermanentCount(playerA, "Steadfast Guard", 1);
|
||||
assertPermanentCount(playerA, "Rootwater Commando", 1);
|
||||
assertPermanentCount(playerA, "Bog Wraith", 1);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package org.mage.test.AI.basic;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBaseAI;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class CastDestroySpellsTest extends CardTestPlayerBaseAI {
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Test
|
||||
public void testOrzhovCharm() {
|
||||
// Choose one -
|
||||
// Return target creature you control and all Auras you control attached to it to their owner's hand;
|
||||
// or destroy target creature and you lose life equal to its toughness;
|
||||
// or return target creature card with converted mana cost 1 or less from your graveyard to the battlefield.
|
||||
addCard(Zone.HAND, playerA, "Orzhov Charm"); // {W}{B}
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Fetid Heath", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 1);
|
||||
|
||||
// Cycling abilities you activate cost you up to {2} less to activate.
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion");
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertLife(playerA, 18);
|
||||
|
||||
assertGraveyardCount(playerA, "Orzhov Charm", 1);
|
||||
assertGraveyardCount(playerB, "Silvercoat Lion", 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -35,8 +35,9 @@ import org.junit.Test;
|
|||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* This test checks if the calculated possible mana options are correct related to the given mana sources available.
|
||||
*
|
||||
* This test checks if the calculated possible mana options are correct related
|
||||
* to the given mana sources available.
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class ManaOptionsTest extends CardTestPlayerBase {
|
||||
|
|
@ -45,12 +46,12 @@ public class ManaOptionsTest extends CardTestPlayerBase {
|
|||
public void testSimpleMana() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 3);
|
||||
|
||||
setStopAt(1, PhaseStep. UPKEEP);
|
||||
setStopAt(1, PhaseStep.UPKEEP);
|
||||
execute();
|
||||
|
||||
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
|
||||
|
||||
Assert.assertEquals("mana variations don't fit",1, manaOptions.size());
|
||||
Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
|
||||
Assert.assertEquals("{G}{G}{G}", getManaOption(0, manaOptions));
|
||||
|
||||
}
|
||||
|
|
@ -62,12 +63,12 @@ public class ManaOptionsTest extends CardTestPlayerBase {
|
|||
public void testTinderFarm() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Tinder Farm", 3);
|
||||
|
||||
setStopAt(2, PhaseStep. UPKEEP);
|
||||
setStopAt(2, PhaseStep.UPKEEP);
|
||||
execute();
|
||||
|
||||
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
|
||||
|
||||
Assert.assertEquals("mana variations don't fit",4, manaOptions.size());
|
||||
Assert.assertEquals("mana variations don't fit", 4, manaOptions.size());
|
||||
Assert.assertEquals("{G}{G}{G}", getManaOption(0, manaOptions));
|
||||
Assert.assertEquals("{R}{G}{G}{W}", getManaOption(1, manaOptions));
|
||||
Assert.assertEquals("{R}{R}{G}{W}{W}", getManaOption(2, manaOptions));
|
||||
|
|
@ -82,12 +83,12 @@ public class ManaOptionsTest extends CardTestPlayerBase {
|
|||
public void testAdarkarWastes() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Adarkar Wastes", 3);
|
||||
|
||||
setStopAt(1, PhaseStep. UPKEEP);
|
||||
setStopAt(1, PhaseStep.UPKEEP);
|
||||
execute();
|
||||
|
||||
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
|
||||
|
||||
Assert.assertEquals("mana variations don't fit",4, manaOptions.size());
|
||||
Assert.assertEquals("mana variations don't fit", 4, manaOptions.size());
|
||||
Assert.assertEquals("{W}{W}{W}", getManaOption(0, manaOptions));
|
||||
Assert.assertEquals("{U}{W}{W}", getManaOption(1, manaOptions));
|
||||
Assert.assertEquals("{U}{U}{W}", getManaOption(2, manaOptions));
|
||||
|
|
@ -95,7 +96,6 @@ public class ManaOptionsTest extends CardTestPlayerBase {
|
|||
|
||||
}
|
||||
|
||||
|
||||
// Chromatic Sphere
|
||||
// {1}, {T}, Sacrifice Chromatic Sphere: Add one mana of any color to your mana pool. Draw a card.
|
||||
@Test
|
||||
|
|
@ -103,12 +103,12 @@ public class ManaOptionsTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Chromatic Sphere", 2);
|
||||
|
||||
setStopAt(1, PhaseStep. UPKEEP);
|
||||
setStopAt(1, PhaseStep.UPKEEP);
|
||||
execute();
|
||||
|
||||
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
|
||||
|
||||
Assert.assertEquals("mana variations don't fit",1, manaOptions.size());
|
||||
Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
|
||||
Assert.assertEquals("{Any}{Any}", getManaOption(0, manaOptions));
|
||||
}
|
||||
|
||||
|
|
@ -120,12 +120,12 @@ public class ManaOptionsTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Orochi Leafcaller", 1);
|
||||
|
||||
setStopAt(1, PhaseStep. UPKEEP);
|
||||
setStopAt(1, PhaseStep.UPKEEP);
|
||||
execute();
|
||||
|
||||
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
|
||||
|
||||
Assert.assertEquals("mana variations don't fit",1, manaOptions.size());
|
||||
Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
|
||||
Assert.assertEquals("{W}{W}{Any}{Any}", getManaOption(0, manaOptions));
|
||||
}
|
||||
|
||||
|
|
@ -138,14 +138,15 @@ public class ManaOptionsTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Crystal Quarry", 1);
|
||||
|
||||
setStopAt(1, PhaseStep. UPKEEP);
|
||||
setStopAt(1, PhaseStep.UPKEEP);
|
||||
execute();
|
||||
|
||||
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
|
||||
|
||||
Assert.assertEquals("mana variations don't fit",1, manaOptions.size());
|
||||
Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
|
||||
Assert.assertEquals("{1}{G}{G}{W}{W}", getManaOption(0, manaOptions));
|
||||
}
|
||||
|
||||
// Crystal Quarry
|
||||
// {T}: {1} Add to your mana pool.
|
||||
// {5}, {T}: Add {W}{U}{B}{R}{G} to your mana pool.
|
||||
|
|
@ -155,12 +156,12 @@ public class ManaOptionsTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 3);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Crystal Quarry", 1);
|
||||
|
||||
setStopAt(1, PhaseStep. UPKEEP);
|
||||
setStopAt(1, PhaseStep.UPKEEP);
|
||||
execute();
|
||||
|
||||
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
|
||||
|
||||
Assert.assertEquals("mana variations don't fit",2, manaOptions.size());
|
||||
Assert.assertEquals("mana variations don't fit", 2, manaOptions.size());
|
||||
Assert.assertEquals("{1}{G}{G}{G}{W}{W}", getManaOption(0, manaOptions));
|
||||
Assert.assertEquals("{R}{G}{U}{W}{B}", getManaOption(1, manaOptions));
|
||||
}
|
||||
|
|
@ -174,15 +175,15 @@ public class ManaOptionsTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 3);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Nykthos, Shrine to Nyx", 1);
|
||||
|
||||
setStopAt(1, PhaseStep. UPKEEP);
|
||||
setStopAt(1, PhaseStep.UPKEEP);
|
||||
execute();
|
||||
|
||||
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
|
||||
|
||||
Assert.assertEquals("mana variations don't fit",1, manaOptions.size());
|
||||
Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
|
||||
Assert.assertEquals("{G}{G}{G}{G}{G}", getManaOption(0, manaOptions));
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testNykthos2() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Sedge Scorpion", 4);
|
||||
|
|
@ -190,12 +191,12 @@ public class ManaOptionsTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 3);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Nykthos, Shrine to Nyx", 1);
|
||||
|
||||
setStopAt(1, PhaseStep. UPKEEP);
|
||||
setStopAt(1, PhaseStep.UPKEEP);
|
||||
execute();
|
||||
|
||||
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
|
||||
|
||||
Assert.assertEquals("mana variations don't fit",2, manaOptions.size());
|
||||
Assert.assertEquals("mana variations don't fit", 2, manaOptions.size());
|
||||
Assert.assertEquals("{G}{G}{G}{G}{G}", getManaOption(0, manaOptions));
|
||||
Assert.assertEquals("{R}{R}{R}{G}", getManaOption(1, manaOptions));
|
||||
}
|
||||
|
|
@ -206,36 +207,92 @@ public class ManaOptionsTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Nykthos, Shrine to Nyx", 1);
|
||||
|
||||
setStopAt(1, PhaseStep. UPKEEP);
|
||||
setStopAt(1, PhaseStep.UPKEEP);
|
||||
execute();
|
||||
|
||||
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
|
||||
|
||||
Assert.assertEquals("mana variations don't fit",1, manaOptions.size());
|
||||
Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
|
||||
Assert.assertEquals("{1}{G}{Any}", getManaOption(0, manaOptions));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMix1() {
|
||||
// {1}, {T}, Sacrifice Chromatic Star: Add one mana of any color to your mana pool.
|
||||
// When Chromatic Star is put into a graveyard from the battlefield, draw a card.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Chromatic Star", 1);
|
||||
// {1}, {T}, Sacrifice Chromatic Sphere: Add one mana of any color to your mana pool. Draw a card.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Chromatic Sphere", 1);
|
||||
// {T}: Add {1} to your mana pool. If you control an Urza's Mine and an Urza's Power-Plant, add {3} to your mana pool instead.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Urza's Tower", 1);
|
||||
// {T}: Add {1} to your mana pool.
|
||||
// {T}: Add {R} or {G} to your mana pool. Each opponent gains 1 life.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Grove of the Burnwillows", 1);
|
||||
|
||||
setStopAt(1, PhaseStep. UPKEEP);
|
||||
setStopAt(1, PhaseStep.UPKEEP);
|
||||
execute();
|
||||
|
||||
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
|
||||
|
||||
Assert.assertEquals("mana variations don't fit",2, manaOptions.size());
|
||||
Assert.assertEquals("mana variations don't fit", 2, manaOptions.size());
|
||||
Assert.assertEquals("{Any}{Any}", getManaOption(0, manaOptions));
|
||||
Assert.assertEquals("{Any}{Any}", getManaOption(1, manaOptions));
|
||||
}
|
||||
|
||||
private String getManaOption(int index, ManaOptions manaOptions) {
|
||||
@Test
|
||||
public void testFetidHeath() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Fetid Heath", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 1);
|
||||
|
||||
setStopAt(1, PhaseStep.UPKEEP);
|
||||
execute();
|
||||
|
||||
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
|
||||
|
||||
Assert.assertEquals("mana variations don't fit", 3, manaOptions.size());
|
||||
Assert.assertEquals("{W}{W}", getManaOption(0, manaOptions));
|
||||
Assert.assertEquals("{W}{B}", getManaOption(1, manaOptions));
|
||||
Assert.assertEquals("{B}{B}", getManaOption(2, manaOptions));
|
||||
}
|
||||
|
||||
/**
|
||||
* Don't use mana sources that only reduce available mana
|
||||
*/
|
||||
@Test
|
||||
public void testCabalCoffers1() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Cabal Coffers", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1);
|
||||
|
||||
setStopAt(1, PhaseStep.UPKEEP);
|
||||
execute();
|
||||
|
||||
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
|
||||
|
||||
Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
|
||||
Assert.assertEquals("{W}{B}", getManaOption(0, manaOptions));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCabalCoffers2() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Cabal Coffers", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 2);
|
||||
|
||||
setStopAt(1, PhaseStep.UPKEEP);
|
||||
execute();
|
||||
|
||||
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
|
||||
|
||||
Assert.assertEquals("mana variations don't fit", 2, manaOptions.size());
|
||||
Assert.assertEquals("{W}{B}{B}", getManaOption(0, manaOptions));
|
||||
Assert.assertEquals("{B}{B}{B}", getManaOption(1, manaOptions));
|
||||
}
|
||||
|
||||
private String getManaOption(int index, ManaOptions manaOptions) {
|
||||
if (manaOptions.size() < index + 1) {
|
||||
return "";
|
||||
}
|
||||
return manaOptions.get(index).toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue