From 45e7a0cd6a2b2edde6d93f585745add27419465e Mon Sep 17 00:00:00 2001 From: keni Date: Sun, 10 May 2009 16:33:57 +0000 Subject: [PATCH] expanded feedback for "in quiver" (trunk only) Replace quiver with quiver/quiver pouch/at the ready as appropriate. --- doc/Guidebook.mn | 21 ++++++++++++++------- doc/Guidebook.tex | 23 +++++++++++++++-------- src/objnam.c | 32 +++++++++++++++++++++++++++++++- 3 files changed, 60 insertions(+), 16 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 644fcdace..b47534a93 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -540,7 +540,8 @@ E- - write in the dust with your fingers. .ei .ed .lp f -Fire one of the objects placed in your quiver. You may select +Fire one of the objects placed in your quiver (or quiver sack, or that you +have at the ready). You may select ammunition with a previous `Q' command, or let the computer pick something appropriate if .op autoquiver @@ -578,7 +579,9 @@ The behavior can be varied via the msg_window option. .lp q Quaff (drink) something (potion, water, etc). .lp Q -Select an object for your quiver. You can then throw this using +Select an object for your quiver, quiver sack, or just generally at +the ready (only one of these is available at a time). You can then throw +this (or one of these) using the `f' command. (In versions prior to 3.3 this was the command to quit the game, which has now been moved to `#quit'.) .lp r @@ -1179,7 +1182,8 @@ have to specify which item to throw each time you use `f'. There is also an option, .op autoquiver, which has NetHack choose another item to automatically fill your -quiver when the inventory slot used for `Q' runs out. +quiver (or quiver sack, or have at the ready) when the inventory slot used +for `Q' runs out. .pg Some characters have the ability to fire a volley of multiple items in a single turn. Knowing how to load several rounds of ammunition at @@ -1709,11 +1713,14 @@ See to refine the behavior. .lp "autoquiver " This option controls what happens when you attempt the `f' (fire) -command with an empty quiver. When true, the computer will fill -your quiver with some suitable weapon. Note that it will not take +command with an empty quiver (or quiver sack or have nothing at the ready). +When true, the computer will fill +your quiver or quiver sack or make ready some suitable weapon. Note that it +will not take into account the blessed/cursed status, enchantment, damage, or -quality of the weapon; you are free to manually fill your quiver with -the `Q' command instead. If no weapon is found or the option is +quality of the weapon; you are free to manually fill your quiver or quiver sack +or make ready +with the `Q' command instead. If no weapon is found or the option is false, the `t' (throw) command is executed instead. (default false) .lp boulder Set the character used to display boulders (default is rock class symbol). diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 2f8c14488..9ccf78079 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -33,7 +33,7 @@ \begin{document} % % input file: guidebook.mn -% $Revision: 1.106 $ $Date: 2007/05/25 02:02:43 $ +% $Revision: 1.107 $ $Date: 2007/05/26 02:36:38 $ % %.ds h0 " %.ds h1 %.ds h2 \% @@ -726,7 +726,8 @@ of the game, so your version might not have it.)\\ %.ed %.Ip \item[\tb{f}] -Fire one of the objects placed in your quiver. You may select +Fire one of the objects placed in your quiver (or quiver sack, or that you +have at the ready). You may select ammunition with a previous `{\tt Q}' command, or let the computer pick something appropriate if {\it autoquiver\/} is true. %.lp @@ -771,7 +772,9 @@ The behavior can be varied via the msg_window option. Quaff (drink) something (potion, water, etc). %.lp \item[\tb{Q}] -Select an object for your quiver. You can then throw this using +Select an object for your quiver, quiver sack, or just generally at +the ready (only one of these is available at a time). You can then throw +this (or one of these) using the `f' command. (In versions prior to 3.3 this was the command to quit the game, which has now been moved to `{\tt \#quit}'.) %.lp @@ -1529,7 +1532,8 @@ have to specify which item to throw each time you use `{\tt f}'. There is also an option, {\it autoquiver}, which has {\it NetHack\/} choose another item to automatically fill your -quiver when the inventory slot used for `{\tt Q}' runs out. +quiver (or quiver sack, or have at the ready) when the inventory slot used +for `{\tt Q}' runs out. %.pg Some characters have the ability to fire a volley of multiple items in a @@ -2153,11 +2157,14 @@ See ``{\it pickup\_types\/}'' to refine the behavior. %.lp \item[\ib{autoquiver}] This option controls what happens when you attempt the `f' (fire) -command with an empty quiver. When true, the computer will fill -your quiver with some suitable weapon. Note that it will not take +command with an empty quiver (or quiver sack or have nothing at the ready). +When true, the computer will fill +your quiver or quiver sack or make ready some suitable weapon. Note that it +will not take into account the blessed/cursed status, enchantment, damage, or -quality of the weapon; you are free to manually fill your quiver with -the `Q' command instead. If no weapon is found or the option is +quality of the weapon; you are free to manually fill your quiver or quiver sack +or make ready +with the `Q' command instead. If no weapon is found or the option is false, the `t' (throw) command is executed instead. (default false) %.lp \item[\ib{boulder}] diff --git a/src/objnam.c b/src/objnam.c index feb5d2ded..dc0a7948d 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -877,7 +877,37 @@ ring: else Strcat(bp, " (alternate weapon; not wielded)"); } - if(obj->owornmask & W_QUIVER) Strcat(bp, " (in quiver)"); + if(obj->owornmask & W_QUIVER){ + switch(obj->oclass){ + case WEAPON_CLASS: + if(is_ammo(obj)){ + if(objects[obj->otyp].oc_skill == -P_BOW){ + /* Ammo for a bow */ + Strcat(bp, " (in quiver)"); + break; + } else { + /* Ammo not for a bow */ + Strcat(bp, " (in quiver pouch)"); + break; + } + } else { + /* Weapons not considered ammo */ + Strcat(bp, " (at the ready)"); + break; + } + + /* Small things and ammo not for a bow */ + case RING_CLASS: + case AMULET_CLASS: + case WAND_CLASS: + case COIN_CLASS: + case GEM_CLASS: + Strcat(bp, " (in quiver pouch)"); + break; + default: /* odd things */ + Strcat(bp, " (at the ready)"); + } + } if (!iflags.suppress_price && is_unpaid(obj)) { long quotedprice = unpaid_cost(obj, TRUE);