Package mage.constants

Examples of mage.constants.CardType


        Permanent sourceCreature = game.getPermanent(source.getSourceId());
        if (you != null && sourceCreature != null) {
            Choice choiceImpl = new ChoiceImpl();
            choiceImpl.setChoices(choice);
            while (you.isInGame() && !you.choose(Outcome.Neutral, choiceImpl, game)) {}
            CardType type = null;
            String choosenType = choiceImpl.getChoice();

            if (choosenType.equals(CardType.ARTIFACT.toString())) {
                type = CardType.ARTIFACT;
            } else if (choosenType.equals(CardType.LAND.toString())) {
                type = CardType.LAND;
            } else if (choosenType.equals(CardType.CREATURE.toString())) {
                type = CardType.CREATURE;
            } else if (choosenType.equals(CardType.ENCHANTMENT.toString())) {
                type = CardType.ENCHANTMENT;
            } else if (choosenType.equals(CardType.INSTANT.toString())) {
                type = CardType.INSTANT;
            } else if (choosenType.equals(CardType.SORCERY.toString())) {
                type = CardType.SORCERY;
            } else if (choosenType.equals(CardType.PLANESWALKER.toString())) {
                type = CardType.PLANESWALKER;
            } else if (choosenType.equals(CardType.TRIBAL.toString())) {
                type = CardType.TRIBAL;
            }
            if (type != null) {
                FilterPermanent filter = new FilterControlledPermanent(new StringBuilder("permanent you control of type ").append(type.toString()).toString());
                filter.add(new CardTypePredicate(type));

                TargetPermanent target = new TargetControlledPermanent(1, 1, filter, false);
                target.setNotTarget(true);
View Full Code Here


        UUID target = source.getFirstTarget();
        if(player != null && target != null){
            Choice choiceImpl = new ChoiceImpl();
            choiceImpl.setChoices(choice);
            while(!player.choose(outcome.Neutral, choiceImpl, game));
            CardType type;
            String choosenType = choiceImpl.getChoice();
           
            if(choosenType.equals(CardType.ARTIFACT.toString())){
                type = CardType.ARTIFACT;
            }else if(choosenType.equals(CardType.LAND.toString())){
View Full Code Here

TOP

Related Classes of mage.constants.CardType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.