Exemple #1
0
  @Override
  public boolean apply(Game game, Ability source) {
    Player player = game.getPlayer(source.getControllerId());
    if (player == null) {
      return false;
    }

    Card card = player.getLibrary().getFromTop(game);
    if (card != null) {
      Cards cards = new CardsImpl();
      cards.add(card);
      player.lookAtCards("Explorer's Scope", cards, game);
      if (card.getCardType().contains(CardType.LAND)) {
        String message = "Put " + card.getName() + " onto the battlefield tapped?";
        if (player.chooseUse(Outcome.PutLandInPlay, message, game)) {
          if (card.putOntoBattlefield(
              game, Zone.LIBRARY, source.getId(), source.getControllerId())) {
            Permanent permanent = game.getPermanent(card.getId());
            if (permanent != null) {
              permanent.setTapped(true);
            }
          }
        }
      }
    }
    return true;
  }
 @Override
 public boolean replaceEvent(GameEvent event, Ability source, Game game) {
   Permanent target = game.getPermanent(event.getTargetId());
   if (target != null) {
     target.setTapped(true);
   }
   return false;
 }
Exemple #3
0
  @Override
  public boolean apply(Game game, Ability source) {

    Player player = game.getPlayer(source.getControllerId());

    for (Card card : player.getGraveyard().getCards(filterZombie, game)) {
      card.putOntoBattlefield(game, Zone.GRAVEYARD, source.getSourceId(), source.getControllerId());
      Permanent permanent = game.getPermanent(card.getId());
      if (permanent != null) {
        permanent.setTapped(true);
      }
    }
    for (Permanent permanent :
        game.getBattlefield().getActivePermanents(filterHuman, source.getControllerId(), game)) {
      permanent.destroy(source.getSourceId(), game, false);
    }
    return true;
  }
Exemple #4
0
  @Override
  public boolean apply(Game game, Ability source) {
    Player player = game.getPlayer(source.getControllerId());
    if (player == null || !player.chooseUse(Outcome.PutLandInPlay, choiceText, source, game)) {
      return false;
    }

    TargetCardInHand target = new TargetCardInHand(filter);
    if (player.choose(Outcome.PutLandInPlay, target, source.getSourceId(), game)) {
      Card card = game.getCard(target.getFirstTarget());
      if (card != null) {
        card.putOntoBattlefield(game, Zone.HAND, source.getSourceId(), source.getControllerId());
        Permanent permanent = game.getPermanent(card.getId());
        if (permanent != null) {
          permanent.setTapped(true);
        }
        return true;
      }
    }
    return false;
  }