From 6c4a5bbd587504a1def6e37239fa2d4ecb2ddb90 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 17 Jun 2019 17:15:07 -0400 Subject: [PATCH] Implemented Dread Presence --- Mage.Sets/src/mage/cards/d/DreadPresence.java | 58 +++++++++++++++++++ Mage.Sets/src/mage/sets/CoreSet2020.java | 1 + 2 files changed, 59 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/d/DreadPresence.java diff --git a/Mage.Sets/src/mage/cards/d/DreadPresence.java b/Mage.Sets/src/mage/cards/d/DreadPresence.java new file mode 100644 index 0000000000..a33b0f34e6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DreadPresence.java @@ -0,0 +1,58 @@ +package mage.cards.d; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.target.common.TargetAnyTarget; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class DreadPresence extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledPermanent(SubType.SWAMP, "a Swamp"); + + public DreadPresence(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + + this.subtype.add(SubType.NIGHTMARE); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Whenever a Swamp enters the battlefield under your control, choose one --- + // • You draw a card and you lose 1 life. + Ability ability = new EntersBattlefieldControlledTriggeredAbility( + new DrawCardSourceControllerEffect(1).setText("you draw a card"), filter + ); + ability.addEffect(new LoseLifeSourceControllerEffect(1).concatBy("and")); + + // • Dread Presence deals 2 damage to any target and you gain 2 life. + Mode mode = new Mode(new DamageTargetEffect(2)); + mode.addEffect(new GainLifeEffect(2).concatBy("and")); + mode.addTarget(new TargetAnyTarget()); + ability.addMode(mode); + this.addAbility(ability); + } + + private DreadPresence(final DreadPresence card) { + super(card); + } + + @Override + public DreadPresence copy() { + return new DreadPresence(this); + } +} diff --git a/Mage.Sets/src/mage/sets/CoreSet2020.java b/Mage.Sets/src/mage/sets/CoreSet2020.java index cc6b83d6cb..581f73a24e 100644 --- a/Mage.Sets/src/mage/sets/CoreSet2020.java +++ b/Mage.Sets/src/mage/sets/CoreSet2020.java @@ -32,5 +32,6 @@ public final class CoreSet2020 extends ExpansionSet { cards.add(new SetCardInfo("Chandra, Awakened Inferno", 127, Rarity.MYTHIC, mage.cards.c.ChandraAwakenedInferno.class)); cards.add(new SetCardInfo("Chandra, Novice Pyromancer", 128, Rarity.UNCOMMON, mage.cards.c.ChandraNovicePyromancer.class)); cards.add(new SetCardInfo("Cryptic Caves", 244, Rarity.UNCOMMON, mage.cards.c.CrypticCaves.class)); + cards.add(new SetCardInfo("Dread Presence", 96, Rarity.RARE, mage.cards.d.DreadPresence.class)); } }