diff --git a/Mage.Sets/src/mage/sets/darkascension/FaithlessLooting.java b/Mage.Sets/src/mage/sets/darkascension/FaithlessLooting.java index 010a622016..1e690ccfa4 100644 --- a/Mage.Sets/src/mage/sets/darkascension/FaithlessLooting.java +++ b/Mage.Sets/src/mage/sets/darkascension/FaithlessLooting.java @@ -32,8 +32,7 @@ import java.util.UUID; import mage.constants.CardType; import mage.constants.Rarity; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.DiscardControllerEffect; -import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.abilities.keyword.FlashbackAbility; import mage.cards.CardImpl; import mage.constants.TimingRule; @@ -51,8 +50,7 @@ public class FaithlessLooting extends CardImpl { this.color.setRed(true); // Draw two cards, then discard two cards. - this.getSpellAbility().addEffect(new DrawCardControllerEffect(2)); - this.getSpellAbility().addEffect(new DiscardControllerEffect(2)); + this.getSpellAbility().addEffect(new DrawDiscardControllerEffect(2,2)); // Flashback {2}{R} this.addAbility(new FlashbackAbility(new ManaCostsImpl("{2}{R}"), TimingRule.SORCERY)); } diff --git a/Mage.Sets/src/mage/sets/odyssey/CarefulStudy.java b/Mage.Sets/src/mage/sets/odyssey/CarefulStudy.java index a4300e5440..35a5931270 100644 --- a/Mage.Sets/src/mage/sets/odyssey/CarefulStudy.java +++ b/Mage.Sets/src/mage/sets/odyssey/CarefulStudy.java @@ -27,13 +27,11 @@ */ package mage.sets.odyssey; +import java.util.UUID; +import mage.abilities.effects.common.DrawDiscardControllerEffect; +import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.abilities.effects.common.DiscardControllerEffect; -import mage.abilities.effects.common.DrawCardControllerEffect; -import mage.cards.CardImpl; - -import java.util.UUID; /** * @author magenoxx_at_gmail.com @@ -47,8 +45,7 @@ public class CarefulStudy extends CardImpl { this.color.setBlue(true); // Draw two cards, then discard two cards. - this.getSpellAbility().addEffect(new DrawCardControllerEffect(2)); - this.getSpellAbility().addEffect(new DiscardControllerEffect(2)); + this.getSpellAbility().addEffect(new DrawDiscardControllerEffect(2,2)); } public CarefulStudy(final CarefulStudy card) { diff --git a/Mage.Sets/src/mage/sets/returntoravnica/IzzetCharm.java b/Mage.Sets/src/mage/sets/returntoravnica/IzzetCharm.java index a7d65bb535..e476ae6e09 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/IzzetCharm.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/IzzetCharm.java @@ -34,8 +34,7 @@ import mage.abilities.Mode; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.CounterUnlessPaysEffect; import mage.abilities.effects.common.DamageTargetEffect; -import mage.abilities.effects.common.DiscardControllerEffect; -import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.cards.CardImpl; import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; @@ -73,8 +72,7 @@ public class IzzetCharm extends CardImpl { // or draw two cards, then discard two cards. mode = new Mode(); - mode.getEffects().add(new DrawCardControllerEffect(2)); - mode.getEffects().add(new DiscardControllerEffect(2)); + mode.getEffects().add(new DrawDiscardControllerEffect(2, 2)); this.getSpellAbility().addMode(mode); } diff --git a/Mage.Sets/src/mage/sets/returntoravnica/Thoughtflare.java b/Mage.Sets/src/mage/sets/returntoravnica/Thoughtflare.java index 54c4160b78..73e05f69a0 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/Thoughtflare.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/Thoughtflare.java @@ -28,10 +28,9 @@ package mage.sets.returntoravnica; import java.util.UUID; +import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.constants.CardType; import mage.constants.Rarity; -import mage.abilities.effects.common.DiscardControllerEffect; -import mage.abilities.effects.common.DrawCardControllerEffect; import mage.cards.CardImpl; /** @@ -47,8 +46,7 @@ public class Thoughtflare extends CardImpl { this.color.setRed(true); // Draw four cards, then discard two cards. - this.getSpellAbility().addEffect(new DrawCardControllerEffect(4)); - this.getSpellAbility().addEffect(new DiscardControllerEffect(2)); + this.getSpellAbility().addEffect(new DrawDiscardControllerEffect(4, 2)); } public Thoughtflare(final Thoughtflare card) { diff --git a/Mage.Sets/src/mage/sets/tenth/Sift.java b/Mage.Sets/src/mage/sets/tenth/Sift.java index 86655ccb4f..5a6f4fa78f 100644 --- a/Mage.Sets/src/mage/sets/tenth/Sift.java +++ b/Mage.Sets/src/mage/sets/tenth/Sift.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.constants.CardType; import mage.constants.Rarity; import mage.abilities.effects.common.DiscardControllerEffect; -import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.cards.CardImpl; /** @@ -47,8 +47,7 @@ public class Sift extends CardImpl { this.color.setBlue(true); // Draw three cards, then discard a card. - this.getSpellAbility().addEffect(new DrawCardControllerEffect(3)); - this.getSpellAbility().addEffect(new DiscardControllerEffect(1)); + this.getSpellAbility().addEffect(new DrawDiscardControllerEffect(3,1)); } public Sift(final Sift card) { diff --git a/Mage.Sets/src/mage/sets/urzaslegacy/FranticSearch.java b/Mage.Sets/src/mage/sets/urzaslegacy/FranticSearch.java index 78225e1f96..97705ef069 100644 --- a/Mage.Sets/src/mage/sets/urzaslegacy/FranticSearch.java +++ b/Mage.Sets/src/mage/sets/urzaslegacy/FranticSearch.java @@ -28,10 +28,9 @@ package mage.sets.urzaslegacy; import java.util.UUID; +import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.constants.CardType; import mage.constants.Rarity; -import mage.abilities.effects.common.DiscardControllerEffect; -import mage.abilities.effects.common.DrawCardControllerEffect; import mage.abilities.effects.common.UntapLandsEffect; import mage.cards.CardImpl; @@ -48,8 +47,7 @@ public class FranticSearch extends CardImpl { this.color.setBlue(true); // Draw two cards, then discard two cards. Untap up to three lands. - this.getSpellAbility().addEffect(new DrawCardControllerEffect(2)); - this.getSpellAbility().addEffect(new DiscardControllerEffect(2)); + this.getSpellAbility().addEffect(new DrawDiscardControllerEffect(2, 2)); this.getSpellAbility().addEffect(new UntapLandsEffect(3)); } diff --git a/Mage.Sets/src/mage/sets/urzassaga/Catalog.java b/Mage.Sets/src/mage/sets/urzassaga/Catalog.java index 89e3830c46..2f1d132b2c 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/Catalog.java +++ b/Mage.Sets/src/mage/sets/urzassaga/Catalog.java @@ -33,6 +33,7 @@ import mage.constants.Outcome; import mage.constants.Rarity; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.cards.CardImpl; import mage.game.Game; import mage.players.Player; @@ -49,7 +50,7 @@ public class Catalog extends CardImpl { this.color.setBlue(true); // Draw two cards, then discard a card. - this.getSpellAbility().addEffect(new CatalogEffect()); + this.getSpellAbility().addEffect(new DrawDiscardControllerEffect(2,1)); } public Catalog(final Catalog card) { @@ -61,31 +62,3 @@ public class Catalog extends CardImpl { return new Catalog(this); } } - -class CatalogEffect extends OneShotEffect { - - public CatalogEffect() { - super(Outcome.DrawCard); - this.staticText = "Draw two cards, then discard a card"; - } - - public CatalogEffect(final CatalogEffect effect) { - super(effect); - } - - @Override - public CatalogEffect copy() { - return new CatalogEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); - if (player != null) { - player.drawCards(2, game); - player.discard(1, source, game); - return true; - } - return false; - } -}