From 12097817ba592302ea12af491feabda0c1f3a99a Mon Sep 17 00:00:00 2001 From: drmDev Date: Thu, 4 Aug 2016 05:16:07 -0400 Subject: [PATCH] Escalate test confirming bug #2143 --- .../abilities/keywords/EscalateTest.java | 56 ++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/EscalateTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/EscalateTest.java index 22626a912a5..00eddf100f8 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/EscalateTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/EscalateTest.java @@ -59,7 +59,61 @@ public class EscalateTest extends CardTestPlayerBase { assertGraveyardCount(playerB, "Silvercoat Lion", 1); assertGraveyardCount(playerA, "Savage Alliance", 1); - + } + + @Test + public void testGaddockTeegInteraction_ThreeCMC_OneMode() { + + // Noncreature spells with converted mana cost {4} or greater can't be cast. + // Noncreature spells with {X} in their mana costs can't be cast. + addCard(Zone.BATTLEFIELD, playerB, "Gaddock Teeg"); // {W}{G} 2/2 Legendary Kithkin + + // Escalate {1} (Pay this cost for each mode chosen beyond the first.) + // Choose one or more — + // * Target player discards all the cards in his or her hand, then draws that many cards. + // * Collective Defiance deals 4 damage to target creature. + // * Collective Defiance deals 3 damage to target opponent. + addCard(Zone.HAND, playerA, "Collective Defiance"); // {1}{R}{R} sorcery + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Collective Defiance", playerB); + setModeChoice(playerA, "3"); // deal 3 dmg to opponent + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerB, "Gaddock Teeg", 1); + assertGraveyardCount(playerA, "Collective Defiance", 1); + assertLife(playerB, 17); + } + + // Reported bug: Escalate CMC is not calculated correctly when more than 1 mode chosen + // With 1 extra mode, the casting cost is {2}{R}{R} but the CMC should still be 3 + @Test + public void testGaddockTeegInteraction_ThreeCMC_TwoModes() { + + // Noncreature spells with converted mana cost {4} or greater can't be cast. + // Noncreature spells with {X} in their mana costs can't be cast. + addCard(Zone.BATTLEFIELD, playerB, "Gaddock Teeg"); // {W}{G} 2/2 Legendary Kithkin + + // Escalate {1} (Pay this cost for each mode chosen beyond the first.) + // Choose one or more — + // * Target player discards all the cards in his or her hand, then draws that many cards. + // * Collective Defiance deals 4 damage to target creature. + // * Collective Defiance deals 3 damage to target opponent. + addCard(Zone.HAND, playerA, "Collective Defiance"); // {1}{R}{R} sorcery + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Collective Defiance", "mode2=Gaddock Teeg"); + setModeChoice(playerA, "2"); // deal 4 dmg to target creature (gaddock teeg) + setModeChoice(playerA, "3"); // deal 3 dmg to opponent + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerA, "Collective Defiance", 1); + assertGraveyardCount(playerB, "Gaddock Teeg", 1); + assertLife(playerB, 17); } }