Lake banks slope down to the water instead of ending in a cliff (t96)

Digging basins to the lower rim left a 9-18 grain vertical cliff on each lake's high side
(owner screenshots, seed 766733). From each edge inward the ground now falls at most 0.7 grains
a column and is never raised above the natural surface. New no-cliff check in t_lakes.js;
world hashes re-baselined (shallow ore: 2 cells changed, on a lake bank).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-29 20:00:48 -04:00
co-authored by Claude Opus 5.5
parent 80668a4baf
commit e3e01a84b1
6 changed files with 37 additions and 11 deletions
+3 -3
View File
@@ -6,9 +6,9 @@ const { check, done } = suite();
// t96 re-baseline: only lake generation (rim height, spawn clearance, levelling) changes these material bytes.
for (const [seed, expected] of [
[777, '7d60a0f1a92b42438471c8c15c5cc92576a75a4aa54b8c519c42904acb7088a6'],
[77, '724eb1730ca5fead6aeaa13994beb2e066bb9d65c7db7e0b790857e2d72b7c2a'],
[4242, '9ffdabf1ffe8ab6cd5855ccfe05c31221d1a0517d960bf2e2273018e9dbf03f9'],
[777, 'dc0a19b076f341bcd944e1692651446198f57c7353db5fdea36d6bdd886ab6ff'],
[77, 'aa979290d81a758e6ff68fa22b06513fb546aa73a80d09e69b35899a46758a0b'],
[4242, '25737574612fe0395a2b0304a1ac698f817aa68bcd9e2b13a24ba794201ba6dc'],
]) {
run(`generateWorld(${seed}, 512, 384)`);
check(`seed ${seed} restores corner sealing`,run('CORNER_SEAL')===true);
+8 -3
View File
@@ -17,9 +17,9 @@ function surfacePools() {
})()`);
}
for (const [seed, expected] of [
[7, '4c4778417e6cf6e9577b831e66111bd374068a14e15642bae304b8a45a68b879'],
[42, '907f2ed79b9fda1ae99c5ee55fa19ce85eff8ffdcd7dadac14a2deb42223217d'],
[424242, '40080ea6039d0d4247e36fd9a5837d0675100414f198d77419ecf500c7f9d6ad'],
[7, '5e230523dc4dda212e7c67ceb7f3b496ff201d826366e1d7c379efd1351d1956'],
[42, 'cc3d150a91caac6ab88dfefbd45d85c5bc5c38fc77d7913b9de157647f4b9d7b'],
[424242, '1339c90f4f7f1d245c2e21aa4b8d23b21c199b8251392256f6de5ed704e2b396'],
[2, null],
[1, null],
// Before t96 round 3 these lakes ran over their lower rim up to the trade dock.
@@ -36,6 +36,11 @@ for (const [seed, expected] of [
check(`seed ${seed} conserves water through levelling`, run('mat.reduce((n, m) => n + (m === WATER), 0) === waterBeforeLevel'));
const initial = surfacePools();
check(`seed ${seed} starts with flat surface pools`, initial.length > 0 && initial.every(p => p.max - p.min <= 1), JSON.stringify(initial));
// Lakes dug to their lower rim once left a cliff on the high side (seed 766733's 15-grain step).
check(`seed ${seed} lake banks slope with no cliff`, run(`(() => { const d = machines.find(m => m && m.type === 'dock');
const top = x => { let y = 0; while (y < H && (mat[y * W + x] === EMPTY || mat[y * W + x] === WATER)) y++; return y; };
return ${JSON.stringify(initial)}.every(p => { for (let x = Math.max(1, p.x0 - 40); x < Math.min(W - 1, p.x1 + 40); x++)
if (x < d.x - 2 || x > d.x + 26) { if (Math.abs(top(x + 1) - top(x)) > 3) return false; } return true; }); })()`), JSON.stringify(initial));
check(`seed ${seed} keeps its lakes clear of the trade dock`, run(`(() => { const d = machines.find(m => m && m.type === 'dock');
return ${JSON.stringify(initial)}.every(p => p.x1 < d.x - 8 || p.x0 > d.x + 24 + 8); })()`), JSON.stringify(initial));
check(`seed ${seed} restores pinned generation switches`, run('LSTEP === 8 && LFILM === 4 && SORTP === 0.06 && CORNER_SEAL && POWDER_FAN'));
+2 -2
View File
@@ -185,8 +185,8 @@ oreNames.forEach((name, j) => {
});
const totalOre = oreBalance.counts.reduce((a, b) => a + b, 0);
check('total ore is about 4 to 4.5 times the original', totalOre >= 162519 * 4 && totalOre <= 162519 * 4.5, totalOre);
// t96 round 3: lake basins moved, so ore under them changed (414 cells, all under the two lakes).
check('shallow ore matches the original generator', oreBalance.shallowHash === 607138519, oreBalance.shallowHash);
// t96: lake basins moved and their high banks now slope, so ore there changed (only at the two lakes).
check('shallow ore matches the original generator', oreBalance.shallowHash === 1640715415, oreBalance.shallowHash);
run('generateWorld(99, 4096, 1536, null)');
const marks = run('(()=>{let lakes=0,peaks=0,inLake=false;for(let x=1;x<W-1;x++){const l=mat[(surfY[x]-1)*W+x]===WATER;if(l&&!inLake)lakes++;inLake=l;if(surfY[x]<surfBase-100&&surfY[x]<=surfY[x-1]&&surfY[x]<surfY[x+1])peaks++;}return [lakes,peaks]})()');
check('a large world has several lakes and mountains across it', marks[0] >= 2 && marks[1] >= 2, marks);