From 70dd5308c571cc0a143c8fc4f446203fc199f619 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Sat, 1 Apr 2023 10:12:08 -0400 Subject: [PATCH] [MOM] Implement Seraph of New Capenna / Seraph of New Phyrexia --- .../src/mage/cards/s/SeraphOfNewCapenna.java | 46 +++++++++++++ .../src/mage/cards/s/SeraphOfNewPhyrexia.java | 64 +++++++++++++++++++ .../src/mage/sets/MarchOfTheMachine.java | 2 + 3 files changed, 112 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SeraphOfNewCapenna.java create mode 100644 Mage.Sets/src/mage/cards/s/SeraphOfNewPhyrexia.java diff --git a/Mage.Sets/src/mage/cards/s/SeraphOfNewCapenna.java b/Mage.Sets/src/mage/cards/s/SeraphOfNewCapenna.java new file mode 100644 index 0000000000..4fbe986ba2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SeraphOfNewCapenna.java @@ -0,0 +1,46 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SeraphOfNewCapenna extends CardImpl { + + public SeraphOfNewCapenna(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.subtype.add(SubType.ANGEL); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + this.secondSideCardClazz = mage.cards.s.SeraphOfNewPhyrexia.class; + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // {4}{B/P}: Transform Seraph of New Capenna. Activate only as a sorcery. + this.addAbility(new TransformAbility()); + this.addAbility(new ActivateAsSorceryActivatedAbility(new TransformSourceEffect(), new ManaCostsImpl<>("{4}{B/P}"))); + } + + private SeraphOfNewCapenna(final SeraphOfNewCapenna card) { + super(card); + } + + @Override + public SeraphOfNewCapenna copy() { + return new SeraphOfNewCapenna(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SeraphOfNewPhyrexia.java b/Mage.Sets/src/mage/cards/s/SeraphOfNewPhyrexia.java new file mode 100644 index 0000000000..50ecf358d0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SeraphOfNewPhyrexia.java @@ -0,0 +1,64 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AnotherPredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SeraphOfNewPhyrexia extends CardImpl { + + private static final FilterControlledPermanent filter + = new FilterControlledPermanent("another creature or artifact"); + + static { + filter.add(AnotherPredicate.instance); + filter.add(Predicates.or( + CardType.CREATURE.getPredicate(), + CardType.ARTIFACT.getPredicate() + )); + } + + public SeraphOfNewPhyrexia(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, ""); + + this.subtype.add(SubType.PHYREXIAN); + this.subtype.add(SubType.ANGEL); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + this.color.setWhite(true); + this.color.setBlack(true); + this.nightCard = true; + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever Seraph of New Phyrexia attacks, you may sacrifice another creature or artifact. If you do, Seraph of New Phyrexia gets +2/+1 until end of turn. + this.addAbility(new AttacksTriggeredAbility(new DoIfCostPaid( + new BoostSourceEffect(2, 1, Duration.EndOfTurn), new SacrificeTargetCost(filter) + ))); + } + + private SeraphOfNewPhyrexia(final SeraphOfNewPhyrexia card) { + super(card); + } + + @Override + public SeraphOfNewPhyrexia copy() { + return new SeraphOfNewPhyrexia(this); + } +} diff --git a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java index 27dac82453..cd37f21260 100644 --- a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java +++ b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java @@ -64,6 +64,8 @@ public final class MarchOfTheMachine extends ExpansionSet { cards.add(new SetCardInfo("Rugged Highlands", 271, Rarity.COMMON, mage.cards.r.RuggedHighlands.class)); cards.add(new SetCardInfo("Ruins Recluse", 336, Rarity.UNCOMMON, mage.cards.r.RuinsRecluse.class)); cards.add(new SetCardInfo("Scoured Barrens", 272, Rarity.COMMON, mage.cards.s.ScouredBarrens.class)); + cards.add(new SetCardInfo("Seraph of New Capenna", 36, Rarity.UNCOMMON, mage.cards.s.SeraphOfNewCapenna.class)); + cards.add(new SetCardInfo("Seraph of New Phyrexia", 36, Rarity.UNCOMMON, mage.cards.s.SeraphOfNewPhyrexia.class)); cards.add(new SetCardInfo("Stoke the Flames", 166, Rarity.UNCOMMON, mage.cards.s.StokeTheFlames.class)); cards.add(new SetCardInfo("Storm the Seedcore", 206, Rarity.UNCOMMON, mage.cards.s.StormTheSeedcore.class)); cards.add(new SetCardInfo("Swamp", 279, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));