Attacking you abilities and filters - fixed that planeswalker removes from a combat can cause a game error (NPE error, example: Curse of Hospitality)

This commit is contained in:
Oleg Agafonov 2023-05-09 14:59:44 +04:00
parent 1f4dfd08ce
commit 9d9916280a
9 changed files with 68 additions and 6 deletions

View file

@ -2557,6 +2557,7 @@ public abstract class GameImpl implements Game {
.getGroups()
.stream()
.map(CombatGroup::getDefenderId)
.filter(Objects::nonNull)
.noneMatch(perm.getId()::equals)
&& this.getPlayer(perm.getProtectorId()) == null
|| perm.isControlledBy(perm.getProtectorId())) {