mirror of
https://github.com/correl/mage.git
synced 2025-01-13 19:11:33 +00:00
* Fixed AI game freeze on choose new targets (#5023);
This commit is contained in:
parent
3fa97d47c6
commit
03795f1aae
1 changed files with 5 additions and 0 deletions
|
@ -188,6 +188,11 @@ public abstract class StackObjImpl implements StackObject {
|
||||||
newTarget.clearChosen();
|
newTarget.clearChosen();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// workaround to stop infinite AI choose (remove after chooseTarget can be called with extra filter to disable some ids)
|
||||||
|
if (iteration > 10) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
while (targetController.canRespond() && (targetId.equals(newTarget.getFirstTarget()) || newTarget.getTargets().size() != 1));
|
while (targetController.canRespond() && (targetId.equals(newTarget.getFirstTarget()) || newTarget.getTargets().size() != 1));
|
||||||
// choose a new target
|
// choose a new target
|
||||||
|
|
Loading…
Reference in a new issue