diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-02-20 12:57:03 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-02-20 12:57:03 +0000 |
commit | 727f4e1f12361fa326bcb16d15715a04b7a7568b (patch) | |
tree | e38d94e3d6614a764d8293460ba2c05b417ea036 /crawl-ref/source | |
parent | e2efb14c85c324beb9cb34b62af0cc33b133a468 (diff) | |
download | crawl-ref-727f4e1f12361fa326bcb16d15715a04b7a7568b.tar.gz crawl-ref-727f4e1f12361fa326bcb16d15715a04b7a7568b.zip |
Apply Paul's =f inscription patch as well as a patch to make
crawl_options.txt more readable concerning inscriptions. (Not that
that really is such an issue now there's extensive documentation
in the manual, but it surely doesn't hurt.)
Also fix some of the randart autoinscriptions.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3447 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/command.cc | 5 | ||||
-rw-r--r-- | crawl-ref/source/describe.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/item_use.cc | 28 |
3 files changed, 29 insertions, 7 deletions
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc index 848ce8ebed..f6a42f6382 100644 --- a/crawl-ref/source/command.cc +++ b/crawl-ref/source/command.cc @@ -1356,7 +1356,7 @@ static void show_keyhelp_menu(const std::vector<formatted_string> &lines, "<w>*</w> Table of contents\n" "<w>A</w>. Overview\n" "<w>B</w>. Starting Screen\n" - "<w>C</w>. Abilities and Stats\n" + "<w>C</w>. Attributes and Stats\n" "<w>D</w>. Dungeon Exploration\n" "<w>E</w>. Experience and Skills\n" "<w>F</w>. Monsters\n" @@ -1372,7 +1372,8 @@ static void show_keyhelp_menu(const std::vector<formatted_string> &lines, "<w>2</w>. List of Classes\n" "<w>3</w>. List of Skills\n" "<w>4</w>. Keys and Commands\n" - "<w>5</w>. List of Enchantments\n", + "<w>5</w>. List of Enchantments\n" + "<w>6</w>. Inscriptions\n", true, true, cmdhelp_textfilter); std::vector<formatted_string> blines = cols.formatted_lines(); diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 00edf93c78..9faa461141 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -1800,7 +1800,10 @@ void describe_item( item_def &item, bool allow_inscribe ) char buf[79]; cprintf("\nInscribe with what? "); if (!cancelable_get_line(buf, sizeof buf)) + { item.inscription = buf; + you.quiver_change = true; // might have added/removed !F + } } else if (toupper(keyin) == 'A' && allow_autoinscribe) { diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index e0cbce7b0e..9566601153 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -1300,9 +1300,11 @@ static bool fire_item_matches(const item_def &item, unsigned fire_type) return (false); } +static bool Hack_Ignore_F_Inscription = false; // only for "why can't I fire" feedback static bool fire_item_okay(const item_def &item, unsigned flags) { return (fire_item_matches(item, flags) + && (Hack_Ignore_F_Inscription || strstr(item.inscription.c_str(), "=f") == 0) && you.equip[EQ_WEAPON] != item.link); } @@ -1336,6 +1338,9 @@ quiver_type get_quiver_type() } +// Search all items in pack for a fire_item_okay item. +// If check_quiver, quiver item is checked first. +// Then, check all items in the loop determined by start and forward static int find_fire_item_matching(unsigned fire_type, int start, bool forward, bool check_quiver) { @@ -1528,14 +1533,26 @@ void shoot_thing(void) if (item == ENDOFPACK) { - unwind_var<int> festart(Options.fire_items_start, 0); - if ((item = get_fire_item_index()) == ENDOFPACK) + // Tell the user why we might have skipped their missile + unwind_var<int> unwind_festart(Options.fire_items_start, 0); + unwind_var<bool> unwind_inscription(Hack_Ignore_F_Inscription, true); + const int skipped_item = get_fire_item_index(); + if (skipped_item == ENDOFPACK) + { mpr("No suitable missiles."); - else + } + else if (skipped_item < unwind_festart.original_value()) + { mprf("No suitable missiles (fire_items_start = '%c', " "ignoring item on '%c').", - index_to_letter(festart.original_value()), - index_to_letter(item)); + index_to_letter(unwind_festart.original_value()), + index_to_letter(skipped_item)); + } + else + { + mprf("No suitable missiles (ignoring '=f'-inscribed item on '%c').", + index_to_letter(skipped_item)); + } flush_input_buffer( FLUSH_ON_FAILURE ); return; } @@ -3408,6 +3425,7 @@ void inscribe_item() you.inv[item_slot].inscription = std::string(buf); you.wield_change = true; + you.quiver_change = true; } else { |