* Goad all ability: fixed game error in some use cases (NPE fix)

This commit is contained in:
Oleg Agafonov 2023-03-25 14:54:40 +04:00
parent c96805a307
commit 22552ede47

View file

@ -59,7 +59,8 @@ public class GoadAllEffect extends ContinuousEffectImpl {
@Override
public boolean apply(Game game, Ability source) {
if (this.affectedObjectsSet) {
this.affectedObjectList.removeIf(mor -> !mor.zoneCounterIsCurrent(game));
this.affectedObjectList.removeIf(mor -> !mor.zoneCounterIsCurrent(game)
|| mor.getPermanent(game) == null);
if (affectedObjectList.isEmpty()) {
discard();
return false;