From fd7dc681f01391fac151867b2d9152d7795c6e76 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Sun, 25 May 2008 11:48:21 +0000 Subject: Mention named orcs' base type in the monster descriptions. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5231 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/directn.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/directn.cc') diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index 1c14c2e8f6..eef4efefa4 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -2169,13 +2169,20 @@ static void describe_monster(const monsters *mon) } } +// This method is called in two cases: +// a) Monsters coming into view: "An ogre comes into view. It is wielding ..." +// b) Monster description via 'x': "An ogre, wielding a club and wearing ..." std::string get_monster_desc(const monsters *mon, bool full_desc, description_level_type mondtype) { std::string desc = ""; if (mondtype != DESC_NONE) + { desc = mon->name(mondtype); - + // For named monsters also mention the base type. + if (!(mon->mname).empty()) + desc += ", " + mons_type_name(mon->type, DESC_NOCAP_A); + } std::string weap = ""; if (mon->type != MONS_DANCING_WEAPON) @@ -2188,6 +2195,7 @@ std::string get_monster_desc(const monsters *mon, bool full_desc, desc += weap; } + // Print the rest of the equipment only for full descriptions. if (full_desc) { const int mon_arm = mon->inv[MSLOT_ARMOUR]; -- cgit v1.2.3-54-g00ecf