Skip to content

Enumerate cards simplified/info management#8458

Merged
NBKelly merged 16 commits intomtgred:masterfrom
NBKelly:enumerate-cards
Dec 9, 2025
Merged

Enumerate cards simplified/info management#8458
NBKelly merged 16 commits intomtgred:masterfrom
NBKelly:enumerate-cards

Conversation

@NBKelly
Copy link
Collaborator

@NBKelly NBKelly commented Dec 9, 2025

  • I added an enumerate-cards fn which is cleaner than (enumerate-str (map :title/get-title ...))`, and supports sorting where appropriate
  • I updated most uses of enumerate-str throughout the game to use this
  • I made it so that most of the time, the enumerated cards are sorted where they should be
    • This means for a lot of cards, you will no longer receive them in prompt-click-order (ie gachapon), but sorted order
    • Reveals, sequences of cards from hand/discard, and a few others will be in sorted order to not reveal draw-order where they shouldn't
    • Some stuff will just imperceptibly become easier to parse
  • Harvest now discards instead of trashes cards
  • I confirmed it does not trigger strike/steelskin, but does trigger magdalene


(defn enumerate-cards
"Enumerates a collection of cards, optionally in sorted order"
([cards] (enumerate-cards cards nil))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we default to sorted?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it could be either, but:

  • The default behaviour (unsorted) means if you forget the key, the info is slightly harder to parse
  • The default being sorted means if you forget the key, you leak info
    So I think this is safer.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does sorted leak info?

@NBKelly NBKelly merged commit 50a837e into mtgred:master Dec 9, 2025
3 checks passed
@NBKelly
Copy link
Collaborator Author

NBKelly commented Dec 9, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants