mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Fixed that mana sources that produce any mana type that other sources produce (e.g. Reflecting Pool) could erroneously produce colorless mana from mana sources that could only produce any color mana (fixes #6814).
This commit is contained in:
parent
219ab89bcc
commit
31163eec6d
3 changed files with 31 additions and 9 deletions
|
@ -26,9 +26,9 @@ public final class AcademyRuins extends CardImpl {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.LAND},"");
|
super(ownerId,setInfo,new CardType[]{CardType.LAND},"");
|
||||||
addSuperType(SuperType.LEGENDARY);
|
addSuperType(SuperType.LEGENDARY);
|
||||||
|
|
||||||
// {tap}: Add {C}.
|
// {T}: Add {C}.
|
||||||
this.addAbility(new ColorlessManaAbility());
|
this.addAbility(new ColorlessManaAbility());
|
||||||
// {1}{U}, {tap}: Put target artifact card from your graveyard on top of your library.
|
// {1}{U}, {T}: Put target artifact card from your graveyard on top of your library.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutOnLibraryTargetEffect(true), new ManaCostsImpl("{1}{U}"));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutOnLibraryTargetEffect(true), new ManaCostsImpl("{1}{U}"));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addTarget(new TargetCardInYourGraveyard(new FilterArtifactCard("artifact card from your graveyard")));
|
ability.addTarget(new TargetCardInYourGraveyard(new FilterArtifactCard("artifact card from your graveyard")));
|
||||||
|
|
|
@ -266,4 +266,30 @@ public class ReflectingPoolTest extends CardTestPlayerBase {
|
||||||
assertTapped("Reflecting Pool", false);
|
assertTapped("Reflecting Pool", false);
|
||||||
Assert.assertEquals(1, playerA.getManaPool().get(ManaType.BLACK));
|
Assert.assertEquals(1, playerA.getManaPool().get(ManaType.BLACK));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* I only control 3 lands, a Triome, a Reflecting Pool, and a Mana
|
||||||
|
* Confluence. The Reflecting Pool is able to tap for colorless, but it
|
||||||
|
* should not be able to.
|
||||||
|
*
|
||||||
|
* https://blogs.magicjudges.org/rulestips/2012/09/you-have-to-name-a-color-when-you-add-one-mana-of-any-color-to-your-mana-pool/
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testWithTriomeAndManaConfluence() {
|
||||||
|
// {T}: Add {C}.
|
||||||
|
// {1}{U}, {T}: Put target artifact card from your graveyard on top of your library.
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Academy Ruins", 1);
|
||||||
|
// {T}, Pay 1 life: Add one mana of any color.
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Mana Confluence", 1);
|
||||||
|
// {T}: Add one mana of any type that a land you control could produce.
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Reflecting Pool", 1);
|
||||||
|
|
||||||
|
setStopAt(1, PhaseStep.PRECOMBAT_MAIN);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
ManaOptions options = playerA.getAvailableManaTest(currentGame);
|
||||||
|
Assert.assertEquals("Player A should be able to create only 3 different mana options", 2, options.size());
|
||||||
|
assertManaOptions("{C}{C}{Any}", options);
|
||||||
|
assertManaOptions("{C}{Any}{Any}", options);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,16 +140,12 @@ class AnyColorLandsProduceManaEffect extends ManaEffect {
|
||||||
if (!onlyColors && types.getColorless() > 0) {
|
if (!onlyColors && types.getColorless() > 0) {
|
||||||
choice.getChoices().add("Colorless");
|
choice.getChoices().add("Colorless");
|
||||||
}
|
}
|
||||||
if (types.getAny() > 0) {
|
if (types.getAny() > 0) { // Only any Color
|
||||||
choice.getChoices().add("Black");
|
choice.getChoices().add("Black");
|
||||||
choice.getChoices().add("Red");
|
choice.getChoices().add("Red");
|
||||||
choice.getChoices().add("Blue");
|
choice.getChoices().add("Blue");
|
||||||
choice.getChoices().add("Green");
|
choice.getChoices().add("Green");
|
||||||
choice.getChoices().add("White");
|
choice.getChoices().add("White");
|
||||||
if (!onlyColors) {
|
|
||||||
choice.getChoices().add("Colorless");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!choice.getChoices().isEmpty()) {
|
if (!choice.getChoices().isEmpty()) {
|
||||||
Player player = game.getPlayer(source.getControllerId());
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
|
@ -199,7 +195,7 @@ class AnyColorLandsProduceManaEffect extends ManaEffect {
|
||||||
for (Permanent land : lands) {
|
for (Permanent land : lands) {
|
||||||
Abilities<ActivatedManaAbilityImpl> mana = land.getAbilities().getActivatedManaAbilities(Zone.BATTLEFIELD);
|
Abilities<ActivatedManaAbilityImpl> mana = land.getAbilities().getActivatedManaAbilities(Zone.BATTLEFIELD);
|
||||||
for (ActivatedManaAbilityImpl ability : mana) {
|
for (ActivatedManaAbilityImpl ability : mana) {
|
||||||
if (!ability.equals(source) && ability.definesMana(game)) {
|
if (!ability.getSourceId().equals(source.getSourceId()) && ability.definesMana(game)) {
|
||||||
for (Mana netMana : ability.getNetMana(game)) {
|
for (Mana netMana : ability.getNetMana(game)) {
|
||||||
types.add(netMana);
|
types.add(netMana);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue