mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 20:11:59 -08:00
Combat.removeBlocker incorrectly ignored blockingGroups (Partial fix for #4172)
This commit is contained in:
parent
8228cee30c
commit
3de6f417dc
1 changed files with 13 additions and 0 deletions
|
|
@ -1421,6 +1421,19 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
}
|
||||
}
|
||||
}
|
||||
boolean canRemove = false;
|
||||
for (CombatGroup group : getBlockingGroups()) {
|
||||
if (group.blockers.contains(blockerId)) {
|
||||
group.blockers.remove(blockerId);
|
||||
group.attackerOrder.clear();
|
||||
}
|
||||
if (group.blockers.isEmpty()) {
|
||||
canRemove = true;
|
||||
}
|
||||
}
|
||||
if (canRemove) {
|
||||
blockingGroups.remove(blockerId);
|
||||
}
|
||||
Permanent creature = game.getPermanent(blockerId);
|
||||
if (creature != null) {
|
||||
creature.setBlocking(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue