Implemented No Escape

This commit is contained in:
Evan Kranzler 2019-03-31 13:16:36 -04:00
parent 5ac35907d1
commit cb2d7396e7
2 changed files with 50 additions and 0 deletions

View file

@ -0,0 +1,49 @@
package mage.cards.n;
import mage.abilities.effects.common.CounterTargetWithReplacementEffect;
import mage.abilities.effects.keyword.ScryEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.FilterSpell;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.target.TargetSpell;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class NoEscape extends CardImpl {
private static final FilterSpell filter = new FilterSpell("creature or planeswalker spell");
static {
filter.add(Predicates.or(
new CardTypePredicate(CardType.CREATURE),
new CardTypePredicate(CardType.PLANESWALKER)
));
}
public NoEscape(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}");
// Counter target creature or planeswalker spell. If that spell is countered this way, exile it instead of putting it into its owner's graveyard.
this.getSpellAbility().addEffect(new CounterTargetWithReplacementEffect(Zone.EXILED));
this.getSpellAbility().addTarget(new TargetSpell(filter));
// Scry 1.
this.getSpellAbility().addEffect(new ScryEffect(1));
}
private NoEscape(final NoEscape card) {
super(card);
}
@Override
public NoEscape copy() {
return new NoEscape(this);
}
}

View file

@ -37,6 +37,7 @@ public final class WarOfTheSpark extends ExpansionSet {
cards.add(new SetCardInfo("Mountain", 259, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Mountain", 260, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Mountain", 261, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("No Escape", 63, Rarity.COMMON, mage.cards.n.NoEscape.class));
cards.add(new SetCardInfo("Plains", 250, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Plains", 251, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Plains", 252, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));