diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/mana/ReflectingPoolTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/mana/ReflectingPoolTest.java index 7ab29a93f0d..b55de2a10f7 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/mana/ReflectingPoolTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/mana/ReflectingPoolTest.java @@ -27,8 +27,10 @@ */ package org.mage.test.cards.mana; +import mage.abilities.mana.ManaOptions; import mage.constants.PhaseStep; import mage.constants.Zone; +import org.junit.Assert; import org.junit.Test; import org.mage.test.serverside.base.CardTestPlayerBase; @@ -68,4 +70,23 @@ public class ReflectingPoolTest extends CardTestPlayerBase { } + /** + * Reflecting Pool does not see what mana Exotic Orchard can produce + */ + @Test + public void testWithExoticOrchard() { + addCard(Zone.BATTLEFIELD, playerB, "Mountain", 1); + + // {T}: Add to your mana pool one mana of any type that a land you control could produce. + addCard(Zone.BATTLEFIELD, playerA, "Reflecting Pool", 1); + // {T}: Add to your mana pool one mana of any color that a land an opponent controls could produce. + addCard(Zone.BATTLEFIELD, playerA, "Exotic Orchard", 1); + + setStopAt(1, PhaseStep.PRECOMBAT_MAIN); + execute(); + + ManaOptions options = playerA.getAvailableManaTest(currentGame); + Assert.assertEquals("Player should be able to create 2 red mana", "{R}{R}", options.get(0).toString()); + + } } diff --git a/Mage/src/main/java/mage/abilities/mana/AnyColorLandsProduceManaAbility.java b/Mage/src/main/java/mage/abilities/mana/AnyColorLandsProduceManaAbility.java index 398c1f27410..989b558f609 100644 --- a/Mage/src/main/java/mage/abilities/mana/AnyColorLandsProduceManaAbility.java +++ b/Mage/src/main/java/mage/abilities/mana/AnyColorLandsProduceManaAbility.java @@ -69,6 +69,12 @@ public class AnyColorLandsProduceManaAbility extends ActivatedManaAbilityImpl { public List getNetMana(Game game) { return ((AnyColorLandsProduceManaEffect) getEffects().get(0)).getNetMana(game, this); } + + @Override + public boolean definesMana() { + return true; + } + } class AnyColorLandsProduceManaEffect extends ManaEffect { @@ -155,7 +161,7 @@ class AnyColorLandsProduceManaEffect extends ManaEffect { } private Mana getManaTypes(Game game, Ability source) { - List lands = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game); + List lands = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game); Mana types = new Mana(); for (Permanent land : lands) { Abilities mana = land.getAbilities().getActivatedManaAbilities(Zone.BATTLEFIELD);