View stats for removed cards #12

Closed
opened 2026-04-19 21:21:59 -07:00 by nelsong6 · 1 comment
nelsong6 commented 2026-04-19 21:21:59 -07:00 (Migrated from github.com)

Motivation

A card can be removed from the deck mid-run (Toke event, Merchant's remove service, certain curses like Parasite, etc.). Today our tooltip UI only shows stats for cards currently in the deck — once a card is gone, its historical contribution is invisible.

That's useful data the user paid attention to. Example: "I removed Bashdrawer on floor 12 after it delivered 40 effective damage across 8 plays — was that the right call?"

What we'd need

  1. Track card removals: hook whichever game method handles pile-based card removal from the deck. Log an event + preserve the instance's aggregates under a "removed" flag with removal floor/room/reason.
  2. UI surface for browsing removed cards:
    • A separate section in the tooltip when hovering any card ("Also-removed cards: 2")? Probably wrong surface.
    • A new screen / button accessible from deck view or somewhere sensible
    • Or a tab/toggle within our existing Card Utility mode
  3. Design question: merge removed cards with the "current deck" view, or keep them separate?

Priority

Medium. Compelling feature for post-run analysis but not blocking the core functional loop (track-per-play stats for live cards).

  • This is one example of "our UI will keep growing" — other dimensions to think about:
    • Cards in exhaust pile during combat
    • Cards generated temporarily and never picked (Neurosurge output, Wraith Form clones, etc.)
    • Per-combat views vs. per-run views
## Motivation A card can be removed from the deck mid-run (Toke event, Merchant's remove service, certain curses like Parasite, etc.). Today our tooltip UI only shows stats for cards currently in the deck — once a card is gone, its historical contribution is invisible. That's useful data the user paid attention to. Example: "I removed Bashdrawer on floor 12 after it delivered 40 effective damage across 8 plays — was that the right call?" ## What we'd need 1. Track card removals: hook whichever game method handles pile-based card removal from the deck. Log an event + preserve the instance's aggregates under a "removed" flag with removal floor/room/reason. 2. UI surface for browsing removed cards: - A separate section in the tooltip when hovering any card ("Also-removed cards: 2")? Probably wrong surface. - A new screen / button accessible from deck view or somewhere sensible - Or a tab/toggle within our existing Card Utility mode 3. Design question: merge removed cards with the "current deck" view, or keep them separate? ## Priority Medium. Compelling feature for post-run analysis but not blocking the core functional loop (track-per-play stats for live cards). ## Related - This is one example of "our UI will keep growing" — other dimensions to think about: - Cards in exhaust pile during combat - Cards generated temporarily and never picked (Neurosurge output, Wraith Form clones, etc.) - Per-combat views vs. per-run views
nelsong6 commented 2026-04-20 18:20:27 -07:00 (Migrated from github.com)

Closing this as shipped and working.

Root cause: removed cards were disappearing from Card Utility entirely once they left the deck. We had per-instance aggregates, but no removal hook to mark an instance as removed and no deck-view surface to render removed cards back into the browseable list.

Fix shipped in 9a4a44e:

Deliberate non-changes: this closes the issue via the "merge removed cards into the current deck view behind the existing Card Utility toggle" approach. It does not add a separate removed-cards screen/tab, and it does not currently store removal room/reason metadata.

User-verified working, so closing.

Closing this as shipped and working. Root cause: removed cards were disappearing from Card Utility entirely once they left the deck. We had per-instance aggregates, but no removal hook to mark an instance as removed and no deck-view surface to render removed cards back into the browseable list. Fix shipped in [9a4a44e](https://github.com/nelsong6/card-utility-stats/commit/9a4a44e3f5ae5583083f3821ff4e4ca5b2b3dd35): - Removal capture and persistence: [Core/Patches/CardRemoveFromDeckPatch.cs#L9-L40](https://github.com/nelsong6/card-utility-stats/blob/9a4a44e3f5ae5583083f3821ff4e4ca5b2b3dd35/Core/Patches/CardRemoveFromDeckPatch.cs#L9-L40) plus [Core/RunTracker.cs#L834-L870](https://github.com/nelsong6/card-utility-stats/blob/9a4a44e3f5ae5583083f3821ff4e4ca5b2b3dd35/Core/RunTracker.cs#L834-L870) and [Core/RunTracker.cs#L958-L970](https://github.com/nelsong6/card-utility-stats/blob/9a4a44e3f5ae5583083f3821ff4e4ca5b2b3dd35/Core/RunTracker.cs#L958-L970). This marks aggregates as removed, records removal floor, snapshots the card state for hot-reload resume, and surfaces the removed-card list back to the UI. - Deck-view UI surface: [Core/Patches/DeckViewInjectRemovedPatch.cs#L9-L68](https://github.com/nelsong6/card-utility-stats/blob/9a4a44e3f5ae5583083f3821ff4e4ca5b2b3dd35/Core/Patches/DeckViewInjectRemovedPatch.cs#L9-L68) appends removed cards into the in-run deck view when Card Utility mode is enabled. - Hover treatment: [Core/Patches/CardHoverTooltipPatch.cs#L180-L201](https://github.com/nelsong6/card-utility-stats/blob/9a4a44e3f5ae5583083f3821ff4e4ca5b2b3dd35/Core/Patches/CardHoverTooltipPatch.cs#L180-L201) marks removed cards explicitly in the tooltip, including the red "Card Removed" banner when the card is no longer in deck. - Toggle polish: [Core/Patches/ViewStatsInjectorPatch.cs#L267-L278](https://github.com/nelsong6/card-utility-stats/blob/9a4a44e3f5ae5583083f3821ff4e4ca5b2b3dd35/Core/Patches/ViewStatsInjectorPatch.cs#L267-L278) makes the deck view re-render immediately when the toggle flips so removed cards appear/disappear live. Deliberate non-changes: this closes the issue via the "merge removed cards into the current deck view behind the existing Card Utility toggle" approach. It does not add a separate removed-cards screen/tab, and it does not currently store removal room/reason metadata. User-verified working, so closing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
romaine-life/spirelens#12
No description provided.