Examples of ChoiceColor


Examples of mage.choices.ChoiceColor

    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());       
        if (controller == null) {
            return false;
        }
        ChoiceColor choice = new ChoiceColor();
        controller.choose(outcome, choice, game);
        if (choice.getColor() != null) {
            game.informPlayers(new StringBuilder(controller.getName()).append(" chooses ").append(choice.getColor()).toString());
            FilterPermanent filter = new FilterPermanent();
            filter.add(new ColorPredicate(choice.getColor()));
            int cardsWithColor = game.getBattlefield().count(filter, source.getSourceId(), controller.getId(), game);
            if (cardsWithColor > 0) {
                new CreateTokenEffect(new SaprolingToken(), cardsWithColor).apply(game, source);
            }
            return true;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.