From 5253462ffc5a60d647cee8ad327e68b6311cdb29 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 21 May 2019 08:09:00 -0400 Subject: [PATCH] Implemented Abominable Treefolk --- .../src/mage/cards/a/AbominableTreefolk.java | 67 +++++++++++++++++++ Mage.Sets/src/mage/sets/ModernHorizons.java | 1 + 2 files changed, 68 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/a/AbominableTreefolk.java diff --git a/Mage.Sets/src/mage/cards/a/AbominableTreefolk.java b/Mage.Sets/src/mage/cards/a/AbominableTreefolk.java new file mode 100644 index 0000000000..bceb6ee985 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AbominableTreefolk.java @@ -0,0 +1,67 @@ +package mage.cards.a; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.target.common.TargetOpponentsCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class AbominableTreefolk extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledPermanent("snow permanents you control"); + + static { + filter.add(new SupertypePredicate(SuperType.SNOW)); + } + + private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter); + + public AbominableTreefolk(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{U}"); + + this.addSuperType(SuperType.SNOW); + this.subtype.add(SubType.TREEFOLK); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Abominable Treefolk's power and toughness are each equal to the number of snow permanents you control. + this.addAbility(new SimpleStaticAbility( + Zone.ALL, new SetPowerToughnessSourceEffect(xValue, Duration.EndOfGame) + )); + + // When Abominable Treefolk enters the battlefield, tap target creature an opponent controls. That creature doesn't untap during its controller's next untap step. + Ability ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect(), false); + ability.addEffect(new DontUntapInControllersNextUntapStepTargetEffect("That creature")); + ability.addTarget(new TargetOpponentsCreaturePermanent()); + this.addAbility(ability); + } + + private AbominableTreefolk(final AbominableTreefolk card) { + super(card); + } + + @Override + public AbominableTreefolk copy() { + return new AbominableTreefolk(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ModernHorizons.java b/Mage.Sets/src/mage/sets/ModernHorizons.java index 4945ca898b..19e4b078fe 100644 --- a/Mage.Sets/src/mage/sets/ModernHorizons.java +++ b/Mage.Sets/src/mage/sets/ModernHorizons.java @@ -27,6 +27,7 @@ public final class ModernHorizons extends ExpansionSet { this.numBoosterRare = 1; this.ratioBoosterMythic = 8; + cards.add(new SetCardInfo("Abominable Treefolk", 194, Rarity.UNCOMMON, mage.cards.a.AbominableTreefolk.class)); cards.add(new SetCardInfo("Cabal Therapist", 80, Rarity.RARE, mage.cards.c.CabalTherapist.class)); cards.add(new SetCardInfo("Choking Tethers", 44, Rarity.COMMON, mage.cards.c.ChokingTethers.class)); cards.add(new SetCardInfo("Deep Forest Hermit", 161, Rarity.RARE, mage.cards.d.DeepForestHermit.class));