diff --git a/Mage/src/main/java/mage/abilities/effects/keyword/SweepEffect.java b/Mage/src/main/java/mage/abilities/effects/keyword/SweepEffect.java index f46f6b7f2cf..229b7d8bea1 100644 --- a/Mage/src/main/java/mage/abilities/effects/keyword/SweepEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/keyword/SweepEffect.java @@ -32,7 +32,6 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardsImpl; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterPermanent; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -49,30 +48,16 @@ import mage.util.CardUtil; public class SweepEffect extends OneShotEffect { private final String sweepSubtype; - private FilterPermanent setFilter = null; - private boolean notTarget = true; public SweepEffect(String sweepSubtype) { super(Outcome.Benefit); this.sweepSubtype = sweepSubtype; this.staticText = "Sweep - Return any number of " + sweepSubtype + (sweepSubtype.endsWith("s") ? "" : "s") + " you control to their owner's hand"; } - - public SweepEffect(FilterPermanent filter, String text, boolean notTarget) { - super(Outcome.Benefit); - this.sweepSubtype = text; - this.staticText = "Return any number of " + text + " you control to their owner's hand"; - this.setFilter = filter; - this.notTarget = notTarget; - } - - public SweepEffect(final SweepEffect effect) { super(effect); this.sweepSubtype = effect.sweepSubtype; - this.setFilter = effect.setFilter; - this.notTarget = effect.notTarget; } @Override @@ -84,15 +69,9 @@ public class SweepEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - FilterPermanent filter; - if (setFilter == null) { - filter = new FilterControlledLandPermanent(new StringBuilder("any number of ").append(sweepSubtype).append("s you control").toString()); - filter.add(new SubtypePredicate(sweepSubtype)); - } else { - filter = setFilter; - } - - Target target = new TargetPermanent(0, Integer.MAX_VALUE, filter, notTarget); + FilterPermanent filter = new FilterControlledLandPermanent(new StringBuilder("any number of ").append(sweepSubtype).append("s you control").toString()); + filter.add(new SubtypePredicate(sweepSubtype)); + Target target = new TargetPermanent(0, Integer.MAX_VALUE, filter, true); if (controller.chooseTarget(outcome, target, source, game)) { game.getState().setValue(CardUtil.getCardZoneString("sweep", source.getSourceId(), game), target.getTargets().size()); controller.moveCards(new CardsImpl(target.getTargets()), Zone.HAND, source, game);