Package mage.cards

Examples of mage.cards.Card.moveToExile()


    @Override
    public boolean apply(Game game, Ability source) {
        Card targetCreatureCard = game.getCard(source.getFirstTarget());
        if (targetCreatureCard != null) {
            targetCreatureCard.moveToExile(null, null, source.getSourceId(), game);
            int toughness = targetCreatureCard.getToughness().getValue();
            SaprolingToken token = new SaprolingToken();
            return token.putOntoBattlefield(toughness, game, source.getSourceId(), source.getControllerId());
        }
        return false;
View Full Code Here


            Player player = game.getPlayer(playerId);
            if (player != null) {
                for (UUID cid : player.getGraveyard().copy()) {
                    Card c = game.getCard(cid);
                    if (c != null) {
                        c.moveToExile(null, null, source.getSourceId(), game);
                    }
                }

            }
        }
View Full Code Here

            }
        }
        else {
            Card card = game.getCard(event.getTargetId());
            if (card != null) {
                return card.moveToExile(null, "", source.getSourceId(), game);
            }
        }
        return false;
    }
View Full Code Here

            Cards cards = new CardsImpl(Zone.EXILED);
            int count = Math.min(player.getLibrary().size(), 7);
            for (int i = 0; i < count; i++) {
                Card card = player.getLibrary().getFromTop(game);
                cards.add(card);
                card.moveToExile(null, null, source.getSourceId(), game);
            }
            FilterCard filter = new FilterCard("creature and/or land cards to put onto the battlefield");
            filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE),
                                     new CardTypePredicate(CardType.LAND)));
            TargetCard target1 = new TargetCard(0, Integer.MAX_VALUE, Zone.EXILED, filter);
View Full Code Here

                    game.informPlayers("Plunge into Darkness: " + player.getName() + " puts a card into his or her hand");
                }
            }
            for (UUID cardId : cards) {
                Card card = game.getCard(cardId);
                card.moveToExile(null, "", source.getSourceId(), game);
            }
            return true;
        }
        return false;
    }
View Full Code Here

        Player player = game.getPlayer(source.getFirstTarget());
        if (player != null) {
            for (UUID cid : player.getHand().copy()) {
                Card c = game.getCard(cid);
                if (c != null) {
                    c.moveToExile(null, null, source.getSourceId(), game);
                }
            }
            for (UUID cid : player.getGraveyard().copy()) {
                Card c = game.getCard(cid);
                if (c != null) {
View Full Code Here

                }
            }
            for (UUID cid : player.getGraveyard().copy()) {
                Card c = game.getCard(cid);
                if (c != null) {
                    c.moveToExile(null, null, source.getSourceId(), game);
                }
            }
            return true;
        }
        return false;
View Full Code Here

                        cards.remove(card);
                    }
                }

                for (Card card : cards.getCards(game)) {
                    card.moveToExile(null, null, source.getSourceId(), game);
                }
            }
            return true;
        }
        return false;
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        for (UUID targetID : source.getTargets().get(0).getTargets()) {
            Card card = game.getCard(targetID);
            if (card != null) {
                card.moveToExile(null, "", source.getSourceId(), game);
            }
        }
        return true;
    }
}
View Full Code Here

    @Override
    public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) {
        Card card = game.getCard(sourceId);
        Player player = game.getPlayer(controllerId);
        if (player != null && player.getHand().contains(sourceId) && card != null) {
            paid = card.moveToExile(ability.getSourceId(), "from Hand", ability.getSourceId(), game);
        }
        return paid;
    }

    @Override
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.