groundwork: u.twoweap manipulation

Toggle u.twoweap on or off in just one place.
This commit is contained in:
PatR
2020-04-03 11:42:17 -07:00
parent d58e449d6c
commit 8f73f926b1
9 changed files with 32 additions and 19 deletions

View File

@@ -603,7 +603,7 @@ u_init()
uarm = uarmc = uarmh = uarms = uarmg = uarmf = 0;
uwep = uball = uchain = uleft = uright = 0;
uswapwep = uquiver = 0;
u.twoweap = 0;
u.twoweap = FALSE; /* bypass set_twoweap() */
u.ublessed = 0; /* not worthy yet */
u.ugangr = 0; /* gods not angry */
u.ugifts = 0; /* no divine gifts bestowed */
@@ -1114,11 +1114,11 @@ register struct trobj *trop;
if (obj->oclass == ARMOR_CLASS) {
if (is_shield(obj) && !uarms && !(uwep && bimanual(uwep))) {
setworn(obj, W_ARMS);
/* Prior to 3.6.2 this used to unset uswapwep if it was set, but
wearing a shield doesn't prevent having an alternate
/* Prior to 3.6.2 this used to unset uswapwep if it was set,
but wearing a shield doesn't prevent having an alternate
weapon ready to swap with the primary; just make sure we
aren't two-weaponing (academic; no one starts that way) */
u.twoweap = FALSE;
set_twoweap(FALSE); /* u.twoweap = FALSE */
} else if (is_helmet(obj) && !uarmh)
setworn(obj, W_ARMH);
else if (is_gloves(obj) && !uarmg)