From 240a1af1839999f1bfeb71698f0a195b5b7a4b19 Mon Sep 17 00:00:00 2001 From: fwannmacher Date: Wed, 27 Jul 2016 13:43:55 -0300 Subject: [PATCH 1/2] - Added test for issue #2105 --- .../cards/mana/NykthosShrineToNyxTest.java | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/mana/NykthosShrineToNyxTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/mana/NykthosShrineToNyxTest.java index 5f2f268a2b..b692a7526b 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/mana/NykthosShrineToNyxTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/mana/NykthosShrineToNyxTest.java @@ -120,4 +120,37 @@ public class NykthosShrineToNyxTest extends CardTestPlayerBase { Assert.assertEquals("amount of colorless mana", 10, playerA.getManaPool().getColorless()); // 6 - 2 (2.Activation) = 4 + 6 = 10 colorless mana assertPowerToughness(playerA, "Kruphix, God of Horizons", 4,7); } + + @Test + public void testNormalUseWithTokens() { + addCard(Zone.BATTLEFIELD, playerA, "Forest", 2); + addCard(Zone.BATTLEFIELD, playerA, "Island", 3); + addCard(Zone.BATTLEFIELD, playerA, "Nykthos, Shrine to Nyx", 1); + // Green mana doesn't empty from your mana pool as steps and phases end. + // Omnath, Locus of Mana gets +1/+1 for each green mana in your mana pool. + addCard(Zone.BATTLEFIELD, playerA, "Omnath, Locus of Mana", 1); + // Simic Guildmage {G/U}{G/U} + // Creature - Elf Wizard + // {1}{G}: Move a +1/+1 counter from target creature onto another target creature with the same controller. + // {1}{U}: Attach target Aura enchanting a permanent to another permanent with the same controller. + addCard(Zone.BATTLEFIELD, playerA, "Simic Guildmage"); + // Cackling Counterpart {1}{U}{U} + // Instant + // Put a token onto the battlefield that's a copy of target creature you control. + // Flashback {5}{U}{U} (You may cast this card from your graveyard for its flashback cost. Then exile it.) + addCard(Zone.HAND, playerA, "Cackling Counterpart"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cackling Counterpart"); + addTarget(playerA, "Simic Guildmage"); + + activateManaAbility(1, PhaseStep.BEGIN_COMBAT, playerA, "{2},{T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); + setChoice(playerA, "Green"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, "Simic Guildmage", 2); + Assert.assertEquals("amount of green mana", 5, playerA.getManaPool().getGreen()); // 6 green mana + assertPowerToughness(playerA, "Omnath, Locus of Mana", 6, 6); + } } From b4bda0da5e35f00fda778001a8f273a949f875d3 Mon Sep 17 00:00:00 2001 From: fwannmacher Date: Fri, 29 Jul 2016 18:37:47 -0300 Subject: [PATCH 2/2] - Fix issue #2088 --- .../mage/sets/eldritchmoon/EmrakulThePromisedEnd.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/EmrakulThePromisedEnd.java b/Mage.Sets/src/mage/sets/eldritchmoon/EmrakulThePromisedEnd.java index 6fdf82899d..2b9b45d250 100644 --- a/Mage.Sets/src/mage/sets/eldritchmoon/EmrakulThePromisedEnd.java +++ b/Mage.Sets/src/mage/sets/eldritchmoon/EmrakulThePromisedEnd.java @@ -37,6 +37,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CastSourceTriggeredAbility; import mage.abilities.effects.common.cost.CostModificationEffectImpl; +import mage.abilities.effects.common.turn.ControlTargetPlayerNextTurnEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.ProtectionAbility; import mage.abilities.keyword.TrampleAbility; @@ -143,10 +144,10 @@ class EmrakulThePromisedEndCostReductionEffect extends CostModificationEffectImp } } -class EmrakulThePromisedEndGainControlEffect extends OneShotEffect { +class EmrakulThePromisedEndGainControlEffect extends ControlTargetPlayerNextTurnEffect { EmrakulThePromisedEndGainControlEffect() { - super(Outcome.GainControl); + super(); this.staticText = "you gain control of target opponent during that player's next turn. After that turn, that player takes an extra turn"; } @@ -165,9 +166,7 @@ class EmrakulThePromisedEndGainControlEffect extends OneShotEffect { Player targetPlayer = game.getPlayer(this.getTargetPointer().getFirst(game, source)); if (controller != null && targetPlayer != null) { game.getState().getTurnMods().add(new TurnMod(targetPlayer.getId(), false)); - game.getState().getTurnMods().add(new TurnMod(targetPlayer.getId(), controller.getId())); - return true; } - return false; + return super.apply(game, source); } }