From c610807d514cc7a6ecde3932a6093ea8f21be099 Mon Sep 17 00:00:00 2001 From: "Raphael \"who?!\" Kehldorfer" Date: Fri, 17 Sep 2021 14:11:33 +0200 Subject: [PATCH] [MID] Implemented Dennick, Pious Apprentice // Dennick, Pious Apparition (#8279) * [MID] Implemented Dennick, Pious Apprentice // Dennick, Pious Apparition * [MID] Refactored Dennick, Pious Apprentice // Dennick, Pious Apparition * small change Co-authored-by: Evan Kranzler --- .../mage/cards/d/DennickPiousApparition.java | 53 ++++++++++++++++++ .../mage/cards/d/DennickPiousApprentice.java | 55 +++++++++++++++++++ .../src/mage/sets/InnistradMidnightHunt.java | 2 + 3 files changed, 110 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/d/DennickPiousApparition.java create mode 100644 Mage.Sets/src/mage/cards/d/DennickPiousApprentice.java diff --git a/Mage.Sets/src/mage/cards/d/DennickPiousApparition.java b/Mage.Sets/src/mage/cards/d/DennickPiousApparition.java new file mode 100644 index 0000000000..ec7c305155 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DennickPiousApparition.java @@ -0,0 +1,53 @@ +package mage.cards.d; + +import mage.MageInt; +import mage.abilities.common.PutCardIntoGraveFromAnywhereAllTriggeredAbility; +import mage.abilities.common.PutIntoGraveFromAnywhereSourceAbility; +import mage.abilities.effects.common.ExileSourceEffect; +import mage.abilities.effects.keyword.InvestigateEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.TargetController; + +import java.util.UUID; + +/** + * @author LePwnerer + */ +public final class DennickPiousApparition extends CardImpl { + + public DennickPiousApparition(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, ""); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + this.color.setWhite(true); + this.color.setBlue(true); + this.nightCard = true; + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever one or more creature cards are put into graveyards from anywhere, investigate. This ability triggers only once each turn. + this.addAbility(new PutCardIntoGraveFromAnywhereAllTriggeredAbility(new InvestigateEffect(1), false, TargetController.ANY).setTriggersOnce(true)); + + // If Dennick, Pious Apparition would be put into a graveyard from anywhere, exile it instead. + this.addAbility(new PutIntoGraveFromAnywhereSourceAbility(new ExileSourceEffect().setText("exile it instead"))); + } + + private DennickPiousApparition(final DennickPiousApparition card) { + super(card); + } + + @Override + public DennickPiousApparition copy() { + return new DennickPiousApparition(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DennickPiousApprentice.java b/Mage.Sets/src/mage/cards/d/DennickPiousApprentice.java new file mode 100644 index 0000000000..20107974ca --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DennickPiousApprentice.java @@ -0,0 +1,55 @@ +package mage.cards.d; + +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CantBeTargetedCardsGraveyardsEffect; +import mage.abilities.keyword.DisturbAbility; +import mage.abilities.keyword.LifelinkAbility; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.Zone; + +import java.util.UUID; + +/** + * @author LePwnerer + */ +public final class DennickPiousApprentice extends CardImpl { + + public DennickPiousApprentice(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{U}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + this.transformable = true; + this.secondSideCardClazz = mage.cards.d.DennickPiousApparition.class; + + // Lifelink + this.addAbility(LifelinkAbility.getInstance()); + + // Cards in graveyards can't be the targets of spells or abilities. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBeTargetedCardsGraveyardsEffect())); + + // Disturb {2}{W}{U} + this.addAbility(new TransformAbility()); + this.addAbility(new DisturbAbility(new ManaCostsImpl<>("{2}{W}{U}"))); + + } + + private DennickPiousApprentice(final DennickPiousApprentice card) { + super(card); + } + + @Override + public DennickPiousApprentice copy() { + return new DennickPiousApprentice(this); + } +} diff --git a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java index d65369018c..75c5f49087 100644 --- a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java +++ b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java @@ -103,6 +103,8 @@ public final class InnistradMidnightHunt extends ExpansionSet { cards.add(new SetCardInfo("Defend the Celestus", 182, Rarity.UNCOMMON, mage.cards.d.DefendTheCelestus.class)); cards.add(new SetCardInfo("Defenestrate", 95, Rarity.COMMON, mage.cards.d.Defenestrate.class)); cards.add(new SetCardInfo("Delver of Secrets", 47, Rarity.UNCOMMON, mage.cards.d.DelverOfSecrets.class)); + cards.add(new SetCardInfo("Dennick, Pious Apparition", 217, Rarity.RARE, mage.cards.d.DennickPiousApparition.class)); + cards.add(new SetCardInfo("Dennick, Pious Apprentice", 217, Rarity.RARE, mage.cards.d.DennickPiousApprentice.class)); cards.add(new SetCardInfo("Departed Soulkeeper", 218, Rarity.UNCOMMON, mage.cards.d.DepartedSoulkeeper.class)); cards.add(new SetCardInfo("Deserted Beach", 260, Rarity.RARE, mage.cards.d.DesertedBeach.class)); cards.add(new SetCardInfo("Devious Cover-Up", 48, Rarity.COMMON, mage.cards.d.DeviousCoverUp.class));