diff --git a/Mage.Sets/src/mage/cards/c/ConiferWurm.java b/Mage.Sets/src/mage/cards/c/ConiferWurm.java new file mode 100644 index 0000000000..26efba0002 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ConiferWurm.java @@ -0,0 +1,61 @@ +package mage.cards.c; + +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SupertypePredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ConiferWurm extends CardImpl { + + private static final FilterPermanent filter + = new FilterControlledPermanent("the number of snow permanents you control"); + + static { + filter.add(new SupertypePredicate(SuperType.SNOW)); + } + + private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter); + + public ConiferWurm(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}"); + + this.addSuperType(SuperType.SNOW); + this.subtype.add(SubType.WURM); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // {3}{G}: Conifer Wurm gets +X/+X until end of turn, where X is the number of snow permanents you control. + this.addAbility(new SimpleActivatedAbility( + new BoostSourceEffect(xValue, xValue, Duration.EndOfTurn), new ManaCostsImpl("{3}{G}") + )); + } + + private ConiferWurm(final ConiferWurm card) { + super(card); + } + + @Override + public ConiferWurm copy() { + return new ConiferWurm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ModernHorizons.java b/Mage.Sets/src/mage/sets/ModernHorizons.java index b62cd14787..1b414b65dd 100644 --- a/Mage.Sets/src/mage/sets/ModernHorizons.java +++ b/Mage.Sets/src/mage/sets/ModernHorizons.java @@ -53,6 +53,7 @@ public final class ModernHorizons extends ExpansionSet { cards.add(new SetCardInfo("Cloudshredder Sliver", 195, Rarity.RARE, mage.cards.c.CloudshredderSliver.class)); cards.add(new SetCardInfo("Collected Conjuring", 196, Rarity.RARE, mage.cards.c.CollectedConjuring.class)); cards.add(new SetCardInfo("Collector Ouphe", 158, Rarity.RARE, mage.cards.c.CollectorOuphe.class)); + cards.add(new SetCardInfo("Conifer Wurm", 159, Rarity.UNCOMMON, mage.cards.c.ConiferWurm.class)); cards.add(new SetCardInfo("Cordial Vampire", 83, Rarity.RARE, mage.cards.c.CordialVampire.class)); cards.add(new SetCardInfo("Crashing Footfalls", 160, Rarity.RARE, mage.cards.c.CrashingFootfalls.class)); cards.add(new SetCardInfo("Crypt Rats", 84, Rarity.UNCOMMON, mage.cards.c.CryptRats.class));