-NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.337 $ $NHDT-Date: 1603507384 2020/10/24 02:43:04 $
+NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.338 $ $NHDT-Date: 1603509297 2020/10/24 03:14:57 $
General Fixes and Modified Features
-----------------------------------
learn scroll of teleportation after reading even when random destination is
right by starting spot
fix off-by-one bug in dimensions of theme rooms
+fire/frost horn feedback when zapped by monster was inaccurate (falsely
+ claimed that it was "directed at self" when attacking hero)
curses: 'msg_window' option wasn't functional for curses unless the binary
also included tty support
-/* NetHack 3.7 muse.c $NHDT-Date: 1596498190 2020/08/03 23:43:10 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.129 $ */
+/* NetHack 3.7 muse.c $NHDT-Date: 1603509297 2020/10/24 03:14:57 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.132 $ */
/* Copyright (C) 1990 by Ken Arromdee */
/* NetHack may be freely redistributed. See license for details. */
struct obj *otmp;
boolean self;
{
+ char *objnamp, objbuf[BUFSZ];
+
if (!canseemon(mtmp)) {
int range = couldsee(mtmp->mx, mtmp->my) /* 9 or 5 */
? (BOLT_LIM + 1) : (BOLT_LIM - 3);
(distu(mtmp->mx, mtmp->my) <= range * range)
? "nearby" : "in the distance");
otmp->known = 0; /* hero doesn't know how many charges are left */
- } else {
- char *objnamp, objbuf[BUFSZ];
-
+ } else if (self) {
otmp->dknown = 1;
objnamp = xname(otmp);
if (strlen(objnamp) >= QBUFSZ)
/* "<mon> plays a <horn> directed at himself!" */
pline("%s!", monverbself(mtmp, Monnam(mtmp), "play", objbuf));
makeknown(otmp->otyp); /* (wands handle this slightly differently) */
- if (!self)
- stop_occupation();
+ } else {
+ otmp->dknown = 1;
+ objnamp = xname(otmp);
+ if (strlen(objnamp) >= QBUFSZ)
+ objnamp = simpleonames(otmp);
+ pline("%s %s %s directed at you!",
+ /* monverbself() would adjust the verb if hallucination made
+ subject plural; stick with singular here, at least for now */
+ Monnam(mtmp), "plays", an(objnamp));
+ makeknown(otmp->otyp);
+ stop_occupation();
}
otmp->spe -= 1; /* use a charge */
}