Examples of moveToZone()


Examples of mage.cards.Card.moveToZone()

    player.searchLibrary(target, game);
        if (target.getTargets().size() > 0) {
            for (UUID cardId: (List<UUID>)target.getTargets()) {
                Card card = player.getLibrary().remove(cardId, game);
                if (card != null){
          card.moveToZone(Zone.HAND, source.getId(), game, false);
                }
            }
            player.shuffleLibrary(game);
        }
        return true;
View Full Code Here

Examples of mage.cards.Card.moveToZone()

    }
    TargetCard target1 = new TargetCard(Zone.PICK, filter1);
    while (cards.size() > 0 && player.choose(cards, target1, game)) {
      Card card = cards.get(target1.getFirstTarget(), game);
      cards.remove(card);
      card.moveToZone(Zone.LIBRARY, source.getId(), game, false);
      target1.clearChosen();
    }
    if (cards.size() > 1) {
      TargetCard target2 = new TargetCard(Zone.PICK, filter2);
      target2.setRequired(true);
View Full Code Here

Examples of mage.cards.Card.moveToZone()

      target2.setRequired(true);
      while (cards.size() > 1) {
        player.choose(cards, target2, game);
        Card card = cards.get(target2.getFirstTarget(), game);
        cards.remove(card);
        card.moveToZone(Zone.LIBRARY, source.getId(), game, true);
        target2.clearChosen();
      }
    }
    if (cards.size() == 1) {
      Card card = cards.get(cards.iterator().next(), game);
View Full Code Here

Examples of mage.cards.Card.moveToZone()

        target2.clearChosen();
      }
    }
    if (cards.size() == 1) {
      Card card = cards.get(cards.iterator().next(), game);
      card.moveToZone(Zone.LIBRARY, source.getId(), game, true);
    }
    return true;
  }

  @Override
View Full Code Here

Examples of mage.cards.Card.moveToZone()

  public boolean apply(Game game, Ability source) {
    Player player = game.getPlayer(source.getControllerId());
    Card card = player.getGraveyard().get(source.getSourceId(), game);
    if (card != null) {
      player.removeFromGraveyard(card, game);
      card.moveToZone(Zone.HAND, source.getId(), game, false);
      return true;
    }
    return false;
  }
View Full Code Here

Examples of mage.cards.Card.moveToZone()

  }

  protected boolean drawCard(Game game) {
    Card card = getLibrary().removeFromTop(game);
    if (card != null) {
      card.moveToZone(Zone.HAND, null, game, false);
      game.fireEvent(GameEvent.getEvent(GameEvent.EventType.DREW_CARD, card.getId(), playerId));
      return true;
    }
    return false;
  }
View Full Code Here

Examples of mage.cards.Card.moveToZone()

    Card card = game.getCard(ability.getSourceId());
    if (card != null) {
      if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.CAST_SPELL, ability.getId(), playerId))) {
        game.bookmarkState();
        removeFromHand(card, game);
        card.moveToZone(Zone.STACK, ability.getId(), game, false);
        Ability spellAbility = game.getStack().getSpell(ability.getId()).getSpellAbility();
        if (spellAbility.activate(game, noMana)) {
          for (KickerAbility kicker: card.getAbilities().getKickerAbilities()) {
            kicker.activate(game, false);
          }
View Full Code Here

Examples of mage.cards.Card.moveToZone()

    if (target.getTargets().size() > 0) {
      Cards revealed = new CardsImpl();
      for (UUID cardId: (List<UUID>)target.getTargets()) {
        Card card = player.getLibrary().remove(cardId, game);
        if (card != null) {
          card.moveToZone(Zone.HAND, source.getId(), game, false);
          revealed.add(card);
        }
      }
      player.shuffleLibrary(game);
      player.revealCards(revealed, game);
View Full Code Here

Examples of mage.cards.Card.moveToZone()

                if (card != null)
          cards.add(card);
            }
            player.shuffleLibrary(game);
      for (Card card: cards) {
        card.moveToZone(Zone.LIBRARY, source.getId(), game, true);
      }
        }
        return true;
    }
View Full Code Here

Examples of mage.cards.Card.moveToZone()

      case GRAVEYARD:
        Card card = game.getCard(source.getFirstTarget());
        for (Player player: game.getPlayers().values()) {
          if (player.getGraveyard().contains(card.getId())) {
            player.getGraveyard().remove(card);
            return card.moveToZone(Zone.LIBRARY, source.getId(), game, onTop);
          }
        }
    }
    return false;
  }
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.