Knight fortresses: knight towers, patrols, alarm, claimable knight ground and vaults

- fortress.rs: fortress builder (masonry walls with doors, courtyard, corner towers, vault chambers
  full of mixed treasure, shard chamber, gate of the order as the heart, guards, patrols)
- Knight towers shoot the player's units; creatures tear down knight towers within reach
- Patrols walk their round; guards and patrols that spot an enemy alarm the others nearby
- Imps claim knight ground (slower, not next to fighting heroes); vaults hand over their treasure,
  shard chambers give the shard back; claiming alarms the knights
- Knights tear down the player's bridges near their posts
- Fix: units next to a tower could stop at the tile edge just out of melee reach
- Tests for towers, vault looting, patrols/alarm and bridge tearing

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Opus 5.5 committed 2026-11-03 10:57:37 +01:00
1 parent 7e84cae910
commit e15b16cc60
7 files changed
+565 -23

No files matched your search

+8 -8
View File
@@ -419,15 +419,15 @@ impl Ui {
let cap = g.counts[1].min(30);
let wave_col = if g.wave_timer < 30.0 { RED } else { TXT };
let vol = if settings.muted { tr("hud.off") } else { format!("{}%", (settings.volume * 100.0).round() as i32) };
let mut gold_seg = vec![txt(tr("hud.gold"), GOLD), Part::Gap, txt(format!("{}/{}", g.gold as i32, g.gold_cap() as i32), TXT)];
let due = g.next_payday_cost().ceil() as i32;
if due > 0 {
// what the next payday costs, in red
gold_seg.push(Part::Gap);
gold_seg.push(txt(format!("-{}", due), RED));
}
let mut segs: Vec<Vec<Part>> = vec![
vec![
txt(tr("hud.gold"), GOLD),
Part::Gap,
txt(format!("{}/{}", g.gold as i32, g.gold_cap() as i32), TXT),
Part::Gap,
// what the next payday costs, in red
txt(format!("-{}", g.next_payday_cost().ceil() as i32), RED),
],
gold_seg,
vec![txt(tr("hud.mana"), MANA), Part::Gap, Part::Bar(g.mana / MANA_MAX, MANA), Part::Gap, txt(format!("{:<3}", g.mana as i32), TXT)],
vec![txt(tr("hud.core"), RED), Part::Gap, Part::Bar(g.core_hp / CORE_HP, RED)],
vec![txt(tr("hud.gate"), BLUE), Part::Gap, Part::Bar(g.gate_hp / GATE_HP, BLUE)],