mirror of
https://github.com/correl/mage.git
synced 2024-12-26 19:16:54 +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) {
|
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) {
|
public Set<CombatGroup> getBlockedOnlyByCreature(MageObjectReference creature) {
|
||||||
Set<CombatGroup> combatGroups = new HashSet<>();
|
Set<CombatGroup> combatGroups = new HashSet<>();
|
||||||
for (Map.Entry<CombatGroup, MageObjectReference> entry : blockedByOneCreature.entrySet()) {
|
for (Map.Entry<CombatGroup, MageObjectReference> entry : blockedByOneCreature.entrySet()) {
|
||||||
if (entry.getValue().equals(creature)) {
|
if (entry.getValue() != null) {
|
||||||
combatGroups.add(entry.getKey());
|
if (entry.getValue().equals(creature)) {
|
||||||
}
|
combatGroups.add(entry.getKey());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (combatGroups.size() > 0) {
|
if (combatGroups.size() > 0) {
|
||||||
return combatGroups;
|
return combatGroups;
|
||||||
|
|
Loading…
Reference in a new issue