- [C17] Added Path of Ancestry.

- Fixed Command Tower and Path of Ancestry generating 2 colorless mana in non-EDH matches.
This commit is contained in:
Agetian
2017-08-11 14:14:57 +00:00
parent 6907c9c550
commit b2fc1cc1f2
4 changed files with 25 additions and 1 deletions

View File

@@ -62,7 +62,7 @@ public class ManaEffect extends SpellAbilityEffect {
Player activator = sa.getActivatingPlayer();
String express = abMana.getExpressChoice();
String[] colorsProduced = abMana.getComboColors().split(" ");
final StringBuilder choiceString = new StringBuilder();
ColorSet colorOptions = null;
String[] colorsNeeded = express.isEmpty() ? null : express.split(" ");
@@ -94,6 +94,12 @@ public class ManaEffect extends SpellAbilityEffect {
}
choiceString.append(choice);
}
if ("".equals(choiceString.toString()) && "Combo ColorIdentity".equals(abMana.getOrigProduced())) {
// No mana could be produced here (non-EDH match?), so cut short
return;
}
game.action.nofityOfValue(sa, card, activator + " picked " + choiceString, activator);
abMana.setExpressChoice(choiceString.toString());
}

View File

@@ -4565,6 +4565,14 @@ public class Card extends GameEntity implements Comparable<Card> {
return false;
}
break;
case "Commander":
final List<Card> cmdrs = sourceController.getCommanders();
for (Card cmdr : cmdrs) {
if (sharesCreatureTypeWith(cmdr)) {
return true;
}
}
return false;
case "Enchanted":
for (final SpellAbility sa : source.currentState.getNonManaAbilities()) {
final SpellAbility root = sa.getRootAbility();