Cards cardsInHand = new CardsImpl();
cardsInHand.addAll(targetPlayer.getHand());
int count = Math.min(cardsInHand.size(), payLife);
TargetCard target = new TargetCard(count, Zone.HAND, new FilterCard());
Cards revealedCards = new CardsImpl();
if (targetPlayer.chooseTarget(Outcome.Discard, cardsInHand, target, source, game)) {
List<UUID> targets = target.getTargets();
for (UUID targetId : targets) {
Card card = game.getCard(targetId);
if (card != null) {
revealedCards.add(card);
}
}
}
TargetCard targetInHand = new TargetCard(Zone.HAND, new FilterCard("card to exile"));
if (!revealedCards.isEmpty()) {
targetPlayer.revealCards(sourceCard.getName(), revealedCards, game);
controller.chooseTarget(Outcome.Exile, revealedCards, targetInHand, source, game);
Card card = revealedCards.get(targetInHand.getFirstTarget(), game);
if (card != null) {
controller.moveCardToExileWithInfo(card, null, null, source.getSourceId(), game, Zone.HAND);
}
}
return true;