mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
refactor FilterBasicLandCard
This commit is contained in:
parent
68f2d7468c
commit
8f4e8645fa
52 changed files with 214 additions and 365 deletions
|
|
@ -185,24 +185,33 @@ public final class StaticFilters {
|
|||
FILTER_CARD_LAND_A.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterBasicLandCard FILTER_CARD_BASIC_LAND = new FilterBasicLandCard();
|
||||
public static final FilterLandCard FILTER_CARD_BASIC_LAND = new FilterLandCard("basic land card");
|
||||
|
||||
static {
|
||||
FILTER_CARD_BASIC_LAND.add(SuperType.BASIC.getPredicate());
|
||||
FILTER_CARD_BASIC_LAND.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterBasicLandCard FILTER_CARD_BASIC_LANDS = new FilterBasicLandCard("basic land cards");
|
||||
public static final FilterLandCard FILTER_CARD_BASIC_LANDS = new FilterLandCard("basic land cards");
|
||||
|
||||
static {
|
||||
FILTER_CARD_BASIC_LANDS.add(SuperType.BASIC.getPredicate());
|
||||
FILTER_CARD_BASIC_LANDS.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterBasicLandCard FILTER_CARD_BASIC_LAND_A = new FilterBasicLandCard("a basic land card");
|
||||
public static final FilterLandCard FILTER_CARD_BASIC_LAND_A = new FilterLandCard("a basic land card");
|
||||
|
||||
static {
|
||||
FILTER_CARD_BASIC_LAND_A.add(SuperType.BASIC.getPredicate());
|
||||
FILTER_CARD_BASIC_LAND_A.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterBasicCard FILTER_CARD_BASIC_PLAINS = new FilterBasicCard(SubType.PLAINS);
|
||||
|
||||
static {
|
||||
FILTER_CARD_BASIC_PLAINS.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterNonlandCard FILTER_CARD_NON_LAND = new FilterNonlandCard();
|
||||
|
||||
static {
|
||||
|
|
|
|||
33
Mage/src/main/java/mage/filter/common/FilterBasicCard.java
Normal file
33
Mage/src/main/java/mage/filter/common/FilterBasicCard.java
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
package mage.filter.common;
|
||||
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
/**
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class FilterBasicCard extends FilterCard {
|
||||
|
||||
public FilterBasicCard(SubType subType) {
|
||||
this(subType, "basic " + subType + " card");
|
||||
}
|
||||
|
||||
public FilterBasicCard(String name) {
|
||||
this(null, name);
|
||||
}
|
||||
|
||||
public FilterBasicCard(SubType subType, String name) {
|
||||
super(subType, name);
|
||||
this.add(SuperType.BASIC.getPredicate());
|
||||
}
|
||||
|
||||
protected FilterBasicCard(final FilterBasicCard filter) {
|
||||
super(filter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FilterBasicCard copy() {
|
||||
return new FilterBasicCard(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
|
||||
package mage.filter.common;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
/**
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class FilterBasicLandCard extends FilterCard {
|
||||
|
||||
public FilterBasicLandCard() {
|
||||
this("basic land card");
|
||||
}
|
||||
|
||||
public FilterBasicLandCard(SubType subType) {
|
||||
this("basic " + subType + " card");
|
||||
this.add(subType.getPredicate());
|
||||
}
|
||||
|
||||
public FilterBasicLandCard(String name) {
|
||||
super(name);
|
||||
this.add(CardType.LAND.getPredicate());
|
||||
this.add(SuperType.BASIC.getPredicate());
|
||||
}
|
||||
|
||||
protected FilterBasicLandCard(final FilterBasicLandCard filter) {
|
||||
super(filter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FilterBasicLandCard copy() {
|
||||
return new FilterBasicLandCard(this);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue