Merge pull request #3413 from drmDev/master

another UT for CMC flip cards for #1904
This commit is contained in:
Derek M 2017-05-22 18:14:44 -04:00 committed by GitHub
commit 400353e973

View file

@ -14,21 +14,25 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
* New SOI mechanics change requires the night-side CMC to be equal to the
* day-side CMC
*
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
* @author escplan9
*/
public class NightSideCMCTest extends CardTestPlayerBase {
// Delver of Secrets {U} 1/1
// At the beginning of your upkeep, look at the top card of your library. You may reveal that card. If an instant or sorcery card is revealed this way, transform Delver of Secrets.
private final String delver = "Delver of Secrets";
// Night-side of Delver, 3/2 Flying should have CMC 1 as well
private final String insect = "Insectile Aberration";
/**
*
*
* Repeal for X = 1 on Delver flipped "Insectile Aberration"
*/
@Test
public void insectileAbberationRepealXis1Test() {
// At the beginning of your upkeep, look at the top card of your library. You may reveal that card. If an instant or sorcery card is revealed this way, transform Delver of Secrets.
addCard(Zone.BATTLEFIELD, playerA, "Delver of Secrets"); // night-side of Delver of Secrets {U}
addCard(Zone.LIBRARY, playerA, "Lightning Bolt"); // to transform Delver of Secrets
skipInitShuffling();
addCard(Zone.BATTLEFIELD, playerA, delver);
addCard(Zone.LIBRARY, playerA, "Lightning Bolt"); // to transform Delver of Secrets
// Instant - {X}{U}
// Return target nonland permanent with converted mana cost X to its owner's hand. Draw a card.
addCard(Zone.HAND, playerB, "Repeal");
@ -36,13 +40,46 @@ public class NightSideCMCTest extends CardTestPlayerBase {
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Repeal");
setChoice(playerB, "X=1");
addTarget(playerB, "Insectile Aberration");
addTarget(playerB, insect);
setStopAt(1, PhaseStep.BEGIN_COMBAT);
execute();
assertGraveyardCount(playerB, "Repeal", 1);
assertPermanentCount(playerA, "Insectile Aberration", 0);
assertHandCount(playerA, "Delver of Secrets", 1); // day-side of Insectile Abberation returned to hand
assertPermanentCount(playerA, insect, 0);
assertHandCount(playerA, delver, 1); // day-side of Insectile Abberation returned to hand
}
/**
* Engineered Explosives for Sunburst = 1 on Delver flipped "Insectile Aberration"
*/
@Test
public void insectileAbberationEngeeredExplosivesSunburstIs1Test() {
/*
Engineered Explosives {X}
Artifact
Sunburst (This enters the battlefield with a charge counter on it for each color of mana spent to cast it.)
{2}, Sacrifice Engineered Explosives: Destroy each nonland permanent with converted mana cost equal to the number of charge counters on Engineered Explosives.
*/
String explosives = "Engineered Explosives";
skipInitShuffling();
addCard(Zone.BATTLEFIELD, playerA, delver);
addCard(Zone.LIBRARY, playerA, "Lightning Bolt"); // to transform Delver of Secrets
addCard(Zone.HAND, playerB, explosives);
addCard(Zone.BATTLEFIELD, playerB, "Island", 3);
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, explosives);
setChoice(playerB, "X=1");
activateAbility(2, PhaseStep.BEGIN_COMBAT, playerB, "{2}"); // activate explosives
setStopAt(2, PhaseStep.END_COMBAT);
execute();
assertGraveyardCount(playerB, explosives, 1);
assertPermanentCount(playerA, insect, 0);
assertGraveyardCount(playerA, delver, 1);
}
}