mirror of
https://github.com/magefree/mage.git
synced 2026-01-18 01:10:00 -08:00
Fixed that discard cost of Wolf of Devil's Breach was not handled correctly (fixes #1668).
This commit is contained in:
parent
8780a6101a
commit
b80166664f
3 changed files with 74 additions and 20 deletions
|
|
@ -6,54 +6,54 @@ 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.
|
||||
* 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() {
|
||||
|
||||
// Whenever Wolf of Devil's Breach attacks, you may pay {1}{R} 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.
|
||||
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() {
|
||||
|
||||
// Whenever Wolf of Devil's Breach attacks, you may pay {1}{R} 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.
|
||||
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue