diff options
Diffstat (limited to 'crawl-ref/source/describe.cc')
-rw-r--r-- | crawl-ref/source/describe.cc | 44 |
1 files changed, 19 insertions, 25 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 5c1853e2e5..c74de28fcf 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -470,23 +470,6 @@ static std::string _randart_descrip( const item_def &item ) description += "$It emits mutagenic radiation."; } - if (is_unrandom_artefact( item )) - { - const char *desc = unrandart_descrip( 0, item ); - const char *desc_id = unrandart_descrip( 1, item ); - - if (item_type_known(item) && desc_id[0] != '\0') - { - description += "$$"; - description += desc_id; - } - else if (desc[0] != '\0') - { - description += "$$"; - description += desc; - } - } - return description; } #undef known_proprt @@ -1669,14 +1652,6 @@ std::string get_item_description( const item_def &item, bool verbose, } #endif - if (is_unrandom_artefact( item ) - && strlen(unrandart_descrip(2, item)) != 0) - { - description << "$$"; - description << unrandart_descrip(2, item); - description << "$"; - } - if (verbose || (item.base_type != OBJ_WEAPONS && item.base_type != OBJ_ARMOUR && item.base_type != OBJ_BOOKS)) @@ -1689,6 +1664,18 @@ std::string get_item_description( const item_def &item, bool verbose, << item.name(DESC_DBNAME, true, false, false) << "]"; } + else if (is_unrandom_artefact(item) + && (unrandart_descrip(0, item)[0] != '\0' + || unrandart_descrip(1, item)[1] != '\0')) + { + const char *desc = unrandart_descrip( 0, item ); + const char *desc_id = unrandart_descrip( 1, item ); + + if (item_type_known(item) && desc_id[0] != '\0') + description << desc_id << "$"; + else if (desc[0] != '\0') + description << desc << "$"; + } else { std::string db_name = item.name(DESC_DBNAME, true, false, false); @@ -1963,6 +1950,13 @@ std::string get_item_description( const item_def &item, bool verbose, description << "$This item should not exist. Mayday! Mayday!"; } + if (is_unrandom_artefact( item ) + && strlen(unrandart_descrip(2, item)) != 0) + { + description << "$$"; + description << unrandart_descrip(2, item); + } + if (!verbose && item_known_cursed( item )) description << "$It has a curse placed upon it."; else |