mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Added setDefaultColor to CardImpl
This commit is contained in:
parent
68f2b65c34
commit
76db4c4d01
1 changed files with 9 additions and 0 deletions
|
@ -43,6 +43,7 @@ import mage.abilities.PlayLandAbility;
|
||||||
import mage.abilities.SpellAbility;
|
import mage.abilities.SpellAbility;
|
||||||
import mage.abilities.mana.ManaAbility;
|
import mage.abilities.mana.ManaAbility;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.ColoredManaSymbol;
|
||||||
import mage.constants.Rarity;
|
import mage.constants.Rarity;
|
||||||
import mage.constants.SpellAbilityType;
|
import mage.constants.SpellAbilityType;
|
||||||
import mage.constants.TimingRule;
|
import mage.constants.TimingRule;
|
||||||
|
@ -121,6 +122,14 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
|
||||||
this.morphCard = false;
|
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) {
|
protected CardImpl(UUID ownerId, String name) {
|
||||||
this.ownerId = ownerId;
|
this.ownerId = ownerId;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
|
Loading…
Reference in a new issue