mirror of
https://github.com/correl/mage.git
synced 2025-03-12 17:00:08 -09:00
* Refelecting Pool - Fixed that mana that Exotic Orchard could produce was not taken into account.
This commit is contained in:
parent
4018d39dab
commit
7d60d884c3
2 changed files with 28 additions and 1 deletions
|
@ -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());
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,6 +69,12 @@ public class AnyColorLandsProduceManaAbility extends ActivatedManaAbilityImpl {
|
|||
public List<Mana> 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<Permanent> lands = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game);
|
||||
List<Permanent> lands = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game);
|
||||
Mana types = new Mana();
|
||||
for (Permanent land : lands) {
|
||||
Abilities<ActivatedManaAbilityImpl> mana = land.getAbilities().getActivatedManaAbilities(Zone.BATTLEFIELD);
|
||||
|
|
Loading…
Add table
Reference in a new issue