From 82c82016cdf017366d41025ac86a207d04398426 Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Tue, 8 May 2007 03:45:53 +0000 Subject: [PATCH] f-iring without ammo refinement A change a couple of weeks ago to have player's chosen ammo be auto- quivered when using the 'f' command while quiver is empty was excluding objects with quantity 1. That was on the basis that it was in the process of being thrown so there was no point in putting it into the quiver slot first. But if it was a boomerang, or Mjollnir under suitable conditions, there was a chance for it to be available for another throw, so there is a point to quivering it. Also, player can hit ESC at the direction prompt and end up not throwing it after all. So, put even quantity 1 items into the quiver when 'f' command is used with empty quiver. --- doc/fixes34.4 | 4 ++-- src/dothrow.c | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/doc/fixes34.4 b/doc/fixes34.4 index d085c27f8..119ee0356 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -388,8 +388,8 @@ intelligent pets will use keys to unlock doors destroyed drawbridge leaves some iron chains give feedback when a nearby monster grows into a stronger form familiars are now created without any starting inventory -using the 'f' command when quiver is empty will fill quiver if player selects - a stack of 2 or more items in response to the "what to throw?" prompt +using the 'f' command when quiver is empty will fill quiver with player's + response to the "what to throw?" prompt breaking a wand with the apply command has a chance to wrest an extra charge diff --git a/src/dothrow.c b/src/dothrow.c index fb7479b0b..293ae0f3b 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -351,16 +351,19 @@ dofire() You("have nothing appropriate for your quiver."); } /* if autoquiver is disabled or has failed, prompt for missile; - fill quiver with it if it's a stack that's not wielded */ + fill quiver with it if it's not wielded */ if (!obj) { obj = getobj(uslinging() ? bullets : toss_objs, "throw"); - if (obj && obj->quan > 1L && !obj->owornmask && - /* Q command doesn't allow gold in quiver */ - obj->oclass != COIN_CLASS) + /* Q command doesn't allow gold in quiver */ + if (obj && !obj->owornmask && obj->oclass != COIN_CLASS) setuqwep(obj); /* demi-autoquiver */ } /* give feedback if quiver has now been filled */ - if (uquiver) prinv("You ready:", uquiver, 0L); + if (uquiver) { + uquiver->owornmask &= ~W_QUIVER; /* less verbose */ + prinv("You ready:", uquiver, 0L); + uquiver->owornmask |= W_QUIVER; + } } return obj ? throw_obj(obj, shotlimit) : 0;