Package mage.cards

Examples of mage.cards.CardsImpl.addAll()


    public boolean apply(Game game, Ability source) {
        Player opponent = game.getPlayer(getTargetPointer().getFirst(game, source));
        Player you = game.getPlayer(source.getControllerId());
        if (opponent != null && you != null) {
            Cards cardsInHand = new CardsImpl(Zone.PICK);
            cardsInHand.addAll(opponent.getHand());
            opponent.revealCards("Opponents hand", cardsInHand, game);
            if (cardsInHand.size() > 0
                    && cardsInHand.getCards(new FilterNonlandCard(), game).size() > 0) {
                TargetCard target = new TargetCard(1, Zone.PICK, new FilterNonlandCard());
                if (you.chooseTarget(Outcome.PlayForFree, cardsInHand, target, source, game)) {
View Full Code Here


            return false;
        }
        int cardsCount;
        Cards cardToReveal = new CardsImpl();
        Cards cardsInLibrary = new CardsImpl(Zone.LIBRARY);
        cardsInLibrary.addAll(player.getLibrary().getCards(game));

        for (int cmc=3; cmc > 0; cmc--) {
            FilterCard filter = new FilterCard("instant card with converted mana cost " + cmc);
            filter.add(new CardTypePredicate(CardType.INSTANT));
            filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, cmc));
View Full Code Here

        for (Card card : player.getHand().getCards(filter, game)) {
            possibleTargets.add(card.getId());
        }

        Cards cardsToCheck = new CardsImpl();
        cardsToCheck.addAll(possibleTargets);
        if (targets.size() == 1) {
            // first target is laready choosen, now only targets with the same name are selectable
            for (Map.Entry<UUID, Integer> entry : targets.entrySet()) {
                Card chosenCard = cardsToCheck.get(entry.getKey(), game);
                if (chosenCard != null) {
View Full Code Here

                            }
                        }
                    }
                }
            } else {
                revealedCards.addAll(targetPlayer.getHand());
            }
            if (!revealedCards.isEmpty()) {
                targetPlayer.revealCards("Disciple of Phenax", revealedCards, game);
                Player you = game.getPlayer(source.getControllerId());
                if (you != null) {
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.