* Disciple of Phenax - It shows no longer an empty window, if target player has no cards in hand.

This commit is contained in:
LevelX2 2013-09-24 00:09:14 +02:00
parent 672567cd72
commit 957d420e8d

View file

@ -122,22 +122,25 @@ class DiscipleOfPhenaxEffect extends OneShotEffect<DiscipleOfPhenaxEffect> {
} }
} }
} }
if (!revealedCards.isEmpty()) {
targetPlayer.revealCards("Disciple of Phenax", revealedCards, game); targetPlayer.revealCards("Disciple of Phenax", revealedCards, game);
Player you = game.getPlayer(source.getControllerId());
Player you = game.getPlayer(source.getControllerId()); if (you != null) {
TargetCard yourChoice = new TargetCard(Zone.PICK, new FilterCard());
if (you != null) { yourChoice.setRequired(true);
TargetCard yourChoice = new TargetCard(Zone.PICK, new FilterCard()); yourChoice.setNotTarget(true);
yourChoice.setRequired(true); if (you.choose(Outcome.Benefit, revealedCards, yourChoice, game)) {
yourChoice.setNotTarget(true); Card card = targetPlayer.getHand().get(yourChoice.getFirstTarget(), game);
if (you.choose(Outcome.Benefit, revealedCards, yourChoice, game)) { if (card != null) {
Card card = targetPlayer.getHand().get(yourChoice.getFirstTarget(), game); return targetPlayer.discard(card, source, game);
if (card != null) { }
return targetPlayer.discard(card, source, game);
} }
} else {
return false;
} }
} }
return true;
} }
return false; return false;