Creature personality: favourite rooms, hatreds and brawls, abilities learned with the level

- every kind loves one room (working there lifts the mood) and cannot stand certain other kinds; close by they sour each other's mood and now and then brawl (they stop at 30% health)
- learned abilities: imps dig faster, kobold dash, spider web, mage shadow step, ogre stomp, jailer shackle, priestess healing pulse, chainbreaker whirlwind, bat shriek, gargoyle stone form, owl volley, wyrm inferno, cogling bomb
- bestiary lists likes, hatreds and the ability (highlighted from its level on)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Opus 5.5 committed 2026-11-04 07:25:47 +01:00
1 parent 240e89d9cb
commit 2c8db33a69
7 files changed
+403 -4

No files matched your search

+13
View File
@@ -216,6 +216,19 @@ impl Menu {
}
if !HUMANS.contains(&kind) && !cave {
facts.push((trf("best.lure", &[tr(&format!("best.{}.lure", id))]), BLUE_C));
// personality: favourite room, hatreds, learned ability
let p = crate::personality::persona(kind);
if let Some(r) = crate::game::room_index(p.likes) {
facts.push((trf("best.likes", &[tr(crate::game::ROOM_NAMES[r])]), GREEN_C));
}
if !p.hates.is_empty() {
let names: Vec<String> = p.hates.iter().map(|&h| tr(st(h).name)).collect();
facts.push((trf("best.hates", &[names.join(", ")]), RED_C));
}
if let Some((lv, a)) = p.ability {
let line = trf("best.ability", &[lv.to_string(), tr(&format!("ability.{}.name", a)), tr(&format!("ability.{}.desc", a))]);
facts.push((line, if level >= lv { GOLD } else { DIM }));
}
}
text_key = format!("best.{}.text", id);
}