Player auto-choose respects required targets (#10557)

* Player auto-choose respects required targets
This commit is contained in:
Alexander Novotny 2023-07-03 20:02:46 -07:00 committed by GitHub
parent fae63d9d4b
commit fb8424556e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View file

@ -350,7 +350,7 @@ public abstract class TargetImpl implements Target {
}
} else {
// Try to autochoosen
UUID autoChosenId = tryToAutoChoose(playerId, source, game);
UUID autoChosenId = required ? tryToAutoChoose(playerId, source, game) : null;
if (autoChosenId != null) {
addTarget(autoChosenId, source, game);
} else if (!targetController.chooseTarget(outcome, this, source, game)) { // If couldn't autochoose ask player