diff --git a/Mage.Sets/src/mage/cards/l/LeylineOfAbundance.java b/Mage.Sets/src/mage/cards/l/LeylineOfAbundance.java index 8e1ac037a7..a2e8594ea7 100644 --- a/Mage.Sets/src/mage/cards/l/LeylineOfAbundance.java +++ b/Mage.Sets/src/mage/cards/l/LeylineOfAbundance.java @@ -15,7 +15,7 @@ import mage.constants.SetTargetPointer; import mage.counters.CounterType; import mage.filter.FilterPermanent; import mage.filter.StaticFilters; -import mage.filter.common.FilterCreaturePermanent; +import mage.filter.common.FilterControlledCreaturePermanent; import java.util.UUID; @@ -24,7 +24,7 @@ import java.util.UUID; */ public final class LeylineOfAbundance extends CardImpl { - private static final FilterPermanent filter = new FilterCreaturePermanent("you tap a creature"); + private static final FilterPermanent filter = new FilterControlledCreaturePermanent("you tap a creature"); public LeylineOfAbundance(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}{G}"); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/mana/LeylineOfAbundanceTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/mana/LeylineOfAbundanceTest.java new file mode 100644 index 0000000000..56f7bdc5c2 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/mana/LeylineOfAbundanceTest.java @@ -0,0 +1,37 @@ + +package org.mage.test.cards.mana; + +import mage.constants.ManaType; +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Assert; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author apetresc + */ +public class LeylineOfAbundanceTest extends CardTestPlayerBase { + + /** + * Creatures an opponent controls shouldn't trigger Leyline's ability to + * generate additional mana. + */ + @Test + public void testOpponentsManaCreatures() { + addCard(Zone.BATTLEFIELD, playerA, "Upwelling", 1); + + addCard(Zone.BATTLEFIELD, playerA, "Leyline of Abundance"); + addCard(Zone.BATTLEFIELD, playerB, "Llanowar Elves"); + addCard(Zone.BATTLEFIELD, playerB, "Leyline of Abundance"); + + activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerB, "{T}: Add {G}"); + setStopAt(3, PhaseStep.PRECOMBAT_MAIN); + execute(); + + assertManaPool(playerB, ManaType.GREEN, 2); + assertManaPool(playerA, ManaType.GREEN, 0); + } +} +