diff --git a/Mage.Sets/src/mage/cards/d/DidntSayPlease.java b/Mage.Sets/src/mage/cards/d/DidntSayPlease.java new file mode 100644 index 0000000000..f4e6a186b5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DidntSayPlease.java @@ -0,0 +1,69 @@ +package mage.cards.d; + +import mage.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetSpell; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class DidntSayPlease extends CardImpl { + + public DidntSayPlease(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}{U}"); + + // Counter target spell. Its controller puts the top three cards of their library into their graveyard. + this.getSpellAbility().addEffect(new DidntSayPleaseEffect()); + this.getSpellAbility().addTarget(new TargetSpell()); + } + + private DidntSayPlease(final DidntSayPlease card) { + super(card); + } + + @Override + public DidntSayPlease copy() { + return new DidntSayPlease(this); + } +} + +class DidntSayPleaseEffect extends OneShotEffect { + + private static final Effect effect = new CounterTargetEffect(); + + DidntSayPleaseEffect() { + super(Outcome.Benefit); + staticText = "Counter target spell. Its controller puts " + + "the top three cards of their library into their graveyard."; + } + + private DidntSayPleaseEffect(final DidntSayPleaseEffect effect) { + super(effect); + } + + @Override + public DidntSayPleaseEffect copy() { + return new DidntSayPleaseEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(game.getControllerId(source.getFirstTarget())); + if (player == null) { + return false; + } + player.moveCards(player.getLibrary().getTopCards(game, 3), Zone.GRAVEYARD, source, game); + return effect.apply(game, source); + } +} diff --git a/Mage.Sets/src/mage/cards/t/ThoughtCollapse.java b/Mage.Sets/src/mage/cards/t/ThoughtCollapse.java index e09ad3f024..ed4faf06f7 100644 --- a/Mage.Sets/src/mage/cards/t/ThoughtCollapse.java +++ b/Mage.Sets/src/mage/cards/t/ThoughtCollapse.java @@ -1,6 +1,7 @@ package mage.cards.t; import mage.abilities.Ability; +import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CounterTargetEffect; import mage.cards.CardImpl; @@ -39,6 +40,8 @@ public final class ThoughtCollapse extends CardImpl { class ThoughtCollapseEffect extends OneShotEffect { + private static final Effect effect = new CounterTargetEffect(); + ThoughtCollapseEffect() { super(Outcome.Benefit); staticText = "Counter target spell. Its controller puts " + @@ -61,6 +64,6 @@ class ThoughtCollapseEffect extends OneShotEffect { return false; } player.moveCards(player.getLibrary().getTopCards(game, 3), Zone.GRAVEYARD, source, game); - return new CounterTargetEffect().apply(game, source); + return effect.apply(game, source); } } \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index 1f3bf67db9..83b3490467 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -73,6 +73,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Curious Pair", 150, Rarity.COMMON, mage.cards.c.CuriousPair.class)); cards.add(new SetCardInfo("Dance of the Manse", 186, Rarity.RARE, mage.cards.d.DanceOfTheManse.class)); cards.add(new SetCardInfo("Deafening Silence", 10, Rarity.UNCOMMON, mage.cards.d.DeafeningSilence.class)); + cards.add(new SetCardInfo("Didn't Say Please", 42, Rarity.COMMON, mage.cards.d.DidntSayPlease.class)); cards.add(new SetCardInfo("Doom Foretold", 187, Rarity.RARE, mage.cards.d.DoomForetold.class)); cards.add(new SetCardInfo("Drown in the Loch", 188, Rarity.UNCOMMON, mage.cards.d.DrownInTheLoch.class)); cards.add(new SetCardInfo("Edgewall Innkeeper", 151, Rarity.UNCOMMON, mage.cards.e.EdgewallInnkeeper.class));