monk's to-hit penalty for wearing a suit

If hero is a monk who is wearing a suit, have ^X mention the to-hit
penalty for that in the status section even though it isn't a normal
status line item.  Combat feedback makes it annoyingly obvious, but
player might forget if MSGTYPE=hide is used to suppress the "Your
armor is rather cumbersome..." message.
This commit is contained in:
PatR
2020-07-20 03:00:28 -07:00
parent 22cbabde8d
commit afbcf3f9a9
4 changed files with 26 additions and 5 deletions

View File

@@ -57,9 +57,7 @@ long mask;
uskin = obj;
/* assert( !uarm ); */
} else {
if ((mask & W_ARMOR))
u.uroleplay.nudist = FALSE;
for (wp = worn; wp->w_mask; wp++)
for (wp = worn; wp->w_mask; wp++) {
if (wp->w_mask & mask) {
oobj = *(wp->w_obj);
if (oobj && !(oobj->owornmask & wp->w_mask))
@@ -105,6 +103,11 @@ long mask;
}
}
}
}
if (obj && (obj->owornmask & W_ARMOR) != 0L)
u.uroleplay.nudist = FALSE;
/* tux -> tuxedo -> "monkey suit" -> monk's suit */
iflags.tux_penalty = (uarm && Role_if(PM_MONK) && g.urole.spelarmr);
}
update_inventory();
}
@@ -137,6 +140,8 @@ register struct obj *obj;
if ((p = w_blocks(obj, wp->w_mask)) != 0)
u.uprops[p].blocked &= ~wp->w_mask;
}
if (!uarm)
iflags.tux_penalty = FALSE;
update_inventory();
}