mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
[KHM] fixed Battle for Bretagard chapter III (fixes #7599)
This commit is contained in:
parent
8dde735851
commit
6cb8072352
1 changed files with 7 additions and 3 deletions
|
@ -133,9 +133,11 @@ class BattleForBretagardTarget extends TargetPermanent {
|
|||
Set<String> names = this.getTargets()
|
||||
.stream()
|
||||
.map(game::getPermanent)
|
||||
.map(MageObject::getName)
|
||||
.filter(Objects::nonNull)
|
||||
.map(MageObject::getName)
|
||||
.collect(Collectors.toSet());
|
||||
names.removeIf(Objects::isNull);
|
||||
names.removeIf(String::isEmpty);
|
||||
Permanent permanent = game.getPermanent(id);
|
||||
return permanent != null && !names.contains(permanent.getName());
|
||||
}
|
||||
|
@ -147,12 +149,14 @@ class BattleForBretagardTarget extends TargetPermanent {
|
|||
Set<String> names = this.getTargets()
|
||||
.stream()
|
||||
.map(game::getPermanent)
|
||||
.map(MageObject::getName)
|
||||
.filter(Objects::nonNull)
|
||||
.map(MageObject::getName)
|
||||
.collect(Collectors.toSet());
|
||||
names.removeIf(Objects::isNull);
|
||||
names.removeIf(String::isEmpty);
|
||||
possibleTargets.removeIf(uuid -> {
|
||||
Permanent permanent = game.getPermanent(uuid);
|
||||
return permanent != null && !names.contains(permanent.getName());
|
||||
return permanent == null || names.contains(permanent.getName());
|
||||
});
|
||||
return possibleTargets;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue