* 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> {
}
}
}
targetPlayer.revealCards("Disciple of Phenax", revealedCards, game);
Player you = game.getPlayer(source.getControllerId());
if (you != null) {
TargetCard yourChoice = new TargetCard(Zone.PICK, new FilterCard());
yourChoice.setRequired(true);
yourChoice.setNotTarget(true);
if (you.choose(Outcome.Benefit, revealedCards, yourChoice, game)) {
Card card = targetPlayer.getHand().get(yourChoice.getFirstTarget(), game);
if (card != null) {
return targetPlayer.discard(card, source, game);
if (!revealedCards.isEmpty()) {
targetPlayer.revealCards("Disciple of Phenax", revealedCards, game);
Player you = game.getPlayer(source.getControllerId());
if (you != null) {
TargetCard yourChoice = new TargetCard(Zone.PICK, new FilterCard());
yourChoice.setRequired(true);
yourChoice.setNotTarget(true);
if (you.choose(Outcome.Benefit, revealedCards, yourChoice, game)) {
Card card = targetPlayer.getHand().get(yourChoice.getFirstTarget(), game);
if (card != null) {
return targetPlayer.discard(card, source, game);
}
}
} else {
return false;
}
}
return true;
}
return false;