diff --git a/Mage/src/main/java/mage/abilities/AbilitiesImpl.java b/Mage/src/main/java/mage/abilities/AbilitiesImpl.java index 2c69d020bf..0bab0434c0 100644 --- a/Mage/src/main/java/mage/abilities/AbilitiesImpl.java +++ b/Mage/src/main/java/mage/abilities/AbilitiesImpl.java @@ -261,7 +261,15 @@ public class AbilitiesImpl extends ArrayList implements Ab @Override public boolean containsKey(UUID abilityId) { // TODO: remove - return stream().map(T::getId).anyMatch(abilityId::equals); + if (abilityId == null) { + return false; + } + for (T ability : this) { + if (ability != null && abilityId.equals(ability.getId())) { + return true; + } + } + return false; } @Override