mirror of
https://github.com/correl/mage.git
synced 2024-12-25 19:25:41 +00:00
Some more fixes
This commit is contained in:
parent
187b558b7b
commit
8154f04550
1 changed files with 6 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue