From 22552ede4747af880227edc96f43a6e3ca243f6d Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sat, 25 Mar 2023 14:54:40 +0400 Subject: [PATCH] * Goad all ability: fixed game error in some use cases (NPE fix) --- .../mage/abilities/effects/common/combat/GoadAllEffect.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/GoadAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/GoadAllEffect.java index cb01a0a7dd..bae67a892b 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/combat/GoadAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/GoadAllEffect.java @@ -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;