Skip to content

feat: add persisted S.D.C. combat exchanges#52

Merged
StreamDemon merged 21 commits into
mainfrom
feat/sdc-combat-exchange
Jul 21, 2026
Merged

feat: add persisted S.D.C. combat exchanges#52
StreamDemon merged 21 commits into
mainfrom
feat/sdc-combat-exchange

Conversation

@StreamDemon

@StreamDemon StreamDemon commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Closes #44

Summary

  • Add a persisted two-phase S.D.C. attack/defense exchange with server-owned dice.
  • Derive legal melee/ranged defenses and route hits through body pools or artificial S.D.C. armor.
  • Add the Ley Terminal command-rail UI with route-safe live Convex feeds.

Rules boundary

Verification

  • Affected rules, backend, and web package check/test gates pass.
  • Root vp check, vp test, and git diff --check pass.
  • Live two-dossier miss, defense, hit, M.D.C. refusal, and route-change ownership scenarios pass.

Tracker


Summary by cubic

Adds a persisted, server-rolled S.D.C. combat exchange with engine-authorized defenses, immutable history, and correct S.D.C→HP routing including Artificial S.D.C. armor A.R. and ablation. Hardens state ownership to reject stale inputs and rule snapshots.

  • New Features

    • @riftforge/rules: Derive attack profiles and legal defenses, validate context, resolve strikes and damage, and route S.D.C. through body pools or Artificial S.D.C. armor. Adds combat state tokens and ranged dodge/auto-dodge + minimum strike rules; Natural A.R. excluded per RUE p.339; M.D. weapons and nondepleted M.D.C. protection are refused.
    • Backend (Convex): Adds combatExchanges ledger with indexes and APIs to list targets, declare exchanges, choose defenses, and resolve atomically with server-owned dice and state revalidation. Shares character state helpers and rejects stale rule snapshots and manifest changes.
    • Web: New CombatExchangePanel with route-safe live feeds and telemetry; adds SelectInput and ToggleChip; improves state ownership, clears stale notices, and tweaks semantics for accessibility.
  • Migration

    • Apply Convex schema changes (new combatExchanges table and indexes) and redeploy the backend.

Written for commit 3b2f008. Summary will update on new commits.

Review in cubic

@StreamDemon
StreamDemon marked this pull request as ready for review July 20, 2026 07:51

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 25 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread apps/web/src/components/combat-exchange-panel.tsx
Comment thread packages/rules/src/engine/combat-exchange.ts
Repository owner deleted a comment from cubic-dev-ai Bot Jul 20, 2026
@StreamDemon
StreamDemon merged commit 3067c99 into main Jul 21, 2026
2 checks passed
@StreamDemon
StreamDemon deleted the feat/sdc-combat-exchange branch July 21, 2026 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A.R. & armor damage in combat: strike-vs-A.R., armor ablation, the M.D.C. scope decision

1 participant