Status: done (2026-11-10) Priority: 3 Size: S Design ref: design.md, World, climate and travel, the row Walking and terrain (slopes Decided, 10 Nov) Goal: Routes prefer flat ground and a pawn walks slower on a steep step: stepCost (src/sim/routes.js) adds SLOPE.perRise for each unit of elevation between the two tiles (w.he), at most SLOPE.max, the same up and down, so the way back stays the way there, reversed. Acceptance criteria:
SLOPE = { perRise: 6, max: 2 } in src/sim/rules.js, with a comment that says what each number does; perRise: 0 switches slopes off.stepCost adds slopeCost: perRise times the elevation difference of the two tiles, at most max, the same up and down; water counts as sea level; a worn path does not flatten a slope. Routes and walking speed both follow, as they do for terrain.ROUTE.minStep stays the search’s lower bound (a slope only adds); MAX_STEP of refreshRoutes grows by SLOPE.max.tests/routes.js: raised ground is walked round, the way back costs the same, a step costs the same up and down, level high ground costs the terrain alone, the cap holds, perRise: 0 restores the straight way.tests/golden.json re-recorded (every entry changes: routes and so walking times differ from the first day), and the pinned life hash of tests/record.js. tests/counters.json holds unchanged.
Notes:design.md’s row “Walking and terrain” names the slope cost (Kim asked for the amendment, 10 Nov).src/sim/rules.js (SLOPE), src/sim/routes.js (slopeCost, stepCost, MAX_STEP), docs/architecture/modules.md (tunables). No new state, module or owner: reads w.he.
Validation (small map, 5 years populous and 10 years founders; before, after):npm test passes (86 scripts). npm run verify: all pass but tests/history.js, which also fails at the commit before on the published fixtures (made at 498a87a): routeExpand, routeRefresh, walkTies, roundPairs, heirRank, roundRank. With this change routeExpand 1.462 to 1.316, routeRefresh 1.856 to 1.970, and oppAsk 1.354411 to 1.354475, over its recorded ceiling by 0.00006.