From 272b9d9da016865b4874bbc46ce02ef110ee874d Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 18 Jan 2021 07:36:04 -0500 Subject: [PATCH] [KHM] Implemented Demonic Gifts --- Mage.Sets/src/mage/cards/d/DemonicGifts.java | 44 ++++++++++++++++++++ Mage.Sets/src/mage/sets/Kaldheim.java | 1 + 2 files changed, 45 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/d/DemonicGifts.java diff --git a/Mage.Sets/src/mage/cards/d/DemonicGifts.java b/Mage.Sets/src/mage/cards/d/DemonicGifts.java new file mode 100644 index 0000000000..3de379cf37 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DemonicGifts.java @@ -0,0 +1,44 @@ +package mage.cards.d; + +import mage.abilities.common.DiesSourceTriggeredAbility; +import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class DemonicGifts extends CardImpl { + + public DemonicGifts(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}"); + + // Until end of turn, target creature gets +2/+0 and gains "When this creature dies, return it to the battlefield under its owner's control." + this.getSpellAbility().addEffect(new BoostTargetEffect( + 2, 0, Duration.EndOfTurn + ).setText("Until end of turn, target creature gets +2/+0")); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect( + new DiesSourceTriggeredAbility( + new ReturnSourceFromGraveyardToBattlefieldEffect(false, true), false + ), Duration.EndOfTurn, "and gains \"When this creature dies, " + + "return it to the battlefield under its owner's control.\"" + )); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + private DemonicGifts(final DemonicGifts card) { + super(card); + } + + @Override + public DemonicGifts copy() { + return new DemonicGifts(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Kaldheim.java b/Mage.Sets/src/mage/sets/Kaldheim.java index dd09d9b908..670f5ea94d 100644 --- a/Mage.Sets/src/mage/sets/Kaldheim.java +++ b/Mage.Sets/src/mage/sets/Kaldheim.java @@ -112,6 +112,7 @@ public final class Kaldheim extends ExpansionSet { cards.add(new SetCardInfo("Darkbore Pathway", 254, Rarity.RARE, mage.cards.d.DarkborePathway.class)); cards.add(new SetCardInfo("Deathknell Berserker", 83, Rarity.COMMON, mage.cards.d.DeathknellBerserker.class)); cards.add(new SetCardInfo("Demon Bolt", 129, Rarity.COMMON, mage.cards.d.DemonBolt.class)); + cards.add(new SetCardInfo("Demonic Gifts", 84, Rarity.COMMON, mage.cards.d.DemonicGifts.class)); cards.add(new SetCardInfo("Disdainful Stroke", 54, Rarity.COMMON, mage.cards.d.DisdainfulStroke.class)); cards.add(new SetCardInfo("Divine Gambit", 8, Rarity.UNCOMMON, mage.cards.d.DivineGambit.class)); cards.add(new SetCardInfo("Dogged Pursuit", 85, Rarity.COMMON, mage.cards.d.DoggedPursuit.class));