Package mage.cards

Examples of mage.cards.Card.moveToExile()


            }

            for (int i = 0; i < 10; i++) {
                Card card = sourcePlayer.getLibrary().getFromTop(game);
                if (card != null) {
                    card.moveToExile(null, null, source.getSourceId(), game);
                }
            }

            for (UUID playerId : sourcePlayer.getInRange()) {
                Player player = game.getPlayer(playerId);
View Full Code Here


        Cards pile2 = new CardsImpl();
        int max = Math.min(you.getLibrary().size(), 5);
        for (int i = 0; i < max; i++) {
            Card card = you.getLibrary().removeFromTop(game);
            if (card != null) {
                card.moveToExile(source.getSourceId(), "Brilliant Ultimatum", source.getSourceId(), game);
                pile2.add(card);
            }
        }

        Player opponent = game.getPlayer(source.getFirstTarget());
View Full Code Here

                sourcePermanent = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD);
            }
            if (sourcePermanent != null) {
                game.getStack().counter(spell.getId(), source.getSourceId(), game);
                Card card = spell.getCard();
                card.moveToExile(CardUtil.getCardExileZoneId(game, source), sourcePermanent.getName(), id, game);
            }
        }
        return false;
    }
}
View Full Code Here

                    if (!target.getTargets().isEmpty()) {
                        List<UUID> targets = target.getTargets();
                        for (UUID targetId : targets) {
                            Card card = game.getCard(targetId);
                            if (card != null) {
                                card.moveToExile(id, "Suffer the Past", source.getSourceId(), game);
                                numberExiled ++;
                            }
                        }
                        you.gainLife(numberExiled, game);
                        targetPlayer.loseLife(numberExiled, game);
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Card targetCard = game.getCard(source.getFirstTarget());
        if (targetCard != null) {
            int power = targetCard.getPower().getValue();
            targetCard.moveToExile(null, null, source.getSourceId(), game);
            if (power > 0) {
                Permanent targetCreature = game.getPermanent(source.getTargets().get(1).getFirstTarget());
                if (targetCreature != null) {
                    targetCreature.addCounters(CounterType.P1P1.createInstance(power), game);
                }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Card card = game.getCard(source.getFirstTarget());
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (card != null && permanent != null) {
            card.moveToExile(getId(), "Myr Welder (Imprint)", source.getSourceId(), game);
            permanent.imprint(card.getId(), game);
            return true;
        }
        return false;
    }
View Full Code Here

        if (player.getHand().size() > 0) {
            TargetCard target = new TargetCard(Zone.HAND, filter);
            player.choose(Outcome.Benefit, player.getHand(), target, game);
            Card card = player.getHand().get(target.getFirstTarget(), game);
            if (card != null) {
                card.moveToExile(getId(), "Prototype Portal (Imprint)", source.getSourceId(), game);
                Permanent permanent = game.getPermanent(source.getSourceId());
                if (permanent != null) {
                    permanent.imprint(card.getId(), game);
                }
                return true;
View Full Code Here

        if (player != null) {
            // move cards from library to exile
            for (int i = 0; i < 5; i++) {
                if (player != null && player.getLibrary().size() > 0) {
                    Card topCard = player.getLibrary().getFromTop(game);
                    topCard.moveToExile(source.getSourceId(), "Cards exiled by Search the City", source.getSourceId(), game);
                }
            }
            return true;
        }
        return false;
View Full Code Here

                UUID exileZone = CardUtil.getCardExileZoneId(game, source);
                if (target.getTargets().size() > 0) {
                    for (UUID cardId : target.getTargets()) {
                        Card card = you.getLibrary().getCard(cardId, game);
                        if (card != null) {
                            card.moveToExile(exileZone, "Endless Horizons", source.getSourceId(), game);
                        }
                    }
                }
            }
            you.shuffleLibrary(game);
View Full Code Here

            Player player = game.getPlayer(playerId);
            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

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.