mirror of
https://github.com/correl/mage.git
synced 2025-01-11 11:05:23 +00:00
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) {
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue