forked from External/mage
Fixed a bug for AI target handling of TargetCardInHand.
This commit is contained in:
parent
b968e2b4c4
commit
58a05970e8
1 changed files with 6 additions and 4 deletions
|
|
@ -217,11 +217,13 @@ public class ComputerPlayer<T extends ComputerPlayer<T>> extends PlayerImpl<T> i
|
||||||
if (target instanceof TargetCardInHand) {
|
if (target instanceof TargetCardInHand) {
|
||||||
List<Card> cards = new ArrayList<Card>();
|
List<Card> cards = new ArrayList<Card>();
|
||||||
cards.addAll(this.hand.getCards(game));
|
cards.addAll(this.hand.getCards(game));
|
||||||
Card pick = pickTarget(cards, outcome, target, null, game);
|
while(!target.isChosen() && !cards.isEmpty()) {
|
||||||
if (pick != null) {
|
Card pick = pickTarget(cards, outcome, target, null, game);
|
||||||
target.add(pick.getId(), game);
|
if (pick != null) {
|
||||||
return true;
|
target.addTarget(pick.getId(), null, game);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return target.isChosen();
|
||||||
}
|
}
|
||||||
if (target instanceof TargetCreatureOrPlayer) {
|
if (target instanceof TargetCreatureOrPlayer) {
|
||||||
List<Permanent> targets;
|
List<Permanent> targets;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue