ReviewOS

stacks/the-settlers-iii-remake

[S3-057] Implement temples, offerings, manna, priests, and promotions

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

S3-057: Implement temples, offerings, manna, priests, and promotions

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

Offer physically delivered goods. Recruit priests and spend manna. Apply promotions only to subsequent recruits.

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

  • Offer physically delivered goods.
  • Recruit priests and spend manna.
  • Apply promotions only to subsequent recruits.
  • 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

  • Promote with existing troops present.
  • Save during offering and promotion progress.
  • 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 d9a6bb0.

  • Offerings from physically delivered goods: carriers deliver wine to the small temple's request pile. The temple takes one offering every 30 seconds (reference TempleBuilding, E) for one manna, recorded as consumed wine in the ledger. The manual confirms that small temples transform wine offerings into manna.
  • Priests and manna: a completed large temple gives 8 manna once. It gives none again after a completed one has been razed (reference BigTemple). It brings a priest every five minutes (manual; the reference uses ten, recorded in evidence), up to 100. Priests are born settlers and counted. Manna is spent on promotions here; spending it on interventions is S3-058.
  • Promotions: costs are 10, 20, 30, 50, 60, 30 in order, and no class may get two ranks ahead of another (reference MannaInformation). Each promotion raises the rank only of soldiers recruited afterwards; serving soldiers keep theirs (manual). The free rank setting is refused under these rules.
  • Visible result: the sidebar shows manna, the next promotion's cost, each class's joining rank, and Promote buttons. Refusals explain why.

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

  • offerings on schedule, including a save mid-offering that restores identically
  • large-temple manna once, a priest's arrival, and razing forfeiting further temple manna
  • promotion costs, order rule and limits, sparing a serving soldier
  • tampered religion saves refused

engine-military.test.ts covers recruits joining at the promoted rank. Profile 0.4.0 stays frozen for older games.

Sign in to comment on this issue.