Examples of moveCardToExileWithInfo()


Examples of mage.players.Player.moveCardToExileWithInfo()

    @Override
    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        Permanent sourcePermanent = game.getPermanent(source.getSourceId());
        if (controller != null && sourcePermanent != null) {
            controller.moveCardToExileWithInfo(sourcePermanent, null, "", source.getSourceId(), game, Zone.BATTLEFIELD);
            DelayedTriggeredAbility delayedAbility = new AtBeginningNextDeclareAttackersStepNextTurnDelayedTriggeredAbility();
            delayedAbility.setSourceId(source.getSourceId());
            delayedAbility.setControllerId(source.getControllerId());
            game.addDelayedTriggeredAbility(delayedAbility);
            return true;
View Full Code Here

Examples of mage.players.Player.moveCardToExileWithInfo()

                if(card.getName().equals(cardName)){
                    controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                    break;
                }
                else{
                    controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.LIBRARY);
                }
            }
            else{
                break;
            }
View Full Code Here

Examples of mage.players.Player.moveCardToExileWithInfo()

        if (controller != null) {
            UUID exileId = CardUtil.getCardExileZoneId(game, source);
            if (exileId != null) {
                for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) {
                    if (!permanent.getId().equals(source.getSourceId())) { // Another
                        controller.moveCardToExileWithInfo(permanent, exileId, sourceObject.getLogName(), source.getSourceId(), game, Zone.BATTLEFIELD);
                    }
                }
                return true;
            }
        }
View Full Code Here

Examples of mage.players.Player.moveCardToExileWithInfo()

                TargetCard target = new TargetCard(Zone.HAND, filter);
                if (target.canChoose(source.getSourceId(), source.getControllerId(), game)
                        && controller.choose(Outcome.Benefit, controller.getHand(), target, game)) {
                    Card card = controller.getHand().get(target.getFirstTarget(), game);
                    if (card != null) {
                        controller.moveCardToExileWithInfo(card, source.getSourceId(), sourcePermanent.getLogName() +" (Imprint)", source.getSourceId(), game, Zone.HAND);
                        Permanent permanent = game.getPermanent(source.getSourceId());
                        if (permanent != null) {
                            permanent.imprint(card.getId(), game);
                            permanent.addInfo("imprint", CardUtil.addToolTipMarkTags("[Imprinted card - " + card.getLogName() + "]"));
                        }
View Full Code Here

Examples of mage.players.Player.moveCardToExileWithInfo()

                TargetCard target = new TargetCard(0, numCards, Zone.LIBRARY, new FilterCard("cards to exile"));
                player.choose(Outcome.Exile, cards, target, game);
                for (UUID cardId : target.getTargets()) {
                    Card card = cards.get(cardId, game);
                    if (card != null) {
                        player.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.LIBRARY);
                        cards.remove(card);
                    }
                }
                while (cards.size() > 1) {
                    target = new TargetCard(1, Zone.LIBRARY, new FilterCard("card to put on top of library (last put is first drawn)"));
View Full Code Here

Examples of mage.players.Player.moveCardToExileWithInfo()

        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            Permanent sourcePermanent = game.getPermanent(source.getSourceId());
            Permanent targetPermanent = game.getPermanent(source.getFirstTarget());
            if (targetPermanent != null) {
                controller.moveCardToExileWithInfo(targetPermanent, getId(), "Phyrexian Ingester (Imprint)",  source.getSourceId(), game, Zone.BATTLEFIELD);
                sourcePermanent.imprint(targetPermanent.getId(), game);
                return true;
            }           
        }
        return false;
View Full Code Here

Examples of mage.players.Player.moveCardToExileWithInfo()

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

Examples of mage.players.Player.moveCardToExileWithInfo()

    @Override
    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
                controller.moveCardToExileWithInfo(permanent, null, "", source.getSourceId(), game, Zone.HAND);
            }
            return true;
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.moveCardToExileWithInfo()

        if (sourcePermanent != null && controller != null && controller.getLibrary().size() > 0) {
            Library library = controller.getLibrary();
            Card card = library.removeFromTop(game);
            if (card != null) {
                String exileName = new StringBuilder(sourcePermanent.getName()).append(" <this card may be played the turn it was exiled>").toString();
                controller.moveCardToExileWithInfo(card, source.getSourceId(), exileName, source.getSourceId(), game, Zone.LIBRARY);
                ContinuousEffect effect = new PropheticFlamespeakerCastFromExileEffect();
                effect.setTargetPointer(new FixedTarget(card.getId()));
                game.addEffect(effect, source);
            }
            return true;
View Full Code Here

Examples of mage.players.Player.moveCardToExileWithInfo()

        MageObject sourceObject = game.getObject(source.getSourceId());
        if (controller != null && sourceObject != null) {
            Permanent permanent = game.getPermanent(source.getFirstTarget());
            if (permanent != null) {
                UUID exileId = UUID.randomUUID();
                if (controller.moveCardToExileWithInfo(permanent, exileId, sourceObject.getLogName(), source.getSourceId(), game, Zone.BATTLEFIELD)) {
                    //create delayed triggered ability
                    AtEndOfTurnDelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(new ReturnFromExileEffect(exileId, Zone.BATTLEFIELD, false));
                    delayedAbility.setSourceId(source.getSourceId());
                    delayedAbility.setControllerId(source.getControllerId());
                    game.addDelayedTriggeredAbility(delayedAbility);
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.