Merge branch 'NetHack-3.6'

This commit is contained in:
nhmall
2019-11-09 12:24:10 -05:00
16 changed files with 243 additions and 35 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 objnam.c $NHDT-Date: 1571436005 2019/10/18 22:00:05 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.247 $ */
/* NetHack 3.6 objnam.c $NHDT-Date: 1573290418 2019/11/09 09:06:58 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.248 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2011. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1053,7 +1053,7 @@ unsigned doname_flags;
Strcat(bp, " (being worn)");
break;
case ARMOR_CLASS:
if (obj->owornmask & W_ARMOR)
if (obj->owornmask & W_ARMOR) {
Strcat(bp, (obj == uskin) ? " (embedded in your skin)"
/* in case of perm_invent update while Wear/Takeoff
is in progress; check doffing() before donning()
@@ -1061,6 +1061,13 @@ unsigned doname_flags;
: doffing(obj) ? " (being doffed)"
: donning(obj) ? " (being donned)"
: " (being worn)");
/* slippery fingers is an intrinsic condition of the hero
rather than extrinsic condition of objects, but gloves
are described as slippery when hero has slippery fingers */
if (obj == uarmg && Glib) /* just appended "(something)",
* change to "(something; slippery)" */
Strcpy(rindex(bp, ')'), "; slippery)");
}
/*FALLTHRU*/
case WEAPON_CLASS:
if (ispoisoned)
@@ -4160,6 +4167,26 @@ struct obj *helmet;
return (helmet && !is_metallic(helmet)) ? "hat" : "helm";
}
/* gloves vs gauntlets; depends upon discovery state */
const char *
gloves_simple_name(gloves)
struct obj *gloves;
{
static const char gauntlets[] = "gauntlets";
if (gloves && gloves->dknown) {
int otyp = gloves->otyp;
struct objclass *ocl = &objects[otyp];
const char *actualn = OBJ_NAME(*ocl),
*descrpn = OBJ_DESCR(*ocl);
if (strstri(objects[otyp].oc_name_known ? actualn : descrpn,
gauntlets))
return gauntlets;
}
return "gloves";
}
const char *
mimic_obj_name(mtmp)
struct monst *mtmp;