Add initiative tracking tools for structured combat
The DM was tracking initiative order, enemy HP, conditions, and effect
durations entirely in its head. That works for short fights but drifts
badly on longer encounters and breaks on context truncation.
Now the DM has a proper initiative tracker — a state machine that
handles turn order, HP, conditions with 5e-correct duration expiry
(anchored to the source's turn), and auto-syncs player HP to the
character sheet. The full combat state gets injected into the system
prompt every turn, so the DM always sees ground truth instead of trying
to remember it.
The MCP server dynamically swaps tool sets: narrative mode gets the
usual 10 tools plus enter_initiative, initiative mode gets 7 combat
tools (damage, heal, condition, next_turn, etc.) plus roll, recall, and
update_character. This keeps the DM's decision space tight — it only
sees what's relevant to the current mode.
Works for non-combat initiative too (environmental hazards, chases,
timed puzzles) since the tracker is just "who goes when" with HP and
conditions bolted on.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>