diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/soi/TirelessTrackerTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/soi/TirelessTrackerTest.java new file mode 100644 index 0000000000..fe4adf12e7 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/soi/TirelessTrackerTest.java @@ -0,0 +1,40 @@ +package org.mage.test.cards.single.soi; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * 2G +Creature - Human Scout +Whenever a land enters the battlefield under your control, investigate. + +Whenever you sacrifice a Clue, put a +1/+1 counter on Tireless Tracker. +* + * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) + */ +public class TirelessTrackerTest extends CardTestPlayerBase { + + /** + * Only landfall under your control triggers first ability + */ + @Test + public void landfallUnderOwnControlTriggers() { + + addCard(Zone.BATTLEFIELD, playerA, "Tireless Tracker", 1); + addCard(Zone.HAND, playerA, "Forest", 3); + addCard(Zone.HAND, playerB, "Wastes", 3); + + playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Forest"); + playLand(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Wastes"); + setStopAt(2, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertPermanentCount(playerA, "Forest", 1); + assertPermanentCount(playerB, "Wastes", 1); + assertPermanentCount(playerA, "Clue", 1); + } + + // TODO: add tests for 2nd ability +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/soi/WolfOfDevilsBreachTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/soi/WolfOfDevilsBreachTest.java new file mode 100644 index 0000000000..0223b44a08 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/soi/WolfOfDevilsBreachTest.java @@ -0,0 +1,61 @@ +package org.mage.test.cards.single.soi; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * 3RR +Creature - Elemental Wolf + *Whenever Wolf of Devil's Breach attacks, you may pay 1R and discard a card. + * If you do, Wolf of Devil's Breach deals damage to target creature or planeswalker equal to the discarded card's converted mana cost. + * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) + */ +public class WolfOfDevilsBreachTest extends CardTestPlayerBase { + + /** + * + */ + @Test + public void attackChooseToPay() { + + addCard(Zone.BATTLEFIELD, playerA, "Wolf of Devil's Breach", 1); + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2); + addCard(Zone.HAND, playerA, "Bronze Sable", 1); // (2) 2/1 + addCard(Zone.BATTLEFIELD, playerB, "Grizzly Bears", 1); // 2/2 + + attack(1, playerA, "Wolf of Devil's Breach"); + setChoice(playerA, "Yes"); + setChoice(playerA, "Bronze Sable"); + addTarget(playerA, "Grizzly Bears"); + setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertGraveyardCount(playerA, "Bronze Sable", 1); + assertGraveyardCount(playerB, "Grizzly Bears", 1); + } + + /** + * + */ + @Test + public void attackDoNotPay() { + + addCard(Zone.BATTLEFIELD, playerA, "Wolf of Devil's Breach", 1); + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2); + addCard(Zone.HAND, playerA, "Bronze Sable", 1); // (2) 2/1 + addCard(Zone.BATTLEFIELD, playerB, "Grizzly Bears", 1); // 2/2 + + attack(1, playerA, "Wolf of Devil's Breach"); + setChoice(playerA, "No"); + setChoice(playerA, "Bronze Sable"); + addTarget(playerA, "Grizzly Bears"); + setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertHandCount(playerA, "Bronze Sable", 1); // never discarded + assertGraveyardCount(playerA, "Bronze Sable", 0); + assertGraveyardCount(playerB, "Grizzly Bears", 0); + } +}