diff --git a/Mage.Sets/src/mage/cards/g/GavonyDawnguard.java b/Mage.Sets/src/mage/cards/g/GavonyDawnguard.java new file mode 100644 index 00000000000..88f5cce5f93 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GavonyDawnguard.java @@ -0,0 +1,64 @@ +package mage.cards.g; + +import mage.MageInt; +import mage.abilities.common.BecomeDayAsEntersAbility; +import mage.abilities.common.BecomesDayOrNightTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; +import mage.abilities.keyword.WardAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.mageobject.ManaValuePredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class GavonyDawnguard extends CardImpl { + + private static final FilterCard filter = new FilterCreatureCard("creature card with mana value 3 or less"); + + static { + filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4)); + } + + public GavonyDawnguard(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Ward {1} + this.addAbility(new WardAbility(new ManaCostsImpl<>("{1}"))); + + // If it's neither day nor night, it becomes day as Gavony Dawnguard enters the battlefield. + this.addAbility(new BecomeDayAsEntersAbility()); + + // Whenever day becomes night or night becomes day, look at the top four cards of your library. You may reveal a creature card with mana value 3 or less from among them and put it into your hand. Put the rest on the bottom of your library in any order. + this.addAbility(new BecomesDayOrNightTriggeredAbility(new LookLibraryAndPickControllerEffect( + StaticValue.get(4), false, StaticValue.get(1), filter, Zone.LIBRARY, false, + true, false, Zone.HAND, true, false, false + ).setBackInRandomOrder(true).setText("look at the top four cards of your library. " + + "You may reveal a creature card with mana value 3 or less from among them " + + "and put it into your hand. Put the rest on the bottom of your library in any order"))); + } + + private GavonyDawnguard(final GavonyDawnguard card) { + super(card); + } + + @Override + public GavonyDawnguard copy() { + return new GavonyDawnguard(this); + } +} diff --git a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java index c37566d6bbe..fa190601acd 100644 --- a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java +++ b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java @@ -80,6 +80,7 @@ public final class InnistradMidnightHunt extends ExpansionSet { cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Foul Play", 101, Rarity.UNCOMMON, mage.cards.f.FoulPlay.class)); cards.add(new SetCardInfo("Galvanic Iteration", 224, Rarity.RARE, mage.cards.g.GalvanicIteration.class)); + cards.add(new SetCardInfo("Gavony Dawnguard", 20, Rarity.UNCOMMON, mage.cards.g.GavonyDawnguard.class)); cards.add(new SetCardInfo("Geistflame Reservoir", 142, Rarity.RARE, mage.cards.g.GeistflameReservoir.class)); cards.add(new SetCardInfo("Ghoulcaller's Harvest", 225, Rarity.RARE, mage.cards.g.GhoulcallersHarvest.class)); cards.add(new SetCardInfo("Grafted Identity", 57, Rarity.RARE, mage.cards.g.GraftedIdentity.class));