ReviewOS

stacks/the-settlers-iii-remake

[S3-055] Implement healers, thieves, and specialist military interactions

#57
Closed chris opened this 10 days ago ·
10 days ago

S3-055: Implement healers, thieves, and specialist military interactions

Parent and ownership

Parent epic: https://github.com/stacksjs/the-settlers-iii-remake/issues/9 Source owner: stacksjs/the-settlers-iii-remake. Master roadmap: https://github.com/stacksjs/the-settlers-iii-remake/issues/4.

Problem and observable result

Heal actual wounded units. Move stolen goods physically. Handle detection, pursuit, interruption, and death.

The current application is a browser prototype. Passing the Riverlands campaign does not establish original-game or native parity. This issue is complete only when its stated behavior has retained evidence.

Evidence and interfaces

Individual units execute deterministic commands. Recruitment, damage, ownership, offerings, promotions, and interventions use versioned faction rules and physical resources.

Pin the inspected revisions and fixture hashes in the implementation evidence. Original-game observations govern rules and timing. JSettlers is implementation evidence, not an authoritative balance specification. Unknown values remain explicitly unverified.

Acceptance criteria

  • Heal actual wounded units.
  • Move stolen goods physically.
  • Handle detection, pursuit, interruption, and death.
  • The visible result agrees with the underlying simulation or platform state, including failure paths.
  • Tests exercise the maintained public interface and retain reproducible fixtures or execution receipts.

Test matrix

  • Interrupt healing and theft.
  • Verify stolen cargo ownership after defeat.
  • Exercise invalid input, cancellation or interruption, and repeated execution where this interface permits them.
  • Verify determinism/conservation for simulation changes and resource ownership/disposal for platform changes.
  • Run owning-repository lint, relevant type checks and tests. Capture actual native output for native capability claims.

Scope constraints

Implement this behavior as a complete verifiable slice. Do not silently expand into adjacent tickets or substitute simplified gameplay. Keep the shared TypeScript simulation, shared stx signals, and ts-css conventions. Native gameplay and HUD must not depend on a WebView. HomeOS reuse must not introduce a kernel dependency into the game. Existing unrelated edits and authored guidance must be preserved.

Blocked by

Upstream release and adoption

Application behavior belongs here. If a reproduction identifies a framework defect, repair and release its owning source first, update Stacks where affected, then install the verified packages here.

No node_modules edits, copied runtimes, generated-source string patches, fabricated globals, successful no-op implementations, or skipped release gates. Push tested conventional commits as Chris to the owning origin/main without coauthor trailers or force pushes.

Completion evidence

  • Implementation commits and relevant upstream issue links.
  • Exact checks and results, fixture hashes, and screenshots/native execution evidence where applicable.
  • Published package versions, downstream lockfile identity, and release receipts when affected.
  • Remaining limitations stated explicitly. Partial work does not close this issue.
10 days ago

Completed in 22d6ee1 (rules roman-engineering 0.7.0, digest 486e089e…40bb44).

  • Healing actual wounded units: the healer's hut (3 planks, 3 stone, manual table) employs a healer. He calls the most wounded idle soldier of his player within 20 tiles of the work area to the heal spot and restores full health, one treatment every four seconds (reference HealerMovable, hospital.xml). Soldiers carrying out orders are not called, as the manual has the player send wounded soldiers to the healer. TAB keeps only the wounded among marked soldiers (manual).
  • Stolen goods moved physically: thieves are converted from carriers without a tool, keeping the carrier ratio (manual). Sent with ALT, a thief takes one good from a pile on someone else's land within 30 tiles of the target (reference). He carries it home at half speed (manual: thieves are slow carrying loot; the factor is a placeholder) and sets it down once he stands on his own land. The good changes owner as it is taken, recorded as lost/gained so both players' accounts balance.
  • Detection, pursuit, interruption, death: other players see a thief as a carrier until one of their soldiers comes within 3 tiles (manual; the distance is a placeholder). From then on their soldiers pursue and strike him (100 health, reference). A fallen thief drops his loot where he lies, still his player's. Any new order interrupts a theft or a treatment.

Tests (tests/unit/engine-thieves.test.ts):

  • recruitment and the disguise in the enemy's view
  • a complete theft with slowed steps and balanced ledgers
  • uncovering, pursuit and death with loot ownership and audits
  • interruption, restore and tampered state
  • a full treatment, interruption by a move order, and the TAB filter

The browser has a Thief button. Click a thief, right-click to send him, and hold Alt to pilfer there.

Sign in to comment on this issue.