Examples of moveToExile()


Examples of mage.cards.Card.moveToExile()

    int sourceCost = game.getObject(source.getSourceId()).getManaCost().convertedManaCost();
    do {
      card = player.getLibrary().removeFromTop(game);
      if (card == null)
        break;
      card.moveToExile(exile.getId(), exile.getName(), source.getId(), game);
    } while (card.getCardType().contains(CardType.LAND) || card.getManaCost().convertedManaCost() >= sourceCost);

    if (card != null) {
      if (player.chooseUse(outcome, "Use cascade effect on " + card.getName() + "?", game)) {
        player.cast(card.getSpellAbility(), game, true);
View Full Code Here

Examples of mage.cards.Card.moveToExile()

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

Examples of mage.cards.Card.moveToExile()

            if (target != null && target.canChoose(player.getId(), game)) {
                if (target.choose(Outcome.Exile, player.getId(), source.getSourceId(), game)) {
                    for (UUID cardId : target.getTargets()) {
                        Card card = game.getCard(cardId);
                        if (card != null) {
                            card.moveToExile(exileId, exileName, source.getSourceId(), game);
                        }
                    }
                    return true;
                }
            }
View Full Code Here

Examples of mage.cards.Card.moveToExile()

            UUID exileId = (UUID) game.getState().getValue("SuspendExileId" + source.getControllerId().toString());
            if (exileId == null) {
                exileId = UUID.randomUUID();
                game.getState().setValue("SuspendExileId" + source.getControllerId().toString(), exileId);
            }
            if (card.moveToExile(exileId, new StringBuilder("Suspended cards of ").append(controller.getName()).toString() , source.getSourceId(), game)) {
                if (suspend == Integer.MAX_VALUE) {
                    suspend = source.getManaCostsToPay().getX();
                }
                card.addCounters(CounterType.TIME.createInstance(suspend), game);
                game.informPlayers(new StringBuilder(controller.getName()).append(" suspends (").append(suspend).append(") ").append(card.getName()).toString());
View Full Code Here

Examples of mage.cards.Card.moveToExile()

            if (player.searchLibrary(target, game, targetPlayer.getId())) {
                List<UUID> targets = target.getTargets();
                for (UUID targetId : targets) {
                    Card card = targetPlayer.getLibrary().remove(targetId, game);
                    if (card != null) {
                        card.moveToExile(null, "", source.getSourceId(), game);
                    }
                }
            }
            targetPlayer.shuffleLibrary(game);
            return true;
View Full Code Here

Examples of mage.cards.Card.moveToExile()

                    List<UUID> targets = target.getTargets();
                    for (UUID targetId : targets) {
                        Card card = game.getCard(targetId);
                        if (card != null) {
                            card.setFaceDown(true);
                            if (card.moveToExile(source.getSourceId(), sourceObject.getLogName(), source.getSourceId(), game)) {
                                amountExiled++;
                            }
                        }
                    }
                }
View Full Code Here

Examples of mage.cards.Card.moveToExile()

        Card card = game.getCard(source.getSourceId());
        if (card != null) {
            Permanent hauntedCreature = game.getPermanent(targetPointer.getFirst(game, source));
            // haunting card will only be moved to exile, if
            if (hauntedCreature != null) {
                if (card.moveToExile(source.getSourceId(), "Haunting", source.getSourceId(), game)) {
                    // remember the haunted creature
                    String key = new StringBuilder("Haunting_").append(source.getSourceId().toString()).append("_").append(card.getZoneChangeCounter()).toString();
                    game.getState().setValue(key, new FixedTarget(targetPointer.getFirst(game, source)));
                    card.addInfo("hauntinfo", new StringBuilder("Haunting ").append(hauntedCreature.getLogName()).toString());
                    hauntedCreature.addInfo("hauntinfo", new StringBuilder("Haunted by ").append(card.getLogName()).toString());
View Full Code Here

Examples of mage.cards.Card.moveToExile()

                    Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new CipherStoreEffect(source.getSourceId(), ruleText), true);
                    ContinuousEffect effect = new GainAbilityTargetEffect(ability, Duration.Custom);
                    effect.setTargetPointer(new FixedTarget(target.getFirstTarget()));
                    game.addEffect(effect, source);
                    game.informPlayers(new StringBuilder(sourceCard.getLogName()).append(": Spell ciphered to ").append(targetCreature.getLogName()).toString());
                    return sourceCard.moveToExile(null, "", source.getSourceId(), game);
                } else {
                    return false;
                }
            }
            return true;
View Full Code Here

Examples of mage.cards.Card.moveToExile()

                if(card != null){
                    if(!mulliganedCards.containsKey(playerId)){
                        mulliganedCards.put(playerId, new CardsImpl());
                    }
                    card.setFaceDown(true);
                    card.moveToExile(null, "", null, this);
                    mulliganedCards.get(playerId).add(card);
                }
            }
            int deduction = 1;
            if (freeMulligans > 0) {
View Full Code Here

Examples of mage.cards.Card.moveToExile()

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

        if (cards.getCards(new FilterInstantOrSorceryCard(), game).size() > 0) {
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.