From 1c49100d7505e69a8e0c251020471457e379e634 Mon Sep 17 00:00:00 2001 From: spjspj Date: Thu, 8 Sep 2016 17:31:42 +1000 Subject: [PATCH] spjspj - Implement Paradoxical Outcome (KLD) - shroud wasn't being followed --- Mage.Sets/src/mage/sets/kaladesh/ParadoxicalOutcome.java | 2 +- .../java/mage/abilities/effects/keyword/SweepEffect.java | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/sets/kaladesh/ParadoxicalOutcome.java b/Mage.Sets/src/mage/sets/kaladesh/ParadoxicalOutcome.java index 6c36ba2842..d03487a6fe 100644 --- a/Mage.Sets/src/mage/sets/kaladesh/ParadoxicalOutcome.java +++ b/Mage.Sets/src/mage/sets/kaladesh/ParadoxicalOutcome.java @@ -56,7 +56,7 @@ public class ParadoxicalOutcome extends CardImpl { filter.add(Predicates.not(new CardTypePredicate(CardType.LAND))); filter.add(Predicates.not(new TokenPredicate())); - this.getSpellAbility().addEffect(new SweepEffect(filter, "nonland, nontoken permanents ")); + this.getSpellAbility().addEffect(new SweepEffect(filter, "nonland, nontoken permanents ", false)); DynamicValue paradoxicalOutcomeValue = new SweepNumber("nonland, nontoken permanents ", false); this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(paradoxicalOutcomeValue)); } 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 dc047692eb..f46f6b7f2c 100644 --- a/Mage/src/main/java/mage/abilities/effects/keyword/SweepEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/keyword/SweepEffect.java @@ -50,6 +50,7 @@ public class SweepEffect extends OneShotEffect { private final String sweepSubtype; private FilterPermanent setFilter = null; + private boolean notTarget = true; public SweepEffect(String sweepSubtype) { super(Outcome.Benefit); @@ -57,11 +58,12 @@ public class SweepEffect extends OneShotEffect { 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) { + 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; } @@ -70,6 +72,7 @@ public class SweepEffect extends OneShotEffect { super(effect); this.sweepSubtype = effect.sweepSubtype; this.setFilter = effect.setFilter; + this.notTarget = effect.notTarget; } @Override @@ -89,7 +92,7 @@ public class SweepEffect extends OneShotEffect { filter = setFilter; } - Target target = new TargetPermanent(0, Integer.MAX_VALUE, filter, true); + Target target = new TargetPermanent(0, Integer.MAX_VALUE, filter, notTarget); 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);