Creatures arrive faster with more free lair room, slower as the lairs fill up

- Portal interval scaled by free beds (1 free: ~3x slower, 6: normal, 14: 2x faster, up to ~3x)
- Lair info shows the free beds and the arrival speed
- Test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Opus 5.5 committed 2026-11-03 11:29:18 +01:00
1 parent bd8f53e8a1
commit 6c85a62f1b
4 files changed
+34 -2

No files matched your search

+5 -1
View File
@@ -1119,7 +1119,11 @@ pub fn hover_info(g: &Game, ent: Option<usize>, tile: Option<(i32, i32)>) -> Vec
let what = ["res.gold", "res.silver", "res.ruby", "res.diamond"][(t.res & 3) as usize];
out.push((trf("treasury.content", &[t.gold.to_string(), tr(what)]), GOLD));
}
Kind::Lair => out.push((tr(if t.bed != 0 { "lair.taken" } else { "lair.free" }), DIM)),
Kind::Lair => {
out.push((tr(if t.bed != 0 { "lair.taken" } else { "lair.free" }), DIM));
let speed = (100.0 / g.lair_factor()).round() as i32;
out.push((trf("lair.arrivals", &[g.free_beds().to_string(), speed.to_string()]), if speed >= 100 { GREEN } else { GOLD }));
}
Kind::Torture => {
let used = g.ents.iter().filter(|e| e.alive && e.hero && e.captive != 0).count();
out.push((trf("info.prison", &[used.to_string(), (g.counts[5] / 2).to_string()]), DIM));