From 381104bd92f9812c2fb2d0ad41a16c7ea43d6e2b Mon Sep 17 00:00:00 2001 From: Susucre <34709007+Susucre@users.noreply.github.com> Date: Thu, 23 May 2024 18:53:32 +0200 Subject: [PATCH] implement [MH3] Guide of Souls --- Mage.Sets/src/mage/cards/g/GuideOfSouls.java | 75 ++++++++++++++++++++ Mage.Sets/src/mage/sets/ModernHorizons3.java | 1 + 2 files changed, 76 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/g/GuideOfSouls.java diff --git a/Mage.Sets/src/mage/cards/g/GuideOfSouls.java b/Mage.Sets/src/mage/cards/g/GuideOfSouls.java new file mode 100644 index 00000000000..9f354fb5177 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GuideOfSouls.java @@ -0,0 +1,75 @@ + +package mage.cards.g; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksWithCreaturesTriggeredAbility; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; +import mage.abilities.common.delayed.ReflexiveTriggeredAbility; +import mage.abilities.costs.common.PayEnergyCost; +import mage.abilities.effects.common.DoWhenCostPaid; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.continuous.BecomesCreatureTypeTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AnotherPredicate; +import mage.target.common.TargetAttackingCreature; + +import java.util.UUID; + +/** + * @author Susucr + */ +public final class GuideOfSouls extends CardImpl { + + private static final FilterCreaturePermanent filter + = new FilterCreaturePermanent("another creature"); + + static { + filter.add(AnotherPredicate.instance); + } + + public GuideOfSouls(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Whenever another creature enters the battlefield under your control, you gain 1 life and get {E}. + Ability ability = new EntersBattlefieldControlledTriggeredAbility(new GainLifeEffect(1), filter); + ability.addEffect(new GetEnergyCountersControllerEffect(1).setText("and get {E}")); + this.addAbility(ability); + + // Whenever you attack, you may pay {E}{E}{E}. When you do, put two +1/+1 counters and a flying counter on target attacking creature. It becomes an Angel in addition to its other types. + ReflexiveTriggeredAbility reflexive = new ReflexiveTriggeredAbility( + new AddCountersTargetEffect(CounterType.P1P1.createInstance(2)) + .setText("put two +1/+1 counters"), false + ); + reflexive.addEffect(new AddCountersTargetEffect(CounterType.FLYING.createInstance()) + .setText("and a flying counter on target attacking creature.")); + reflexive.addTarget(new TargetAttackingCreature()); + reflexive.addEffect(new BecomesCreatureTypeTargetEffect(Duration.EndOfGame, SubType.ANGEL, false) + .setText("It becomes an Angel in addition to its other types.")); + this.addAbility(new AttacksWithCreaturesTriggeredAbility( + new DoWhenCostPaid(reflexive, new PayEnergyCost(3), "Pay {E}{E}{E}?", true), 1 + )); + } + + private GuideOfSouls(final GuideOfSouls card) { + super(card); + } + + @Override + public GuideOfSouls copy() { + return new GuideOfSouls(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ModernHorizons3.java b/Mage.Sets/src/mage/sets/ModernHorizons3.java index e169846d5ee..c13f2da9134 100644 --- a/Mage.Sets/src/mage/sets/ModernHorizons3.java +++ b/Mage.Sets/src/mage/sets/ModernHorizons3.java @@ -58,6 +58,7 @@ public final class ModernHorizons3 extends ExpansionSet { cards.add(new SetCardInfo("Grim Servant", 97, Rarity.UNCOMMON, mage.cards.g.GrimServant.class)); cards.add(new SetCardInfo("Grist, Voracious Larva", 251, Rarity.MYTHIC, mage.cards.g.GristVoraciousLarva.class)); cards.add(new SetCardInfo("Grist, the Plague Swarm", 251, Rarity.MYTHIC, mage.cards.g.GristThePlagueSwarm.class)); + cards.add(new SetCardInfo("Guide of Souls", 29, Rarity.RARE, mage.cards.g.GuideOfSouls.class)); cards.add(new SetCardInfo("Island", 305, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("It That Heralds the End", 9, Rarity.UNCOMMON, mage.cards.i.ItThatHeraldsTheEnd.class)); cards.add(new SetCardInfo("Jet Medallion", 292, Rarity.RARE, mage.cards.j.JetMedallion.class));