Wild beasts: cave bears and giant beetles in dens, tamed when beaten while a prison has room

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Opus 5.5 committed 2026-11-06 00:09:18 +01:00
1 parent af21c1ae46
commit 655e625eb0
28 files changed
+289 -5

No files matched your search

+8
View File
@@ -127,6 +127,9 @@ pub enum EK {
// siege engines (heroes bring them; a master can build his own, see siege.rs)
Ram, // smashes doors, walls and towers, ignores creatures
Catapult, // hurls stones at towers from afar
// wild beasts of the caverns (beasts.rs): neutral until tamed
CaveBear, // strong and shaggy, likes the mushroom garden
Beetle, // a giant armoured beetle, likes the lair
}
pub struct St {
@@ -171,6 +174,8 @@ pub fn st(k: EK) -> St {
EK::BattleMage => s("unit.battlemage", 120.0, 18.0, 5.0, 1.8, 1.8, 120, 250),
EK::Ram => s("unit.ram", 900.0, 45.0, 1.1, 1.0, 1.8, 0, 200),
EK::Catapult => s("unit.catapult", 320.0, 40.0, 7.5, 0.9, 3.5, 0, 200),
EK::CaveBear => s("unit.cavebear", 420.0, 24.0, 1.0, 1.9, 1.4, 110, 0),
EK::Beetle => s("unit.beetle", 300.0, 13.0, 1.0, 1.7, 1.1, 70, 0),
}
}
@@ -2782,6 +2787,9 @@ impl Game {
pub(crate) fn kill(&mut self, j: usize) {
self.boss_loot(j);
if self.try_tame(j) {
return;
}
let e = &self.ents[j];
if e.hero && e.captive == 0 && self.prison_space() > 0 {
// knocked out instead of killed: imps carry the hero to the torture chamber