Implemented Cunning Evasion

This commit is contained in:
Evan Kranzler 2019-06-01 18:43:54 -04:00
parent e5b735f404
commit f8b2c6b7b5
2 changed files with 44 additions and 0 deletions

View file

@ -0,0 +1,43 @@
package mage.cards.c;
import mage.abilities.common.BecomesBlockedAllTriggeredAbility;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.TargetController;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class CunningEvasion extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature you control");
static {
filter.add(new ControllerPredicate(TargetController.YOU));
}
public CunningEvasion(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}");
// Whenever a creature you control becomes blocked, you may return it to its owner's hand.
this.addAbility(new BecomesBlockedAllTriggeredAbility(
new ReturnToHandTargetEffect().setText("return it to its owner's hand"),
true, filter, true
));
}
private CunningEvasion(final CunningEvasion card) {
super(card);
}
@Override
public CunningEvasion copy() {
return new CunningEvasion(this);
}
}

View file

@ -57,6 +57,7 @@ public final class ModernHorizons extends ExpansionSet {
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));
cards.add(new SetCardInfo("Cunning Evasion", 45, Rarity.UNCOMMON, mage.cards.c.CunningEvasion.class));
cards.add(new SetCardInfo("Dead of Winter", 85, Rarity.RARE, mage.cards.d.DeadOfWinter.class));
cards.add(new SetCardInfo("Deep Forest Hermit", 161, Rarity.RARE, mage.cards.d.DeepForestHermit.class));
cards.add(new SetCardInfo("Defile", 86, Rarity.COMMON, mage.cards.d.Defile.class));