summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/describe.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-06-26 00:47:41 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-06-26 00:47:41 +0000
commitc49670d415ca81cce9205ea0320e21a9f993713c (patch)
tree0a94434a3477dec2f52f7957704de64b391bf063 /crawl-ref/source/describe.cc
parentd8c8e320239ed508108825e77c1a02dd600c9b76 (diff)
downloadcrawl-ref-c49670d415ca81cce9205ea0320e21a9f993713c.tar.gz
crawl-ref-c49670d415ca81cce9205ea0320e21a9f993713c.zip
Fix description of unrandarts.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10046 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/describe.cc')
-rw-r--r--crawl-ref/source/describe.cc44
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