mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
* Fixed a bug that the AI did not handle to target a card in its hand (e.g. Chrome Mox).
This commit is contained in:
parent
1758b62f58
commit
ae69986aef
3 changed files with 30 additions and 20 deletions
|
|
@ -322,9 +322,10 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
return target.isChosen();
|
||||
}
|
||||
|
||||
if (target instanceof TargetCardInHand) {
|
||||
if (target instanceof TargetCardInHand
|
||||
|| (target.getZone().equals(Zone.HAND) && (target instanceof TargetCard))) {
|
||||
List<Card> cards = new ArrayList<>();
|
||||
for (UUID cardId : ((TargetCardInHand) target).possibleTargets(sourceId, this.getId(), game)) {
|
||||
for (UUID cardId : target.possibleTargets(sourceId, this.getId(), game)) {
|
||||
Card card = game.getCard(cardId);
|
||||
if (card != null) {
|
||||
cards.add(card);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue