}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
MageObject sourceObject = game.getObject(source.getSourceId());
if (sourceObject == null || controller == null) {
return false;
}
if (!controller.getLibrary().isEmptyDraw()) {
Card card = controller.getLibrary().getFromTop(game);
if (card == null) {
return false;
}
controller.lookAtCards(sourceObject.getLogName(), new CardsImpl(card), game);
boolean toBottom = controller.chooseUse(outcome, "Put card on the bottom of your library?", game);
return controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.LIBRARY, !toBottom, false);
}
return true;
}