diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/ClutchOfCurrents.java b/Mage.Sets/src/mage/sets/battleforzendikar/ClutchOfCurrents.java index 2619589cb6a..65fe9140eae 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/ClutchOfCurrents.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/ClutchOfCurrents.java @@ -46,7 +46,7 @@ public class ClutchOfCurrents extends CardImpl { this.expansionSetCode = "BFZ"; // Return target creature to its owner's hand. - this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect(true, false)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); // Awaken 3—{4}{U} diff --git a/Mage.Sets/src/mage/sets/torment/ChurningEddy.java b/Mage.Sets/src/mage/sets/torment/ChurningEddy.java index fe37543fdc3..23f5a207c6a 100644 --- a/Mage.Sets/src/mage/sets/torment/ChurningEddy.java +++ b/Mage.Sets/src/mage/sets/torment/ChurningEddy.java @@ -47,7 +47,7 @@ public class ChurningEddy extends CardImpl { this.expansionSetCode = "TOR"; // Return target creature and target land to their owners' hands. - Effect effect = new ReturnToHandTargetEffect(); + Effect effect = new ReturnToHandTargetEffect(true, true); effect.setText("Return target creature and target land to their owners' hands"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); diff --git a/Mage.Sets/src/mage/sets/torment/CracklingClub.java b/Mage.Sets/src/mage/sets/torment/CracklingClub.java index 062b62f359c..23bf0d0bda6 100644 --- a/Mage.Sets/src/mage/sets/torment/CracklingClub.java +++ b/Mage.Sets/src/mage/sets/torment/CracklingClub.java @@ -32,7 +32,6 @@ import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.common.SacrificeSourceCost; -import mage.abilities.effects.Effect; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.continuous.BoostEnchantedEffect; diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/AwakenTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/AwakenTest.java index 7f7f21db988..be0b77c7b97 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/AwakenTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/AwakenTest.java @@ -29,6 +29,7 @@ package org.mage.test.cards.abilities.keywords; import mage.constants.PhaseStep; import mage.constants.Zone; +import mage.filter.Filter; import org.junit.Test; import org.mage.test.serverside.base.CardTestPlayerBase; @@ -120,4 +121,31 @@ public class AwakenTest extends CardTestPlayerBase { assertGraveyardCount(playerB, "Silvercoat Lion", 1); } + + /** + * Awakened Clutch of Currents returned the targeted land (for awaken) to my + * hand in addition to the targeted creature. + */ + @Test + public void testClutchOfCurrents() { + addCard(Zone.BATTLEFIELD, playerA, "Island", 5); + // Return target creature to its owner's hand. + // Awaken 3—{4}{U} + addCard(Zone.HAND, playerA, "Clutch of Currents", 1); // {U} + + addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Clutch of Currents with awaken", "Silvercoat Lion"); + addTarget(playerA, "Island"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerA, "Clutch of Currents", 1); + assertHandCount(playerB, "Silvercoat Lion", 1); + assertPermanentCount(playerA, "Island", 5); + assertPowerToughness(playerA, "Island", 3, 3, Filter.ComparisonScope.Any); + + } + } diff --git a/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandTargetEffect.java index a8fe124fc1e..7733ab85114 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandTargetEffect.java @@ -40,7 +40,6 @@ import mage.constants.Zone; import mage.game.Game; import mage.players.Player; import mage.target.Target; -import mage.target.targetpointer.FirstTargetPointer; import mage.util.CardUtil; /** @@ -49,19 +48,26 @@ import mage.util.CardUtil; public class ReturnToHandTargetEffect extends OneShotEffect { boolean withName; + protected boolean multitargetHandling; public ReturnToHandTargetEffect() { this(true); } public ReturnToHandTargetEffect(boolean withName) { + this(withName, false); + } + + public ReturnToHandTargetEffect(boolean withName, boolean multitargetHandling) { super(Outcome.ReturnToHand); this.withName = withName; + this.multitargetHandling = multitargetHandling; } public ReturnToHandTargetEffect(final ReturnToHandTargetEffect effect) { super(effect); this.withName = effect.withName; + this.multitargetHandling = effect.multitargetHandling; } @Override @@ -76,7 +82,7 @@ public class ReturnToHandTargetEffect extends OneShotEffect { return false; } Set cards = new LinkedHashSet<>(); - if (source.getTargets().size() > 1 && targetPointer instanceof FirstTargetPointer) { + if (multitargetHandling) { for (Target target : source.getTargets()) { for (UUID targetId : target.getTargets()) { MageObject mageObject = game.getObject(targetId); @@ -85,8 +91,7 @@ public class ReturnToHandTargetEffect extends OneShotEffect { } } } - } - else { + } else { for (UUID targetId : targetPointer.getTargets(game, source)) { MageObject mageObject = game.getObject(targetId); if (mageObject != null) {