From 5f61112a45da9321f04ce05d2bdeca4a2ed7f7c1 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 2 Jun 2021 21:59:57 -0400 Subject: [PATCH] [MH2] Implemented Revolutionist --- Mage.Sets/src/mage/cards/a/Archaeomancer.java | 19 +++----- Mage.Sets/src/mage/cards/r/Revolutionist.java | 48 +++++++++++++++++++ Mage.Sets/src/mage/sets/ModernHorizons2.java | 1 + 3 files changed, 56 insertions(+), 12 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/r/Revolutionist.java diff --git a/Mage.Sets/src/mage/cards/a/Archaeomancer.java b/Mage.Sets/src/mage/cards/a/Archaeomancer.java index e94afc39c5..7fa14cb679 100644 --- a/Mage.Sets/src/mage/cards/a/Archaeomancer.java +++ b/Mage.Sets/src/mage/cards/a/Archaeomancer.java @@ -1,25 +1,23 @@ package mage.cards.a; -import java.util.UUID; import mage.MageInt; +import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.filter.common.FilterInstantOrSorceryCard; -import mage.target.Target; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** - * * @author North */ public final class Archaeomancer extends CardImpl { - private static final FilterInstantOrSorceryCard filter = new FilterInstantOrSorceryCard("instant or sorcery card from your graveyard"); - public Archaeomancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); this.subtype.add(SubType.HUMAN); @@ -29,11 +27,8 @@ public final class Archaeomancer extends CardImpl { this.toughness = new MageInt(2); // When Archaeomancer enters the battlefield, return target instant or sorcery card from your graveyard to your hand. - EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility( - new ReturnToHandTargetEffect() - .setText("return target instant or sorcery card from your graveyard to your hand"), false); - Target target = new TargetCardInYourGraveyard(filter); - ability.addTarget(target); + Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect()); + ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY_FROM_YOUR_GRAVEYARD)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/Revolutionist.java b/Mage.Sets/src/mage/cards/r/Revolutionist.java new file mode 100644 index 0000000000..9fb5d4e2a0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/Revolutionist.java @@ -0,0 +1,48 @@ +package mage.cards.r; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.abilities.keyword.MadnessAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.StaticFilters; +import mage.target.common.TargetCardInYourGraveyard; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class Revolutionist extends CardImpl { + + public Revolutionist(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // When Revolutionist enters the battlefield, return target instant or sorcery card from your graveyard to your hand. + Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect()); + ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY_FROM_YOUR_GRAVEYARD)); + this.addAbility(ability); + + // Madness {3}{R} + this.addAbility(new MadnessAbility(this, new ManaCostsImpl<>("{3}{R}"))); + } + + private Revolutionist(final Revolutionist card) { + super(card); + } + + @Override + public Revolutionist copy() { + return new Revolutionist(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ModernHorizons2.java b/Mage.Sets/src/mage/sets/ModernHorizons2.java index f3160adb96..2db559761c 100644 --- a/Mage.Sets/src/mage/sets/ModernHorizons2.java +++ b/Mage.Sets/src/mage/sets/ModernHorizons2.java @@ -193,6 +193,7 @@ public final class ModernHorizons2 extends ExpansionSet { cards.add(new SetCardInfo("Ravenous Squirrel", 211, Rarity.UNCOMMON, mage.cards.r.RavenousSquirrel.class)); cards.add(new SetCardInfo("Raving Visionary", 56, Rarity.UNCOMMON, mage.cards.r.RavingVisionary.class)); cards.add(new SetCardInfo("Razortide Bridge", 252, Rarity.COMMON, mage.cards.r.RazortideBridge.class)); + cards.add(new SetCardInfo("Revolutionist", 139, Rarity.COMMON, mage.cards.r.Revolutionist.class)); cards.add(new SetCardInfo("Rift Sower", 170, Rarity.COMMON, mage.cards.r.RiftSower.class)); cards.add(new SetCardInfo("Riptide Laboratory", 303, Rarity.RARE, mage.cards.r.RiptideLaboratory.class)); cards.add(new SetCardInfo("Rishadan Dockhand", 59, Rarity.RARE, mage.cards.r.RishadanDockhand.class));