Skip to content

Try to get find cards in same set first#10397

Open
clairchiara wants to merge 2 commits intoCard-Forge:masterfrom
clairchiara:feature/try-art-from-same-set-first
Open

Try to get find cards in same set first#10397
clairchiara wants to merge 2 commits intoCard-Forge:masterfrom
clairchiara:feature/try-art-from-same-set-first

Conversation

@clairchiara
Copy link
Copy Markdown
Contributor

If card is not found with artIndex and/or collectorNumber, try again to find it in the same set without them. Only then fallback to full database if still not found.

Example: the 40K commander precon "Ruinous Powers" contains Mountain|40K|3. Although the 40K set has Mountains, it does not have one at artIndex 3. Currently this causes another Mountain to be loaded according to user art preferences, either from LEA or the latest set (eg TMT). A more logical behavior would be to load another Mountain from 40K instead, as these are available.

@Jetz72
Copy link
Copy Markdown
Contributor

Jetz72 commented Apr 14, 2026

I'd think if the card exists in the set but we've requested an invalid art index or collector number, that's a sign the problem is primarily with the request. In this case, it seems like that deck should be using art index 2. Note how they both have text in the bottom left indicating which deck they're meant for:

Art index 1 - CN315
Art index 2 - CN316

Falling back to the same set upon a failed request does make a kind of sense, but I think it'd make it harder to catch other mistakes like these.

@Jetz72 Jetz72 added the CardDB Loading, storing, and searching CardRules and PaperCard data label Apr 14, 2026
@clairchiara clairchiara force-pushed the feature/try-art-from-same-set-first branch from 0b0aa94 to 7232f2a Compare April 14, 2026 16:55
@clairchiara
Copy link
Copy Markdown
Contributor Author

@Jetz72
That makes sense, I thought about adding a warning log in the console but it seems to happen for a lot of cards...

@clairchiara clairchiara force-pushed the feature/try-art-from-same-set-first branch from 7232f2a to 1b1128f Compare April 16, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CardDB Loading, storing, and searching CardRules and PaperCard data

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants