@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { if (controller.getLibrary().hasCards()) { Card card = controller.getLibrary().getFromBottom(game); if (card != null) { controller.moveCards(card, Zone.GRAVEYARD, source, game); if (card.isCreature()) { Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); if (sourcePermanent != null && card.getPower().getValue() <= sourcePermanent.getPower().getValue()) { controller.moveCards(card, Zone.BATTLEFIELD, source, game); } } } } return true; } return false; } }