diff --git a/Mage.Sets/src/mage/cards/d/DragonsApproach.java b/Mage.Sets/src/mage/cards/d/DragonsApproach.java new file mode 100644 index 0000000000..af58d8c642 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DragonsApproach.java @@ -0,0 +1,63 @@ +package mage.cards.d; + +import mage.abilities.costs.CompositeCost; +import mage.abilities.costs.common.ExileFromGraveCost; +import mage.abilities.costs.common.ExileSourceCost; +import mage.abilities.effects.common.DamagePlayersEffect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.InfoEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.target.common.TargetCardInLibrary; +import mage.target.common.TargetCardInYourGraveyard; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class DragonsApproach extends CardImpl { + + private static final FilterCard filter = new FilterCreatureCard("a Dragon creature card"); + private static final FilterCard filter2 = new FilterCard("cards named Dragon's Approach"); + + static { + filter.add(SubType.DRAGON.getPredicate()); + filter2.add(new NamePredicate("Dragon's Approach")); + } + + public DragonsApproach(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}"); + + // Dragon's Approach deals 3 damage to each opponent. You may exile Dragon's Approach and four cards named Dragon's Approach from your graveyard. If you do, search your library for a Dragon creature card, put it onto the battlefield, then shuffle. + this.getSpellAbility().addEffect(new DamagePlayersEffect(3, TargetController.OPPONENT)); + this.getSpellAbility().addEffect(new DoIfCostPaid( + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary()), + new CompositeCost( + new ExileSourceCost(), new ExileFromGraveCost(new TargetCardInYourGraveyard(filter2)), + "exile {this} and four cards named Dragon's Approach from your graveyard" + ) + )); + + // A deck can have any number of cards named Dragon's Approach. + this.getSpellAbility().addEffect(new InfoEffect( + "A deck can have any number of cards named Dragon's Approach." + ).concatBy("
")); + } + + private DragonsApproach(final DragonsApproach card) { + super(card); + } + + @Override + public DragonsApproach copy() { + return new DragonsApproach(this); + } +} diff --git a/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java b/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java index 75e6ef0acd..9cfe652958 100644 --- a/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java +++ b/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java @@ -81,6 +81,7 @@ public final class StrixhavenSchoolOfMages extends ExpansionSet { cards.add(new SetCardInfo("Dina, Soul Steeper", 178, Rarity.UNCOMMON, mage.cards.d.DinaSoulSteeper.class)); cards.add(new SetCardInfo("Divide by Zero", 41, Rarity.UNCOMMON, mage.cards.d.DivideByZero.class)); cards.add(new SetCardInfo("Double Major", 179, Rarity.RARE, mage.cards.d.DoubleMajor.class)); + cards.add(new SetCardInfo("Dragon's Approach", 97, Rarity.COMMON, mage.cards.d.DragonsApproach.class)); cards.add(new SetCardInfo("Dragonsguard Elite", 127, Rarity.RARE, mage.cards.d.DragonsguardElite.class)); cards.add(new SetCardInfo("Dramatic Finale", 180, Rarity.RARE, mage.cards.d.DramaticFinale.class)); cards.add(new SetCardInfo("Dream Strix", 42, Rarity.RARE, mage.cards.d.DreamStrix.class)); diff --git a/Mage/src/main/java/mage/cards/decks/Constructed.java b/Mage/src/main/java/mage/cards/decks/Constructed.java index da1a2928e1..27390a1dda 100644 --- a/Mage/src/main/java/mage/cards/decks/Constructed.java +++ b/Mage/src/main/java/mage/cards/decks/Constructed.java @@ -17,7 +17,8 @@ public class Constructed extends DeckValidator { private static final Logger logger = Logger.getLogger(DeckValidator.class); private static final List anyNumberCardsAllowed = new ArrayList<>(Arrays.asList( - "Relentless Rats", "Shadowborn Apostle", "Rat Colony", "Persistent Petitioners", "Seven Dwarves" + "Relentless Rats", "Shadowborn Apostle", "Rat Colony", + "Persistent Petitioners", "Seven Dwarves", "Dragon's Approach" )); protected static final List basicLandNames = new ArrayList<>(Arrays.asList( "Forest", "Island", "Mountain", "Swamp", "Plains", "Wastes", "Snow-Covered Forest",