two-weapon combat on/off via inventory item action

When testing 'm )' I noticed that weapon and alternate weapon weren't
offering the chance to toggle two-weapon mode.  When already on,
providing it as a choice to toggle it off is simple, but when at is
off that isn't the case.  There are lots of reasons why attempting
to toggle it on might fail and it is silly to offer as a choice if
failure is sure to occur.  This tries to filter out the majority of
reasons why the player can't toggle it on when deciding whether to
include 'X' as a choice.
This commit is contained in:
PatR
2023-11-28 01:15:04 -08:00
parent e6a7eb25d4
commit f6e70bbc58
3 changed files with 30 additions and 1 deletions

View File

@@ -73,7 +73,7 @@ static int wield_ok(struct obj *);
empty hands and two-handed weapons have to be handled separately */
#define TWOWEAPOK(obj) \
(((obj)->oclass == WEAPON_CLASS) \
? !(is_launcher(obj) ||is_ammo(obj) || is_missile(obj)) \
? !(is_launcher(obj) || is_ammo(obj) || is_missile(obj)) \
: is_weptool(obj))
static const char