Search in sources :

Example 1 with SubTypes

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;
        }
    }
}
Also used : SubTypes(mage.util.SubTypes) Permanent(mage.game.permanent.Permanent) ObjectColor(mage.ObjectColor) PermanentToken(mage.game.permanent.PermanentToken) Spell(mage.game.stack.Spell)

Aggregations

ObjectColor (mage.ObjectColor)1 Permanent (mage.game.permanent.Permanent)1 PermanentToken (mage.game.permanent.PermanentToken)1 Spell (mage.game.stack.Spell)1 SubTypes (mage.util.SubTypes)1