diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-08-03 02:51:21 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-08-03 02:51:21 +0000 |
commit | dd27b0610543880d2c90103e3e18b4f90d1716bd (patch) | |
tree | 74d31b9a1367571cbe3413d75e1aa1c59d319334 /crawl-ref/source/itemname.cc | |
parent | 73945a5e77bcfacb8aa8aa935f074cabb0a0f3cf (diff) | |
download | crawl-ref-dd27b0610543880d2c90103e3e18b4f90d1716bd.tar.gz crawl-ref-dd27b0610543880d2c90103e3e18b4f90d1716bd.zip |
Apply missing bits of 0.4's r6748 to trunk.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6756 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/itemname.cc')
-rw-r--r-- | crawl-ref/source/itemname.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc index c0cca7b5dd..932a655d63 100644 --- a/crawl-ref/source/itemname.cc +++ b/crawl-ref/source/itemname.cc @@ -2352,6 +2352,9 @@ bool is_dangerous_item(const item_def &item, bool temp) switch (item.base_type) { case OBJ_SCROLLS: + if (!item_type_known(item)) + return (false); + switch (item.sub_type) { case SCR_IMMOLATION: @@ -2362,7 +2365,11 @@ bool is_dangerous_item(const item_def &item, bool temp) default: return (false); } + case OBJ_POTIONS: + if (!item_type_known(item)) + return (false); + switch (item.sub_type) { case POT_MUTATION: @@ -2373,9 +2380,11 @@ bool is_dangerous_item(const item_def &item, bool temp) default: return (false); } + case OBJ_BOOKS: // The Tome of Destruction is certainly risky. return (item.sub_type == BOOK_DESTRUCTION); + default: return (false); } @@ -2611,8 +2620,11 @@ const std::string menu_colour_item_prefix(const item_def &item, bool temp) break; case OBJ_POTIONS: - if (is_good_god(you.religion) && is_blood_potion(item)) + if (is_good_god(you.religion) && item_type_known(item) + && is_blood_potion(item)) + { prefixes.push_back("evil_eating"); + } if (is_preferred_food(item)) prefixes.push_back("preferred"); break; |