Examples of moveToZone()


Examples of mage.cards.Card.moveToZone()

        target.setRequired(true);
        player.lookAtCards(cards, game);
        player.choose(cards, target, game);
        card = cards.get(target.getFirstTarget(), game);
        if (card != null) {
          card.moveToZone(Zone.HAND, source.getId(), game, false);
          cards.remove(card);
        }
        for (Card card1: cards.getCards(game)) {
          card1.moveToZone(Zone.LIBRARY, source.getId(), game, false);
        }
View Full Code Here

Examples of mage.cards.Card.moveToZone()

      if (card != null) {
        cards.add(card);
        defender.revealCards(cards, game);
        if (card.getCardType().contains(CardType.LAND)) {
          defender.getLibrary().removeFromTop(game);
          card.moveToZone(Zone.HAND, source.getId(), game, true);
        }
      }
    }
    return false;
  }
View Full Code Here

Examples of mage.cards.Card.moveToZone()

  @Override
  public boolean apply(Game game, Ability source) {
    Player player = game.getPlayer(source.getControllerId());
    Card card = player.getLibrary().removeFromTop(game);
    if (card != null) {
      card.moveToZone(Zone.HAND, source.getId(), game, false);
      player.loseLife(card.getManaCost().convertedManaCost(), game);
      Cards cards = new CardsImpl();
      cards.add(card);
      player.revealCards(cards, game);
      return true;
View Full Code Here

Examples of mage.cards.Card.moveToZone()

                                break;
                            case EXILED:
                                controller.moveCardToExileWithInfo(card, null, "", sourceId, game, Zone.STACK);
                                break;
                            default:
                                card.moveToZone(targetZone, sourceId, game, flag);
                        }                       
                    } else {
                        return false;
                    }
                }
View Full Code Here

Examples of mage.cards.Card.moveToZone()

        if (player != null) {
            TargetCardInLibrary target = new TargetCardInLibrary();
            if (player.searchLibrary(target, game)) {
                Card card = game.getCard(target.getFirstTarget());
                if (card != null) {
                    card.moveToZone(Zone.HAND, id, game, false);
                    player.shuffleLibrary(game);
                }
            }
        }
        return true;
View Full Code Here

Examples of mage.cards.Card.moveToZone()

                        if (card != null) {
                            cards.remove(card);
                            if (targetZoneLookedCards.equals(Zone.BATTLEFIELD)) {
                                player.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId());
                            } else {
                                card.moveToZone(targetPickedCards, source.getSourceId(), game, false);
                                game.informPlayers(player.getName() + " moves a card to " + targetPickedCards.toString().toLowerCase());
                            }
                            if (revealPickedCards) {
                                reveal.add(card);
                            }
View Full Code Here

Examples of mage.cards.Card.moveToZone()

        if (player != null) {
            int cardsCount = Math.min(numberCards, player.getLibrary().size());
            for (int i = 0; i < cardsCount; i++) {
                Card card = player.getLibrary().removeFromTop(game);
                if (card != null) {
                    card.moveToZone(Zone.GRAVEYARD, source.getSourceId(), game, true);
                }
            }
        }
    }
View Full Code Here

Examples of mage.cards.Card.moveToZone()

                Card card = game.getCard(source.getSourceId());
                if (card != null) {
                    for (Player player : game.getPlayers().values()) {
                        if (player.getGraveyard().contains(card.getId())) {
                            player.getGraveyard().remove(card);
                            result |= card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, onTop);
                        }
                    }
                }
        }
        return result;
View Full Code Here

Examples of mage.cards.Card.moveToZone()

            if (player != null) {
                for (int i = 0; i<amount ; i++) {
                    if (player.getLibrary().size() > 0) {
                        Card card = player.getLibrary().removeFromTop(game);
                        if (card != null) {
                            card.moveToZone(Zone.GRAVEYARD, source.getSourceId(), game, false);
                       
                    }
                }
                return true;
            }
View Full Code Here

Examples of mage.cards.Card.moveToZone()

                Card card = game.getCard(cardId);
                Player owner = game.getPlayer(card.getOwnerId());
                if (owner != null) {
                    switch (zone) {
                        case BATTLEFIELD:
                            card.moveToZone(zone, source.getSourceId(), game, tapped);
                            game.informPlayers(new StringBuilder(controller.getName()).append(" moves ").append(card.getName()).append(" to ").append(zone.toString()).toString());
                            break;
                        case HAND:
                            controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.EXILED);
                            break;
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.