improved DGM filter

fixed slot for timeshifted card in tournament packs.
This commit is contained in:
Maxmtg
2013-05-06 03:13:05 +00:00
parent 33276e0d67
commit 085c93cbcd
3 changed files with 4 additions and 5 deletions

View File

@@ -164,13 +164,12 @@ public class BoosterGenerator {
Predicate<CardPrinted> toAdd = null;
if( operator.equals("dfc") ) {
toAdd = Predicates.compose(CardRulesPredicates.splitType(CardSplitType.Transform), CardPrinted.FN_GET_RULES);
} else if( operator.equals("land") ) {
toAdd = Predicates.compose(CardRulesPredicates.Presets.IS_LAND, CardPrinted.FN_GET_RULES);
} else if ( operator.startsWith("name(") ) {
operator = StringUtils.strip(operator.substring(4), "() ");
String[] cardNames = TextUtil.splitWithParenthesis(operator, ',', '"', '"');
toAdd = IPaperCard.Predicates.names(Lists.newArrayList(cardNames));
} else if ( operator.startsWith("type(") ) {
operator = StringUtils.strip(operator.substring(4), "()\" ");
toAdd = Predicates.compose(CardRulesPredicates.coreType(true, operator), CardPrinted.FN_GET_RULES);
}
if(toAdd == null)