From e413990740fd053f34f54a631d8ce63b723495fc Mon Sep 17 00:00:00 2001 From: theelk801 Date: Fri, 27 Jan 2023 20:40:37 -0500 Subject: [PATCH] [ONE] Implement Myr Kinsmith --- Mage.Sets/src/mage/cards/m/MyrKinsmith.java | 47 +++++++++++++++++++ .../src/mage/sets/PhyrexiaAllWillBeOne.java | 1 + 2 files changed, 48 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/m/MyrKinsmith.java diff --git a/Mage.Sets/src/mage/cards/m/MyrKinsmith.java b/Mage.Sets/src/mage/cards/m/MyrKinsmith.java new file mode 100644 index 0000000000..4601b8aa8a --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MyrKinsmith.java @@ -0,0 +1,47 @@ +package mage.cards.m; + +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterCard; +import mage.target.common.TargetCardInLibrary; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class MyrKinsmith extends CardImpl { + + private static final FilterCard filter = new FilterCard("Myr card"); + + static { + filter.add(SubType.MYR.getPredicate()); + } + + public MyrKinsmith(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); + + this.subtype.add(SubType.MYR); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // When Myr Kinsmith enters the battlefield, you may search your library for a Myr card, reveal it, put it into your hand, then shuffle. + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect( + new TargetCardInLibrary(filter), true, true + ), true)); + } + + private MyrKinsmith(final MyrKinsmith card) { + super(card); + } + + @Override + public MyrKinsmith copy() { + return new MyrKinsmith(this); + } +} diff --git a/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java b/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java index 858be02588..0402e9522c 100644 --- a/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java +++ b/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java @@ -121,6 +121,7 @@ public final class PhyrexiaAllWillBeOne extends ExpansionSet { cards.add(new SetCardInfo("Monument to Perfection", 233, Rarity.RARE, mage.cards.m.MonumentToPerfection.class)); cards.add(new SetCardInfo("Mountain", 275, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Myr Convert", 234, Rarity.UNCOMMON, mage.cards.m.MyrConvert.class)); + cards.add(new SetCardInfo("Myr Kinsmith", 236, Rarity.COMMON, mage.cards.m.MyrKinsmith.class)); cards.add(new SetCardInfo("Necrogen Communion", 99, Rarity.UNCOMMON, mage.cards.n.NecrogenCommunion.class)); cards.add(new SetCardInfo("Necrogen Rotpriest", 212, Rarity.UNCOMMON, mage.cards.n.NecrogenRotpriest.class)); cards.add(new SetCardInfo("Nimraiser Paladin", 101, Rarity.UNCOMMON, mage.cards.n.NimraiserPaladin.class));