From db094c2cc0b07f11637abfe4f66e5003ea1e2d18 Mon Sep 17 00:00:00 2001 From: Plopman Date: Tue, 24 Sep 2013 19:53:42 +0200 Subject: [PATCH] Added test for costs modification --- .../modification/CostModificationTest.java | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Mage.Tests/src/test/java/org/mage/test/cards/cost/modification/CostModificationTest.java diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/cost/modification/CostModificationTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/cost/modification/CostModificationTest.java new file mode 100644 index 00000000000..7e79260273e --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/cost/modification/CostModificationTest.java @@ -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); + } + +}