Examples of moveToZone()


Examples of mage.cards.Card.moveToZone()

  public boolean apply(Game game, Ability source) {
    ExileZone exile = game.getExile().getExileZone(exileId);
    if (exile != null) {
      for (UUID cardId: exile) {
        Card card = game.getCard(cardId);
        card.moveToZone(zone, source.getId(), game, tapped);
      }
      exile.clear();
      return true;
    }
    return false;
View Full Code Here

Examples of mage.cards.Card.moveToZone()

    }

    while (exile.size() > 0) {
      card = exile.getRandom(game);
      exile.remove(card.getId());
      card.moveToZone(Zone.LIBRARY, source.getId(), game, false);
    }

    return true;
  }
View Full Code Here

Examples of mage.cards.Card.moveToZone()

        revealed.remove(card);
        Permanent permanent = game.getPermanent(card.getId());
        if (permanent != null)
          permanent.setTapped(true);
        card = revealed.getCards(game).iterator().next();
        card.moveToZone(Zone.HAND, source.getId(), game, false);
      }
      else if (target.getTargets().size() == 1) {
        Card card = revealed.getCards(game).iterator().next();
        card.putOntoBattlefield(game, Zone.LIBRARY, source.getId(), source.getControllerId());
        Permanent permanent = game.getPermanent(card.getId());
View Full Code Here

Examples of mage.cards.Card.moveToZone()

      Card card = player.getLibrary().removeFromTop(game);
      Cards cards  = new CardsImpl();
      cards.add(card);
      player.revealCards(cards, game);
      if (card.getName().equals(cardChoice.getChoice())) {
        card.moveToZone(Zone.HAND, source.getId(), game, true);
      }
      else {
        card.moveToZone(Zone.LIBRARY, source.getId(), game, false);
      }
View Full Code Here

Examples of mage.cards.Card.moveToZone()

      player.revealCards(cards, game);
      if (card.getName().equals(cardChoice.getChoice())) {
        card.moveToZone(Zone.HAND, source.getId(), game, true);
      }
      else {
        card.moveToZone(Zone.LIBRARY, source.getId(), game, false);
      }

    }
    return true;
  }
View Full Code Here

Examples of mage.cards.Card.moveToZone()

      target.setRequired(true);
      player.choose(player.getHand(), target, game);
      Card card = player.getHand().get(target.getFirstTarget(), game);
      if (card != null) {
        player.removeFromHand(card, game);
        card.moveToZone(Zone.LIBRARY, source.getId(), game, true);
        player.getLibrary().shuffle();
        return true;
      }
    }
    return true;
View Full Code Here

Examples of mage.cards.Card.moveToZone()

      cards.add(player.getLibrary().getFromTop(game));
      controller.lookAtCards(cards, game);
      if (controller.chooseUse(outcome, "Do you wish to put card on the bottom of player's library?", game)) {
        Card card = player.getLibrary().removeFromTop(game);
        if (card != null) {
          card.moveToZone(Zone.LIBRARY, source.getId(), game, false);
        }
      }
      return true;
    }
    return false;
View Full Code Here

Examples of mage.cards.Card.moveToZone()

    target.setRequired(true);
    player.chooseTarget(Outcome.ReturnToHand, target, source, game);
    Card card = player.getHand().get(target.getFirstTarget(), game);
    if (card != null) {
      player.getHand().remove(card);
      card.moveToZone(Zone.LIBRARY, source.getId(), game, true);
    }
    return true;
  }

  @Override
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 = (Card)game.getObject(source.getFirstTarget());
    if (player.removeFromGraveyard(card, game)) {
      card.moveToZone(Zone.HAND, source.getId(), game, false);
      int damage = card.getManaCost().convertedManaCost();
      if (!card.getCardType().contains(CardType.LAND)) {
        Permanent permanent = game.getPermanent(source.getTargets().get(1).getTargets().get(0));
        if (permanent != null) {
          permanent.damage(damage, source.getSourceId(), game, true, false);
View Full Code Here

Examples of mage.cards.Card.moveToZone()

  public boolean apply(Game game, Ability source) {
    Player player = game.getPlayer(source.getControllerId());
    if (player.getLibrary().size() > 0) {
      if (player.getLibrary().size() == 1) {
        Card card = player.getLibrary().removeFromTop(game);
        card.moveToZone(Zone.HAND, source.getId(), game, false);
      }
      else {
        Cards cards = new CardsImpl(Zone.PICK);
        Card card = player.getLibrary().removeFromTop(game);
        cards.add(card);
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.