From 8ed32d03f0a0980178dd1f9bb22e220967208dfc Mon Sep 17 00:00:00 2001 From: theelk801 Date: Tue, 23 Jul 2024 15:13:06 -0400 Subject: [PATCH] [BLB] Implement Dewdrop Cure --- Mage.Sets/src/mage/cards/d/DewdropCure.java | 58 +++++++++++++++++++++ Mage.Sets/src/mage/sets/Bloomburrow.java | 1 + 2 files changed, 59 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/d/DewdropCure.java diff --git a/Mage.Sets/src/mage/cards/d/DewdropCure.java b/Mage.Sets/src/mage/cards/d/DewdropCure.java new file mode 100644 index 00000000000..c12c75e8334 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DewdropCure.java @@ -0,0 +1,58 @@ +package mage.cards.d; + +import mage.abilities.condition.common.GiftWasPromisedCondition; +import mage.abilities.effects.common.InfoEffect; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.abilities.keyword.GiftAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.GiftType; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.mageobject.ManaValuePredicate; +import mage.target.common.TargetCardInYourGraveyard; +import mage.target.targetadjustment.ConditionalTargetAdjuster; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class DewdropCure extends CardImpl { + + private static final FilterCard filter + = new FilterCreatureCard("creature cards each with mana value 2 or less from your graveyard"); + + static { + filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 3)); + } + + public DewdropCure(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{W}"); + + // Gift a card + this.addAbility(new GiftAbility(this, GiftType.CARD)); + + // Return up to two target creature cards each with mana value 2 or less from your graveyard to the battlefield. If the gift was promised, instead return up to three target creature cards each with mana value 2 or less from your graveyard to the battlefield. + this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect()); + this.getSpellAbility().addEffect(new InfoEffect( + "If the gift was promised, instead return up to three target creature cards " + + "each with mana value 2 or less from your graveyard to the battlefield" + )); + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 2, filter)); + this.getSpellAbility().setTargetAdjuster(new ConditionalTargetAdjuster( + GiftWasPromisedCondition.TRUE, new TargetCardInYourGraveyard(0, 3, filter) + )); + } + + private DewdropCure(final DewdropCure card) { + super(card); + } + + @Override + public DewdropCure copy() { + return new DewdropCure(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Bloomburrow.java b/Mage.Sets/src/mage/sets/Bloomburrow.java index 5c7f72657f6..a2d5215cee4 100644 --- a/Mage.Sets/src/mage/sets/Bloomburrow.java +++ b/Mage.Sets/src/mage/sets/Bloomburrow.java @@ -65,6 +65,7 @@ public final class Bloomburrow extends ExpansionSet { cards.add(new SetCardInfo("Darkstar Augur", 90, Rarity.RARE, mage.cards.d.DarkstarAugur.class)); cards.add(new SetCardInfo("Dawn's Truce", 9, Rarity.RARE, mage.cards.d.DawnsTruce.class)); cards.add(new SetCardInfo("Dazzling Denial", 45, Rarity.COMMON, mage.cards.d.DazzlingDenial.class)); + cards.add(new SetCardInfo("Dewdrop Cure", 10, Rarity.UNCOMMON, mage.cards.d.DewdropCure.class)); cards.add(new SetCardInfo("Dire Downdraft", 46, Rarity.COMMON, mage.cards.d.DireDowndraft.class)); cards.add(new SetCardInfo("Diresight", 91, Rarity.COMMON, mage.cards.d.Diresight.class)); cards.add(new SetCardInfo("Downwind Ambusher", 92, Rarity.UNCOMMON, mage.cards.d.DownwindAmbusher.class));