diff --git a/Mage.Sets/src/mage/cards/d/DesculptingBlast.java b/Mage.Sets/src/mage/cards/d/DesculptingBlast.java new file mode 100644 index 00000000000..13ecce8e7cd --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DesculptingBlast.java @@ -0,0 +1,73 @@ +package mage.cards.d; + +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +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.game.permanent.Permanent; +import mage.game.permanent.token.DroneToken2; +import mage.players.Player; +import mage.target.common.TargetNonlandPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class DesculptingBlast extends CardImpl { + + public DesculptingBlast(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); + + // Return target nonland permanent to its owner's hand. If it was attacking, create a 1/1 colorless Drone artifact creature token with flying and "This token can block only creatures with flying." + this.getSpellAbility().addEffect(new DesculptingBlastEffect()); + this.getSpellAbility().addTarget(new TargetNonlandPermanent()); + } + + private DesculptingBlast(final DesculptingBlast card) { + super(card); + } + + @Override + public DesculptingBlast copy() { + return new DesculptingBlast(this); + } +} + +class DesculptingBlastEffect extends OneShotEffect { + + DesculptingBlastEffect() { + super(Outcome.Benefit); + staticText = "return target nonland permanent to its owner's hand. If it was attacking, " + + "create a 1/1 colorless Drone artifact creature token with flying and " + + "\"This token can block only creatures with flying.\""; + } + + private DesculptingBlastEffect(final DesculptingBlastEffect effect) { + super(effect); + } + + @Override + public DesculptingBlastEffect copy() { + return new DesculptingBlastEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (player == null || permanent == null) { + return false; + } + boolean flag = permanent.isAttacking(); + player.moveCards(permanent, Zone.HAND, source, game); + if (flag) { + new DroneToken2().putOntoBattlefield(1, game, source); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/EdgeOfEternities.java b/Mage.Sets/src/mage/sets/EdgeOfEternities.java index 94e5a2efea5..ab15c0c7d69 100644 --- a/Mage.Sets/src/mage/sets/EdgeOfEternities.java +++ b/Mage.Sets/src/mage/sets/EdgeOfEternities.java @@ -72,6 +72,7 @@ public final class EdgeOfEternities extends ExpansionSet { cards.add(new SetCardInfo("Dawnsire, Sunstar Dreadnought", 351, Rarity.MYTHIC, mage.cards.d.DawnsireSunstarDreadnought.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Debris Field Crusher", 131, Rarity.UNCOMMON, mage.cards.d.DebrisFieldCrusher.class)); cards.add(new SetCardInfo("Decode Transmissions", 94, Rarity.COMMON, mage.cards.d.DecodeTransmissions.class)); + cards.add(new SetCardInfo("Desculpting Blast", 54, Rarity.UNCOMMON, mage.cards.d.DesculptingBlast.class)); cards.add(new SetCardInfo("Drix Fatemaker", 178, Rarity.COMMON, mage.cards.d.DrixFatemaker.class)); cards.add(new SetCardInfo("Dyadrine, Synthesis Amalgam", 216, Rarity.RARE, mage.cards.d.DyadrineSynthesisAmalgam.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Dyadrine, Synthesis Amalgam", 298, Rarity.RARE, mage.cards.d.DyadrineSynthesisAmalgam.class, NON_FULL_USE_VARIOUS)); diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index e68d3964fcc..2500ea743d7 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -59136,6 +59136,7 @@ Sunstar Expansionist|Edge of Eternities|41|U|{1}{W}|Creature - Human Knight|2|3| Annul|Edge of Eternities|46|U|{U}|Instant|||Counter target artifact or enchantment spell.| Consult the Star Charts|Edge of Eternities|51|R|{1}{U}|Instant|||Kicker {1}{U}$Look at the top X cards of your library, where X is the number of lands you control. Put one of those cards into your hand. If this spell was kicked, put two of those cards into your hand instead. Put the rest on the bottom of your library in a random order.| Cryogen Relic|Edge of Eternities|52|C|{1}{U}|Artifact|||When this artifact enters or leaves the battlefield, draw a card.${1}{U}, Sacrifice this artifact: Put a stun counter on up to one target tapped creature.| +Desculpting Blast|Edge of Eternities|54|U|{1}{U}|Instant|||Return target nonland permanent to its owner's hand. If it was attacking, create a 1/1 colorless Drone artifact creature token with flying and "This token can block only creatures with flying."| Emissary Escort|Edge of Eternities|56|R|{1}{U}|Artifact Creature - Robot Soldier|0|4|This creature gets +X/+0, where X is the greatest mana value among other artifacts you control.| Illvoi Galeblade|Edge of Eternities|58|C|{U}|Creature - Jellyfish Warrior|1|1|Flash$Flying${2}, Sacrifice this creature: Draw a card.| Mechanozoa|Edge of Eternities|66|C|{4}{U}{U}|Artifact Creature - Robot Jellyfish|5|5|When this creature enters, tap target artifact or creature an opponent controls and put a stun counter on it.$Warp {2}{U}|