summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-02-20 12:57:03 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-02-20 12:57:03 +0000
commit727f4e1f12361fa326bcb16d15715a04b7a7568b (patch)
treee38d94e3d6614a764d8293460ba2c05b417ea036
parente2efb14c85c324beb9cb34b62af0cc33b133a468 (diff)
downloadcrawl-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
-rw-r--r--crawl-ref/docs/crawl_options.txt29
-rw-r--r--crawl-ref/source/command.cc5
-rw-r--r--crawl-ref/source/describe.cc3
-rw-r--r--crawl-ref/source/item_use.cc28
4 files changed, 45 insertions, 20 deletions
diff --git a/crawl-ref/docs/crawl_options.txt b/crawl-ref/docs/crawl_options.txt
index c6e8655c69..011c645153 100644
--- a/crawl-ref/docs/crawl_options.txt
+++ b/crawl-ref/docs/crawl_options.txt
@@ -1188,12 +1188,16 @@ if the messages are too verbose.
---------------------
In Crawl, items can be manually inscribed with the '{' command. This
-adds a note in curly braces to the item inscription. Several
-inscriptions are functional, namely all containing one of the following
- @w9 -- now typing 'w9' will wield this item
- @*9 -- now any action command followed by '9' will use this item
- !w -- before wielding this item, Crawl will ask for confirmation
- !* -- any action with this item causes a prompt
+adds a note in curly braces to the item inscription. Inscriptions
+that contain one or more of the following have functional effects:
+
+ @w9 -- Typing 'w9' will wield this item. Any single digit will
+ work, and the item may contain more than one shortcut.
+ This also works with commands besides 'w'.
+ @*9 -- Any action command followed by '9' will use this item.
+ !w -- Wielding this item causes a prompt for confirmation.
+ This also works with commands besides 'w'.
+ !* -- Using this item with any command causes a prompt.
!p -- Nemelex Xobeh worshippers will be prompted before
sacrificing a stack of items containing an item with this
inscription; if the answer is "no", the whole stack will be
@@ -1202,16 +1206,15 @@ inscriptions are functional, namely all containing one of the following
sacrificing this particular item; if the answer is "no",
then Crawl will go on to sacrifice further items in the
stack.
- =g -- item will be picked up automatically if autopickup is on
- =k -- item will be ignored in all listings on the ground
- (it can still be picked up if it's the only item on the
- ground)
+ =g -- Item will be picked up automatically if autopickup is on.
+ =k -- Item will be ignored in all listings on the ground.
+ It can still be picked up if it's the only item on the
+ ground.
+ =f -- Item will be ignored by the firing prompt and quiver.
+ It can still be fired/thrown using 't'.
=s -- If stash tracking is explicit, then dropping this item will
cause a stash to automatically be marked.
-In the example, 'w' could be any sensible command and '9' could be any
-digit. An item may contain more than one shortcut.
-
autoinscribe = <regex>:<inscription>
Any item whose description contains the regex will be
automatically inscribed (if autopickup is toggled on). For
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
{