summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-12 00:51:38 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-12 00:51:38 +0000
commit627e34c5079bbf923fb7d687272d1abdcfb2e6ef (patch)
tree48a09c81613a6b9ed0624a2ef9e169dc932e0fc2 /crawl-ref/source
parentb522b828e63baba3e1136df6030ec22239764b07 (diff)
downloadcrawl-ref-627e34c5079bbf923fb7d687272d1abdcfb2e6ef.tar.gz
crawl-ref-627e34c5079bbf923fb7d687272d1abdcfb2e6ef.zip
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
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/dat/database/randname.txt154
-rw-r--r--crawl-ref/source/randart.cc13
2 files changed, 150 insertions, 17 deletions
diff --git a/crawl-ref/source/dat/database/randname.txt b/crawl-ref/source/dat/database/randname.txt
index 6b70f295db..720e19c0d9 100644
--- a/crawl-ref/source/dat/database/randname.txt
+++ b/crawl-ref/source/dat/database/randname.txt
@@ -645,28 +645,158 @@ distressingly furry
w:160
@general appearance@
%%%%
+######################################################
+# Jewellry appearance
+######################################################
+#
+# 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.
jewellery appearance
-#specific jewels
-ruby
+scintillating
-crystal
+sparkling
-diamond
+flickering
+
+glittering
+
+smoking
+
+shimmering
+
+wavering
+
+warped
+
+transparent
+
+pitted
+
+slimy
+
+fine
+
+crude
+
+ancient
+
+brightly glowing
+
+faintly glowing
+
+steaming
+
+heavily runed
+
+vibrating
+
+twitching
+%%%%
+ring material
+
+wooden
+
+ivory
+
+bone
+
+amber
+
+silver
+
+golden
+
+platinum
+
+iron
+
+steel
+
+bronze
+
+brass
+
+copper
+
+tin
+
+lead
+
+pewter
+
+granite
+
+marble
+
+jade
+
+turquoise
+
+lapis lazuli
+
+glass
+%%%%
+amulet material
+
+ivory
+
+bone
+
+plastic
+
+silver
+
+golden
+
+platinum
+
+iron
+
+steel
+
+bronze
+
+brass
+
+copper
+
+tin
+
+lead
+
+pewter
+
+zirconium
+
+sapphire
emerald
-#other descriptions
-runed
+garnet
-scintillating
+ruby
-sparkling
+jade
-flickering
+ruby
-glittering
+crystal
-w:160
-@general appearance@
+diamond
+
+amethyst
+%%%%
+ring appearance
+
+@jewellery appearance@ @ring material@
+%%%%
+amulet appearance
+
+@jewellery appearance@ @amulet material@
%%%%
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());
}
}