Package mage.target.common

Examples of mage.target.common.TargetCardInLibrary.canChoose()


                FilterCard filter = new FilterCreatureCard("number of creature cards with total converted mana cost 6 or less (6 CMC left)");
                filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, manaCostLeftToFetch + 1));
                TargetCardInLibrary target = new TargetCardInLibrary(0, 1, filter);
                target.setCardLimit(librarySearchLimit);

                while (target.canChoose(source.getSourceId(), source.getControllerId(), game)) {
                    target.choose(Outcome.PutCreatureInPlay, source.getControllerId(), source.getControllerId(), game);
                    Card card = player.getLibrary().remove(target.getFirstTarget(), game);
                    if (card == null) {
                        break;
                    }
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.