forked from External/mage
add tests for Urza's Saga and The Triumph of Anax
This commit is contained in:
parent
989304359e
commit
ed2cbb5a80
2 changed files with 112 additions and 0 deletions
|
|
@ -0,0 +1,54 @@
|
|||
package org.mage.test.cards.single.mh2;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class UrzasSagaTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* {@link mage.cards.u.UrzasSaga Urza's Saga}
|
||||
* Enchantment Land — Urza's Saga
|
||||
* I — This Saga gains “{T}: Add {C}.”
|
||||
* II — This Saga gains “{2}, {T}: Create a 0/0 colorless Construct artifact creature token with ‘This token gets +1/+1 for each artifact you control.’”
|
||||
* III — Search your library for an artifact card with mana cost {0} or {1}, put it onto the battlefield, then shuffle.
|
||||
*/
|
||||
private static final String saga = "Urza's Saga";
|
||||
|
||||
@Test
|
||||
public void test_SimplePlay() {
|
||||
skipInitShuffling();
|
||||
addCard(Zone.LIBRARY, playerA, "Black Lotus");
|
||||
addCard(Zone.LIBRARY, playerA, "Plateau", 2);
|
||||
|
||||
addCard(Zone.HAND, playerA, saga, 1);
|
||||
addCard(Zone.HAND, playerA, "Sol Ring", 1);
|
||||
|
||||
playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, saga);
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA); // let trigger I resolve
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Sol Ring");
|
||||
|
||||
waitStackResolved(3, PhaseStep.PRECOMBAT_MAIN, playerA); // let trigger II
|
||||
activateManaAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {C}{C}");
|
||||
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}");
|
||||
|
||||
checkPermanentCount("after first token creation", 3, PhaseStep.POSTCOMBAT_MAIN, playerA, "Construct Token", 1);
|
||||
|
||||
activateManaAbility(5, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {C}{C}");
|
||||
activateAbility(5, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}");
|
||||
addTarget(playerA, "Black Lotus");
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(5, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerA, saga, 1);
|
||||
assertPermanentCount(playerA, "Black Lotus", 1);
|
||||
assertPermanentCount(playerA, "Construct Token", 2);
|
||||
assertPowerToughness(playerA, "Construct Token", 4, 4);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
package org.mage.test.cards.single.thb;
|
||||
|
||||
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 TheTriumphOfAnaxTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* {@link mage.cards.t.TheTriumphOfAnax The Triumph of Anax} {2}{R}
|
||||
* Enchantment — Saga
|
||||
* I, II, III — Until end of turn, target creature gains trample and gets +X/+0, where X is the number of lore counters on this Saga.
|
||||
* IV — Target creature you control fights up to one target creature you don’t control.
|
||||
*/
|
||||
private static final String triumph = "The Triumph of Anax";
|
||||
|
||||
@Test
|
||||
public void test_SimplePlay() {
|
||||
addCard(Zone.HAND, playerA, triumph, 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Memnite", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Ornithopter", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, triumph);
|
||||
addTarget(playerA, "Memnite");
|
||||
|
||||
checkPT("T1: Memnite is 2/1", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Memnite", 2, 1);
|
||||
checkAbility("T1: Memnite has trample", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Memnite", TrampleAbility.class, true);
|
||||
|
||||
// turn 3
|
||||
addTarget(playerA, "Memnite");
|
||||
checkPT("T3: Memnite is 3/1", 3, PhaseStep.POSTCOMBAT_MAIN, playerA, "Memnite", 3, 1);
|
||||
checkAbility("T3: Memnite has trample", 3, PhaseStep.POSTCOMBAT_MAIN, playerA, "Memnite", TrampleAbility.class, true);
|
||||
|
||||
// turn 5
|
||||
addTarget(playerA, "Memnite");
|
||||
checkPT("T4: Memnite is 4/1", 5, PhaseStep.POSTCOMBAT_MAIN, playerA, "Memnite", 4, 1);
|
||||
checkAbility("T4: Memnite has trample", 5, PhaseStep.POSTCOMBAT_MAIN, playerA, "Memnite", TrampleAbility.class, true);
|
||||
|
||||
// turn 7
|
||||
addTarget(playerA, "Memnite");
|
||||
addTarget(playerA, "Ornithopter");
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(7, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerA, triumph, 1);
|
||||
assertDamageReceived(playerB, "Ornithopter", 1);
|
||||
assertPowerToughness(playerA, "Memnite", 1, 1);
|
||||
assertAbility(playerA, "Memnite", TrampleAbility.getInstance(), false);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue