Skip to content

CardDB cleanup; index cards by CardRules#10617

Open
Jetz72 wants to merge 4 commits intoCard-Forge:masterfrom
Jetz72:cardDbRefactor20260503
Open

CardDB cleanup; index cards by CardRules#10617
Jetz72 wants to merge 4 commits intoCard-Forge:masterfrom
Jetz72:cardDbRefactor20260503

Conversation

@Jetz72
Copy link
Copy Markdown
Contributor

@Jetz72 Jetz72 commented May 6, 2026

  • Implements allCardsByRules, an alternative to allCardsByName that guarantees that cards don't appear in multiple entries due to things like prepared cards nesting one card within the faces of another. allCardsByName remains available for searching purposes.
  • Migrates a bunch of CardDB's overloaded methods up to the interface as default methods.
  • Removes the noAlt versions of the getAllCards/getUniqueCards methods when the name is not a parameter. The only real distinction between the two previously was that one version contained some unintended duplicate entries or was otherwise slightly wrong.
  • Splits the rulesByName into rulesByPrimaryName and rulesByAltName. Allows a noAlt variant of getRules, though I chose to implement it as a parameter, which I might do for the others sometime too.
  • Switches uniqueCardsByName to uniqueCardsByRules, so that Emeritus of Ideation can no longer be chosen as the default printing of Ancestral Recall.
  • Swaps a few instances of name lookup to rules lookup. Going forward: if you want to search up other prints of a card, getAllCards(CardRules) or getAllCards(PaperCard) are preferable to getAllCards(card.getName()).

@Jetz72 Jetz72 requested review from Hanmac and tool4ever May 6, 2026 13:57
@Jetz72 Jetz72 added the CardDB Loading, storing, and searching CardRules and PaperCard data label May 6, 2026
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.

1 participant