Package mage.players

Examples of mage.players.Player.moveCardToHandWithInfo()


                if (player != null) {
                    Target target = new TargetCardInYourGraveyard(0, 3, new FilterCard());
                    if (target.choose(Outcome.ReturnToHand, player.getId(), source.getSourceId(), game)) {
                        for (UUID targetId : target.getTargets()) {
                            Card card = game.getCard(targetId);
                            player.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.GRAVEYARD);
                        }
                    }
                }
            }
            return true;
View Full Code Here


                controller.choose(Outcome.ReturnToHand, target, source.getSourceId(), game);
                Permanent permanent = game.getPermanent(target.getFirstTarget());

                if ( permanent != null ) {
                    targetChosen = true;
                    controller.moveCardToHandWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD);
                }
            }

            if ( !targetChosen ) {
                new SacrificeSourceEffect().apply(game, source);
View Full Code Here

                cards.add(card);
                controller.revealCards(sourceObject.getLogName(), cards, game);
                if (card.getCardType().contains(CardType.LAND)) {
                    return controller.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId());
                } else {
                    return controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                }
            }
            return true;
        }
    }
View Full Code Here

                cards.add(card);
                controller.lookAtCards("Domri Rade", cards, game);
                if (card.getCardType().contains(CardType.CREATURE)) {
                    if (controller.chooseUse(outcome, new StringBuilder("Reveal ").append(card.getName()).append(" and put it into your hand?").toString(), game)) {
                        card = controller.getLibrary().removeFromTop(game);
                        controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                        controller.revealCards("Domri Rade", cards, game);
                    }
                }
                return true;
            }
View Full Code Here

                    Card card = revealed.get(target2.getFirstTarget(), game);

                    player.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId(), true);
                    revealed.remove(card);
                    card = revealed.getCards(game).iterator().next();
                    player.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                }
                else if (target.getTargets().size() == 1) {
                    Card card = revealed.getCards(game).iterator().next();
                    player.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId(), true);
                }
View Full Code Here

                Target target = new TargetControlledCreaturePermanent();
                target.setNotTarget(true);
                if (target.choose(Outcome.ReturnToHand, targetPlayer.getId(), source.getSourceId(), game)) {
                    Permanent permanent = game.getPermanent(target.getFirstTarget());
                    if (permanent != null) {
                        targetPlayer.moveCardToHandWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD);
                    }
                }

                // then repeats this process for an artifact,
                FilterControlledPermanent filter = new FilterControlledPermanent("artifact you control");
View Full Code Here

                target = new TargetControlledPermanent(filter);
                target.setNotTarget(true);
                if (target.choose(Outcome.ReturnToHand, targetPlayer.getId(), source.getSourceId(), game)) {
                    Permanent permanent = game.getPermanent(target.getFirstTarget());
                    if (permanent != null) {
                        targetPlayer.moveCardToHandWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD);
                    }
                }
               
                // an enchantment,
                filter = new FilterControlledPermanent("enchantment you control");
View Full Code Here

                target = new TargetControlledPermanent(filter);
                target.setNotTarget(true);
                if (target.choose(Outcome.ReturnToHand, targetPlayer.getId(), source.getSourceId(), game)) {
                    Permanent permanent = game.getPermanent(target.getFirstTarget());
                    if (permanent != null) {
                        targetPlayer.moveCardToHandWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD);
                    }
                }
               
                // and a land.
                filter = new FilterControlledPermanent("land you control");
View Full Code Here

                target = new TargetControlledPermanent(filter);
                target.setNotTarget(true);
                if (target.choose(Outcome.ReturnToHand, targetPlayer.getId(), source.getSourceId(), game)) {
                    Permanent permanent = game.getPermanent(target.getFirstTarget());
                    if (permanent != null) {
                        targetPlayer.moveCardToHandWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD);
                    }
                }
               
                return true;
            }
View Full Code Here

            if (cards.size() > 1
                    && you.choose(Outcome.DrawCard, cards, target, game)) {
                if (target != null) {
                    Card card = game.getCard(target.getFirstTarget());
                    if (card != null) {
                        return you.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.GRAVEYARD);
                    }
                }
            } else {
                for (Card card : cards.getCards(game)) {
                    return you.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.GRAVEYARD);
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.