diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ProwlTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ProwlTest.java new file mode 100644 index 00000000000..7dd95c4e919 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ProwlTest.java @@ -0,0 +1,75 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package org.mage.test.cards.abilities.keywords; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) + */ +public class ProwlTest extends CardTestPlayerBase { + + @Test + public void testBasicProwlCasting() { + + // Auntie's Snitch {2}{B} Creature — Goblin Rogue (3/1) + // Auntie's Snitch can't block. + // Prowl {1}{B} (You may cast this for its prowl cost if you dealt combat damage to a player this turn with a Goblin or Rogue.) + // Whenever a Goblin or Rogue you control deals combat damage to a player, if Auntie's Snitch is in your graveyard, you may return Auntie's Snitch to your hand. + addCard(Zone.HAND, playerA, "Auntie's Snitch"); + + // {1}{R} Creature — Goblin Warrior 1/1 + // Red creatures you control have first strike. + addCard(Zone.BATTLEFIELD, playerA, "Bloodmark Mentor"); + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 2); + + attack(1, playerA, "Bloodmark Mentor"); + + castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Auntie's Snitch using prowl"); + setChoice(playerA, "Yes"); // choosing to pay prowl cost + setStopAt(1, PhaseStep.END_TURN); + execute(); + + assertLife(playerB, 19); + assertPermanentCount(playerA, "Bloodmark Mentor", 1); + assertPermanentCount(playerA, "Auntie's Snitch", 1); + } + + /* + * Reported bug: Prowl is not taking into consideration other cost reducing effects. For instance Goblin Warchief + * does not reduce the Prowl cost of other Goblin cards with Prowl ability. + */ + @Test + public void testProwlWithCostDiscount() { + + // Auntie's Snitch {2}{B} Creature — Goblin Rogue (3/1) + // Auntie's Snitch can't block. + // Prowl {1}{B} (You may cast this for its prowl cost if you dealt combat damage to a player this turn with a Goblin or Rogue.) + // Whenever a Goblin or Rogue you control deals combat damage to a player, if Auntie's Snitch is in your graveyard, you may return Auntie's Snitch to your hand. + addCard(Zone.HAND, playerA, "Auntie's Snitch"); + + // Goblin Warchief {1}{R}{R} Creature — Goblin Warrior (2/2) + // Goblin spells you cast cost 1 less to cast. + // Goblin creatures you control have haste. + addCard(Zone.BATTLEFIELD, playerA, "Goblin Warchief"); + addCard(Zone.BATTLEFIELD, playerA, "Swamp"); + + attack(1, playerA, "Goblin Warchief"); + + castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Auntie's Snitch using prowl"); // should only cost {B} with Warchief discount + setChoice(playerA, "Yes"); // choosing to pay prowl cost + setStopAt(1, PhaseStep.END_TURN); + execute(); + + assertLife(playerB, 18); + assertPermanentCount(playerA, "Goblin Warchief", 1); + assertPermanentCount(playerA, "Auntie's Snitch", 1); + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/ShuffleTriggeredTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/ShuffleTriggeredTest.java index 3f0d91ce2a6..69bc2dbfae1 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/ShuffleTriggeredTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/ShuffleTriggeredTest.java @@ -65,6 +65,8 @@ public class ShuffleTriggeredTest extends CardTestPlayerBase { * Wenn ich mit Knowledge Exploitation einen Gegner seine Bibliothek mischen * lasse, dann triggert Widespread Panic für ihn (sollte garnicht triggern). * Bei Bribery ist es genauso. + * + * If I have an opponent shuffle his library using Knowledge Exploitation, Widespread Panic triggers for him (shoudn't trigger at all). Same thing with Bribery. */ @Test public void testWidespreadPanicDoesNotTriggerIfOpponentShufflesPlayersLibrary() {