mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 19:11:59 -08:00
Standard Bearer - fixed that cards with TargetsHaveToTargetPermanentIfAbleEffect can brake multi-modes cards (can be related to #9769)
This commit is contained in:
parent
d9ca387fad
commit
9d1ad256a5
1 changed files with 3 additions and 2 deletions
|
|
@ -94,9 +94,10 @@ public class TargetsHaveToTargetPermanentIfAbleEffect extends ContinuousRuleModi
|
||||||
if (!stackAbility.isControlledBy(targetingPlayer.getId())) {
|
if (!stackAbility.isControlledBy(targetingPlayer.getId())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Ability ability = (Ability) getValue("targetAbility");
|
Ability targetAbility = (Ability) getValue("targetAbility");
|
||||||
if (ability != null) {
|
if (targetAbility != null) {
|
||||||
// Get all the allowed permanents on the battlefield in range of the abilities controller
|
// 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<Permanent> allowedPermanents = game.getBattlefield().getActivePermanents(filter, event.getPlayerId(), source, game);
|
List<Permanent> allowedPermanents = game.getBattlefield().getActivePermanents(filter, event.getPlayerId(), source, game);
|
||||||
if (!allowedPermanents.isEmpty()) {
|
if (!allowedPermanents.isEmpty()) {
|
||||||
boolean canTargetAllowedPermanent = false;
|
boolean canTargetAllowedPermanent = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue