Added test for costs modification

This commit is contained in:
Plopman 2013-09-24 19:53:42 +02:00
parent 3144409c2c
commit db094c2cc0

View file

@ -0,0 +1,48 @@
package org.mage.test.cards.cost.modification;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
*
* also tests cost reduction effects
*
* @author BetaSteward
*/
public class CostModificationTest extends CardTestPlayerBase {
@Test
public void testCard() {
addCard(Zone.BATTLEFIELD, playerA, "Helm of Awakening"); //-1
addCard(Zone.BATTLEFIELD, playerA, "Thalia, Guardian of Thraben"); //+1
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
addCard(Zone.HAND, playerA, "Lightning Bolt");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", playerB);
setStopAt(1, PhaseStep.BEGIN_COMBAT);
execute();
assertLife(playerA, 20);
assertLife(playerB, 17);
assertGraveyardCount(playerA, 1);
}
@Test
public void testCard1() {
addCard(Zone.BATTLEFIELD, playerA, "Trinisphere"); // Set mana cost to min 3
addCard(Zone.BATTLEFIELD, playerA, "Thalia, Guardian of Thraben"); //+1
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
addCard(Zone.HAND, playerA, "Lightning Bolt");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", playerB);
setStopAt(1, PhaseStep.BEGIN_COMBAT);
execute();
assertLife(playerA, 20);
assertLife(playerB, 17);
assertGraveyardCount(playerA, 1);
}
}