summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/itemname.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-08 14:27:11 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-08 14:27:11 +0000
commit1acf1d1387f7f365f0a5cb108558fcd25483ac37 (patch)
tree6f23777ce2f4b304692d8bf47c79dd9be8ff6c39 /crawl-ref/source/itemname.cc
parent72d1d7f1687c534a35fbdf0c8248d4a78b0c8fc5 (diff)
downloadcrawl-ref-1acf1d1387f7f365f0a5cb108558fcd25483ac37.tar.gz
crawl-ref-1acf1d1387f7f365f0a5cb108558fcd25483ac37.zip
[Fix 1884172] clean up paragraphs in item description
This includes condensing skill category, handedness and str/dex bias into a consecutive text. [Fix 1909597] For consistency, add {tried} to tried, unID'd randart jewellery. Also, reintroduce the "may hold more properties" line that presumably vanished back at the randart jewellery id overhaul. [Fix 1909855] Incorrect randart name from database. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3541 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/itemname.cc')
-rw-r--r--crawl-ref/source/itemname.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index 2696f6e5b9..5edd6a75d9 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -85,11 +85,13 @@ std::string item_def::name(description_level_type descrip,
if (descrip == DESC_NONE)
return ("");
+ const bool is_artefact = (is_fixed_artefact( *this )
+ || (is_random_artefact( *this )));
+
std::ostringstream buff;
-
const std::string auxname = this->name_aux(descrip, terse, ident,
ignore_flags);
- const bool startvowel = is_vowel(auxname[0]);
+ const bool startvowel = is_vowel(auxname[0]);
if (descrip == DESC_INVENTORY_EQUIP || descrip == DESC_INVENTORY)
{
@@ -112,8 +114,7 @@ std::string item_def::name(description_level_type descrip,
|| ( (ident || item_type_known( *this ))
&& ((this->base_type == OBJ_MISCELLANY
&& this->sub_type == MISC_HORN_OF_GERYON)
- || (is_fixed_artefact( *this )
- || (is_random_artefact( *this ))))))
+ || is_artefact)))
{
// artefacts always get "the" unless we just want the plain name
switch (descrip)
@@ -235,7 +236,9 @@ std::string item_def::name(description_level_type descrip,
if (descrip != DESC_PLAIN && descrip != DESC_BASENAME)
{
- const bool tried = (!ident && !equipped && item_type_tried(*this));
+ const bool tried = (!ident && !equipped
+ && (is_artefact && !item_type_known(*this)
+ || item_type_tried(*this)));
std::string tried_str = "";
if (tried)
@@ -1705,8 +1708,10 @@ bool item_type_tried( const item_def& item )
const item_type_id_type idt = objtype_to_idtype(item.base_type);
if (idt != NUM_IDTYPE && item.sub_type < 50)
+ {
return ( type_ids[idt][item.sub_type] == ID_TRIED_TYPE
|| type_ids[idt][item.sub_type] == ID_MON_TRIED_TYPE);
+ }
else
return false;
}