YMKM: roalesk_prime_specimen + support (#4903)

* roalesk_prime_specimen + support

* allow added abilities to show on face-down cards
This commit is contained in:
Northmoc
2024-03-27 10:57:42 -04:00
committed by GitHub
parent 38c5fee296
commit fb6e944b45
5 changed files with 34 additions and 1 deletions

View File

@@ -103,6 +103,9 @@ public final class CardFacePredicates {
if (!hasManaCost(input, manaCost)) {
return false;
}
} else if (m.contains("cmcEQ")) {
int i = Integer.parseInt(m.substring(5));
if (!hasCMC(input, i)) return false;
} else if (!hasProperty(input, m)) {
return false;
}
@@ -122,6 +125,11 @@ public final class CardFacePredicates {
return mC.equals(input.getManaCost().getShortString());
}
static protected boolean hasCMC(ICardFace input, final int value) {
ManaCost cost = input.getManaCost();
return cost != null && cost.getCMC() == value;
}
}
public static Predicate<ICardFace> valid(final String val) {