From dd27b0610543880d2c90103e3e18b4f90d1716bd Mon Sep 17 00:00:00 2001 From: dolorous Date: Sun, 3 Aug 2008 02:51:21 +0000 Subject: 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 --- crawl-ref/source/describe.cc | 2 +- crawl-ref/source/item_use.cc | 8 ++++---- crawl-ref/source/itemname.cc | 14 +++++++++++++- 3 files changed, 18 insertions(+), 6 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 592ff73fac..b5f3280007 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -2125,7 +2125,7 @@ void inscribe_item(item_def &item, bool proper_prompt) did_prompt = true; } - keyin = (did_prompt ? tolower(c_getch()) : 'y'); + keyin = (did_prompt ? tolower(c_getch()) : 'i'); switch (keyin) { case 'c': diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 9995deca67..ab2b917837 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -3575,18 +3575,18 @@ void zap_wand( int slot ) } you.turn_is_over = true; -} // end zap_wand() +} void prompt_inscribe_item() { - int item_slot; if (inv_count() < 1) { mpr("You don't have anything to inscribe."); return; } - item_slot = prompt_invent_item("Inscribe which item? ", - MT_INVLIST, OSEL_ANY ); + + int item_slot = prompt_invent_item("Inscribe which item? ", + MT_INVLIST, OSEL_ANY); if (prompt_failed(item_slot)) return; 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; -- cgit v1.2.3-54-g00ecf