Traps and doors made in a new forge room, installed by imps; new creature: the cogling

- forge room: creatures work there (coglings fastest), the work goes into the oldest planned trap or door; finished pieces wait as crates, imps carry and install them
- traps: spike pit, poison vent (cloud), fire jet, stone roller, alarm bell (calls creatures), rune mine (one big blast), frost glow (slows around it)
- doors: wood, iron, magic (hurls attackers back); own creatures pass, enemies smash them on their way; clicking a door with a door tool locks it for everybody
- new 'Traps' category in the toolbar, forge in the rooms; texts EN/DE, bestiary entries; atlas grown for new textures and icons
- tests: forge to installed trap, spikes hurt, doors lock and get smashed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Opus 5.5 committed 2026-11-04 06:55:37 +01:00
1 parent 1696297ac3
commit 4f20223c93
13 files changed
+1267 -24

No files matched your search

+17 -2
View File
@@ -61,6 +61,8 @@ pub enum Kind {
Steel, // steel wall: hardly anyone gets through
ManaSpring, // crystal spring: once claimed, more mana and a higher mana maximum
RuneChest, // dwarven chest with the plans of a rune forge tower (claim it: one free build)
Forge, // room: creatures manufacture traps and doors
Door, // floor with an installed door (res bit 0: locked)
}
// options for the map generator (campaign missions)
@@ -89,7 +91,7 @@ pub struct River {
}
// order matters for the packed savegame codec: only append new kinds
const KINDS: [Kind; 27] = [
const KINDS: [Kind; 29] = [
Kind::Rock,
Kind::Earth,
Kind::Gold,
@@ -117,6 +119,8 @@ const KINDS: [Kind; 27] = [
Kind::Steel,
Kind::ManaSpring,
Kind::RuneChest,
Kind::Forge,
Kind::Door,
];
// treasures (veins, treasury content, imp loads): 0 gold, 1 silver, 2 ruby, 3 diamond
@@ -213,6 +217,8 @@ impl Tile {
| Kind::Aerie
| Kind::ManaSpring
| Kind::RuneChest
| Kind::Forge
| Kind::Door
)
}
// river tiles (open, but nobody can walk there)
@@ -642,7 +648,15 @@ impl Map {
}
pub fn walk_cost(&self) -> impl Fn(usize) -> Option<u32> + '_ {
move |i| if self.t[i].walkable() { Some(1) } else { None }
move |i| {
let t = &self.t[i];
// a locked door stops the dungeon's own creatures too
if t.walkable() && !(t.kind == Kind::Door && t.res & 1 == 1) {
Some(1)
} else {
None
}
}
}
// flying creatures also cross water and lava
@@ -663,6 +677,7 @@ impl Map {
Kind::Earth => Some(7),
Kind::Gold | Kind::Silver | Kind::Ruby | Kind::Diamond => Some(12),
Kind::Rock | Kind::Core | Kind::Tower | Kind::Water | Kind::Lava => None,
Kind::Door => Some(10),
_ => Some(1),
}
}