- Fix for Bug #5435. Specific to "must attack" code.

This commit is contained in:
Jeff 2018-11-20 17:43:26 -06:00
parent 7c2738cf9f
commit c7a3e53083
3 changed files with 46 additions and 29 deletions

View file

@ -2372,7 +2372,9 @@ public abstract class PlayerImpl implements Player, Serializable {
setStoredBookmark(game.bookmarkState()); // makes it possible to UNDO a declared attacker with costs from e.g. Propaganda
}
Permanent attacker = game.getPermanent(attackerId);
if (attacker != null && attacker.canAttack(defenderId, game) && attacker.isControlledBy(playerId)) {
if (attacker != null
&& attacker.canAttack(defenderId, game)
&& attacker.isControlledBy(playerId)) {
if (!game.getCombat().declareAttacker(attackerId, defenderId, playerId, game)) {
game.undo(playerId);
}