player.lookAtCards("Gift of the Gargantuan", cards, game);
if ((creatureCardFound || landCardFound) && player.chooseUse(Outcome.DrawCard, "Do you wish to reveal a creature card and/or a land card and put them into your hand?", game)) {
Cards revealedCards = new CardsImpl();
TargetCard target = new TargetCard(Zone.PICK, new FilterCreatureCard("creature card to reveal and put into your hand"));
if (creatureCardFound && player.choose(Outcome.DrawCard, cards, target, game)) {
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {
cards.remove(card);
card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
revealedCards.add(card);
}
}
target = new TargetCard(Zone.PICK, new FilterLandCard("land card to reveal and put into your hand"));
if (landCardFound && player.choose(Outcome.DrawCard, cards, target, game)) {
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {
cards.remove(card);
card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
revealedCards.add(card);
}
}
if (!revealedCards.isEmpty()) {
player.revealCards("Gift of the Gargantuan", revealedCards, game);
}
}
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on the bottom of your library"));
while (player.isInGame() && cards.size() > 1) {
player.choose(Outcome.Neutral, cards, target, game);
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {
cards.remove(card);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}
target.clearChosen();
}
if (cards.size() == 1) {
Card card = cards.get(cards.iterator().next(), game);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}