Permanent perm = game.getPermanent(source.getSourceId());
if (perm != null) {
Player player = game.getPlayer(perm.getOwnerId());
if (player != null) {
perm.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
player.shuffleLibrary(game);
Cards cards = new CardsImpl();
while (true) {
Card card = player.getLibrary().removeFromTop(game);
if (card == null)
break;