From 94b1472ad6847028f7053d35e647d0e5719e11cc Mon Sep 17 00:00:00 2001
From: Daniel Bomar <dbdaniel42@gmail.com>
Date: Thu, 3 Feb 2022 13:21:46 -0600
Subject: [PATCH] [NEO] Implemented Roadside Reliquary

---
 .../src/mage/cards/r/RoadsideReliquary.java   | 68 +++++++++++++++++++
 .../src/mage/sets/KamigawaNeonDynasty.java    |  1 +
 2 files changed, 69 insertions(+)
 create mode 100644 Mage.Sets/src/mage/cards/r/RoadsideReliquary.java

diff --git a/Mage.Sets/src/mage/cards/r/RoadsideReliquary.java b/Mage.Sets/src/mage/cards/r/RoadsideReliquary.java
new file mode 100644
index 0000000000..841cfbe676
--- /dev/null
+++ b/Mage.Sets/src/mage/cards/r/RoadsideReliquary.java
@@ -0,0 +1,68 @@
+package mage.cards.r;
+
+import java.util.UUID;
+
+import mage.abilities.Ability;
+import mage.abilities.common.SimpleActivatedAbility;
+import mage.abilities.condition.Condition;
+import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
+import mage.abilities.costs.common.SacrificeSourceCost;
+import mage.abilities.costs.common.TapSourceCost;
+import mage.abilities.costs.mana.GenericManaCost;
+import mage.abilities.decorator.ConditionalOneShotEffect;
+import mage.abilities.effects.common.DrawCardSourceControllerEffect;
+import mage.abilities.hint.ConditionHint;
+import mage.abilities.hint.Hint;
+import mage.abilities.mana.ColorlessManaAbility;
+import mage.cards.CardImpl;
+import mage.cards.CardSetInfo;
+import mage.constants.CardType;
+import mage.filter.StaticFilters;
+
+/**
+ *
+ * @author weirddan455
+ */
+public final class RoadsideReliquary extends CardImpl {
+
+    private static final Condition artifactCondition = new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_PERMANENT_ARTIFACT);
+    private static final Condition enchantmentCondition = new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT);
+    private static final Hint artifactHint = new ConditionHint(artifactCondition, "You control an artifact");
+    private static final Hint enchantmentHint = new ConditionHint(enchantmentCondition, "You control an enchantment");
+
+    public RoadsideReliquary(UUID ownerId, CardSetInfo setInfo) {
+        super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
+
+        // {T}: Add {C}.
+        this.addAbility(new ColorlessManaAbility());
+
+        // {2}, {T}, Sacrifice Roadside Reliquary: Draw a card if you control an artifact. Draw a card if you control an enchantment.
+        Ability ability = new SimpleActivatedAbility(
+                new ConditionalOneShotEffect(
+                        new DrawCardSourceControllerEffect(1),
+                        artifactCondition,
+                        "Draw a card if you control an artifact"
+                ),
+                new GenericManaCost(2)
+        );
+        ability.addCost(new TapSourceCost());
+        ability.addCost(new SacrificeSourceCost());
+        ability.addEffect(new ConditionalOneShotEffect(
+                new DrawCardSourceControllerEffect(1),
+                enchantmentCondition,
+                "Draw a card if you control an enchantment"
+        ));
+        ability.addHint(artifactHint);
+        ability.addHint(enchantmentHint);
+        this.addAbility(ability);
+    }
+
+    private RoadsideReliquary(final RoadsideReliquary card) {
+        super(card);
+    }
+
+    @Override
+    public RoadsideReliquary copy() {
+        return new RoadsideReliquary(this);
+    }
+}
diff --git a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java
index ca93576b53..1db51b153c 100644
--- a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java
+++ b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java
@@ -118,6 +118,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet {
         cards.add(new SetCardInfo("Reality Heist", 75, Rarity.UNCOMMON, mage.cards.r.RealityHeist.class));
         cards.add(new SetCardInfo("Reckoner Bankbuster", 255, Rarity.RARE, mage.cards.r.ReckonerBankbuster.class));
         cards.add(new SetCardInfo("Reito Sentinel", 256, Rarity.UNCOMMON, mage.cards.r.ReitoSentinel.class));
+        cards.add(new SetCardInfo("Roadside Reliquary", 272, Rarity.UNCOMMON, mage.cards.r.RoadsideReliquary.class));
         cards.add(new SetCardInfo("Satoru Umezawa", 234, Rarity.RARE, mage.cards.s.SatoruUmezawa.class));
         cards.add(new SetCardInfo("Satsuki, the Living Lore", 235, Rarity.RARE, mage.cards.s.SatsukiTheLivingLore.class));
         cards.add(new SetCardInfo("Scrap Welder", 159, Rarity.RARE, mage.cards.s.ScrapWelder.class));