forked from External/mage
AI: improved combat support:
* added support to attack battle permanents (#10246); * fixed that AI was able to attack multiple targets by single creature (#7434); * added docs; * added todos with another bugs or possible problems with AI combat;
This commit is contained in:
parent
6858d43547
commit
e4157fefb8
16 changed files with 239 additions and 89 deletions
|
|
@ -2710,6 +2710,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
@Override
|
||||
public void declareAttacker(UUID attackerId, UUID defenderId, Game game, boolean allowUndo) {
|
||||
if (allowUndo) {
|
||||
// TODO: allowUndo is smells bad, must be researched (what will be restored on allowUndo = false and why there are so diff usage), 2024-01-16
|
||||
setStoredBookmark(game.bookmarkState()); // makes it possible to UNDO a declared attacker with costs from e.g. Propaganda
|
||||
}
|
||||
Permanent attacker = game.getPermanent(attackerId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue