From 627e34c5079bbf923fb7d687272d1abdcfb2e6ef Mon Sep 17 00:00:00 2001 From: zelgadis Date: Thu, 12 Jun 2008 00:51:38 +0000 Subject: While for the appearance of randart weapons and armour you can just stick an adjective in front of the object type name ("bloodstained dagger"), unidentified non-artefact jewellry is described with both an adjective and material ("runed wooden ring"), making a description like "runed ring" a bit weird. So give randart jewellery an adjective that no non-artefact jewellery would have, plus a material that a non-artefact might or might not have. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5741 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/randart.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/randart.cc') diff --git a/crawl-ref/source/randart.cc b/crawl-ref/source/randart.cc index 951ab6427e..34a7895c57 100644 --- a/crawl-ref/source/randart.cc +++ b/crawl-ref/source/randart.cc @@ -1252,16 +1252,19 @@ bool randart_wpn_known_prop( const item_def &item, randart_prop_type prop ) return known; } -static std::string _get_artefact_type(const int type) +static std::string _get_artefact_type(const item_def &item) { - switch (type) + switch (item.base_type) { case OBJ_WEAPONS: return "weapon"; case OBJ_ARMOUR: return "armour"; case OBJ_JEWELLERY: - return "jewellery"; + if (jewellery_is_amulet(item)) + return "amulet"; + else + return "ring"; default: return "artefact"; } @@ -1319,7 +1322,7 @@ std::string randart_name(const item_def &item, bool appearance) } // get base type - lookup += _get_artefact_type(item.base_type); + lookup += _get_artefact_type(item); rng_save_excursion rng_state; seed_rng( seed ); @@ -1365,7 +1368,7 @@ std::string randart_name(const item_def &item, bool appearance) { // if still nothing found, try base type alone name = getRandNameString( - _get_artefact_type(item.base_type).c_str()); + _get_artefact_type(item).c_str()); } } -- cgit v1.2.3-54-g00ecf