mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
added predicate to cardrules to filter cards
This commit is contained in:
@@ -131,6 +131,9 @@ public final class CardRules {
|
|||||||
* Filtering conditions specific for CardRules class, defined here along with some presets.
|
* Filtering conditions specific for CardRules class, defined here along with some presets.
|
||||||
*/
|
*/
|
||||||
public abstract static class Predicates {
|
public abstract static class Predicates {
|
||||||
|
public static final Predicate<CardRules> isKeptInAiDecks = new Predicate<CardRules>() {
|
||||||
|
@Override public boolean isTrue(CardRules card) { return !card.isRemovedFromAIDecks; } };
|
||||||
|
|
||||||
|
|
||||||
// Static builder methods - they choose concrete implementation by themselves
|
// Static builder methods - they choose concrete implementation by themselves
|
||||||
public static Predicate<CardRules> cmc(final ComparableOp op, final int what)
|
public static Predicate<CardRules> cmc(final ComparableOp op, final int what)
|
||||||
|
|||||||
Reference in New Issue
Block a user