Report card-pool offers as an observed offered/taken pair #316

Merged
nelsong6 merged 1 commit from claude/card-pool-offered-taken-8ff208 into main 2026-08-12 20:40:42 -07:00
nelsong6 commented 2026-08-12 20:40:26 -07:00 (Migrated from github.com)

Prismatic Gem and Dingy Rug showed only how many options each card pool contributed to rewards, which says nothing about what the player did with them. Each pool is now one row whose value is offered/taken.

Offered side — unchanged

Still Hook.TryModifyCardRewardOptions, still deliberately meta: it counts the final visible options of every reward generated while the relic is held, and another modifier may have contributed the same option.

Taken side — new

Reuses the CardReward._cards removal truth already used by Wing Charm and Lasting Candy: snapshot the visible options with their pool when the selection opens, and treat a result missing at terminal resolution as taken. That counts cards that reached the deck, not cards clicked. Reroll resolves before _cards is cleared, then re-snapshots.

Both relics observe the whole option list rather than one tagged option, so a player holding both is credited on both.

Notes

  • card_reward_category_aggregate.taken is additive. Pools written before it read as zero taken, not zero offers.
  • Offered and taken come from different hooks, so they are not a strict subset relationship. If a reward screen ever resolves without having gone through the generation hook, a pool can show taken > offered. Not clamped — clamping would hide the disagreement rather than report it.
  • Fixture card-reward-pool-taken-run.json plus schema-loading assertions on the new field and on the zero default for the two pre-existing fixtures.
  • Primer note added next to the Wing Charm / Lasting Candy paragraphs.

Tests were not run and no live behavioral verification was done, per the repo's user-owned verification rule. Built, deployed, and hot-reloaded cleanly (Patch install: 428 classes patched, 0 failed/skipped); no Harmony surface changed, so no restart is needed.

Prismatic Gem and Dingy Rug showed only how many options each card pool contributed to rewards, which says nothing about what the player did with them. Each pool is now one row whose value is `offered/taken`. ## Offered side — unchanged Still `Hook.TryModifyCardRewardOptions`, still deliberately meta: it counts the final visible options of every reward generated while the relic is held, and another modifier may have contributed the same option. ## Taken side — new Reuses the `CardReward._cards` removal truth already used by Wing Charm and Lasting Candy: snapshot the visible options with their pool when the selection opens, and treat a result missing at terminal resolution as taken. That counts cards that reached the deck, not cards clicked. Reroll resolves before `_cards` is cleared, then re-snapshots. Both relics observe the whole option list rather than one tagged option, so a player holding both is credited on both. ## Notes - `card_reward_category_aggregate.taken` is additive. Pools written before it read as zero taken, not zero offers. - Offered and taken come from different hooks, so they are not a strict subset relationship. If a reward screen ever resolves without having gone through the generation hook, a pool can show taken > offered. Not clamped — clamping would hide the disagreement rather than report it. - Fixture `card-reward-pool-taken-run.json` plus schema-loading assertions on the new field and on the zero default for the two pre-existing fixtures. - Primer note added next to the Wing Charm / Lasting Candy paragraphs. Tests were not run and no live behavioral verification was done, per the repo's user-owned verification rule. Built, deployed, and hot-reloaded cleanly (`Patch install: 428 classes patched, 0 failed/skipped`); no Harmony surface changed, so no restart is needed.
Sign in to join this conversation.
No reviewers
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!316
No description provided.