From 724b1136beaf8ac21eb9c4674d6eb03c0b8d113f Mon Sep 17 00:00:00 2001 From: JRHerlehy Date: Sat, 7 Apr 2018 20:45:55 -0700 Subject: [PATCH] [DOM] Implement Marwyn Add to set file --- .../src/mage/cards/m/MarwynTheNurturer.java | 57 +++++++++++++++++++ Mage.Sets/src/mage/sets/Dominaria.java | 1 + 2 files changed, 58 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/m/MarwynTheNurturer.java diff --git a/Mage.Sets/src/mage/cards/m/MarwynTheNurturer.java b/Mage.Sets/src/mage/cards/m/MarwynTheNurturer.java new file mode 100644 index 0000000000..703561956d --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MarwynTheNurturer.java @@ -0,0 +1,57 @@ +package mage.cards.m; + +import java.util.UUID; + +import mage.MageInt; +import mage.Mana; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.mana.DynamicManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.counters.CounterType; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * @author JRHerlehy + * Created on 4/7/18. + */ +public class MarwynTheNurturer extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another Elf"); + + static { + filter.add(new AnotherPredicate()); + filter.add(new SubtypePredicate(SubType.ELF)); + } + + public MarwynTheNurturer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.ELF, SubType.DRUID); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Whenever another Elf enters the battlefield under your control, put a +1/+1 counter on Marwyn, the Nurturer. + this.addAbility(new EntersBattlefieldAllTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), filter)); + + // {T}: Add an amount of {G} equal to Marwyn’s power. + this.addAbility(new DynamicManaAbility(Mana.GreenMana(1), new SourcePermanentPowerCount(), "Add an amount of {G} equal to Marwyn’s power")); + } + + public MarwynTheNurturer(final MarwynTheNurturer card) { + super(card); + } + + @Override + public MarwynTheNurturer copy() { + return new MarwynTheNurturer(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/Dominaria.java b/Mage.Sets/src/mage/sets/Dominaria.java index 07c92c7f9b..88a53cc2c4 100644 --- a/Mage.Sets/src/mage/sets/Dominaria.java +++ b/Mage.Sets/src/mage/sets/Dominaria.java @@ -85,6 +85,7 @@ public class Dominaria extends ExpansionSet { cards.add(new SetCardInfo("Knight of Malice", 52, Rarity.UNCOMMON, mage.cards.k.KnightOfMalice.class)); cards.add(new SetCardInfo("Llanowar Elves", 168, Rarity.COMMON, mage.cards.l.LlanowarElves.class)); cards.add(new SetCardInfo("Lyra Dawnbringer", 14, Rarity.MYTHIC, mage.cards.l.LyraDawnbringer.class)); + cards.add(new SetCardInfo("Marwyn, the Nurturer", 172, Rarity.RARE, mage.cards.m.MarwynTheNurturer.class)); cards.add(new SetCardInfo("Meandering River", 274, Rarity.COMMON, mage.cards.m.MeanderingRiver.class)); cards.add(new SetCardInfo("Naru Meha, Master Wizard", 59, Rarity.MYTHIC, mage.cards.n.NaruMehaMasterWizard.class)); cards.add(new SetCardInfo("Opt", 60, Rarity.COMMON, mage.cards.o.Opt.class));