* Fixed CMC calculation for transformed cards (fixes #1826).

This commit is contained in:
LevelX2 2016-04-15 14:59:36 +02:00
parent 1deb4192ba
commit 2b8f73dbcc
132 changed files with 227 additions and 179 deletions

View file

@ -68,20 +68,19 @@ public class UginTest extends CardTestPlayerBase {
block(3, playerB, "Ashaya, the Awoken World", "Silvercoat Lion");
activateAbility(3, PhaseStep.POSTCOMBAT_MAIN, playerA, "-X: Exile each permanent with converted mana cost X or less that's one or more colors");
setChoice(playerA, "X=0");
setChoice(playerA, "X=3");
setStopAt(3, PhaseStep.END_TURN);
execute();
assertPermanentCount(playerA, "Ugin, the Spirit Dragon", 1);
assertCounterCount("Ugin, the Spirit Dragon", CounterType.LOYALTY, 9); // 7 + 2 - 0
assertCounterCount("Ugin, the Spirit Dragon", CounterType.LOYALTY, 6); // 7 + 2 - 3
assertGraveyardCount(playerA, "Silvercoat Lion", 1);
assertPermanentCount(playerB, "Ashaya, the Awoken World", 0);
assertExileCount("Nissa, Vastwood Seer", 1);
assertCounterCount("Quest for the Gravelord", CounterType.QUEST, 1);
assertExileCount("Quest for the Gravelord", 1);
assertLife(playerA, 20);
assertLife(playerB, 17);

View file

@ -11,32 +11,38 @@ import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
* New SOI mechanics change requires the night-side CMC to be equal to the day-side CMC
* 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)
*/
public class NightSideCMCTest extends CardTestPlayerBase {
/**
*
**/
*
*
*/
@Test
public void insectileAbberationRepealXis1Test() {
addCard(Zone.BATTLEFIELD, playerA, "Insectile Aberration"); // night-side of Delver of Secrets {U}
// 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();
// 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");
addCard(Zone.BATTLEFIELD, playerB, "Island", 2);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Repeal");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Repeal");
setChoice(playerB, "X=1");
addTarget(playerB, "Insectile Aberration");
setStopAt(1, PhaseStep.BEGIN_COMBAT);
execute();
assertGraveyardCount(playerB, "Repeal", 1);
assertPermanentCount(playerA, "Insectile Aberration", 0);
execute();
assertGraveyardCount(playerB, "Repeal", 1);
assertPermanentCount(playerA, "Insectile Aberration", 0);
assertHandCount(playerA, "Delver of Secrets", 1); // day-side of Insectile Abberation returned to hand
}
}