diff --git a/Mage.Sets/src/mage/cards/t/ToppleTheStatue.java b/Mage.Sets/src/mage/cards/t/ToppleTheStatue.java new file mode 100644 index 00000000000..f00e5f258d0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/ToppleTheStatue.java @@ -0,0 +1,68 @@ +package mage.cards.t; + +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ToppleTheStatue extends CardImpl { + + public ToppleTheStatue(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}"); + + // Tap target permanent. If it's an artifact, destroy it. + // Draw a card. + this.getSpellAbility().addEffect(new ToppleTheStatueEffect()); + this.getSpellAbility().addTarget(new TargetPermanent()); + } + + private ToppleTheStatue(final ToppleTheStatue card) { + super(card); + } + + @Override + public ToppleTheStatue copy() { + return new ToppleTheStatue(this); + } +} + +class ToppleTheStatueEffect extends OneShotEffect { + + ToppleTheStatueEffect() { + super(Outcome.Benefit); + staticText = "Tap target permanent. If it's an artifact, destroy it.
Draw a card."; + } + + private ToppleTheStatueEffect(final ToppleTheStatueEffect effect) { + super(effect); + } + + @Override + public ToppleTheStatueEffect copy() { + return new ToppleTheStatueEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent == null) { + return false; + } + permanent.tap(game); + if (permanent.isArtifact()) { + permanent.destroy(source.getSourceId(), game, false); + } + return new DrawCardSourceControllerEffect(1).apply(game, source); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/WarOfTheSpark.java b/Mage.Sets/src/mage/sets/WarOfTheSpark.java index 49467294431..a7a91a79479 100644 --- a/Mage.Sets/src/mage/sets/WarOfTheSpark.java +++ b/Mage.Sets/src/mage/sets/WarOfTheSpark.java @@ -169,6 +169,7 @@ public final class WarOfTheSpark extends ExpansionSet { cards.add(new SetCardInfo("Tibalt, Rakish Instigator", 146, Rarity.UNCOMMON, mage.cards.t.TibaltRakishInstigator.class)); cards.add(new SetCardInfo("Time Wipe", 223, Rarity.RARE, mage.cards.t.TimeWipe.class)); cards.add(new SetCardInfo("Tolsimir, Friend to Wolves", 224, Rarity.RARE, mage.cards.t.TolsimirFriendToWolves.class)); + cards.add(new SetCardInfo("Topple the Statue", 35, Rarity.COMMON, mage.cards.t.ToppleTheStatue.class)); cards.add(new SetCardInfo("Totally Lost", 74, Rarity.COMMON, mage.cards.t.TotallyLost.class)); cards.add(new SetCardInfo("Turret Ogre", 148, Rarity.COMMON, mage.cards.t.TurretOgre.class)); cards.add(new SetCardInfo("Vivien's Arkbow", 181, Rarity.RARE, mage.cards.v.ViviensArkbow.class));