summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/itemname.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/itemname.cc')
-rw-r--r--crawl-ref/source/itemname.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index 89a6d3c251..a76dc938ff 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -1466,6 +1466,14 @@ std::string item_def::name_aux( description_level_type desc,
break;
case OBJ_BOOKS:
+ if (is_random_artefact( *this ) && !dbname && !basename)
+ {
+ if (know_type)
+ buff << "book" << get_artefact_name(*this);
+ else
+ buff << get_artefact_name(*this) << "book";
+ break;
+ }
if (basename)
buff << (item_typ == BOOK_MANUAL ? "manual" : "book");
else if (!know_type)
@@ -1560,7 +1568,8 @@ std::string item_def::name_aux( description_level_type desc,
buff.str( pluralise(buff.str()) );
// Disambiguation
- if (!terse && !basename && !dbname && know_type)
+ if (!terse && !basename && !dbname && know_type &&
+ !is_random_artefact( *this ))
{
switch (this->base_type)
{