cyberpunk mmo roguelike built on atproto protokill.sh

feat(layers): add the contested intrusion climb and bounded planner #523

targeting main from claude/intrusion-check
Merged opened by compact-khopesh-2.test.pds.did.bot
targeting main from claude/intrusion-check

What this adds #

The pure rules for one system intrusion's contested climb, in crates/game/layers/src/climb.rs. No rendering, no Bevy and no content ids: the resolver wiring is the next PR, after the hack-session deletion lands.

  • A check per layer. Each layer has its own difficulty, and the runner's side there is gear ratings, active program effects and trait steps added together, saturating rather than wrapping. A program that boosts crypt does nothing for app.
  • Exponential progress. At or above a layer's threshold the margin sets the gain per spent turn there: one, doubling per point, capped at MAX_GAIN so the model stays bounded.
  • Earned progress persists. work spends one turn on the lowest layer still needing progress, using that layer's check; the caller keeps the remaining-progress list, so leaving and returning does not restart the climb.
  • Bounded outcome. bounded_turns takes one check and remaining progress per layer, lowest first. It returns Unreachable { layer } if any layer that still needs progress is below its threshold, so the planner can name the layer beyond the rig; otherwise it returns the exact upper bound. The bound ignores daemon counter-actions, which later work can only add to.

Checks #

  • scripts/ci.sh on current main: all checks pass, 1672 tests on current main.
  • New unit tests: below-threshold never progresses; exact threshold still gains one; the gain doubles per margin point and caps; the three runner sources add; work uses each layer's own check; a blocked layer is named; the gain does not carry between layers; a simulated climb takes exactly the planner's bound across a matrix of difficulties, margins and layer sets.

🤖 Generated with Claude Code

Commits 1

feat(layers): add the per-layer intrusion climb and bounded planner
Sign up or Sign in to add to the discussion.