From 9d1ad256a5edfe7fe1ebfe2aeb4aed702d24a4f4 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Mon, 2 Oct 2023 14:12:56 +0400 Subject: [PATCH] Standard Bearer - fixed that cards with TargetsHaveToTargetPermanentIfAbleEffect can brake multi-modes cards (can be related to #9769) --- .../TargetsHaveToTargetPermanentIfAbleEffect.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/TargetsHaveToTargetPermanentIfAbleEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/TargetsHaveToTargetPermanentIfAbleEffect.java index da9f91c7199..c916dda521f 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/TargetsHaveToTargetPermanentIfAbleEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/TargetsHaveToTargetPermanentIfAbleEffect.java @@ -94,9 +94,10 @@ public class TargetsHaveToTargetPermanentIfAbleEffect extends ContinuousRuleModi if (!stackAbility.isControlledBy(targetingPlayer.getId())) { return false; } - Ability ability = (Ability) getValue("targetAbility"); - if (ability != null) { + Ability targetAbility = (Ability) getValue("targetAbility"); + if (targetAbility != null) { // Get all the allowed permanents on the battlefield in range of the abilities controller + Ability ability = targetAbility.copy(); // must use a copy for diff modes checking List allowedPermanents = game.getBattlefield().getActivePermanents(filter, event.getPlayerId(), source, game); if (!allowedPermanents.isEmpty()) { boolean canTargetAllowedPermanent = false;