diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/MistcutterHydraTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/MistcutterHydraTest.java index 508179900b6..958b2930ae2 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/MistcutterHydraTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/MistcutterHydraTest.java @@ -38,6 +38,28 @@ import org.mage.test.serverside.base.CardTestPlayerBase; */ public class MistcutterHydraTest extends CardTestPlayerBase { + /** + * Test that a Mistcutter Hydra gets its +1/+1 counters + */ + @Test + public void testHydraNormal3Counters() { + // Mistcutter Hydra + // Creature — Hydra 0/0, XG (1) + // Mistcutter Hydra can't be countered. + // Haste, protection from blue + // Mistcutter Hydra enters the battlefield with X +1/+1 counters on it. + addCard(Zone.HAND, playerA, "Mistcutter Hydra"); + addCard(Zone.BATTLEFIELD, playerA, "Forest", 2); + addCard(Zone.BATTLEFIELD, playerA, "Plains", 2); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Mistcutter Hydra"); + setChoice(playerA, "X=3"); + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, "Mistcutter Hydra", 1); + assertPowerToughness(playerA, "Mistcutter Hydra", 3,3); + } /** * Test that a Mistcutter Hydra exiled with Banishing Light returns with 0 Counters on it @@ -74,5 +96,67 @@ public class MistcutterHydraTest extends CardTestPlayerBase { assertGraveyardCount(playerB, "Mistcutter Hydra", 1); assertPermanentCount(playerB, "Mistcutter Hydra", 0); } + + /** + * Test that a Apocalypse Hydra gets its +1/+1 counters + */ + @Test + public void testApocalypseHydraNormal3Counters() { + // Apocalypse {X}{R}{G} + // Apocalypse Hydra enters the battlefield with X +1/+1 counters on it. + // If X is 5 or more, it enters the battlefield with an additional X +1/+1 counters on it. + // {1}{R}, Remove a +1/+1 counter from Apocalypse Hydra: Apocalypse Hydra deals 1 damage to target creature or player. + // Mistcutter Hydra enters the battlefield with X +1/+1 counters on it. + addCard(Zone.HAND, playerA, "Apocalypse Hydra"); + addCard(Zone.BATTLEFIELD, playerA, "Forest", 1); + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1); + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 3); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Apocalypse Hydra"); + setChoice(playerA, "X=3"); + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, "Apocalypse Hydra", 1); + assertPowerToughness(playerA, "Apocalypse Hydra", 3,3); + } + /** + * Test that a Apocalypse Hydra countered returns with 0 Counters to battlefield if + * put to battlefield with Beacon of Unrest + */ + @Test + public void testHydraReturnsAfterCounterWithZeroCounters() { + // Apocalypse {X}{R}{G} + // Apocalypse Hydra enters the battlefield with X +1/+1 counters on it. + // If X is 5 or more, it enters the battlefield with an additional X +1/+1 counters on it. + // {1}{R}, Remove a +1/+1 counter from Apocalypse Hydra: Apocalypse Hydra deals 1 damage to target creature or player. + // Mistcutter Hydra enters the battlefield with X +1/+1 counters on it. + addCard(Zone.HAND, playerA, "Apocalypse Hydra"); + addCard(Zone.BATTLEFIELD, playerA, "Forest", 1); + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1); + // Put target artifact or creature card from a graveyard onto the battlefield under + // your control. Shuffle Beacon of Unrest into its owner's library. + addCard(Zone.HAND, playerA, "Beacon of Unrest"); + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 3); + + addCard(Zone.HAND, playerB, "Counterspell"); + addCard(Zone.BATTLEFIELD, playerB, "Island", 2); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Apocalypse Hydra"); + setChoice(playerA, "X=3"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Counterspell", "Apocalypse Hydra"); + + castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Beacon of Unrest", "Apocalypse Hydra"); + + setStopAt(3, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerB, "Counterspell", 1); + assertHandCount(playerA,"Beacon of Unrest", 0); + assertPermanentCount(playerA, "Apocalypse Hydra", 0); + assertGraveyardCount(playerA, "Apocalypse Hydra", 1); + + + // assertPowerToughness(playerA, "Mistcutter Hydra", 3,3); + } } diff --git a/Mage/src/mage/abilities/keyword/DelveAbility.java b/Mage/src/mage/abilities/keyword/DelveAbility.java index 439d2edce40..ea0f9c8295b 100644 --- a/Mage/src/mage/abilities/keyword/DelveAbility.java +++ b/Mage/src/mage/abilities/keyword/DelveAbility.java @@ -44,18 +44,29 @@ import mage.util.CardUtil; /** - * 702.64. Delve - * - * 702.64a Delve is a static ability that functions while the spell that has delve is on - * the stack. "Delve" means "As an additional cost to cast this spell, you may exile any - * number of cards from your graveyard. Each card exiled this way reduces the cost to cast - * this spell by {1}." Using the delve ability follows the rules for paying additional - * costs in rules 601.2b and 601.2e-g. # - * - * 702.64b Multiple instances of delve on the same spell are redundant. - * + * 702.65. Delve + * 702.65a Delve is a static ability that functions while the spell with delve is on the stack. + * “Delve” means “For each generic mana in this spell’s total cost, you may exile a card + * from your graveyard rather than pay that mana.” The delve ability isn’t an additional + * or alternative cost and applies only after the total cost of the spell with delve is + * determined. + * 702.65b Multiple instances of delve on the same spell are redundant. + * + * * The rules for delve have changed slightly since it was last in an expansion. Previously, delve + * reduced the cost to cast a spell. Under the current rules, you exile cards from your graveyard + * at the same time you pay the spell’s cost. Exiling a card this way is simply another way to pay + * that cost. + * * Delve doesn’t change a spell’s mana cost or converted mana cost. For example, Dead Drop’s converted + * mana cost is 10 even if you exiled three cards to cast it. + * * You can’t exile cards to pay for the colored mana requirements of a spell with delve. + * * You can’t exile more cards than the generic mana requirement of a spell with delve. For example, + * you can’t exile more than nine cards from your graveyard to cast Dead Drop. + * * Because delve isn’t an alternative cost, it can be used in conjunction with alternative costs. + * * @author LevelX2 * + * TODO: Change card exiling to a way to pay mana costs, now it's maybe not passible to pay costs from effects that + * increase the mana costs. */ public class DelveAbility extends SimpleStaticAbility implements AdjustingSourceCosts {