Combat.removeBlocker incorrectly ignored blockingGroups (Partial fix for #4172)

This commit is contained in:
Zzooouhh 2017-12-26 22:29:54 +01:00 committed by GitHub
parent 8228cee30c
commit 3de6f417dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);