From cb0907c2ef499062df5e53552155a11f6eec1a18 Mon Sep 17 00:00:00 2001
From: Evan Kranzler <theelk801@gmail.com>
Date: Mon, 6 Apr 2020 08:38:26 -0400
Subject: [PATCH] Implemented Herald of the Forgotten

---
 .../mage/cards/h/HeraldOfTheForgotten.java    | 63 +++++++++++++++++++
 .../src/mage/sets/Commander2020Edition.java   |  1 +
 2 files changed, 64 insertions(+)
 create mode 100644 Mage.Sets/src/mage/cards/h/HeraldOfTheForgotten.java

diff --git a/Mage.Sets/src/mage/cards/h/HeraldOfTheForgotten.java b/Mage.Sets/src/mage/cards/h/HeraldOfTheForgotten.java
new file mode 100644
index 0000000000..253c9df3fa
--- /dev/null
+++ b/Mage.Sets/src/mage/cards/h/HeraldOfTheForgotten.java
@@ -0,0 +1,63 @@
+package mage.cards.h;
+
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.common.EntersBattlefieldTriggeredAbility;
+import mage.abilities.condition.common.CastFromEverywhereSourceCondition;
+import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
+import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
+import mage.abilities.keyword.CyclingAbility;
+import mage.abilities.keyword.FlyingAbility;
+import mage.cards.CardImpl;
+import mage.cards.CardSetInfo;
+import mage.constants.CardType;
+import mage.constants.SubType;
+import mage.filter.FilterCard;
+import mage.filter.common.FilterPermanentCard;
+import mage.filter.predicate.mageobject.AbilityPredicate;
+import mage.target.common.TargetCardInYourGraveyard;
+
+import java.util.UUID;
+
+/**
+ * @author TheElk801
+ */
+public final class HeraldOfTheForgotten extends CardImpl {
+
+    private static final FilterCard filter
+            = new FilterPermanentCard("permanent cards with cycling abilities from your graveyard");
+
+    static {
+        filter.add(new AbilityPredicate(CyclingAbility.class));
+    }
+
+    public HeraldOfTheForgotten(UUID ownerId, CardSetInfo setInfo) {
+        super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{W}{W}");
+
+        this.subtype.add(SubType.CAT);
+        this.subtype.add(SubType.BEAST);
+        this.power = new MageInt(6);
+        this.toughness = new MageInt(6);
+
+        // Flying
+        this.addAbility(FlyingAbility.getInstance());
+
+        // When Herald of the Forgotten enters the battlefield, if you cast it, return any number of target permanent cards with cycling abilities from your graveyard to the battlefield.
+        Ability ability = new ConditionalInterveningIfTriggeredAbility(
+                new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect()),
+                CastFromEverywhereSourceCondition.instance, "When {this} enters the battlefield, if you cast it, " +
+                "return any number of target permanent cards with cycling abilities from your graveyard to the battlefield."
+        );
+        ability.addTarget(new TargetCardInYourGraveyard(0, Integer.MAX_VALUE, filter));
+        this.addAbility(ability);
+    }
+
+    private HeraldOfTheForgotten(final HeraldOfTheForgotten card) {
+        super(card);
+    }
+
+    @Override
+    public HeraldOfTheForgotten copy() {
+        return new HeraldOfTheForgotten(this);
+    }
+}
diff --git a/Mage.Sets/src/mage/sets/Commander2020Edition.java b/Mage.Sets/src/mage/sets/Commander2020Edition.java
index 1f7db53b22..9b56e0b3a9 100644
--- a/Mage.Sets/src/mage/sets/Commander2020Edition.java
+++ b/Mage.Sets/src/mage/sets/Commander2020Edition.java
@@ -38,6 +38,7 @@ public final class Commander2020Edition extends ExpansionSet {
         cards.add(new SetCardInfo("Eternal Dragon", 88, Rarity.RARE, mage.cards.e.EternalDragon.class));
         cards.add(new SetCardInfo("Flawless Maneuver", 26, Rarity.RARE, mage.cards.f.FlawlessManeuver.class));
         cards.add(new SetCardInfo("Fluctuator", 241, Rarity.RARE, mage.cards.f.Fluctuator.class));
+        cards.add(new SetCardInfo("Herald of the Forgotten", 27, Rarity.RARE, mage.cards.h.HeraldOfTheForgotten.class));
         cards.add(new SetCardInfo("Jace, Architect of Thought", 114, Rarity.MYTHIC, mage.cards.j.JaceArchitectOfThought.class));
         cards.add(new SetCardInfo("Jirina Kudro", 8, Rarity.MYTHIC, mage.cards.j.JirinaKudro.class));
         cards.add(new SetCardInfo("Kathril, Aspect Warper", 10, Rarity.MYTHIC, mage.cards.k.KathrilAspectWarper.class));