@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
VariableCost cost = new PayVariableLifeCost();
int xValue = cost.announceXValue(source, game);
cost.getFixedCostsFromAnnouncedValue(xValue).pay(source, game, source.getSourceId(), source.getControllerId(), true);
Cards cards = new CardsImpl(Zone.PICK);
int count = Math.min(player.getLibrary().size(), xValue);
for (int i = 0; i < count; i++) {
Card card = player.getLibrary().removeFromTop(game);