Some more fixes

This commit is contained in:
Zzooouhh 2017-11-17 20:21:45 +01:00 committed by GitHub
parent 187b558b7b
commit 8154f04550
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -207,7 +207,7 @@ class BecameBlockedByOnlyOneCreatureWatcher extends Watcher {
}
}
else if (combatGroup.getBlockers().size() > 1) {
blockedByOneCreature.remove(combatGroup);
blockedByOneCreature.put(combatGroup, null);
}
}
}
@ -216,9 +216,11 @@ class BecameBlockedByOnlyOneCreatureWatcher extends Watcher {
public Set<CombatGroup> getBlockedOnlyByCreature(MageObjectReference creature) {
Set<CombatGroup> combatGroups = new HashSet<>();
for (Map.Entry<CombatGroup, MageObjectReference> entry : blockedByOneCreature.entrySet()) {
if (entry.getValue().equals(creature)) {
combatGroups.add(entry.getKey());
}
if (entry.getValue() != null) {
if (entry.getValue().equals(creature)) {
combatGroups.add(entry.getKey());
}
}
}
if (combatGroups.size() > 0) {
return combatGroups;