Package mage.cards

Examples of mage.cards.Card.moveToExile()


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


                    player.searchLibrary(target, game, targetPlayer.getId());
                    List<UUID> targets = target.getTargets();
                    for(UUID cardId : targets){
                        Card libraryCard = game.getCard(cardId);
                        if (libraryCard != null) {
                            libraryCard.moveToExile(null, "", source.getSourceId(), game);
                        }
                    }
                }
            }
            targetPlayer.shuffleLibrary(game);
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Card card = game.getCard(getTargetPointer().getFirst(game, source));
        if (card != null) {
            card.moveToExile(null, null, source.getSourceId(), game);
            if (card.getCardType().contains(CardType.CREATURE)) {
                Permanent sourcePermanent = game.getPermanent(source.getSourceId());
                if (sourcePermanent != null) {
                    sourcePermanent.addCounters(CounterType.P1P1.createInstance(), game);
                    Player controller = game.getPlayer(source.getControllerId());
View Full Code Here

        if (you != null) {
            if (cardOne != null) {
                cardOne.moveToExile(null, null, source.getSourceId(), game);
            }
            if (cardTwo != null) {
                cardTwo.moveToExile(null, null, source.getSourceId(), game);
            }

            boolean castCardOne = true;
            if (cardOne != null && you.chooseUse(Outcome.Neutral, "Cast the copy of " + cardOne.getName() + " first?", game)) {
                Card copyOne = game.copyCard(cardOne, source, you.getId());
View Full Code Here

                }
            }
            Card cardToExile = game.getCard(source.getSourceId());
            if(cardToExile != null)
            {
                cardToExile.moveToExile(null, "", source.getSourceId(), game);
            }
        }
        return true;
    }
View Full Code Here

                }
            }
        }

        for (Card card : player.getLibrary().getCards(game)) {
            card.moveToExile(null, null, source.getSourceId(), game);
        }

        TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on top of your library"));
        while (player.isInGame() && cards.size() > 1) {
            player.choose(Outcome.Neutral, cards, target, game);
View Full Code Here

                } else if (target instanceof TargetCardInGraveyard){
                    for (UUID cardId : target.getTargets()) {
                        Card card = game.getCard(cardId);
                        if (card != null) {
                            result |= card.moveToExile(CardUtil.getCardExileZoneId(game, source), "Angel of Serenity", source.getSourceId(), game);
                        }
                    }
                }
            }
        }
View Full Code Here

        Set<String> names = new HashSet<>();
        while (player.isInGame() && player.getLibrary().size() > 0) {
            Card card = player.getLibrary().getFromTop(game);
            if (card != null) {

                card.moveToExile(null, null, source.getSourceId(), game);
                // Checks if there was already exiled a card with the same name
                if (names.contains(card.getName())) {
                    break;
                }
                names.add(card.getName());
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Card card = game.getCard(targetPointer.getFirst(game, source));
        if (card != null) {
            if (card.moveToExile(null, "Unscythe Exile", source.getSourceId(), game)) {
                ZombieToken zombie = new ZombieToken("ALA");
                return zombie.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
            }
        }
        return false;
View Full Code Here

        do {
            repeat = false;
            if (player.getLibrary().size() > 0) {
                Card card = player.getLibrary().removeFromTop(game);
                if (card != null) {
                    card.moveToExile(null, "", source.getSourceId(), game);
                    List<CardType> cardType = card.getCardType();
                    if ((cardType.contains(CardType.ARTIFACT) || cardType.contains(CardType.CREATURE)
                            || cardType.contains(CardType.ENCHANTMENT) || cardType.contains(CardType.LAND)
                            || cardType.contains(CardType.PLANESWALKER))
                            && player.chooseUse(Outcome.PutCardInPlay, "Put " + card.getName() + " onto the battlefield?", game)) {
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.