[DOM] Implement Marwyn

Add to set file
This commit is contained in:
JRHerlehy 2018-04-07 20:45:55 -07:00
parent 405296d53d
commit 724b1136be
2 changed files with 58 additions and 0 deletions

View file

@ -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 Marwyns power.
this.addAbility(new DynamicManaAbility(Mana.GreenMana(1), new SourcePermanentPowerCount(), "Add an amount of {G} equal to Marwyns power"));
}
public MarwynTheNurturer(final MarwynTheNurturer card) {
super(card);
}
@Override
public MarwynTheNurturer copy() {
return new MarwynTheNurturer(this);
}
}

View file

@ -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));