Don't switch away from polearm if monster in range

Using 'f', if hero is wielding a polearm, and a monster is in range,
don't switch away even if we do have ammo in quiver and a launcher
in the inventory.
This commit is contained in:
Pasi Kallinen
2024-12-08 22:18:27 +02:00
parent dafd854993
commit 57abae29e8
3 changed files with 65 additions and 27 deletions

View File

@@ -553,6 +553,8 @@ dofire(void)
if (uquiver && is_ammo(uquiver) && iflags.fireassist) {
struct obj *olauncher;
if (uwep && is_pole(uwep) && could_pole_mon())
return use_pole(uwep, TRUE);
/* Try to find a launcher */
if (ammo_and_launcher(uquiver, uwep)) {
obj = uquiver;