mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 22:42:03 -08:00
refactor and test 'greatest [quality] among [permanent filter]' (#13666)
This commit is contained in:
parent
0b6a2b2546
commit
43c45238d0
96 changed files with 1616 additions and 1638 deletions
|
|
@ -0,0 +1,58 @@
|
|||
package org.mage.test.cards.single.avr;
|
||||
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class CraterhoofBehemothTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* {@link mage.cards.c.CraterhoofBehemoth Craterhoof Behemoth} {5}{G}{G}{G}
|
||||
* Creature — Beast
|
||||
* Haste
|
||||
* When this creature enters, creatures you control gain trample and get +X/+X until end of turn, where X is the number of creatures you control.
|
||||
* 5/5
|
||||
*/
|
||||
private static final String hoof = "Craterhoof Behemoth";
|
||||
|
||||
@Test
|
||||
public void test_simple() {
|
||||
|
||||
addCard(Zone.HAND, playerA, hoof, 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Elite Vanguard", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 8);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Goblin Piker", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Merfolk of the Pearl Trident", 1);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, hoof);
|
||||
|
||||
checkAbility("hoof gets trample", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, hoof, TrampleAbility.class, true);
|
||||
checkAbility("vanguard gets trample", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Elite Vanguard", TrampleAbility.class, true);
|
||||
checkAbility("bears gets trample", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Grizzly Bears", TrampleAbility.class, true);
|
||||
checkAbility("opp's piker no trample", 1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Goblin Piker", TrampleAbility.class, false);
|
||||
checkAbility("opp's merfolk no trample", 1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Merfolk of the Pearl Trident", TrampleAbility.class, false);
|
||||
|
||||
checkPT("hoof gets +3/+3", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, hoof, 5 + 3, 5 + 3);
|
||||
checkPT("vanguard gets +3/+3", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Elite Vanguard", 2 + 3, 1 + 3);
|
||||
checkPT("bears gets +3/+3", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Grizzly Bears", 2 + 3, 2 + 3);
|
||||
checkPT("opp's piker no PT change", 1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Goblin Piker", 2, 1);
|
||||
checkPT("opp's merfolk no PT change", 1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Merfolk of the Pearl Trident", 1, 1);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(2, PhaseStep.PRECOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
// check effect ended.
|
||||
assertPowerToughness(playerA, hoof, 5, 5);
|
||||
assertPowerToughness(playerA, "Elite Vanguard", 2, 1);
|
||||
assertAbility(playerA, hoof, TrampleAbility.getInstance(), false);
|
||||
assertAbility(playerA, "Elite Vanguard", TrampleAbility.getInstance(), false);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package org.mage.test.cards.single.avr;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class EssenceHarvestTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* {@link mage.cards.e.EssenceHarvest Essence Harvest} {2}{B}
|
||||
* Sorcery
|
||||
* Target player loses X life and you gain X life, where X is the greatest power among creatures you control.
|
||||
*/
|
||||
private static final String harvest = "Essence Harvest";
|
||||
|
||||
@Test
|
||||
public void test_no_creature() {
|
||||
addCard(Zone.HAND, playerA, harvest, 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 3);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Goblin Piker", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Merfolk of the Pearl Trident", 1);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, harvest, playerB);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 20);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_4_power() {
|
||||
addCard(Zone.HAND, playerA, harvest, 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 3);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Elite Vanguard", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Borderland Minotaur", 1); // 4/3
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Goblin Piker", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Merfolk of the Pearl Trident", 1);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, harvest, playerB);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertLife(playerA, 20 + 4);
|
||||
assertLife(playerB, 20 - 4);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
package org.mage.test.cards.single.bfz;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class UginsInsightTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* {@link mage.cards.u.UginsInsight Ugin's Insight} {3}{U}{U}
|
||||
* Sorcery
|
||||
* Scry X, where X is the greatest mana value among permanents you control, then draw three cards.
|
||||
*/
|
||||
private static final String insight = "Ugin's Insight";
|
||||
|
||||
@Test
|
||||
public void test_greatest_0() {
|
||||
addCard(Zone.HAND, playerA, insight);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 5);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Barbarian Horde", 1); // 3/3 {3}{R}
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, insight);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertHandCount(playerA, 3);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_greatest_4() {
|
||||
skipInitShuffling();
|
||||
addCard(Zone.LIBRARY, playerA, "Ageless Guardian");
|
||||
addCard(Zone.LIBRARY, playerA, "Barktooth Warbeard");
|
||||
addCard(Zone.LIBRARY, playerA, "Catacomb Crocodile");
|
||||
addCard(Zone.LIBRARY, playerA, "Devilthorn Fox");
|
||||
|
||||
addCard(Zone.HAND, playerA, insight);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 5);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Acolyte of Bahamut", 1); // {1}{G}
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Barbarian Horde", 1); // 3/3 {3}{R}
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Sword of Fire and Ice", 1); // {3}
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Barbarian Horde", 1); // 3/3 {3}{R}
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, insight);
|
||||
addTarget(playerA, "Devilthorn Fox^Barktooth Warbeard"); // scry two to the bottom.
|
||||
setChoice(playerA, "Barktooth Warbeard"); // order 2 to the bottom.
|
||||
setChoice(playerA, "Catacomb Crocodile"); // order 2 to the top.
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertHandCount(playerA, 3);
|
||||
assertHandCount(playerA, "Mountain", 1);
|
||||
assertHandCount(playerA, "Catacomb Crocodile", 1);
|
||||
assertHandCount(playerA, "Ageless Guardian", 1);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
package org.mage.test.cards.single.cmr;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class AlenaKessigTrapperTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* {@link mage.cards.a.AlenaKessigTrapper Alena, Kessig Trapper} {4}{R}
|
||||
* Legendary Creature — Human Scout
|
||||
* First strike
|
||||
* {T}: Add an amount of {R} equal to the greatest power among creatures you control that entered this turn.
|
||||
* Partner
|
||||
* 4/3
|
||||
*/
|
||||
private static final String alena = "Alena, Kessig Trapper";
|
||||
|
||||
@Test
|
||||
public void test_alena() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, alena);
|
||||
addCard(Zone.HAND, playerA, "Frost Walker"); // 4/1 {1}{U}
|
||||
addCard(Zone.HAND, playerA, "Barbarian Horde", 2); // 3/3 {3}{R}
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
|
||||
|
||||
// start on turn 3 as Alena has technically entered t1.
|
||||
checkPlayableAbility("1: Can not cast Horde", 3, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Barbarian Horde", false);
|
||||
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Frost Walker");
|
||||
|
||||
checkPlayableAbility("2: Can cast Horde", 3, PhaseStep.POSTCOMBAT_MAIN, playerA, "Cast Barbarian Horde", true);
|
||||
castSpell(3, PhaseStep.POSTCOMBAT_MAIN, playerA, "Barbarian Horde");
|
||||
|
||||
checkPlayableAbility("3: Can not cast Horde", 5, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Barbarian Horde", false);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(5, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Barbarian Horde", 1);
|
||||
assertHandCount(playerA, "Barbarian Horde", 1);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package org.mage.test.cards.single.cns;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class MuzzioVisionaryArchitectTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* {@link mage.cards.m.MuzzioVisionaryArchitect Muzzio, Visionary Architect} {1}{U}{U}
|
||||
* Legendary Creature — Human Artificer
|
||||
* {3}{U}, {T}: Look at the top X cards of your library, where X is the greatest mana value among artifacts you control. You may put an artifact card from among them onto the battlefield. Put the rest on the bottom of your library in any order.
|
||||
* 1/3
|
||||
*/
|
||||
private static final String muzzio = "Muzzio, Visionary Architect";
|
||||
|
||||
@Test
|
||||
public void test_no_artifact() {
|
||||
skipInitShuffling();
|
||||
addCard(Zone.LIBRARY, playerA, "Mox Ruby");
|
||||
addCard(Zone.LIBRARY, playerA, "Black Lotus");
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, muzzio);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 4);
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{3}{U}");
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertTapped(muzzio, true);
|
||||
assertPermanentCount(playerA, 5);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_mv2() {
|
||||
skipInitShuffling();
|
||||
addCard(Zone.LIBRARY, playerA, "Mox Ruby");
|
||||
addCard(Zone.LIBRARY, playerA, "Black Lotus");
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, muzzio);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 4);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Ace's Baseball Bat"); // mv 2
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Chrome Mox", 2); // mv 0
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{3}{U}");
|
||||
setChoice(playerA, "Mox Ruby"); // chosen to put on battlefield
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertTapped(muzzio, true);
|
||||
assertPermanentCount(playerA, 9);
|
||||
assertPermanentCount(playerA, "Mox Ruby", 1);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
package org.mage.test.cards.single.dmc;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class BaruWurmspeakerTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* {@link mage.cards.b.BaruWurmspeaker Baru, Wurmspeaker} {2}{G}{G}
|
||||
* Legendary Creature — Human Druid
|
||||
* Wurms you control get +2/+2 and have trample.
|
||||
* {7}{G}, {T}: Create a 4/4 green Wurm creature token. This ability costs {X} less to activate, where X is the greatest power among Wurms you control.
|
||||
* 3/3
|
||||
*/
|
||||
private static final String baru = "Baru, Wurmspeaker";
|
||||
|
||||
@Test
|
||||
public void test_no_wurm() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, baru);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 8);
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{7}{G},");
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertTapped(baru, true);
|
||||
assertPermanentCount(playerA, "Wurm Token", 1);
|
||||
assertTappedCount("Forest", true, 8);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_wurm() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, baru);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Voracious Wurm"); // 2/2 Wurm
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 4);
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{7}{G},");
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertTapped(baru, true);
|
||||
assertPermanentCount(playerA, "Wurm Token", 1);
|
||||
assertTappedCount("Forest", true, 4);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
package org.mage.test.cards.single.dmc;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class TetsuoImperialChampionTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* {@link mage.cards.t.TetsuoImperialChampion Tetsuo, Imperial Champion} {U}{B}{R}
|
||||
* <p>
|
||||
* Legendary Creature — Human Samurai
|
||||
* Whenever Tetsuo attacks, if it's equipped, choose one —
|
||||
* • Tetsuo deals damage equal to the greatest mana value among Equipment attached to it to any target.
|
||||
* • You may cast an instant or sorcery spell from your hand with mana value less than or equal to the greatest mana value among Equipment attached to Tetsuo without paying its mana cost.
|
||||
* 3/3
|
||||
*/
|
||||
private static final String tetsuo = "Tetsuo, Imperial Champion";
|
||||
|
||||
@Test
|
||||
public void test_attack_notrigger() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, tetsuo);
|
||||
|
||||
attack(1, playerA, tetsuo, playerB);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertLife(playerB, 20 - 3);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_attack_equipped_damage_mv3() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, tetsuo);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Civic Saber"); // {1} +1/+0 for each color equip {1}
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Barbed Battlegear"); // {3} +4/-1 equip {2}
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 3);
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Equip {2}", tetsuo);
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA);
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Equip {1}", tetsuo);
|
||||
|
||||
attack(1, playerA, tetsuo, playerB);
|
||||
setModeChoice(playerA, "1"); // choose damage mode
|
||||
addTarget(playerA, playerB);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertLife(playerB, 20 - 3 - 3 - 4 - 3);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void test_attack_equipped_damage_mv1() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, tetsuo);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Brokers Initiate"); // 0/4
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Civic Saber"); // {1} +1/+0 for each color equip {1}
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Barbed Battlegear"); // {3} +4/-1 equip {2}
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 3);
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Equip {2}", "Brokers Initiate");
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA);
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Equip {1}", tetsuo);
|
||||
|
||||
attack(1, playerA, tetsuo, playerB);
|
||||
attack(1, playerA, "Brokers Initiate", playerB);
|
||||
setModeChoice(playerA, "1"); // choose damage mode
|
||||
addTarget(playerA, playerB);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertLife(playerB, 20 - 3 - 3 - 4 - 1);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package org.mage.test.cards.single.gtc;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class SpellRuptureTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* {@link mage.cards.s.SpellRupture Spell Rupture} {1}{U}
|
||||
* Instant
|
||||
* Counter target spell unless its controller pays {X}, where X is the greatest power among creatures you control.
|
||||
*/
|
||||
private static final String rupture = "Spell Rupture";
|
||||
|
||||
@Test
|
||||
public void test_no_creature() {
|
||||
addCard(Zone.HAND, playerA, rupture, 1);
|
||||
addCard(Zone.HAND, playerA, "Lightning Bolt", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Volcanic Island", 10);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Goblin Piker", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Merfolk of the Pearl Trident", 1);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", playerA);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, rupture, "Lightning Bolt");
|
||||
setChoice(playerA, true); // yes for pays {0}
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertLife(playerA, 20 - 3);
|
||||
assertTappedCount("Volcanic Island", true, 2 + 1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_4_power() {
|
||||
disableManaAutoPayment(playerA); // TODO: investigate why TestPlayer can't pay the Spell Rupture's tax mana here.
|
||||
|
||||
addCard(Zone.HAND, playerA, rupture, 1);
|
||||
addCard(Zone.HAND, playerA, "Lightning Bolt", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Volcanic Island", 10);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Elite Vanguard", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Borderland Minotaur", 1); // 4/3
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Goblin Piker", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Merfolk of the Pearl Trident", 1);
|
||||
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}.", 5);
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {U}.", 2);
|
||||
|
||||
setChoice(playerA, "Red", 1); // pay for bolt
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", playerA);
|
||||
setChoice(playerA, "Blue", 2); // pay for rupture
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, rupture, "Lightning Bolt");
|
||||
setChoice(playerA, true); // yes for pays {4}
|
||||
setChoice(playerA, "Red", 4); // pay the 4
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertLife(playerA, 20 - 3);
|
||||
assertTappedCount("Volcanic Island", true, 2 + 1 + 4);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
package org.mage.test.cards.single.ktk;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class KinTreeInvocationTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* {@link mage.cards.k.KinTreeInvocation Kin-Tree Invocation} {B}{G}
|
||||
* Sorcery
|
||||
* Create an X/X black and green Spirit Warrior creature token, where X is the greatest toughness among creatures you control.
|
||||
*/
|
||||
private static final String invocation = "Kin-Tree Invocation";
|
||||
|
||||
@Test
|
||||
public void test_no_creature() {
|
||||
addCard(Zone.HAND, playerA, invocation);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Glorious Anthem", 1); // Creatures you control get +1/+1.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Bayou", 2);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Barbarian Horde", 1); // 3/3 {3}{R}
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, invocation);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Spirit Warrior Token", 1);
|
||||
assertPowerToughness(playerA, "Spirit Warrior Token", 1, 1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_varied_creatures() {
|
||||
addCard(Zone.HAND, playerA, invocation);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Axegrinder Giant", 1); // 6/4
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Ancient Carp", 1); // 2/5
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Goblin Piker", 1); // 2/1
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Bayou", 2);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Barbarian Horde", 1); // 3/3 {3}{R}
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, invocation);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Spirit Warrior Token", 1);
|
||||
assertPowerToughness(playerA, "Spirit Warrior Token", 5, 5);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
package org.mage.test.cards.single.lci;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class TriumphantChompTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* {@link mage.cards.t.TriumphantChomp Triumphant Chomp} {R}
|
||||
* Sorcery
|
||||
* Triumphant Chomp deals damage to target creature equal to 2 or the greatest power among Dinosaurs you control, whichever is greater.
|
||||
*/
|
||||
private static final String chomp = "Triumphant Chomp";
|
||||
|
||||
@Test
|
||||
public void test_chomp_nodinosaur() {
|
||||
addCard(Zone.HAND, playerA, chomp);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain");
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Enormous Baloth");
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Colossadactyl");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, chomp, "Colossadactyl");
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertDamageReceived(playerB, "Colossadactyl", 2);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_chomp_dinosaur() {
|
||||
addCard(Zone.HAND, playerA, chomp);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain");
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Bellowing Aegisaur"); // 3/5 dino
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Raging Regisaur"); // 4/4 dino
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Colossadactyl");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, chomp, "Colossadactyl");
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertDamageReceived(playerB, "Colossadactyl", 4);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
package org.mage.test.cards.single.m11;
|
||||
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class OverwhelmingStampedeTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* {@link mage.cards.o.OverwhelmingStampede Overwhelming Stampede} {3}{G}{G}
|
||||
* Sorcery
|
||||
* Until end of turn, creatures you control gain trample and get +X/+X, where X is the greatest power among creatures you control.
|
||||
*/
|
||||
private static final String stampede = "Overwhelming Stampede";
|
||||
|
||||
@Test
|
||||
public void test_simple() {
|
||||
|
||||
addCard(Zone.HAND, playerA, stampede, 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Borderland Minotaur", 1); // 4/3
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Elite Vanguard", 1); // 2/1
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears", 1); // 2/2
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 5);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Goblin Piker", 1); // 2/1
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Merfolk of the Pearl Trident", 1); // 1/1
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, stampede);
|
||||
|
||||
checkAbility("minotaur gets trample", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Borderland Minotaur", TrampleAbility.class, true);
|
||||
checkAbility("vanguard gets trample", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Elite Vanguard", TrampleAbility.class, true);
|
||||
checkAbility("bears gets trample", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Grizzly Bears", TrampleAbility.class, true);
|
||||
checkAbility("opp's piker no trample", 1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Goblin Piker", TrampleAbility.class, false);
|
||||
checkAbility("opp's merfolk no trample", 1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Merfolk of the Pearl Trident", TrampleAbility.class, false);
|
||||
|
||||
checkPT("minotaur gets +4/+4", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Borderland Minotaur", 4 + 4, 3 + 4);
|
||||
checkPT("vanguard gets +4/+4", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Elite Vanguard", 2 + 4, 1 + 4);
|
||||
checkPT("bears gets +4/+4", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Grizzly Bears", 2 + 4, 2 + 4);
|
||||
checkPT("opp's piker no PT change", 1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Goblin Piker", 2, 1);
|
||||
checkPT("opp's merfolk no PT change", 1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Merfolk of the Pearl Trident", 1, 1);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(2, PhaseStep.PRECOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
// check effect ended.
|
||||
assertPowerToughness(playerA, "Borderland Minotaur", 4, 3);
|
||||
assertPowerToughness(playerA, "Elite Vanguard", 2, 1);
|
||||
assertAbility(playerA, "Borderland Minotaur", TrampleAbility.getInstance(), false);
|
||||
assertAbility(playerA, "Elite Vanguard", TrampleAbility.getInstance(), false);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,177 @@
|
|||
package org.mage.test.cards.single.mom;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class GhaltaAndMavrenTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* {@link mage.cards.g.GhaltaAndMavren Ghalta and Mavren} {3}{G}{G}{W}{W}
|
||||
* Legendary Creature — Dinosaur Vampire
|
||||
* Trample
|
||||
* Whenever you attack, choose one —
|
||||
* • Create a tapped and attacking X/X green Dinosaur creature token with trample, where X is the greatest power among other attacking creatures.
|
||||
* • Create X 1/1 white Vampire creature tokens with lifelink, where X is the number of other attacking creatures.
|
||||
* 12/12
|
||||
*/
|
||||
private static final String ghalta = "Ghalta and Mavren";
|
||||
|
||||
@Test
|
||||
public void test_ghalta_attack_alone_dinosaur() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, ghalta);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Blood Artist", 1); // to trigger on token death
|
||||
|
||||
attack(1, playerA, ghalta, playerB);
|
||||
setModeChoice(playerA, "1"); // create 0/0 Dinosaur
|
||||
addTarget(playerA, playerB); // Blood Artist trigger
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Dinosaur Token", 0);
|
||||
assertPermanentCount(playerA, "Vampire Token", 0);
|
||||
assertLife(playerB, 20 - 12 - 1);
|
||||
assertLife(playerA, 20 + 1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_ghalta_attack_alone_vampire() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, ghalta);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Blood Artist", 1); // to trigger on token death
|
||||
|
||||
attack(1, playerA, ghalta, playerB);
|
||||
setModeChoice(playerA, "2"); // create 0 1/1 Vampire
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Dinosaur Token", 0);
|
||||
assertPermanentCount(playerA, "Vampire Token", 0);
|
||||
assertLife(playerB, 20 - 12);
|
||||
assertLife(playerA, 20);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_vanguard_attack_alone_dinosaur() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, ghalta);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Elite Vanguard", 1); // 2/1
|
||||
|
||||
attack(1, playerA, "Elite Vanguard", playerB);
|
||||
setModeChoice(playerA, "1"); // create 2/2 Dinosaur
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Dinosaur Token", 1);
|
||||
assertPowerToughness(playerA, "Dinosaur Token", 2, 2);
|
||||
assertPermanentCount(playerA, "Vampire Token", 0);
|
||||
assertLife(playerB, 20 - 2 - 2);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_bear_attack_alone_vampire() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, ghalta);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Elite Vanguard", 1); // 2/1
|
||||
|
||||
attack(1, playerA, "Elite Vanguard", playerB);
|
||||
setModeChoice(playerA, "2"); // create 1 1/1 Vampire
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Dinosaur Token", 0);
|
||||
assertPermanentCount(playerA, "Vampire Token", 1);
|
||||
assertLife(playerB, 20 - 2);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void test_vanguard_and_ghalta_attack_dinosaur() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, ghalta);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Elite Vanguard", 1); // 2/1
|
||||
|
||||
attack(1, playerA, ghalta, playerB);
|
||||
attack(1, playerA, "Elite Vanguard", playerB);
|
||||
setModeChoice(playerA, "1"); // create 2/2 Dinosaur
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Dinosaur Token", 1);
|
||||
assertPowerToughness(playerA, "Dinosaur Token", 2, 2);
|
||||
assertPermanentCount(playerA, "Vampire Token", 0);
|
||||
assertLife(playerB, 20 - 12 - 2 - 2);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_vanguard_and_ghalta_attack_vampire() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, ghalta);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Elite Vanguard", 1); // 2/1
|
||||
|
||||
attack(1, playerA, ghalta, playerB);
|
||||
attack(1, playerA, "Elite Vanguard", playerB);
|
||||
setModeChoice(playerA, "2"); // create 1 1/1 Vampire
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Dinosaur Token", 0);
|
||||
assertPermanentCount(playerA, "Vampire Token", 1);
|
||||
assertLife(playerB, 20 - 12 - 2);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void test_varied_attackers_dinosaur() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, ghalta);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Elite Vanguard"); // 2/1
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Barony Vampire"); // 3/2
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Armored Wolf-Rider"); // 4/6
|
||||
|
||||
attack(1, playerA, "Elite Vanguard", playerB);
|
||||
attack(1, playerA, "Barony Vampire", playerB);
|
||||
attack(1, playerA, "Armored Wolf-Rider", playerB);
|
||||
setModeChoice(playerA, "1"); // create a 4/4 Dinosaur
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Dinosaur Token", 1);
|
||||
assertPowerToughness(playerA, "Dinosaur Token", 4, 4);
|
||||
assertPermanentCount(playerA, "Vampire Token", 0);
|
||||
assertLife(playerB, 20 - 4 - 3 - 2 - 4);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_5_attackers_vampire() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, ghalta);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Elite Vanguard", 5); // 2/1
|
||||
|
||||
attack(1, playerA, "Elite Vanguard", playerB);
|
||||
attack(1, playerA, "Elite Vanguard", playerB);
|
||||
attack(1, playerA, "Elite Vanguard", playerB);
|
||||
attack(1, playerA, "Elite Vanguard", playerB);
|
||||
attack(1, playerA, "Elite Vanguard", playerB);
|
||||
setModeChoice(playerA, "2"); // create 5 1/1 Vampire
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Dinosaur Token", 0);
|
||||
assertPermanentCount(playerA, "Vampire Token", 5);
|
||||
assertLife(playerB, 20 - 2 * 5);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package org.mage.test.cards.single.scg;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class AcceleratedMutationTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* {@link mage.cards.a.AcceleratedMutation Accelerated Mutation} {3}{G}{G}
|
||||
* Instant
|
||||
* Target creature gets +X/+X until end of turn, where X is the greatest mana value among permanents you control.
|
||||
*/
|
||||
private static final String mutation = "Accelerated Mutation";
|
||||
|
||||
@Test
|
||||
public void test_simple() {
|
||||
addCard(Zone.HAND, playerA, mutation);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 5);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Centaur Courser"); // {2}{G} 3/3
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Ingenuity Engine"); // {7} Artifact
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Arboretum Elemental"); // {7}{G}{G}
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, mutation, "Centaur Courser");
|
||||
checkPT("10/10 Courser", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Centaur Courser", 10, 10);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(2, PhaseStep.PRECOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
// check effect stop end of turn
|
||||
assertPowerToughness(playerA, "Centaur Courser", 3, 3);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
package org.mage.test.cards.single.who;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class TraverseEternityTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* {@link mage.cards.t.TraverseEternity Traverse Eternity} {2}{U}{U}
|
||||
* Sorcery
|
||||
* Draw cards equal to the greatest mana value among historic permanents you control. (Artifacts, legendaries, and Sagas are historic.)
|
||||
*/
|
||||
private static final String traverse = "Traverse Eternity";
|
||||
|
||||
@Test
|
||||
public void test_greatest_2() {
|
||||
addCard(Zone.HAND, playerA, traverse);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 5);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Acolyte of Bahamut", 1); // {1}{G}
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Barbarian Horde", 1); // 3/3 {3}{R}
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Arwen Undomiel", 1); // {G}{U} -- historic
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Barktooth Warbeard", 1); // 7 mv -- historic
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, traverse);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertHandCount(playerA, 2);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_greatest_3() {
|
||||
addCard(Zone.HAND, playerA, traverse);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 4);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Acolyte of Bahamut", 1); // {1}{G}
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Barbarian Horde", 1); // 3/3 {3}{R}
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Sword of Fire and Ice", 1); // {3} -- historic
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Isamaru, Hound of Konda", 1); // {W} -- historic
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Barktooth Warbeard", 1); // 7 mv -- historic
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, traverse);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertHandCount(playerA, 3);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue