mirror of
https://github.com/correl/mage.git
synced 2025-04-06 17:00:12 -09:00
Fixed creatures that must attack being forced to attack players that have already lost the game
This commit is contained in:
parent
725c29182b
commit
eb03669989
1 changed files with 8 additions and 2 deletions
|
@ -451,8 +451,14 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
mustAttack = true;
|
||||
for (Ability ability : entry.getValue()) {
|
||||
UUID defenderId = effect.mustAttackDefender(ability, game);
|
||||
if (defenderId != null && defenders.contains(defenderId)) {
|
||||
defendersForcedToAttack.add(defenderId);
|
||||
|
||||
if (defenderId != null) {
|
||||
// creature is not forced to attack players that are no longer in the game
|
||||
if (game.getPermanentOrLKIBattlefield(defenderId) == null && game.getPlayer(defenderId).hasLost()) {
|
||||
return;
|
||||
} else if (defenders.contains(defenderId)) {
|
||||
defendersForcedToAttack.add(defenderId);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue