fix github issue #542 - clumsy "it" message
when encountering a hiding monster that's still unseen after being revealed (so most likely invisible when hero lacks see invisible). Change |Wait! There's an it hiding under <an object>! to !Wait! There's something hiding under <an object>! when hero tries to move onto the object. Also, when a hidden monster reveals itself by attacking, change |It was hidden under <an object>! usually followed by "It hits." or "It misses." to |Something was hidden under <an object>! without changing whatever follows. Fixes #542
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.581 $ $NHDT-Date: 1625277130 2021/07/03 01:52:10 $
|
||||
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.584 $ $NHDT-Date: 1625446012 2021/07/05 00:46:52 $
|
||||
|
||||
General Fixes and Modified Features
|
||||
-----------------------------------
|
||||
@@ -556,6 +556,8 @@ perm_invent: when buying shop goods using itemized purchasing while persistent
|
||||
change getloc fastmove keys in number_pad mode from hardcoded HJKL to the
|
||||
run/rush movement keys (meta+number)
|
||||
allow using rush/run prefix key in getloc to fastmove the cursor
|
||||
avoid "it" in messages "Wait! There's an it hiding under <an object>!" (hero
|
||||
moving) and "It was hidden under <an object>!" (unseen monster moving)
|
||||
|
||||
|
||||
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
||||
|
||||
11
src/mhitu.c
11
src/mhitu.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 mhitu.c $NHDT-Date: 1606473488 2020/11/27 10:38:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.196 $ */
|
||||
/* NetHack 3.7 mhitu.c $NHDT-Date: 1625446012 2021/07/05 00:46:52 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.245 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -967,9 +967,10 @@ hitmu(register struct monst *mtmp, register struct attack *mattk)
|
||||
*/
|
||||
if (mtmp->mundetected && (hides_under(mdat) || mdat->mlet == S_EEL)) {
|
||||
mtmp->mundetected = 0;
|
||||
if (!(Blind ? Blind_telepat : Unblind_telepat)) {
|
||||
if (!tp_sensemon(mtmp) && !Detect_monsters) {
|
||||
struct obj *obj;
|
||||
const char *what;
|
||||
char Amonbuf[BUFSZ];
|
||||
|
||||
if ((obj = g.level.objects[mtmp->mx][mtmp->my]) != 0) {
|
||||
if (Blind && !obj->dknown)
|
||||
@@ -979,7 +980,11 @@ hitmu(register struct monst *mtmp, register struct attack *mattk)
|
||||
else
|
||||
what = doname(obj);
|
||||
|
||||
pline("%s was hidden under %s!", Amonnam(mtmp), what);
|
||||
Strcpy(Amonbuf, Amonnam(mtmp));
|
||||
/* mtmp might be invisible with hero unable to see same */
|
||||
if (!strcmp(Amonbuf, "It")) /* note: not strcmpi() */
|
||||
Strcpy(Amonbuf, Something);
|
||||
pline("%s was hidden under %s!", Amonbuf, what);
|
||||
}
|
||||
newsym(mtmp->mx, mtmp->my);
|
||||
}
|
||||
|
||||
17
src/uhitm.c
17
src/uhitm.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 uhitm.c $NHDT-Date: 1617035737 2021/03/29 16:35:37 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.300 $ */
|
||||
/* NetHack 3.7 uhitm.c $NHDT-Date: 1625446013 2021/07/05 00:46:53 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.311 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -202,17 +202,24 @@ attack_checks(struct monst *mtmp,
|
||||
seemimic(mtmp);
|
||||
return FALSE;
|
||||
}
|
||||
if (!((Blind ? Blind_telepat : Unblind_telepat) || Detect_monsters)) {
|
||||
if (!tp_sensemon(mtmp) && !Detect_monsters) {
|
||||
struct obj *obj;
|
||||
char lmonbuf[BUFSZ];
|
||||
boolean notseen;
|
||||
|
||||
Strcpy(lmonbuf, l_monnam(mtmp));
|
||||
/* might be unseen if invisible and hero can't see invisible */
|
||||
notseen = !strcmp(lmonbuf, "it"); /* note: not strcmpi() */
|
||||
if (!Blind && Hallucination)
|
||||
pline("A %s %s appeared!",
|
||||
mtmp->mtame ? "tame" : "wild", l_monnam(mtmp));
|
||||
pline("A %s %s %s!", mtmp->mtame ? "tame" : "wild",
|
||||
notseen ? "creature" : (const char *) lmonbuf,
|
||||
notseen ? "is present" : "appears");
|
||||
else if (Blind || (is_pool(mtmp->mx, mtmp->my) && !Underwater))
|
||||
pline("Wait! There's a hidden monster there!");
|
||||
else if ((obj = g.level.objects[mtmp->mx][mtmp->my]) != 0)
|
||||
pline("Wait! There's %s hiding under %s!",
|
||||
an(l_monnam(mtmp)), doname(obj));
|
||||
notseen ? something : (const char *) an(lmonbuf),
|
||||
doname(obj));
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user