Implemented Moon-Eating Dog

This commit is contained in:
Evan Kranzler 2018-06-08 09:13:20 -04:00
parent 52f8690a8f
commit 2f977d97e1
2 changed files with 63 additions and 0 deletions

View file

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

View file

@ -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("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("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("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("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("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)); cards.add(new SetCardInfo("Nine-Tail White Fox", 8, Rarity.COMMON, mage.cards.n.NineTailWhiteFox.class));