@Override public boolean apply(Game game, Ability source) { Card creature = null; Player opponent = game.getPlayer(source.getFirstTarget()); CardsImpl cards = new CardsImpl(); boolean creatureFound = false; while (opponent.getLibrary().size() > 0 && !creatureFound) { Card card = opponent.getLibrary().removeFromTop(game); if (card != null) { if (card.getCardType().contains(CardType.CREATURE)) { creature = card; creatureFound = true; } if (!creatureFound) { cards.add(card); } } } if (!cards.isEmpty()) { opponent.revealCards("Telemin Performance", cards, game); opponent.moveCards(cards, Zone.GRAVEYARD, source, game); } if (creature != null) { return creature.putOntoBattlefield( game, Zone.LIBRARY, source.getSourceId(), source.getControllerId()); } return false; }