From c88ee59c630a16261184abadd666f3fef3cd9e1b Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 20 May 2019 08:29:08 -0400 Subject: [PATCH] Implemented Martyr's Soul --- Mage.Sets/src/mage/cards/m/MartyrsSoul.java | 63 +++++++++++++++++++++ Mage.Sets/src/mage/sets/ModernHorizons.java | 1 + 2 files changed, 64 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/m/MartyrsSoul.java diff --git a/Mage.Sets/src/mage/cards/m/MartyrsSoul.java b/Mage.Sets/src/mage/cards/m/MartyrsSoul.java new file mode 100644 index 0000000000..2849f23d23 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MartyrsSoul.java @@ -0,0 +1,63 @@ +package mage.cards.m; + +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.ConvokeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.permanent.TappedPredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class MartyrsSoul extends CardImpl { + + private static final FilterLandPermanent filter = new FilterLandPermanent(); + + static { + filter.add(TappedPredicate.instance); + } + + private static final Condition condition + = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.EQUAL_TO, 0); + + public MartyrsSoul(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Convoke + this.addAbility(new ConvokeAbility()); + + // When Martyr's Soul enters the battlefield, if you control no tapped lands, put two +1/+1 counters on it. + this.addAbility(new ConditionalInterveningIfTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new AddCountersSourceEffect( + CounterType.P1P1.createInstance(2) + )), condition, "When {this} enters the battlefield, " + + "if you control no tapped lands, put two +1/+1 counters on it" + )); + } + + private MartyrsSoul(final MartyrsSoul card) { + super(card); + } + + @Override + public MartyrsSoul copy() { + return new MartyrsSoul(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ModernHorizons.java b/Mage.Sets/src/mage/sets/ModernHorizons.java index 8356c6f1c4..93b4ee620d 100644 --- a/Mage.Sets/src/mage/sets/ModernHorizons.java +++ b/Mage.Sets/src/mage/sets/ModernHorizons.java @@ -37,6 +37,7 @@ public final class ModernHorizons extends ExpansionSet { cards.add(new SetCardInfo("Headless Specter", 95, Rarity.COMMON, mage.cards.h.HeadlessSpecter.class)); cards.add(new SetCardInfo("Impostor of the Sixth Pride", 14, Rarity.COMMON, mage.cards.i.ImpostorOfTheSixthPride.class)); cards.add(new SetCardInfo("Lava Dart", 134, Rarity.COMMON, mage.cards.l.LavaDart.class)); + cards.add(new SetCardInfo("Martyr's Soul", 19, Rarity.COMMON, mage.cards.m.MartyrsSoul.class)); cards.add(new SetCardInfo("Prismatic View", 244, Rarity.RARE, mage.cards.p.PrismaticView.class)); cards.add(new SetCardInfo("Prohibit", 64, Rarity.COMMON, mage.cards.p.Prohibit.class)); cards.add(new SetCardInfo("Serra the Benevolent", 26, Rarity.MYTHIC, mage.cards.s.SerraTheBenevolent.class));