mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Fixed color identity interaction with special cases IE Transguild Courier
This commit is contained in:
parent
308a55cf9a
commit
7092d16c5d
1 changed files with 12 additions and 8 deletions
|
@ -1,9 +1,6 @@
|
|||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue