diff --git a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java index 41c445b310..a665ab16a0 100644 --- a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java @@ -224,7 +224,12 @@ public class ComputerPlayer> extends PlayerImpl i } if (target instanceof TargetCardInHand) { List cards = new ArrayList<>(); - cards.addAll(this.hand.getCards(game)); + for (UUID cardId: ((TargetCardInHand)target).possibleTargets(this.getId(), hand, game)) { + Card card = game.getCard(cardId); + if (card != null) { + cards.add(card); + } + } while(!target.isChosen() && !cards.isEmpty()) { Card pick = pickTarget(cards, outcome, target, null, game); if (pick != null) {