Merge branch 'NetHack-3.6'

This commit is contained in:
nhmall
2019-06-10 08:05:46 -04:00
6 changed files with 90 additions and 66 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 mhitm.c $NHDT-Date: 1555720096 2019/04/20 00:28:16 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.113 $ */
/* NetHack 3.6 mhitm.c $NHDT-Date: 1560161806 2019/06/10 10:16:46 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.116 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2011. */
/* NetHack may be freely redistributed. See license for details. */
@@ -9,7 +9,6 @@
static const char brief_feeling[] =
"have a %s feeling for a moment, then it passes.";
STATIC_DCL char *FDECL(mon_nam_too, (char *, struct monst *, struct monst *));
STATIC_DCL int FDECL(hitmm, (struct monst *, struct monst *,
struct attack *));
STATIC_DCL int FDECL(gazemm, (struct monst *, struct monst *,
@@ -29,30 +28,6 @@ STATIC_DCL int FDECL(passivemm, (struct monst *, struct monst *,
BOOLEAN_P, int));
/* returns mon_nam(mon) relative to other_mon; normal name unless they're
the same, in which case the reference is to {him|her|it} self */
STATIC_OVL char *
mon_nam_too(outbuf, mon, other_mon)
char *outbuf;
struct monst *mon, *other_mon;
{
if (mon != other_mon)
Strcpy(outbuf, mon_nam(mon));
else
switch (pronoun_gender(mon, FALSE)) {
case 0:
Strcpy(outbuf, "himself");
break;
case 1:
Strcpy(outbuf, "herself");
break;
default:
Strcpy(outbuf, "itself");
break;
}
return outbuf;
}
STATIC_OVL void
noises(magr, mattk)
register struct monst *magr;
@@ -76,7 +51,7 @@ register struct monst *magr, *mdef;
struct attack *mattk;
{
const char *fmt;
char buf[BUFSZ], mdef_name[BUFSZ];
char buf[BUFSZ];
if (g.vis) {
if (!canspotmon(magr))
@@ -91,7 +66,7 @@ struct attack *mattk;
? "%s pretends to be friendly to"
: "%s misses";
Sprintf(buf, fmt, Monnam(magr));
pline("%s %s.", buf, mon_nam_too(mdef_name, mdef, magr));
pline("%s %s.", buf, mon_nam_too(mdef, magr));
} else
noises(magr, mattk);
}
@@ -528,7 +503,7 @@ struct attack *mattk;
{
if (g.vis) {
int compat;
char buf[BUFSZ], mdef_name[BUFSZ];
char buf[BUFSZ];
if (!canspotmon(magr))
map_invisible(magr->mx, magr->my);
@@ -572,7 +547,7 @@ struct attack *mattk;
default:
Sprintf(buf, "%s hits", magr_name);
}
pline("%s %s.", buf, mon_nam_too(mdef_name, mdef, magr));
pline("%s %s.", buf, mon_nam_too(mdef, magr));
}
} else
noises(magr, mattk);