- Fixed mandatory targets not being enforced for the human.

This commit is contained in:
Sloth
2013-03-04 18:36:28 +00:00
parent 4f43f117a6
commit b3a2aab6e5

View File

@@ -411,13 +411,19 @@ public class TargetSelection {
// If reached Minimum targets, enable OK button
if (!tgt.isMinTargetsChosen(sa.getSourceCard(), sa) || tgt.isDividedAsYouChoose()) {
ButtonUtil.enableOnlyCancel();
if (mandatory && tgt.hasCandidates(sa, true)) {
// Player has to click on a target
ButtonUtil.disableAll();
} else {
ButtonUtil.enableOnlyCancel();
}
} else {
ButtonUtil.enableAllFocusOk();
}
if (mandatory && tgt.hasCandidates(sa, true)) {
ButtonUtil.enableOnlyOk();
if (mandatory && tgt.hasCandidates(sa, true)) {
// Player has to click on a target or ok
ButtonUtil.enableOnlyOk();
} else {
ButtonUtil.enableAllFocusOk();
}
}
}