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>2007-11-13 15:57:55 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-13 15:57:55 +0000
commite6525c83826d150eb2a283ce5bf23218cb75f82e (patch)
treeb16a09028c1468efa825975fb1e85a3e4d722bf5 /crawl-ref/source/itemname.cc
parent674a9e64697629cc3266564ea4f8dc7eb2616b50 (diff)
downloadcrawl-ref-e6525c83826d150eb2a283ce5bf23218cb75f82e.tar.gz
crawl-ref-e6525c83826d150eb2a283ce5bf23218cb75f82e.zip
* Add Cannibalism to list of forbidded actions for good gods.
* Add simple warning message (god "did not appreciate that!") when using unID'd items that would otherwise be penalized. * Change protection from harm to be independent of prayer. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2849 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/itemname.cc')
-rw-r--r--crawl-ref/source/itemname.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index 26210874c8..eaacf8c987 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -1605,6 +1605,15 @@ bool item_type_known( const item_def& item )
return false;
}
+bool item_type_known(const object_class_type base_type, const int sub_type)
+{
+ const item_type_id_type idt = objtype_to_idtype(base_type);
+ if ( idt != NUM_IDTYPE && sub_type < 50 )
+ return ( type_ids[idt][sub_type] == ID_KNOWN_TYPE );
+ else
+ return false;
+}
+
bool item_type_tried( const item_def& item )
{
if ( item_type_known(item) )