forked from External/mage
other: reworked target selection (now it use same logic and methods in all places), fixed AI and selection freezes in some use cases (related to #13606, #11285)
This commit is contained in:
parent
62aa310a4f
commit
a53eb66b58
10 changed files with 133 additions and 53 deletions
|
|
@ -76,17 +76,20 @@ public class TargetCardInLibrary extends TargetCard {
|
|||
Cards cardsId = new CardsImpl();
|
||||
cards.forEach(cardsId::add);
|
||||
|
||||
chosen = targets.size() >= getMinNumberOfTargets();
|
||||
chosen = false;
|
||||
do {
|
||||
if (!player.canRespond()) {
|
||||
chosen = isChosen(game);
|
||||
return chosen;
|
||||
}
|
||||
if (!player.chooseTarget(outcome, cardsId, this, source, game)) {
|
||||
chosen = isChosen(game);
|
||||
return chosen;
|
||||
}
|
||||
chosen = targets.size() >= getMinNumberOfTargets();
|
||||
} while (!isChosen(game) && !doneChoosing(game));
|
||||
return chosen;
|
||||
chosen = isChosen(game);
|
||||
} while (!doneChoosing(game));
|
||||
|
||||
return isChosen(game);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue