use of mage.util.SubTypes in project mage by magefree.
the class CardView method fillEmpty.
private void fillEmpty(Card card, boolean controlled) {
this.name = "Face Down";
this.displayName = name;
this.displayFullName = name;
this.rules = new ArrayList<>();
this.power = "";
this.toughness = "";
this.loyalty = "";
this.startingLoyalty = "";
this.cardTypes = new ArrayList<>();
this.subTypes = new SubTypes();
this.superTypes = EnumSet.noneOf(SuperType.class);
this.color = new ObjectColor();
this.frameColor = new ObjectColor();
this.frameStyle = FrameStyle.M15_NORMAL;
this.manaCostLeftStr = "";
this.manaCostRightStr = "";
this.manaValue = 0;
// the controller can see more information (e.g. enlarged image) than other players for face down cards (e.g. Morph played face down)
if (!controlled) {
this.rarity = Rarity.COMMON;
this.expansionSetCode = "";
this.cardNumber = "0";
} else {
this.rarity = card.getRarity();
}
if (card != null) {
if (card instanceof Permanent) {
this.mageObjectType = MageObjectType.PERMANENT;
} else if (card.isCopy()) {
this.mageObjectType = MageObjectType.COPY_CARD;
} else {
this.mageObjectType = MageObjectType.CARD;
}
if (card instanceof PermanentToken) {
this.mageObjectType = MageObjectType.TOKEN;
}
if (card instanceof Spell) {
this.mageObjectType = MageObjectType.SPELL;
}
}
}
Aggregations