From 7f6fc114117180c1777c830101655be89810ad06 Mon Sep 17 00:00:00 2001 From: Evan Kranzler <theelk801@gmail.com> Date: Thu, 7 Apr 2022 20:40:35 -0400 Subject: [PATCH] fixed test failures --- .../effects/common/continuous/BoostControlledEffect.java | 3 ++- .../effects/common/continuous/GainAbilityControlledEffect.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostControlledEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostControlledEffect.java index 2aa55dba17..c3acf90b58 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostControlledEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostControlledEffect.java @@ -92,7 +92,8 @@ public class BoostControlledEffect extends ContinuousEffectImpl { super.init(source, game); if (this.affectedObjectsSet) { for (Permanent perm : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source, game)) { - if (!(excludeSource && perm.getId().equals(source.getSourceId()))) { + if (perm.isControlledBy(source.getControllerId()) + && !(excludeSource && perm.getId().equals(source.getSourceId()))) { affectedObjectList.add(new MageObjectReference(perm, game)); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityControlledEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityControlledEffect.java index 92761081e9..eca20860e2 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityControlledEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityControlledEffect.java @@ -68,7 +68,8 @@ public class GainAbilityControlledEffect extends ContinuousEffectImpl { super.init(source, game); if (this.affectedObjectsSet) { for (Permanent perm : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source, game)) { - if (!(excludeSource && perm.getId().equals(source.getSourceId()))) { + if (perm.isControlledBy(source.getControllerId()) + && !(excludeSource && perm.getId().equals(source.getSourceId()))) { affectedObjectList.add(new MageObjectReference(perm, game)); } }