From f7b06728d8b14587b61ac14a932db1586faa411a Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 28 May 2021 07:22:00 -0400 Subject: [PATCH] [MH2] Implemented Necromancer's Familiar --- .../mage/cards/n/NecromancersFamiliar.java | 64 +++++++++++++++++++ Mage.Sets/src/mage/sets/ModernHorizons2.java | 1 + 2 files changed, 65 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/n/NecromancersFamiliar.java diff --git a/Mage.Sets/src/mage/cards/n/NecromancersFamiliar.java b/Mage.Sets/src/mage/cards/n/NecromancersFamiliar.java new file mode 100644 index 0000000000..f18e8e3937 --- /dev/null +++ b/Mage.Sets/src/mage/cards/n/NecromancersFamiliar.java @@ -0,0 +1,64 @@ +package mage.cards.n; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.HellbentCondition; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.TapSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.IndestructibleAbility; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class NecromancersFamiliar extends CardImpl { + + public NecromancersFamiliar(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SPIRIT); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Hellbent — Necromancer's Familiar has lifelink as long as you have no cards in hand. + this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect( + new GainAbilitySourceEffect(LifelinkAbility.getInstance()), HellbentCondition.instance, + "{this} has lifelink as long as you have no cards in hand" + )).setAbilityWord(AbilityWord.HELLBENT)); + + // {B}, Discard a card: Necromancer's Familiar gains indestructible until end of turn. Tap it. + Ability ability = new SimpleActivatedAbility(new GainAbilitySourceEffect( + IndestructibleAbility.getInstance(), Duration.EndOfTurn + ), new ManaCostsImpl<>("{B}")); + ability.addEffect(new TapSourceEffect().setText("Tap it")); + ability.addCost(new DiscardCardCost()); + this.addAbility(ability); + } + + private NecromancersFamiliar(final NecromancersFamiliar card) { + super(card); + } + + @Override + public NecromancersFamiliar copy() { + return new NecromancersFamiliar(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ModernHorizons2.java b/Mage.Sets/src/mage/sets/ModernHorizons2.java index 54104b1331..680df58cb7 100644 --- a/Mage.Sets/src/mage/sets/ModernHorizons2.java +++ b/Mage.Sets/src/mage/sets/ModernHorizons2.java @@ -83,6 +83,7 @@ public final class ModernHorizons2 extends ExpansionSet { cards.add(new SetCardInfo("Monoskelion", 229, Rarity.UNCOMMON, mage.cards.m.Monoskelion.class)); cards.add(new SetCardInfo("Mountain", 487, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Mystic Redaction", 53, Rarity.UNCOMMON, mage.cards.m.MysticRedaction.class)); + cards.add(new SetCardInfo("Necromancer's Familiar", 94, Rarity.UNCOMMON, mage.cards.n.NecromancersFamiliar.class)); cards.add(new SetCardInfo("Nevinyrral's Disk", 298, Rarity.RARE, mage.cards.n.NevinyrralsDisk.class)); cards.add(new SetCardInfo("Orchard Strider", 169, Rarity.COMMON, mage.cards.o.OrchardStrider.class)); cards.add(new SetCardInfo("Patriarch's Bidding", 275, Rarity.RARE, mage.cards.p.PatriarchsBidding.class));