-NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.410 $ $NHDT-Date: 1609281273 2020/12/29 22:34:33 $
+NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.413 $ $NHDT-Date: 1609442596 2020/12/31 19:23:16 $
General Fixes and Modified Features
-----------------------------------
new ^G gender-naming handling code required a guard against null permonst
pointer which could occur under some circumstances
replace some monster names in .lua files with their new equivalents
+attempting to swap places with a peaceful monster might cause it to flee
curses: 'msg_window' option wasn't functional for curses unless the binary
also included tty support
-/* NetHack 3.7 hack.c $NHDT-Date: 1608673692 2020/12/22 21:48:12 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.274 $ */
+/* NetHack 3.7 hack.c $NHDT-Date: 1609442596 2020/12/31 19:23:16 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.276 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Derek S. Ray, 2015. */
/* NetHack may be freely redistributed. See license for details. */
You("%s %s.", mtmp->mpeaceful ? "swap places with" : "frighten",
x_monnam(mtmp,
mtmp->mtame ? ARTICLE_YOUR
- : (!has_mgivenname(mtmp) && !type_is_pname(mtmp->data))
- ? ARTICLE_THE : ARTICLE_NONE,
+ : (!has_mgivenname(mtmp)
+ && !type_is_pname(mtmp->data)) ? ARTICLE_THE
+ : ARTICLE_NONE,
(mtmp->mpeaceful && !mtmp->mtame) ? "peaceful" : 0,
has_mgivenname(mtmp) ? SUPPRESS_SADDLE : 0, FALSE));
-/* NetHack 3.7 uhitm.c $NHDT-Date: 1607076540 2020/12/04 10:09:00 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.288 $ */
+/* NetHack 3.7 uhitm.c $NHDT-Date: 1609442602 2020/12/31 19:23:22 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.292 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
* if your pet is a long worm with a tail.
* There's also a chance of displacing a "frozen" monster:
* sleeping monsters might magically walk in their sleep.
+ * This block of code used to only be called for pets; now
+ * that it also applies to peacefuls, non-pets mustn't be
+ * forced to flee.
*/
boolean foo = (Punished || !rn2(7)
- || (is_longworm(mtmp->data) && mtmp->wormno)),
+ || (is_longworm(mtmp->data) && mtmp->wormno)
+ || (IS_ROCK(levl[u.ux][u.uy].typ)
+ && !passes_walls(mtmp->data))),
inshop = FALSE;
char *p;
break;
}
}
- if (inshop || foo || (IS_ROCK(levl[u.ux][u.uy].typ)
- && !passes_walls(mtmp->data))) {
+ if (inshop || foo) {
char buf[BUFSZ];
- monflee(mtmp, rnd(6), FALSE, FALSE);
+ if (mtmp->mtame) /* see 'additional considerations' above */
+ monflee(mtmp, rnd(6), FALSE, FALSE);
Strcpy(buf, y_monnam(mtmp));
buf[0] = highc(buf[0]);
You("stop. %s is in the way!", buf);
end_running(TRUE);
return TRUE;
- } else if (mtmp->mfrozen || mtmp->msleeping || (!mtmp->mcanmove)
+ } else if (mtmp->mfrozen || mtmp->msleeping || !mtmp->mcanmove
|| (mtmp->data->mmove == 0 && rn2(6))) {
pline("%s doesn't seem to move!", Monnam(mtmp));
end_running(TRUE);