Fixed color identity interaction with special cases IE Transguild Courier
package mage.cards;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
import mage.MageObject;
import mage.MageObjectImpl;
import mage.Mana;
@@ -45,6 +42,13 @@ import mage.util.SubTypeList;
import mage.watchers.Watcher;
import org.apache.log4j.Logger;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.UUID;
+
public abstract class CardImpl extends MageObjectImpl implements Card {
private static final long serialVersionUID = 1L;
@@ -852,11 +856,11 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
@Override
public FilterMana getColorIdentity() {
FilterMana mana = new FilterMana();
- mana.setBlack(getManaCost().getText().matches(regexBlack));
- mana.setBlue(getManaCost().getText().matches(regexBlue));
- mana.setGreen(getManaCost().getText().matches(regexGreen));
- mana.setRed(getManaCost().getText().matches(regexRed));
- mana.setWhite(getManaCost().getText().matches(regexWhite));
+ mana.setBlack(getManaCost().getText().matches(regexBlack)||color.isBlack());
+ mana.setBlue(getManaCost().getText().matches(regexBlue)||color.isBlue());
+ mana.setGreen(getManaCost().getText().matches(regexGreen)||color.isGreen());
+ mana.setRed(getManaCost().getText().matches(regexRed)||color.isRed());
+ mana.setWhite(getManaCost().getText().matches(regexWhite)||color.isWhite());
for (String rule : getRules()) {
rule = rule.replaceAll("(?i)<i.*?</i>", ""); // Ignoring reminder text in italic
