forked from External/mage
* Rag Dealer / Serene Reembrance - Fixed target handling for AI.
This commit is contained in:
parent
f43b3d1ee2
commit
9d5327da7a
6 changed files with 98 additions and 67 deletions
|
|
@ -576,6 +576,20 @@ public class ComputerPlayer<T extends ComputerPlayer<T>> extends PlayerImpl<T> i
|
|||
return target.isChosen();
|
||||
}
|
||||
|
||||
if (target instanceof TargetCardInASingleGraveyard) {
|
||||
List<Card> cards = new ArrayList<Card>();
|
||||
for (Player player: game.getPlayers().values()) {
|
||||
cards.addAll(player.getGraveyard().getCards(game));
|
||||
}
|
||||
while(!target.isChosen() && !cards.isEmpty()) {
|
||||
Card pick = pickTarget(cards, outcome, target, source, game);
|
||||
if (pick != null) {
|
||||
target.addTarget(pick.getId(), source, game);
|
||||
}
|
||||
}
|
||||
return target.isChosen();
|
||||
}
|
||||
|
||||
throw new IllegalStateException("Target wasn't handled. class:" + target.getClass().toString());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue