From bbb4bfa93880fb178756689ca413be31b3f4c829 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 13 Dec 2024 12:30:48 -0800 Subject: [PATCH] fix issue #1337 - 'fireassist' vs 'f'iring aklys Issue reported by elunna: if the 'fireassist' option is on and the quiver contains ammo, 'f' while wielding an aklys switches to the ammo's launcher instead of throwing the aklys. Fixes #1337 --- doc/fixes3-7-0.txt | 2 ++ src/dothrow.c | 11 +++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 13c61a938..892fa0dd0 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -2069,6 +2069,8 @@ non-fireproof water walking boots wouldn't be burnt up if fire resistant hero at wall locations if a pile of objects had plain arrow(s) on top, map location classification got confused and reported 'unexplored area' +when the 'fireassist' option was on, 'f' would choose uquiver over wielded + throw-and-return uwep Fixes to 3.7.0-x Platform and/or Interface Problems Exposed Via git Repository diff --git a/src/dothrow.c b/src/dothrow.c index fc154773c..57dd5757c 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -472,7 +472,8 @@ dofire(void) on its caller to make sure hero is strong enough to throw that */ boolean uwep_Throw_and_Return = (uwep && AutoReturn(uwep, uwep->owornmask) && (uwep->oartifact != ART_MJOLLNIR - || ACURR(A_STR) >= STR19(25))); + || ACURR(A_STR) >= STR19(25))), + skip_fireassist = FALSE; int altres, res = ECMD_OK; /* @@ -502,6 +503,7 @@ dofire(void) throwing Mjollnir if quiver contains daggers] */ if (uwep_Throw_and_Return && (!obj || is_ammo(obj))) { obj = uwep; + skip_fireassist = TRUE; } else if (!obj) { if (!flags.autoquiver) { @@ -550,7 +552,8 @@ dofire(void) obj = uquiver; } - if (uquiver && is_ammo(uquiver) && iflags.fireassist) { + if (uquiver && is_ammo(uquiver) && iflags.fireassist + && !skip_fireassist) { struct obj *olauncher; if (uwep && is_pole(uwep) && could_pole_mon()) @@ -2074,7 +2077,7 @@ thitmonst( /* ...or any special item, if you've made him angry */ || !mon->mpeaceful) { /* give an explanation for keeping the item only if leader is - not doing it out of anger */ + not doing it out of anger */ if (mon->mpeaceful && !Deaf) { /* just in case, identify the object so its name will appear in the message */ @@ -2090,7 +2093,7 @@ thitmonst( (void) mpickobj(mon, obj); } else { /* under normal circumstances, leader will say something and - then return the item to the hero */ + then return the item to the hero */ boolean next2u = monnear(mon, u.ux, u.uy); finish_quest(obj); /* acknowledge quest completion */