Wilder maps: rivers of water and lava across free maps (neutral bridges), natural caverns until about a quarter of every map is open

- caverns in free play and the campaign (mission pieces, fortresses, islands, sealed caves and dwarf caves stay untouched)
- caverns sometimes hold a pool of water or lava, veins in their walls, rarely a small treasure or a creature in chains to free
- rivers keep away from the start; test: open share, liquids and a hero path to the core
- standalone file in play/ rebuilt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Opus 5.5 committed 2026-11-04 08:15:34 +01:00
1 parent 51814b8ac8
commit 2de0a1de8a
6 files changed
+198 -2

No files matched your search

+2 -1
View File
@@ -629,6 +629,7 @@ impl Game {
g.wave_timer = FIRST_WAVE + ((dist - 45.0) * 1.5).clamp(0.0, 300.0);
g.guard_treasures();
g.place_dwarf_caves(seed);
g.add_wilds(seed, true);
g.init_research(None);
g.init_fog();
g.msg("msg.welcome1", vec![]);
@@ -5133,7 +5134,7 @@ mod tests {
// rubies fill their own tiles
g.add_res(1200.0, 2);
g.update(0.01);
let rubies: i32 = g.map.t.iter().filter(|t| t.kind == Kind::Treasury && t.res == 2).map(|t| t.gold).sum();
let rubies: i32 = g.map.t.iter().filter(|t| t.kind == Kind::Treasury && t.owner == Owner::Player && t.res == 2).map(|t| t.gold).sum();
assert_eq!(rubies, 1200);
assert!(g.map.t.iter().all(|t| t.gold <= TREASURY_TILE as i32 || t.vein().is_some()));
// spending empties tiles (randomly), the total always matches the gold counter