From 7eeb5c977f88f304db9537b42e936427087f3346 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 28 Oct 2020 17:10:25 -0400 Subject: [PATCH] [CMR] Implemented Demonic Lore --- Mage.Sets/src/mage/cards/d/DemonicLore.java | 46 +++++++++++++++++++ Mage.Sets/src/mage/sets/CommanderLegends.java | 1 + 2 files changed, 47 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/d/DemonicLore.java diff --git a/Mage.Sets/src/mage/cards/d/DemonicLore.java b/Mage.Sets/src/mage/cards/d/DemonicLore.java new file mode 100644 index 00000000000..700785c14d4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DemonicLore.java @@ -0,0 +1,46 @@ +package mage.cards.d; + +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.MultipliedValue; +import mage.abilities.dynamicvalue.common.CardsInControllerHandCount; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class DemonicLore extends CardImpl { + + private static final DynamicValue xValue = new MultipliedValue(CardsInControllerHandCount.instance, 2); + + public DemonicLore(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); + + // When Demonic Lore enters the battlefield, draw three cards. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(3))); + + // At the beginning of your end step, you lose 2 life for each card in your hand. + this.addAbility(new BeginningOfEndStepTriggeredAbility( + new LoseLifeSourceControllerEffect(xValue) + .setText("you lose 2 life for each card in your hand"), + TargetController.YOU, false + )); + } + + private DemonicLore(final DemonicLore card) { + super(card); + } + + @Override + public DemonicLore copy() { + return new DemonicLore(this); + } +} diff --git a/Mage.Sets/src/mage/sets/CommanderLegends.java b/Mage.Sets/src/mage/sets/CommanderLegends.java index f17797a7376..9f7351acf71 100644 --- a/Mage.Sets/src/mage/sets/CommanderLegends.java +++ b/Mage.Sets/src/mage/sets/CommanderLegends.java @@ -38,6 +38,7 @@ public final class CommanderLegends extends ExpansionSet { cards.add(new SetCardInfo("Command Tower", 350, Rarity.COMMON, mage.cards.c.CommandTower.class)); cards.add(new SetCardInfo("Commander's Sphere", 306, Rarity.COMMON, mage.cards.c.CommandersSphere.class)); cards.add(new SetCardInfo("Confiscate", 62, Rarity.UNCOMMON, mage.cards.c.Confiscate.class)); + cards.add(new SetCardInfo("Demonic Lore", 118, Rarity.UNCOMMON, mage.cards.d.DemonicLore.class)); cards.add(new SetCardInfo("Dragon Mantle", 174, Rarity.COMMON, mage.cards.d.DragonMantle.class)); cards.add(new SetCardInfo("Entourage of Trest", 224, Rarity.COMMON, mage.cards.e.EntourageOfTrest.class)); cards.add(new SetCardInfo("Exquisite Huntmaster", 122, Rarity.COMMON, mage.cards.e.ExquisiteHuntmaster.class));