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
This commit is contained in:
PatR
2024-12-13 12:30:48 -08:00
parent c7739171a2
commit bbb4bfa938
2 changed files with 9 additions and 4 deletions

View File

@@ -2069,6 +2069,8 @@ non-fireproof water walking boots wouldn't be burnt up if fire resistant hero
at wall locations at wall locations
if a pile of objects had plain arrow(s) on top, map location classification if a pile of objects had plain arrow(s) on top, map location classification
got confused and reported 'unexplored area' 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 Fixes to 3.7.0-x Platform and/or Interface Problems Exposed Via git Repository

View File

@@ -472,7 +472,8 @@ dofire(void)
on its caller to make sure hero is strong enough to throw that */ on its caller to make sure hero is strong enough to throw that */
boolean uwep_Throw_and_Return = (uwep && AutoReturn(uwep, uwep->owornmask) boolean uwep_Throw_and_Return = (uwep && AutoReturn(uwep, uwep->owornmask)
&& (uwep->oartifact != ART_MJOLLNIR && (uwep->oartifact != ART_MJOLLNIR
|| ACURR(A_STR) >= STR19(25))); || ACURR(A_STR) >= STR19(25))),
skip_fireassist = FALSE;
int altres, res = ECMD_OK; int altres, res = ECMD_OK;
/* /*
@@ -502,6 +503,7 @@ dofire(void)
throwing Mjollnir if quiver contains daggers] */ throwing Mjollnir if quiver contains daggers] */
if (uwep_Throw_and_Return && (!obj || is_ammo(obj))) { if (uwep_Throw_and_Return && (!obj || is_ammo(obj))) {
obj = uwep; obj = uwep;
skip_fireassist = TRUE;
} else if (!obj) { } else if (!obj) {
if (!flags.autoquiver) { if (!flags.autoquiver) {
@@ -550,7 +552,8 @@ dofire(void)
obj = uquiver; obj = uquiver;
} }
if (uquiver && is_ammo(uquiver) && iflags.fireassist) { if (uquiver && is_ammo(uquiver) && iflags.fireassist
&& !skip_fireassist) {
struct obj *olauncher; struct obj *olauncher;
if (uwep && is_pole(uwep) && could_pole_mon()) if (uwep && is_pole(uwep) && could_pole_mon())