mirror of
https://github.com/correl/mage.git
synced 2025-04-12 17:00:08 -09:00
tests for Prowl reported bug not taking into account cost reductions for #2169
This commit is contained in:
parent
eeaea4c566
commit
93b5334ce1
2 changed files with 77 additions and 0 deletions
Mage.Tests/src/test/java/org/mage/test/cards
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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() {
|
||||
|
|
Loading…
Add table
Reference in a new issue