Fixed a bug for AI target handling of TargetCardInHand.

This commit is contained in:
LevelX2 2013-02-14 10:53:42 +01:00
parent b968e2b4c4
commit 58a05970e8

View file

@ -217,11 +217,13 @@ public class ComputerPlayer<T extends ComputerPlayer<T>> extends PlayerImpl<T> i
if (target instanceof TargetCardInHand) {
List<Card> cards = new ArrayList<Card>();
cards.addAll(this.hand.getCards(game));
Card pick = pickTarget(cards, outcome, target, null, game);
if (pick != null) {
target.add(pick.getId(), game);
return true;
while(!target.isChosen() && !cards.isEmpty()) {
Card pick = pickTarget(cards, outcome, target, null, game);
if (pick != null) {
target.addTarget(pick.getId(), null, game);
}
}
return target.isChosen();
}
if (target instanceof TargetCreatureOrPlayer) {
List<Permanent> targets;