From e0203d26fb9cddb0c1705743939de38ffd00a517 Mon Sep 17 00:00:00 2001
From: Evan Kranzler <theelk801@gmail.com>
Date: Sun, 29 May 2022 20:50:12 -0400
Subject: [PATCH] [CLB] Implemented Draconic Lore

---
 Mage.Sets/src/mage/cards/d/DraconicLore.java  | 51 +++++++++++++++++++
 .../CommanderLegendsBattleForBaldursGate.java |  1 +
 2 files changed, 52 insertions(+)
 create mode 100644 Mage.Sets/src/mage/cards/d/DraconicLore.java

diff --git a/Mage.Sets/src/mage/cards/d/DraconicLore.java b/Mage.Sets/src/mage/cards/d/DraconicLore.java
new file mode 100644
index 0000000000..c0044bb82b
--- /dev/null
+++ b/Mage.Sets/src/mage/cards/d/DraconicLore.java
@@ -0,0 +1,51 @@
+package mage.cards.d;
+
+import mage.abilities.Ability;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.condition.Condition;
+import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
+import mage.abilities.effects.common.DrawCardSourceControllerEffect;
+import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect;
+import mage.abilities.hint.ConditionHint;
+import mage.abilities.hint.Hint;
+import mage.cards.CardImpl;
+import mage.cards.CardSetInfo;
+import mage.constants.CardType;
+import mage.constants.SubType;
+import mage.constants.Zone;
+import mage.filter.common.FilterControlledPermanent;
+
+import java.util.UUID;
+
+/**
+ * @author TheElk801
+ */
+public final class DraconicLore extends CardImpl {
+
+    private static final Condition condition = new PermanentsOnTheBattlefieldCondition(
+            new FilterControlledPermanent(SubType.DRAGON, "you control a Dragon")
+    );
+    private static final Hint hint = new ConditionHint(condition, "You control a Dragon");
+
+    public DraconicLore(UUID ownerId, CardSetInfo setInfo) {
+        super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{5}{U}");
+
+        // This spell costs {2} less to cast if you control a Dragon.
+        Ability ability = new SimpleStaticAbility(Zone.ALL, new SpellCostReductionSourceEffect(2, condition));
+        ability.setRuleAtTheTop(true);
+        ability.addHint(hint);
+        this.addAbility(ability);
+
+        // Draw three cards.
+        this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(3));
+    }
+
+    private DraconicLore(final DraconicLore card) {
+        super(card);
+    }
+
+    @Override
+    public DraconicLore copy() {
+        return new DraconicLore(this);
+    }
+}
diff --git a/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java b/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java
index 0e0438fa68..a3114864ea 100644
--- a/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java
+++ b/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java
@@ -88,6 +88,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet {
         cards.add(new SetCardInfo("Deadly Dispute", 124, Rarity.COMMON, mage.cards.d.DeadlyDispute.class));
         cards.add(new SetCardInfo("Decanter of Endless Water", 309, Rarity.COMMON, mage.cards.d.DecanterOfEndlessWater.class));
         cards.add(new SetCardInfo("Displacer Kitten", 63, Rarity.RARE, mage.cards.d.DisplacerKitten.class));
+        cards.add(new SetCardInfo("Draconic Lore", 64, Rarity.COMMON, mage.cards.d.DraconicLore.class));
         cards.add(new SetCardInfo("Draconic Muralists", 224, Rarity.UNCOMMON, mage.cards.d.DraconicMuralists.class));
         cards.add(new SetCardInfo("Dragonborn Looter", 65, Rarity.COMMON, mage.cards.d.DragonbornLooter.class));
         cards.add(new SetCardInfo("Dread Linnorm", 225, Rarity.COMMON, mage.cards.d.DreadLinnorm.class));