Allow assigning a CR to custom (non-bestiary) combatants so they contribute to the encounter difficulty calculation. Accessed via a difficulty breakdown panel opened by tapping the difficulty indicator. This bundles the breakdown panel and CR assignment as one feature since the panel is the natural UI for the assignment.
Acceptance Criteria
Combatant supports an optional cr field (string, same format as bestiary CRs)
The difficulty indicator is tappable — opens a breakdown panel showing party budget, per-monster XP contributions, and total
Custom combatants without CR appear in the panel as "unassigned" with a CR picker offering standard 5e values (0, 1/8, 1/4, 1/2, 1-30)
Assigning CR to a custom combatant immediately updates the XP total and difficulty tier
Bestiary-linked combatants derive CR from creature data — the manual cr field is ignored when creatureId is present. The panel shows bestiary-linked CRs as read-only with the source name visible, making the precedence clear.
CR assignment persists within the encounter (survives page reload via encounter storage, round-trips through JSON export/import)
Existing difficulty indicator visibility rules unchanged (hides when no PCs with levels or no combatants with CR)
Notes
This is a bigger chunk of work than issue #20 — two coupled features in one issue. The breakdown panel could be split out if needed, but the CR picker needs a home.
Adding cr to Combatant means another field for rehydrateCombatant to handle — if issue #20 (domain rehydration) lands first, this just means updating the domain function. If not, it's another instance of the shotgun surgery problem.
MVP baseline does not include assigning combatants to party/enemy sides — all combatants with CR are counted as enemies.
Context
Extends spec 008 (encounter difficulty indicator)
Related: issue #20 (move entity rehydration to domain layer)
## Summary
Allow assigning a CR to custom (non-bestiary) combatants so they contribute to the encounter difficulty calculation. Accessed via a difficulty breakdown panel opened by tapping the difficulty indicator. This bundles the breakdown panel and CR assignment as one feature since the panel is the natural UI for the assignment.
## Acceptance Criteria
- [x] `Combatant` supports an optional `cr` field (string, same format as bestiary CRs)
- [x] The difficulty indicator is tappable — opens a breakdown panel showing party budget, per-monster XP contributions, and total
- [x] Custom combatants without CR appear in the panel as "unassigned" with a CR picker offering standard 5e values (0, 1/8, 1/4, 1/2, 1-30)
- [x] Assigning CR to a custom combatant immediately updates the XP total and difficulty tier
- [x] Bestiary-linked combatants derive CR from creature data — the manual `cr` field is ignored when `creatureId` is present. The panel shows bestiary-linked CRs as read-only with the source name visible, making the precedence clear.
- [x] CR assignment persists within the encounter (survives page reload via encounter storage, round-trips through JSON export/import)
- [x] Existing difficulty indicator visibility rules unchanged (hides when no PCs with levels or no combatants with CR)
## Notes
- This is a bigger chunk of work than issue #20 — two coupled features in one issue. The breakdown panel could be split out if needed, but the CR picker needs a home.
- Adding `cr` to `Combatant` means another field for `rehydrateCombatant` to handle — if issue #20 (domain rehydration) lands first, this just means updating the domain function. If not, it's another instance of the shotgun surgery problem.
- MVP baseline does not include assigning combatants to party/enemy sides — all combatants with CR are counted as enemies.
## Context
- Extends spec 008 (encounter difficulty indicator)
- Related: issue #20 (move entity rehydration to domain layer)
- Research: `docs/agents/research/2026-03-25-combat-state.md`
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Allow assigning a CR to custom (non-bestiary) combatants so they contribute to the encounter difficulty calculation. Accessed via a difficulty breakdown panel opened by tapping the difficulty indicator. This bundles the breakdown panel and CR assignment as one feature since the panel is the natural UI for the assignment.
Acceptance Criteria
Combatantsupports an optionalcrfield (string, same format as bestiary CRs)crfield is ignored whencreatureIdis present. The panel shows bestiary-linked CRs as read-only with the source name visible, making the precedence clear.Notes
crtoCombatantmeans another field forrehydrateCombatantto handle — if issue #20 (domain rehydration) lands first, this just means updating the domain function. If not, it's another instance of the shotgun surgery problem.Context
docs/agents/research/2026-03-25-combat-state.md