Noticed post-#10: the P.P.E. bar is live (streams from Convex) but casting a spell doesn''t spend — the cast only prints to the telemetry log. Deferred from PR #37.
Root cause: there is no current vitals state anywhere. The schema stores only rolled (the maximums); the bars always render full.
Proposed shape
- Persistent current vitals on the character document (
current: { hitPoints?, sdc?, ppe? }), defaulting to the rolled maximums when absent. Persistent (not client state) so it survives refresh, syncs across devices, and becomes shared table state for the future VTT.
- Mutations:
spendPpe (cast decrements by the spell''s cost, floor 0, reject when insufficient — the sheet should refuse a cast you can''t afford), applyDamage (S.D.C. depletes before H.P., per RUE), heal/restore.
- Sheet: bars fill by
current / max; cast click spends and logs > CAST :: ENERGY BOLT — 5 P.P.E. [79/84]; insufficient P.P.E. renders the spell row dead-steel.
- Recovery (rules layer, page-stamped): P.P.E. regeneration at rest/sleep rates and ley-line/nexus draw per RUE — needs rulebook extraction; H.P./S.D.C. recovery likewise. Can land as a follow-up to the plumbing.
Out of scope
M.D.C. armor, temporary P.P.E. batteries, death/coma state machine (the -P.E. floor already displays).
Noticed post-#10: the P.P.E. bar is live (streams from Convex) but casting a spell doesn''t spend — the cast only prints to the telemetry log. Deferred from PR #37.
Root cause: there is no current vitals state anywhere. The schema stores only
rolled(the maximums); the bars always render full.Proposed shape
current: { hitPoints?, sdc?, ppe? }), defaulting to the rolled maximums when absent. Persistent (not client state) so it survives refresh, syncs across devices, and becomes shared table state for the future VTT.spendPpe(cast decrements by the spell''s cost, floor 0, reject when insufficient — the sheet should refuse a cast you can''t afford),applyDamage(S.D.C. depletes before H.P., per RUE),heal/restore.current / max; cast click spends and logs> CAST :: ENERGY BOLT — 5 P.P.E. [79/84]; insufficient P.P.E. renders the spell row dead-steel.Out of scope
M.D.C. armor, temporary P.P.E. batteries, death/coma state machine (the -P.E. floor already displays).