Forge version 1.5.22
Tentative target release date: Friday July 18 2014.
High Quality Resources for Collectible Card Games
https://www.slightlymagic.net/forum/
https://www.slightlymagic.net/forum/viewtopic.php?f=52&t=14739
I can't think of any other grouping options I'd want off the top of my head, but you did remind me that I wanted to add boolean expressions to the filters. I'm hoping I can complete that by tomorrow; it seems to be going well so far.drdev wrote:With that, are there any other group by or pile by options people would like to see?
{w}{w} && ({g}{g} || ({u}{u} && {r}{r}))Oh, no. Goodness, no. Search still functions exactly how it did before I added the changes; nothing is different about that. What has changed is if you happen to be using the boolean expression feature (it auto-detects || or && — nothing runs unless those are detected), then the search terms for the expression itself must be in quotation marks.drdev wrote:I'm confused. Are you saying we need to manually type quotation marks for search to work now? If so, that's not desirable. Quotation marks should only be used to group text together than should not be parsed as an expression.
I've thoroughly tested it on my own and am confident that there aren't any bugs (and certainly not any that affect other areas of the program). I just may have missed a minor bug somewhere. I can guarantee that the regular search works 100% as it has been and that any bugs that might arise would affect the boolean searches only. I completely separated all the logic for that specific reason; only if it detects the presence of AND or OR operators does it even attempt to run it through the parser.friarsol wrote:Yea, maybe this can wait till after release so things like that can be ironed out? We should strive not to have last minute features before release so things aren't completely broken and they have time to be tested by the svn users.
Ah ok, that sounds like it should be alright. I just get nervous around release especially when new features pop out of nowhere. (It reminds me too much of the things I have to fight off in my day jobKrazyTheFox wrote:If you'd still prefer I removed the feature and tossed it in the next release, I understand and can do so. Provided a build isn't published early in the morning, I'll be awake early enough to revert the feature if need be.
I'm not sure if it worked before, but I can't seem to use quotes to search for multiple words where I don't get matches that contain one or both words that aren't one after the other. I want searching for "sacrifice a creature" with quotes to not return all cards with either "sacrifice" or "creature" in their text.KrazyTheFox wrote:Oh, no. Goodness, no. Search still functions exactly how it did before I added the changes; nothing is different about that. What has changed is if you happen to be using the boolean expression feature (it auto-detects || or && — nothing runs unless those are detected), then the search terms for the expression itself must be in quotation marks.drdev wrote:I'm confused. Are you saying we need to manually type quotation marks for search to work now? If so, that's not desirable. Quotation marks should only be used to group text together than should not be parsed as an expression.I've thoroughly tested it on my own and am confident that there aren't any bugs (and certainly not any that affect other areas of the program). I just may have missed a minor bug somewhere. I can guarantee that the regular search works 100% as it has been and that any bugs that might arise would affect the boolean searches only. I completely separated all the logic for that specific reason; only if it detects the presence of AND or OR operators does it even attempt to run it through the parser.friarsol wrote:Yea, maybe this can wait till after release so things like that can be ironed out? We should strive not to have last minute features before release so things aren't completely broken and they have time to be tested by the svn users.
If you'd still prefer I removed the feature and tossed it in the next release, I understand and can do so. Provided a build isn't published early in the morning, I'll be awake early enough to revert the feature if need be.
Unfortunately that wasn't/isn't a feature of the search function. The current rules are to replace all commas with spaces and then split the search string by spaces with each word getting passed through the search functions. There's a lot of improvements that can still be made in this part of the program, such as allowing what you want quotes to do.drdev wrote:I'm not sure if it worked before, but I can't seem to use quotes to search for multiple words where I don't get matches that contain one or both words that aren't one after the other. I want searching for "sacrifice a creature" with quotes to not return all cards with either "sacrifice" or "creature" in their text.
String[] splitText = text.replaceAll(",", "").replaceAll(" ", " ").split(" ");
for (String s : splitText) {
List<Predicate<CardRules>> subands = new ArrayList<Predicate<CardRules>>();
if (inName) { subands.add(CardRulesPredicates.name(StringOp.CONTAINS_IC, s)); }
if (inType) { subands.add(CardRulesPredicates.joinedType(StringOp.CONTAINS_IC, s)); }
if (inText) { subands.add(CardRulesPredicates.rules(StringOp.CONTAINS_IC, s)); }
if (inCost) { subands.add(CardRulesPredicates.cost(StringOp.CONTAINS_IC, s)); }
terms.add(Predicates.or(subands));
}
Predicate<CardRules> textFilter = invert ? Predicates.not(Predicates.or(terms)) : Predicates.and(terms);
return Predicates.compose(textFilter, PaperCard.FN_GET_RULES);Different filters.Chris H. wrote:And it looks like the filters have been reverted for now.
Oh I figured out the format he used and did it last night. There's a small issue with M15 booster generation which is related to the Conspiracy booster generation I had been working, so I'll commit that after the release (probably on Sunday night) Nothing too terrible, just cards that appear in the demo decks, that don't appear in boosters can currently show up in Forge boosters.Chris H. wrote:While it would be nice to have the draft rankings ready to go I suspect that we will have to wait until Asepetci gets around to it.![]()