Support |SET pinning in booster name() predicate#10439
Closed
vanja-ivancevic wants to merge 1 commit intoCard-Forge:masterfrom
Closed
Support |SET pinning in booster name() predicate#10439vanja-ivancevic wants to merge 1 commit intoCard-Forge:masterfrom
vanja-ivancevic wants to merge 1 commit intoCard-Forge:masterfrom
Conversation
Booster templates using name("Card|SET") in a non-main-code position
silently produced zero cards for that slot. The slot parser routed
name(...) through buildExtraPredicate, which used
PaperCardPredicates.names(...) to compare operand strings against
card.getName(); names carrying a |SET suffix never matched, so the
slot dropped.
First surfaced on Shandalar Old Border's ICE booster, whose
snow-covered basic slot is pinned to the ICE printing:
1 name("Snow-Covered Plains|ICE", ...). Packs opened 14 cards
instead of 15, with no snow basic.
Resolve pinned names via StaticData.getCommonCards().getCard(name)
(the same call the mainCode branch uses) and filter with a
set-contains predicate. Plain names without | keep the existing
PaperCardPredicates.names path, so current callers (Final Fantasy,
Oath of the Gatewatch) are unaffected.
Contributor
|
Isn't there a |
Contributor
Author
|
Good catch, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
name("Card|SET")in a non-main-code position silently produced zero cards for that slot. The slot parser routedname(...)throughbuildExtraPredicate, which usedPaperCardPredicates.names(...)to compare operand strings againstcard.getName(). Names carrying a|SETsuffix never matched, so the slot dropped.1 name("Snow-Covered Plains|ICE", ...). Packs opened 14 cards instead of 15, with no snow basic.StaticData.getCommonCards().getCard(name)(same call the mainCode branch uses) and filters with a set-contains predicate. Plain names without|keep the existingPaperCardPredicates.namespath, so current callers (Final Fantasy.txt,Oath of the Gatewatch.txt) are unaffected.BoosterGenerator.getBoosterPack: shop packs, draft packs, sealed packs, event rewards.