Examples of moveCardToExileWithInfo()


Examples of mage.players.Player.moveCardToExileWithInfo()

    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            List<Permanent> permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game);
            for (Permanent permanent: permanents) {
                controller.moveCardToExileWithInfo(permanent, exileId, exileZone, source.getSourceId(), game, Zone.BATTLEFIELD);
            }
            return true;
        }
        return false;
View Full Code Here

Examples of mage.players.Player.moveCardToExileWithInfo()

                for (UUID cardId: target.getTargets()) {
                    Card card = game.getCard(cardId);
                    if (card == null) {
                        continue;
                    }
                    player.moveCardToExileWithInfo(card, null, "", getSourceId(), game, Zone.GRAVEYARD);
                    ++adjCost;
                }
                game.informPlayers(new StringBuilder("Delve: ").append(player.getName()).append(" exiled ")
                        .append(adjCost).append(" card").append(adjCost != 1?"s":"").append(" from his or her graveyard").toString());
                CardUtil.adjustCost((SpellAbility)ability, adjCost);
View Full Code Here

Examples of mage.players.Player.moveCardToExileWithInfo()

    public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) {
        Player controller = game.getPlayer(controllerId);
        if (controller != null) {
            Card card = game.getCard(sourceId);
            if (card != null && game.getState().getZone(sourceId).equals(Zone.GRAVEYARD)) {
                paid = controller.moveCardToExileWithInfo(card, null, "", sourceId, game, Zone.GRAVEYARD);
            }
        }
        return paid;
    }
View Full Code Here

Examples of mage.players.Player.moveCardToExileWithInfo()

            return false;
        } else {
            Card sourceCard = (Card) game.getObject(source.getSourceId());
            Player player = game.getPlayer(sourceCard.getOwnerId());
            if (player != null) {
                player.moveCardToExileWithInfo(sourceCard, this.cardId, new StringBuilder(player.getName()).append(" Rebound").toString(), source.getSourceId(), game, Zone.HAND);
                this.used = true;
                return true;
            }
        }
        return false;
View Full Code Here

Examples of mage.players.Player.moveCardToExileWithInfo()

        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            Card card = game.getCard(event.getTargetId());
            if (card != null) {
                if (controller.chooseUse(outcome, "Move " + card.getLogName() + " to exile to cast it by Madness?", game)) {
                    controller.moveCardToExileWithInfo(card, source.getSourceId(), "Madness", source.getSourceId(), game, ((ZoneChangeEvent) event).getFromZone());
                    game.fireEvent(GameEvent.getEvent(GameEvent.EventType.MADNESS_CARD_EXILED, card.getId(), card.getId(),controller.getId()));
                    return true;
                }
            }
        }
View Full Code Here

Examples of mage.players.Player.moveCardToExileWithInfo()

                Card card = player.getHand().get(targetId, game);
                if (card == null) {
                    return false;
                }
                this.cards.add(card);
                paid |= player.moveCardToExileWithInfo(card, null, null, ability.getSourceId(), game, Zone.HAND);
            }
        }
        return paid;
    }
View Full Code Here

Examples of mage.players.Player.moveCardToExileWithInfo()

        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source));
            UUID exileId = source.getSourceId();
            if (permanent != null) {
                return controller.moveCardToExileWithInfo(permanent, exileId, exileZone, source.getSourceId(), game, Zone.BATTLEFIELD);
            } else {
                Card card = game.getCard(targetPointer.getFirst(game, source));
                if (card != null) {
                    return controller.moveCardToExileWithInfo(card, exileId, exileZone, source.getSourceId(), game, game.getState().getZone(card.getId()));
                }
View Full Code Here

Examples of mage.players.Player.moveCardToExileWithInfo()

            if (permanent != null) {
                return controller.moveCardToExileWithInfo(permanent, exileId, exileZone, source.getSourceId(), game, Zone.BATTLEFIELD);
            } else {
                Card card = game.getCard(targetPointer.getFirst(game, source));
                if (card != null) {
                    return controller.moveCardToExileWithInfo(card, exileId, exileZone, source.getSourceId(), game, game.getState().getZone(card.getId()));
                }
            }
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.moveCardToExileWithInfo()

        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null && controller.getLibrary().size() > 0) {
            Library library = controller.getLibrary();
            Card card = library.removeFromTop(game);
            if (card != null) {
                controller.moveCardToExileWithInfo(card, source.getSourceId(), "Chandra Pyromaster <this card may be played the turn it was exiled>", source.getSourceId(), game, Zone.LIBRARY);
                ContinuousEffect effect = new ChandraPyromasterCastFromExileEffect();
                effect.setTargetPointer(new FixedTarget(card.getId()));
                game.addEffect(effect, source);
            }
            return true;
View Full Code Here

Examples of mage.players.Player.moveCardToExileWithInfo()

                    if (game.getState().getZone(objectId).equals(Zone.BATTLEFIELD)) {
                        Permanent permanent = game.getPermanent(objectId);
                        if (permanent != null) {
                            Player player = game.getPlayer(permanent.getControllerId());
                            if (player != null) {
                                player.moveCardToExileWithInfo(permanent, null, "", source.getSourceId(), game, Zone.BATTLEFIELD);
                            }
                        }
                    } else if (game.getState().getZone(objectId).equals(Zone.HAND)) {
                        Card card = game.getCard(objectId);
                        if (card != 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.