Dwarven Blastminer should only be able to target non-basics

likewise Encroaching Wastes
This commit is contained in:
Neil Gentleman 2016-07-17 18:13:44 -07:00
parent 5e1bc1e583
commit 882136fbc7
3 changed files with 6 additions and 23 deletions

View file

@ -39,16 +39,13 @@ import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterLandPermanent;
import mage.target.common.TargetLandPermanent;
import mage.target.common.TargetNonBasicLandPermanent;
/**
*
* @author LevelX2
*/
public class EncroachingWastes extends CardImpl {
private static final FilterLandPermanent filter = new FilterLandPermanent("nonbasic land");
public EncroachingWastes(UUID ownerId) {
super(ownerId, 227, "Encroaching Wastes", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, "");
this.expansionSetCode = "M14";
@ -59,7 +56,7 @@ public class EncroachingWastes extends CardImpl {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new GenericManaCost(4));
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetLandPermanent(filter));
ability.addTarget(new TargetNonBasicLandPermanent());
this.addAbility(ability);
}

View file

@ -39,17 +39,13 @@ import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterLandPermanent;
import mage.target.common.TargetLandPermanent;
import mage.target.common.TargetNonBasicLandPermanent;
/**
*
* @author fireshoes
*/
public class DwarvenBlastminer extends CardImpl {
private static final FilterLandPermanent filter = new FilterLandPermanent("nonbasic land");
public DwarvenBlastminer(UUID ownerId) {
super(ownerId, 199, "Dwarven Blastminer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{R}");
this.expansionSetCode = "ONS";
@ -60,7 +56,7 @@ public class DwarvenBlastminer extends CardImpl {
// {2}{R}, {tap}: Destroy target nonbasic land.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{2}{R}"));
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetLandPermanent(filter));
ability.addTarget(new TargetNonBasicLandPermanent());
this.addAbility(ability);
// Morph {R}

View file

@ -37,31 +37,21 @@ import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SupertypePredicate;
import mage.target.TargetPermanent;
import mage.target.common.TargetLandPermanent;
import mage.target.common.TargetNonBasicLandPermanent;
/**
*
* @author LoneFox
*/
public class UncontrolledInfestation extends CardImpl {
private static final FilterLandPermanent filter = new FilterLandPermanent("nonbasic land");
static{
filter.add(Predicates.not(new SupertypePredicate("Basic")));
}
public UncontrolledInfestation(UUID ownerId) {
super(ownerId, 108, "Uncontrolled Infestation", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}");
this.expansionSetCode = "SCG";
this.subtype.add("Aura");
// Enchant nonbasic land
TargetPermanent auraTarget = new TargetLandPermanent(filter);
TargetPermanent auraTarget = new TargetNonBasicLandPermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
Ability ability = new EnchantAbility(auraTarget.getTargetName());