mirror of
https://github.com/correl/mage.git
synced 2025-01-13 11:01:58 +00:00
use FilterLandPermanent's subtype-filtering constructor
This commit is contained in:
parent
da07a58a85
commit
b919e5907b
13 changed files with 13 additions and 65 deletions
|
@ -39,7 +39,6 @@ import mage.abilities.effects.common.UntapTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
||||
/**
|
||||
|
@ -48,11 +47,7 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class ArborElf extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("Forest");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Forest"));
|
||||
}
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("Forest", "Forest");
|
||||
|
||||
public ArborElf(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}");
|
||||
|
|
|
@ -42,7 +42,6 @@ import mage.constants.Duration;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
@ -53,11 +52,7 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class AwakenTheAncient extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("Mountain");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Mountain"));
|
||||
}
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("Mountain", "Mountain");
|
||||
|
||||
public AwakenTheAncient(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}{R}{R}");
|
||||
|
|
|
@ -41,7 +41,6 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.Layer;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
|
@ -53,11 +52,7 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class AwakenerDruid extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("Forest");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Forest"));
|
||||
}
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("Forest", "Forest");
|
||||
|
||||
public AwakenerDruid(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}");
|
||||
|
|
|
@ -45,7 +45,6 @@ import mage.constants.Duration;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
@ -56,11 +55,7 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class GenjuOfTheCedars extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("Forest");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Forest"));
|
||||
}
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("Forest", "Forest");
|
||||
|
||||
public GenjuOfTheCedars(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}");
|
||||
|
|
|
@ -45,7 +45,6 @@ import mage.constants.Duration;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
@ -56,11 +55,7 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class GenjuOfTheFalls extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent FILTER = new FilterLandPermanent("Island");
|
||||
|
||||
static {
|
||||
FILTER.add(new SubtypePredicate("Island"));
|
||||
}
|
||||
private static final FilterLandPermanent FILTER = new FilterLandPermanent("Island", "Island");
|
||||
|
||||
public GenjuOfTheFalls(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}");
|
||||
|
|
|
@ -46,7 +46,6 @@ import mage.constants.Duration;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
@ -57,11 +56,7 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class GenjuOfTheFens extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent FILTER = new FilterLandPermanent("Swamp");
|
||||
|
||||
static {
|
||||
FILTER.add(new SubtypePredicate("Swamp"));
|
||||
}
|
||||
private static final FilterLandPermanent FILTER = new FilterLandPermanent("Swamp", "Swamp");
|
||||
|
||||
public GenjuOfTheFens(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}");
|
||||
|
|
|
@ -48,7 +48,6 @@ import mage.constants.Duration;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
@ -59,11 +58,7 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class GenjuOfTheFields extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent FILTER = new FilterLandPermanent("Plains");
|
||||
|
||||
static {
|
||||
FILTER.add(new SubtypePredicate("Plains"));
|
||||
}
|
||||
private static final FilterLandPermanent FILTER = new FilterLandPermanent("Plains", "Plains");
|
||||
|
||||
public GenjuOfTheFields(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}");
|
||||
|
|
|
@ -44,7 +44,6 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
@ -55,15 +54,13 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class GenjuOfTheRealm extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent FILTER = new FilterLandPermanent();
|
||||
|
||||
public GenjuOfTheRealm(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}{U}{B}{R}{G}");
|
||||
this.subtype.add("Aura");
|
||||
this.supertype.add("Legendary");
|
||||
|
||||
// Enchant Land
|
||||
TargetPermanent auraTarget = new TargetLandPermanent(FILTER);
|
||||
TargetPermanent auraTarget = new TargetLandPermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.PutCreatureInPlay));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
|
|
|
@ -44,7 +44,6 @@ import mage.constants.Duration;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
@ -55,11 +54,7 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class GenjuOfTheSpires extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent FILTER = new FilterLandPermanent("Mountain");
|
||||
|
||||
static {
|
||||
FILTER.add(new SubtypePredicate("Mountain"));
|
||||
}
|
||||
private static final FilterLandPermanent FILTER = new FilterLandPermanent("Mountain", "Mountain");
|
||||
|
||||
public GenjuOfTheSpires(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}");
|
||||
|
|
|
@ -68,12 +68,10 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class KothOfTheHammer extends CardImpl {
|
||||
|
||||
static final FilterLandPermanent filter = new FilterLandPermanent("Mountain");
|
||||
static final FilterLandPermanent filter = new FilterLandPermanent("Mountain", "Mountain");
|
||||
static final FilterLandPermanent filterCount = new FilterLandPermanent("Mountain you control");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Mountain"));
|
||||
|
||||
filterCount.add(new SubtypePredicate("Mountain"));
|
||||
filterCount.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ public class LivingTerrain extends CardImpl {
|
|||
|
||||
// Enchant land
|
||||
|
||||
TargetPermanent auraTarget = new TargetLandPermanent(new FilterLandPermanent());
|
||||
TargetPermanent auraTarget = new TargetLandPermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.PutCreatureInPlay));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
|
|
|
@ -48,7 +48,6 @@ import mage.constants.Zone;
|
|||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterBasicLandCard;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -66,11 +65,10 @@ import mage.target.targetpointer.FixedTarget;
|
|||
public class NissaWorldwaker extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("land you control");
|
||||
private static final FilterPermanent filterForest = new FilterPermanent("Forest");
|
||||
private static final FilterPermanent filterForest = new FilterPermanent("Forest", "Forest");
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
filterForest.add(new SubtypePredicate("Forest"));
|
||||
}
|
||||
|
||||
public NissaWorldwaker(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
|
@ -39,7 +39,6 @@ import mage.constants.Outcome;
|
|||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -51,11 +50,7 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class VolcanicEruption extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("Mountain");
|
||||
|
||||
static{
|
||||
filter.add(new SubtypePredicate(("Mountain")));
|
||||
}
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("Mountain", "Mountain");
|
||||
|
||||
public VolcanicEruption(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{U}{U}{U}");
|
||||
|
|
Loading…
Reference in a new issue