From a3836f6ec7287619ade5e8f5bc526da00aaded50 Mon Sep 17 00:00:00 2001 From: Neil Gentleman Date: Sun, 14 Feb 2016 16:24:13 -0800 Subject: [PATCH] Act of Aggression can only target opponent's creatures --- .../src/mage/sets/newphyrexia/ActOfAggression.java | 11 ++++++++++- .../common/continuous/GainControlTargetEffect.java | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/sets/newphyrexia/ActOfAggression.java b/Mage.Sets/src/mage/sets/newphyrexia/ActOfAggression.java index ccfa8c8bf28..ca9ec9eea61 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/ActOfAggression.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/ActOfAggression.java @@ -36,6 +36,9 @@ import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.common.continuous.GainControlTargetEffect; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; import mage.target.common.TargetCreaturePermanent; /** @@ -44,12 +47,18 @@ import mage.target.common.TargetCreaturePermanent; */ public class ActOfAggression extends CardImpl { + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + public ActOfAggression(UUID ownerId) { super(ownerId, 78, "Act of Aggression", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{3}{RP}{RP}"); this.expansionSetCode = "NPH"; - this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn)); this.getSpellAbility().addEffect(new UntapTargetEffect()); this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn)); diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/GainControlTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainControlTargetEffect.java index eec92fd8264..4f0e79921db 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/GainControlTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainControlTargetEffect.java @@ -67,7 +67,7 @@ public class GainControlTargetEffect extends ContinuousEffectImpl { /** * * @param duration - * @param controllingPlayerId Player that controlls the target creature + * @param controllingPlayerId Player that controls the target creature */ public GainControlTargetEffect(Duration duration, UUID controllingPlayerId) { this(duration, true, controllingPlayerId);