diff --git a/Mage.Sets/src/mage/cards/a/Arena.java b/Mage.Sets/src/mage/cards/a/Arena.java index 77897647db..9bbd8eeef0 100644 --- a/Mage.Sets/src/mage/cards/a/Arena.java +++ b/Mage.Sets/src/mage/cards/a/Arena.java @@ -58,7 +58,7 @@ public class Arena extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ArenaEffect(), new GenericManaCost(3)); ability.addCost(new TapSourceCost()); ability.addTarget(new TargetControlledCreaturePermanent()); - ability.addTarget(new TargetOpponentsChoicePermanent(new FilterControlledCreaturePermanent())); + ability.addTarget(new TargetOpponentsChoicePermanent(1, 1, new FilterControlledCreaturePermanent(), false, true)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/DiaochanArtfulBeauty.java b/Mage.Sets/src/mage/cards/d/DiaochanArtfulBeauty.java index 079a72c15e..00f50eb31d 100644 --- a/Mage.Sets/src/mage/cards/d/DiaochanArtfulBeauty.java +++ b/Mage.Sets/src/mage/cards/d/DiaochanArtfulBeauty.java @@ -64,7 +64,7 @@ public class DiaochanArtfulBeauty extends CardImpl { // {tap}: Destroy target creature of your choice, then destroy target creature of an opponent's choice. Activate this ability only during your turn, before attackers are declared. Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new DiaochanArtfulBeautyDestroyEffect(), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.getInstance()); ability.addTarget(new TargetCreaturePermanent()); - ability.addTarget(new TargetOpponentsChoicePermanent(new FilterCreaturePermanent())); + ability.addTarget(new TargetOpponentsChoicePermanent(1, 1, new FilterCreaturePermanent(), false, true)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/e/Evangelize.java b/Mage.Sets/src/mage/cards/e/Evangelize.java index 0ef72fa1de..74ad62887d 100644 --- a/Mage.Sets/src/mage/cards/e/Evangelize.java +++ b/Mage.Sets/src/mage/cards/e/Evangelize.java @@ -55,7 +55,7 @@ public class Evangelize extends CardImpl { GainControlTargetEffect effect = new GainControlTargetEffect(Duration.EndOfGame); effect.setText("Gain control of target creature of an opponent's choice that he or she controls"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetOpponentsChoicePermanent(1, 1, filter, false)); + this.getSpellAbility().addTarget(new TargetOpponentsChoicePermanent(1, 1, filter, false, true)); } public Evangelize(final Evangelize card) { diff --git a/Mage.Sets/src/mage/cards/m/MagusOfTheArena.java b/Mage.Sets/src/mage/cards/m/MagusOfTheArena.java index c772c80dfd..79082571e4 100644 --- a/Mage.Sets/src/mage/cards/m/MagusOfTheArena.java +++ b/Mage.Sets/src/mage/cards/m/MagusOfTheArena.java @@ -64,7 +64,7 @@ public class MagusOfTheArena extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new MagusOfTheArenaEffect(), new GenericManaCost(3)); ability.addCost(new TapSourceCost()); ability.addTarget(new TargetControlledCreaturePermanent()); - ability.addTarget(new TargetOpponentsChoicePermanent(new FilterControlledCreaturePermanent())); + ability.addTarget(new TargetOpponentsChoicePermanent(1, 1, new FilterControlledCreaturePermanent(), false, true)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/Preacher.java b/Mage.Sets/src/mage/cards/p/Preacher.java index 706d6b23a0..cf59a2aad1 100644 --- a/Mage.Sets/src/mage/cards/p/Preacher.java +++ b/Mage.Sets/src/mage/cards/p/Preacher.java @@ -69,7 +69,7 @@ public class Preacher extends CardImpl { // {tap}: Gain control of target creature of an opponent's choice that he or she controls for as long as Preacher remains tapped. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreacherEffect(), new TapSourceCost()); - ability.addTarget(new TargetOpponentsChoicePermanent(new FilterControlledCreaturePermanent())); + ability.addTarget(new TargetOpponentsChoicePermanent(1, 1, new FilterControlledCreaturePermanent(), false, true)); this.addAbility(ability); @@ -127,4 +127,4 @@ class PreacherEffect extends OneShotEffect { } return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/v/VolcanicOffering.java b/Mage.Sets/src/mage/cards/v/VolcanicOffering.java index ee3f2080f8..2313bd7358 100644 --- a/Mage.Sets/src/mage/cards/v/VolcanicOffering.java +++ b/Mage.Sets/src/mage/cards/v/VolcanicOffering.java @@ -86,12 +86,12 @@ public class VolcanicOffering extends CardImpl { FilterLandPermanent filterLandForOpponent = new FilterLandPermanent("nonbasic land not controlled by " + controller.getLogName()); filterLandForOpponent.add(Predicates.not(new SupertypePredicate("Basic"))); filterLandForOpponent.add(Predicates.not(new ControllerIdPredicate(controller.getId()))); - ability.addTarget(new TargetOpponentsChoicePermanent(filterLandForOpponent)); + ability.addTarget(new TargetOpponentsChoicePermanent(1, 1, filterLandForOpponent, false, true)); ability.addTarget(new TargetPermanent(filterCreature)); FilterCreaturePermanent filterCreatureForOpponent = new FilterCreaturePermanent("creature not controlled by " + controller.getLogName()); filterCreatureForOpponent.add(Predicates.not(new ControllerIdPredicate(controller.getId()))); - ability.addTarget(new TargetOpponentsChoicePermanent(filterCreatureForOpponent)); + ability.addTarget(new TargetOpponentsChoicePermanent(1, 1, filterCreatureForOpponent, false, true)); } } diff --git a/Mage/src/main/java/mage/target/common/TargetOpponentsChoicePermanent.java b/Mage/src/main/java/mage/target/common/TargetOpponentsChoicePermanent.java index 34cd992cd8..8169667f3b 100644 --- a/Mage/src/main/java/mage/target/common/TargetOpponentsChoicePermanent.java +++ b/Mage/src/main/java/mage/target/common/TargetOpponentsChoicePermanent.java @@ -21,20 +21,23 @@ import mage.target.TargetPermanent; public class TargetOpponentsChoicePermanent extends TargetPermanent { protected UUID opponentId = null; + private boolean dontTargetPlayer = false; public TargetOpponentsChoicePermanent(FilterPermanent filter) { super(1, 1, filter, false); this.targetName = filter.getMessage(); } - public TargetOpponentsChoicePermanent(int minNumTargets, int maxNumTargets, FilterPermanent filter, boolean notTarget) { + public TargetOpponentsChoicePermanent(int minNumTargets, int maxNumTargets, FilterPermanent filter, boolean notTarget, boolean dontTargetPlayer) { super(minNumTargets, maxNumTargets, filter, notTarget); this.targetName = filter.getMessage(); + this.dontTargetPlayer = dontTargetPlayer; } public TargetOpponentsChoicePermanent(final TargetOpponentsChoicePermanent target) { super(target); this.opponentId = target.opponentId; + this.dontTargetPlayer = target.dontTargetPlayer; } @Override @@ -79,7 +82,7 @@ public class TargetOpponentsChoicePermanent extends TargetPermanent { private UUID getOpponentId(UUID playerId, Ability source, Game game) { if (opponentId == null) { - TargetOpponent target = new TargetOpponent(); + TargetOpponent target = new TargetOpponent(dontTargetPlayer); Player player = game.getPlayer(playerId); if (player != null) { if (player.chooseTarget(Outcome.Detriment, target, source, game)) {