From 252255d182faebd656b3b2f22f07ab3d2fa7f177 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Sat, 21 Jan 2023 19:25:28 -0500 Subject: [PATCH] [ONE] Implement Necrogen Communion --- .../src/mage/cards/n/NecrogenCommunion.java | 56 +++++++++++++++++++ .../src/mage/sets/PhyrexiaAllWillBeOne.java | 1 + 2 files changed, 57 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/n/NecrogenCommunion.java diff --git a/Mage.Sets/src/mage/cards/n/NecrogenCommunion.java b/Mage.Sets/src/mage/cards/n/NecrogenCommunion.java new file mode 100644 index 00000000000..812e569a4d2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/n/NecrogenCommunion.java @@ -0,0 +1,56 @@ +package mage.cards.n; + +import java.util.UUID; + +import mage.abilities.common.DiesAttachedTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.ReturnToBattlefieldUnderYourControlAttachedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.ToxicAbility; +import mage.constants.AttachmentType; +import mage.constants.SubType; +import mage.abilities.effects.common.AttachEffect; +import mage.constants.Outcome; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * @author TheElk801 + */ +public final class NecrogenCommunion extends CardImpl { + + public NecrogenCommunion(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature you control + TargetPermanent auraTarget = new TargetControlledCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + this.addAbility(new EnchantAbility(auraTarget)); + + // Enchanted creature has toxic 2. + this.addAbility(new SimpleStaticAbility( + new GainAbilityAttachedEffect(new ToxicAbility(2), AttachmentType.EQUIPMENT) + )); + + // When enchanted creature dies, return that card to the battlefield under your control. + this.addAbility(new DiesAttachedTriggeredAbility( + new ReturnToBattlefieldUnderYourControlAttachedEffect(), "enchanted creature" + )); + } + + private NecrogenCommunion(final NecrogenCommunion card) { + super(card); + } + + @Override + public NecrogenCommunion copy() { + return new NecrogenCommunion(this); + } +} diff --git a/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java b/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java index 0bff042a98d..02dfbc90edf 100644 --- a/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java +++ b/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java @@ -74,6 +74,7 @@ public final class PhyrexiaAllWillBeOne extends ExpansionSet { cards.add(new SetCardInfo("Monument to Perfection", 233, Rarity.RARE, mage.cards.m.MonumentToPerfection.class)); cards.add(new SetCardInfo("Mountain", 275, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Myr Convert", 234, Rarity.UNCOMMON, mage.cards.m.MyrConvert.class)); + cards.add(new SetCardInfo("Necrogen Communion", 99, Rarity.UNCOMMON, mage.cards.n.NecrogenCommunion.class)); cards.add(new SetCardInfo("Nimraiser Paladin", 101, Rarity.UNCOMMON, mage.cards.n.NimraiserPaladin.class)); cards.add(new SetCardInfo("Nissa, Ascended Animist", 175, Rarity.MYTHIC, mage.cards.n.NissaAscendedAnimist.class)); cards.add(new SetCardInfo("Norn's Wellspring", 24, Rarity.RARE, mage.cards.n.NornsWellspring.class));