From 2f977d97e1d8a320461256d2a78e79ec628746d8 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 8 Jun 2018 09:13:20 -0400 Subject: [PATCH] Implemented Moon-Eating Dog --- Mage.Sets/src/mage/cards/m/MoonEatingDog.java | 62 +++++++++++++++++++ .../src/mage/sets/JiangYangguMuYanling.java | 1 + 2 files changed, 63 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/m/MoonEatingDog.java diff --git a/Mage.Sets/src/mage/cards/m/MoonEatingDog.java b/Mage.Sets/src/mage/cards/m/MoonEatingDog.java new file mode 100644 index 0000000000..feebf748c5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MoonEatingDog.java @@ -0,0 +1,62 @@ +package mage.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author TheElk801 + */ +public final class MoonEatingDog extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("a Yanling planeswalker"); + + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + filter.add(new CardTypePredicate(CardType.PLANESWALKER)); + filter.add(new SubtypePredicate(SubType.YANLING)); + } + + public MoonEatingDog(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.HOUND); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // As long as you control a Yanling planeswalker, Moon-Eating Dog has flying. + this.addAbility(new SimpleStaticAbility( + Zone.BATTLEFIELD, + new ConditionalContinuousEffect( + new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield), + new PermanentsOnTheBattlefieldCondition(filter), + "As long as you control a Yanling planeswalker, {this} has flying." + ) + )); + } + + public MoonEatingDog(final MoonEatingDog card) { + super(card); + } + + @Override + public MoonEatingDog copy() { + return new MoonEatingDog(this); + } +} diff --git a/Mage.Sets/src/mage/sets/JiangYangguMuYanling.java b/Mage.Sets/src/mage/sets/JiangYangguMuYanling.java index b8757fea22..99dd3a69f9 100644 --- a/Mage.Sets/src/mage/sets/JiangYangguMuYanling.java +++ b/Mage.Sets/src/mage/sets/JiangYangguMuYanling.java @@ -44,6 +44,7 @@ public final class JiangYangguMuYanling extends ExpansionSet { cards.add(new SetCardInfo("Jiang Yanggu", 22, Rarity.MYTHIC, mage.cards.j.JiangYanggu.class)); cards.add(new SetCardInfo("Leopard-Spotted Jiao", 23, Rarity.COMMON, mage.cards.l.LeopardSpottedJiao.class)); cards.add(new SetCardInfo("Meandering River", 19, Rarity.COMMON, mage.cards.m.MeanderingRiver.class)); + cards.add(new SetCardInfo("Moon-Eating Dog", 10, Rarity.UNCOMMON, mage.cards.m.MoonEatingDog.class)); cards.add(new SetCardInfo("Mountain", 39, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Mu Yanling", 1, Rarity.MYTHIC, mage.cards.m.MuYanling.class)); cards.add(new SetCardInfo("Nine-Tail White Fox", 8, Rarity.COMMON, mage.cards.n.NineTailWhiteFox.class));