summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/itemprop.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/itemprop.cc')
-rw-r--r--crawl-ref/source/itemprop.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc
index 2dc8e9bcce..86e20cd1d2 100644
--- a/crawl-ref/source/itemprop.cc
+++ b/crawl-ref/source/itemprop.cc
@@ -1907,6 +1907,10 @@ int ring_has_pluses( const item_def &item )
{
ASSERT (item.base_type == OBJ_JEWELLERY);
+ // not known -> no pluses
+ if (!item_type_known(item))
+ return (0);
+
switch (item.sub_type)
{
case RING_SLAYING:
@@ -2448,6 +2452,8 @@ std::string item_base_name(const item_def &item)
return Missile_prop[Missile_index[item.sub_type]].name;
case OBJ_ARMOUR:
return Armour_prop[Armour_index[item.sub_type]].name;
+ case OBJ_JEWELLERY:
+ return (jewellery_is_amulet(item) ? "amulet" : "ring");
default:
return "";
}