diff --git a/Mage.Sets/src/mage/sets/odyssey/Decimate.java b/Mage.Sets/src/mage/sets/odyssey/Decimate.java index a5f40f1134..e4c7b92ee7 100644 --- a/Mage.Sets/src/mage/sets/odyssey/Decimate.java +++ b/Mage.Sets/src/mage/sets/odyssey/Decimate.java @@ -48,9 +48,8 @@ public class Decimate extends CardImpl { super(ownerId, 287, "Decimate", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{R}{G}"); this.expansionSetCode = "ODY"; - // Destroy target artifact, target creature, target enchantment, and target land. - Effect effect = new DestroyTargetEffect(); + Effect effect = new DestroyTargetEffect(false, true); effect.setText("Destroy target artifact, target creature, target enchantment, and target land."); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetArtifactPermanent()); diff --git a/Mage.Sets/src/mage/sets/planarchaos/BoomBust.java b/Mage.Sets/src/mage/sets/planarchaos/BoomBust.java index b73609a114..9bfd48af8f 100644 --- a/Mage.Sets/src/mage/sets/planarchaos/BoomBust.java +++ b/Mage.Sets/src/mage/sets/planarchaos/BoomBust.java @@ -25,32 +25,25 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.planarchaos; import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Rarity; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DestroyAllEffect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.SplitCard; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.constants.TargetController; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.permanent.ControllerPredicate; import mage.target.TargetPermanent; -/** - * - * @author LevelX2 - */ - - public class BoomBust extends SplitCard { private static final FilterLandPermanent filter1 = new FilterLandPermanent("land you control"); private static final FilterLandPermanent filter2 = new FilterLandPermanent("land you don't control"); + static { filter1.add(new ControllerPredicate(TargetController.YOU)); filter2.add(new ControllerPredicate(TargetController.NOT_YOU)); @@ -62,7 +55,7 @@ public class BoomBust extends SplitCard { // Boom // Destroy target land you control and target land you don't control. - Effect effect = new DestroyTargetEffect(); + Effect effect = new DestroyTargetEffect(false, true); effect.setText("Destroy target land you control and target land you don't control"); getLeftHalfCard().getSpellAbility().addEffect(effect); getLeftHalfCard().getSpellAbility().addTarget(new TargetPermanent(filter1)); diff --git a/Mage/src/mage/abilities/effects/common/DestroyTargetEffect.java b/Mage/src/mage/abilities/effects/common/DestroyTargetEffect.java index 57b73700ff..751ecc86e4 100644 --- a/Mage/src/mage/abilities/effects/common/DestroyTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/DestroyTargetEffect.java @@ -46,6 +46,7 @@ import mage.util.CardUtil; public class DestroyTargetEffect extends OneShotEffect { protected boolean noRegen; + protected boolean multitargetHandling; public DestroyTargetEffect() { this(false); @@ -57,13 +58,19 @@ public class DestroyTargetEffect extends OneShotEffect { } public DestroyTargetEffect(boolean noRegen) { + this(noRegen, false); + } + + public DestroyTargetEffect(boolean noRegen, boolean multitargetHandling) { super(Outcome.DestroyPermanent); this.noRegen = noRegen; + this.multitargetHandling = multitargetHandling; } public DestroyTargetEffect(final DestroyTargetEffect effect) { super(effect); this.noRegen = effect.noRegen; + this.multitargetHandling = effect.multitargetHandling; } @Override @@ -74,7 +81,7 @@ public class DestroyTargetEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { int affectedTargets = 0; - if (source.getTargets().size() > 1 && targetPointer instanceof FirstTargetPointer) { // Decimate + if (multitargetHandling && source.getTargets().size() > 1 && targetPointer instanceof FirstTargetPointer) { // Decimate for (Target target : source.getTargets()) { for (UUID permanentId : target.getTargets()) { Permanent permanent = game.getPermanent(permanentId);