mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
add a nonbasic land filter.
This commit is contained in:
@@ -550,6 +550,12 @@ public class AllZoneUtil {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public static CardListFilter nonBasicLand = new CardListFilter() {
|
||||||
|
public boolean addCard(Card c) {
|
||||||
|
return !c.isBasicLand();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
public static CardListFilter artifacts = new CardListFilter() {
|
public static CardListFilter artifacts = new CardListFilter() {
|
||||||
public boolean addCard(Card c) {
|
public boolean addCard(Card c) {
|
||||||
return c.isArtifact();
|
return c.isArtifact();
|
||||||
@@ -604,6 +610,12 @@ public class AllZoneUtil {
|
|||||||
return filter;
|
return filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get a CardListFilter to filter a CardList for a given type
|
||||||
|
*
|
||||||
|
* @param type - the type to check for
|
||||||
|
* @return a CardListFilter to only add cards of the given type
|
||||||
|
*/
|
||||||
public static CardListFilter getTypeFilter(final String type) {
|
public static CardListFilter getTypeFilter(final String type) {
|
||||||
CardListFilter filter = new CardListFilter() {
|
CardListFilter filter = new CardListFilter() {
|
||||||
public boolean addCard(Card c) {
|
public boolean addCard(Card c) {
|
||||||
|
|||||||
Reference in New Issue
Block a user