Package mage.choices

Examples of mage.choices.ChoiceColor


                    manaCostExiled += card.getManaCost().convertedManaCost();
                }
            }
        }
       
        ChoiceColor choice = (ChoiceColor) source.getChoices().get(0);
        Mana mana = null;
        if (choice.getColor().isBlack()) {
            mana = new FoodChainManaBuilder().setMana(Mana.BlackMana(manaCostExiled + 1), source, game).build();
        }
        else if (choice.getColor().isBlue()) {
            mana = new FoodChainManaBuilder().setMana(Mana.BlueMana(manaCostExiled + 1), source, game).build();
        }
        else if (choice.getColor().isRed()) {
            mana = new FoodChainManaBuilder().setMana(Mana.RedMana(manaCostExiled + 1), source, game).build();
        }
        else if (choice.getColor().isGreen()) {
            mana = new FoodChainManaBuilder().setMana(Mana.GreenMana(manaCostExiled + 1), source, game).build();
        }
        else if (choice.getColor().isWhite()) {
            mana = new FoodChainManaBuilder().setMana(Mana.WhiteMana(manaCostExiled + 1), source, game).build();
        }
       
        Player player = game.getPlayer(source.getControllerId());
        if (player != null && mana != null) {
View Full Code Here


        this.expansionSetCode = "ONS";

        this.color.setWhite(true);

        // Choose a color. Creatures you control gain protection from the chosen color until end of turn.
        this.getSpellAbility().addChoice(new ChoiceColor());
        this.getSpellAbility().addEffect(new AcromasBlessingEffect());
        // Cycling {W}
        this.addAbility(new CyclingAbility(new ManaCostsImpl("{W}")));
    }
View Full Code Here

        return new AcromasBlessingEffect(this);
    }

    @Override
    public boolean apply(Game game, Ability source) {
        ChoiceColor choice = (ChoiceColor) source.getChoices().get(0);
        filter2.add(new ColorPredicate(choice.getColor()));
        filter2.setMessage(choice.getChoice());
        setAbility(new ProtectionAbility(new FilterCard(filter2)));
        return super.apply(game, source);
    }
View Full Code Here

        this.color.setRed(true);
        this.color.setGreen(true);

        // Add two mana in any combination of colors to your mana pool.
        this.getSpellAbility().addEffect(new ManamorphoseEffect());
        this.getSpellAbility().addChoice(new ChoiceColor());
        this.getSpellAbility().addChoice(new ChoiceColor());
        // Draw a card.
        this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
    }
View Full Code Here

            return false;
        }

        boolean result = false;
        for (int i = 0; i < 2; i++) {
            ChoiceColor choice = (ChoiceColor) source.getChoices().get(i);
            Mana mana = null;
            if (choice.getColor().isBlack()) {
                mana = Mana.BlackMana(1);
            } else if (choice.getColor().isBlue()) {
                mana = Mana.BlueMana(1);
            } else if (choice.getColor().isRed()) {
                mana = Mana.RedMana(1);
            } else if (choice.getColor().isGreen()) {
                mana = Mana.GreenMana(1);
            } else if (choice.getColor().isWhite()) {
                mana = Mana.WhiteMana(1);
            }

            if (mana != null) {
                player.getManaPool().addMana(mana, game, source);
View Full Code Here

        this.expansionSetCode = "INV";

        this.color.setBlue(true);

        // Return all permanents of the color of your choice to their owners' hands.
        this.getSpellAbility().addChoice(new ChoiceColor());
        this.getSpellAbility().addEffect(new WashOutEffect());

    }
View Full Code Here

        if(controller != null){
                int x = 2;

            Mana mana = new Mana();
            for(int i = 0; i < x; i++){
                ChoiceColor choiceColor = new ChoiceColor();
                while (controller.isInGame() && !controller.choose(Outcome.Benefit, choiceColor, game)) {
                }

                if (choiceColor.getColor().isBlack()) {
                    mana.addBlack();
                } else if (choiceColor.getColor().isBlue()) {
                    mana.addBlue();
                } else if (choiceColor.getColor().isRed()) {
                    mana.addRed();
                } else if (choiceColor.getColor().isGreen()) {
                    mana.addGreen();
                } else if (choiceColor.getColor().isWhite()) {
                    mana.addWhite();
                }
            }

            controller.getManaPool().addMana(mana, game, source);
View Full Code Here

        ability.addCost(new TapSourceCost());
        this.addAbility(ability);

        // {tap}, Sacrifice X Goats: Add X mana of any one color to your mana pool. You gain X life.
        ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SpringjackPastureEffect(), new TapSourceCost());
        ability.addChoice(new ChoiceColor());
        ability.addCost(new SacrificeXTargetCost(filter));
        ability.addEffect(new GainLifeEffect(new GetXValue()));
        this.addAbility(ability);

    }
View Full Code Here

    }

    @Override
    public boolean apply(Game game, Ability source) {
        Player you = game.getPlayer(source.getControllerId());
        ChoiceColor choice = (ChoiceColor) source.getChoices().get(0);
        if (you != null && choice != null) {
            int count = new GetXValue().calculate(game, source, this);
            if (choice.getColor().isBlack()) {
                you.getManaPool().addMana(new Mana(0, 0, 0, 0, count, 0, 0), game, source);
            } else if (choice.getColor().isBlue()) {
                you.getManaPool().addMana(new Mana(0, 0, count, 0, 0, 0, 0), game, source);
            } else if (choice.getColor().isRed()) {
                you.getManaPool().addMana(new Mana(count, 0, 0, 0, 0, 0, 0), game, source);
            } else if (choice.getColor().isGreen()) {
                you.getManaPool().addMana(new Mana(0, count, 0, 0, 0, 0, 0), game, source);
            } else if (choice.getColor().isWhite()) {
                you.getManaPool().addMana(new Mana(0, 0, 0, count, 0, 0, 0), game, source);
            }
            return true;

        }
View Full Code Here

   
    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());       
        if (player != null) {
            ChoiceColor choice = new ChoiceColor();
            player.choose(outcome, choice, game);
            if (choice.getColor() != null) {
                game.informPlayers(new StringBuilder(player.getName()).append(" chooses ").append(choice.getColor()).toString());
                FilterPermanent filter = new FilterPermanent();
                filter.add(new ColorPredicate(choice.getColor()));
                new ReturnToHandFromBattlefieldAllEffect(filter).apply(game, source);
                return true;
            }
        }
        return false;
View Full Code Here

TOP

Related Classes of mage.choices.ChoiceColor

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.