From 76db4c4d01442b94b7c2f869768b3a3760dc4e72 Mon Sep 17 00:00:00 2001 From: Ryan Worcester Date: Thu, 11 Dec 2014 19:40:13 -0600 Subject: [PATCH 1/2] Added setDefaultColor to CardImpl --- Mage/src/mage/cards/CardImpl.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Mage/src/mage/cards/CardImpl.java b/Mage/src/mage/cards/CardImpl.java index d7162cfcd9..fcb7828c4a 100644 --- a/Mage/src/mage/cards/CardImpl.java +++ b/Mage/src/mage/cards/CardImpl.java @@ -43,6 +43,7 @@ import mage.abilities.PlayLandAbility; import mage.abilities.SpellAbility; import mage.abilities.mana.ManaAbility; import mage.constants.CardType; +import mage.constants.ColoredManaSymbol; import mage.constants.Rarity; import mage.constants.SpellAbilityType; import mage.constants.TimingRule; @@ -121,6 +122,14 @@ public abstract class CardImpl extends MageObjectImpl implements Card { this.morphCard = false; } + private void setDefaultColor() { + this.color.setWhite(this.manaCost.containsColor(ColoredManaSymbol.W)); + this.color.setBlue(this.manaCost.containsColor(ColoredManaSymbol.U)); + this.color.setBlack(this.manaCost.containsColor(ColoredManaSymbol.B)); + this.color.setRed(this.manaCost.containsColor(ColoredManaSymbol.R)); + this.color.setGreen(this.manaCost.containsColor(ColoredManaSymbol.G)); + } + protected CardImpl(UUID ownerId, String name) { this.ownerId = ownerId; this.name = name; From c78264384437de73d9ec566f73b7a47aa1fb9b1b Mon Sep 17 00:00:00 2001 From: Ryan Worcester Date: Thu, 11 Dec 2014 19:52:16 -0600 Subject: [PATCH 2/2] It helps to actually call the method --- Mage/src/mage/cards/CardImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Mage/src/mage/cards/CardImpl.java b/Mage/src/mage/cards/CardImpl.java index fcb7828c4a..042f8c0658 100644 --- a/Mage/src/mage/cards/CardImpl.java +++ b/Mage/src/mage/cards/CardImpl.java @@ -104,6 +104,7 @@ public abstract class CardImpl extends MageObjectImpl implements Card { this.cardNumber = cardNumber; this.cardType.addAll(Arrays.asList(cardTypes)); this.manaCost.load(costs); + setDefaultColor(); if (cardType.contains(CardType.LAND)) { Ability ability = new PlayLandAbility(name); ability.setSourceId(this.getId());