Dwarf caves in all modes: neutral dwarves guard a hoard and sometimes a rune chest; the rune forge tower; imps repair towers before claiming

- 1-4 cave slots by map size, 50% each (at least one); knight treasure caves only where a mission places them
- dwarves fight intruders near the cave, never chase far, heal at home, grow with distance and the player's army, never count for victory
- rune chest: one free rune forge tower (chain bolt to three more enemies), upgradeable for gold, sold once it comes back (next mission / free play at once), unbuilt ones carry over
- new tool (key N) shown in the tower menu while a rune tower can be built or upgraded

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Opus 5.5 committed 2026-11-03 15:14:36 +01:00
1 parent d92b45a0b8
commit 9a9f04ae1f
17 files changed
+658 -32

No files matched your search

+16
View File
@@ -98,6 +98,7 @@ pub fn draw_props_solid(g: &Game, cam: &Cam, t: f32) {
Kind::Library if z % 2 == 0 => shelf(c, h, l),
Kind::Library if h % 3 == 0 => lectern(c, l),
Kind::ManaSpring => spring_basin(c, l),
Kind::RuneChest => rune_chest(c, l),
_ => {}
}
}
@@ -118,6 +119,16 @@ pub fn draw_props_solid(g: &Game, cam: &Cam, t: f32) {
}
}
// the dwarves' iron-bound chest with the rune forge plans (the rune glows in the glow pass)
fn rune_chest(c: Vec3, l: f32) {
cube(c + vec3(0.0, 0.16, 0.0), vec3(0.5, 0.3, 0.34), rgb(92, 60, 34, l));
cube(c + vec3(0.0, 0.34, 0.0), vec3(0.52, 0.08, 0.36), rgb(110, 72, 40, l));
for dx in [-0.18f32, 0.18] {
cube(c + vec3(dx, 0.2, 0.0), vec3(0.05, 0.4, 0.38), rgb(176, 112, 56, l));
}
cube(c + vec3(0.0, 0.22, 0.18), vec3(0.08, 0.1, 0.03), rgb(200, 170, 80, l));
}
// a stone basin around a mana spring
fn spring_basin(c: Vec3, l: f32) {
for (dx, dz, sx, sz) in [(0.0, -0.38, 0.8, 0.1), (0.0, 0.38, 0.8, 0.1), (-0.38, 0.0, 0.1, 0.8), (0.38, 0.0, 0.1, 0.8)] {
@@ -183,6 +194,11 @@ pub fn draw_props_glow(g: &Game, cam: &Cam, t: f32) {
}
}
}
Kind::RuneChest => {
let f = 0.6 + 0.4 * (t * 2.5 + k).sin();
draw_cube(c + vec3(0.0, 0.39, 0.0), vec3(0.14, 0.02, 0.14), None, Color::new(0.35, 0.8, 1.0, f));
draw_sphere(c + vec3(0.0, 0.45, 0.0), 0.2, None, Color::new(0.3, 0.7, 1.0, 0.15 * f));
}
Kind::ManaSpring => {
// rising mana: a pulsing pool and motes that drift up
let f = 0.8 + 0.2 * (t * 2.0 + k).sin();