diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 54bc83b0d..f2adb977c 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -1,4 +1,4 @@ -.\" $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.271 $ $NHDT-Date: 1535668900 2018/08/30 22:41:40 $ +.\" $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.278 $ $NHDT-Date: 1539507753 2018/10/14 09:02:33 $ .\" .\" This is an excerpt from the 'roff' man page from the 'groff' package. .\" NetHack's Guidebook.mn currently does *not* adhere to these guidelines. @@ -21,7 +21,7 @@ .ds vr "NetHack 3.6 .ds f0 "\*(vr .ds f1 -.ds f2 "September 26, 2018 +.ds f2 "October 14, 2018 . .\" labeled paragraph start (should be part of tmac.n, but I don't want to .\" make changes to that file) @@ -2257,13 +2257,14 @@ you are carrying (shopkeepers aside). Persistence of Objects .pg Normally, if you have seen an object at a particular map location and -move to another location which can't directly see that object any +move to another location where you can't directly see that object any more, if will continue to be displayed on your map. That remains the case even if it is not actually there any more \(em perhaps a monster has picked it up or it has rotted away \(em until you can see or feel that location again. One notable exception is that if the object gets covered by the -``remembered, unseen monster'' marker and that marker is later removed +``remembered, unseen monster'' marker. +When that marker is later removed after you've verified that no monster is there, you will forget that there was any object there regardless of whether the unseen monster actually took the object. @@ -2274,7 +2275,7 @@ The situation is the same for a pile of objects, except that only the top item of the pile is displayed. The .op hilite_pile -option can be enabled in order to show an item differently when is +option can be enabled in order to show an item differently when it is the top one of a pile. . .hn 1 @@ -2663,7 +2664,7 @@ new players if it detects some anticipated mistakes (default on). Have user confirm attacks on pets, shopkeepers, and other peaceable creatures (default on). Persistent. .lp dark_room -Show out-of-sight areas of lit rooms (default off). Persistent. +Show out-of-sight areas of lit rooms (default on). Persistent. .lp disclose Controls what information the program reveals when the game ends. Value is a space separated list of prompting/category pairs diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index d62403d6c..307b886a9 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -45,7 +45,7 @@ %.au \author{Original version - Eric S. Raymond\\ (Edited and expanded for 3.6 by Mike Stephenson and others)} -\date{September 26, 2018} +\date{October 14, 2018} \maketitle @@ -2619,13 +2619,14 @@ you are carrying (shopkeepers aside). %.pg Normally, if you have seen an object at a particular map location and -move to another location which can't directly see that object any +move to another location where you can't directly see that object any more, if will continue to be displayed on your map. That remains the case even if it is not actually there any more-- perhaps a monster has picked it up or it has rotted away-- until you can see or feel that location again. One notable exception is that if the object gets covered by the -``remembered, unseen monster'' marker and that marker is later removed +``remembered, unseen monster'' marker. +When that marker is later removed after you've verified that no monster is there, you will forget that there was any object there regardless of whether the unseen monster actually took the object. @@ -2637,7 +2638,7 @@ The situation is the same for a pile of objects, except that only the top item of the pile is displayed. The {\it hilite\verb+_+pile\/} -option can be enabled in order to show an item differently when is +option can be enabled in order to show an item differently when it is the top one of a pile. %.hn 1 @@ -3109,7 +3110,7 @@ peaceable creatures (default on). Persistent. %.lp %.lp \item[\ib{dark\verb+_+room}] -Show out-of-sight areas of lit rooms (default off). Persistent. +Show out-of-sight areas of lit rooms (default on). Persistent. \item[\ib{disclose}] Controls what information the program reveals when the game ends. Value is a space separated list of prompting/category pairs diff --git a/doc/fixes36.2 b/doc/fixes36.2 index 127f7ee1b..f63ea6f13 100644 --- a/doc/fixes36.2 +++ b/doc/fixes36.2 @@ -158,6 +158,11 @@ being trapped (bear trap, web, molten or solidified lava, chained to buried iron ball) blocks both levitation and flight (note: being stuck in a pit ends when either of those starts so doesn't apply) change default value for the 'autodescribe' option to 'on' +Elbereth hypocrisy penalty doesn't apply if attacking a monster which isn't + frightened by Elbereth; normal scuffing of engravings still applies +Elbereth hypocrisy penalty reduced when alignment is already low +during character creation, don't unset alternate weapon when a shield gets + worn (was preventing knight from having lance set up as uswapwep) Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository @@ -225,6 +230,7 @@ X11: make key translations work with menus on Linux X11: allow mouse wheel scrolling to work in menus by default X11: handle paged menu control keys X11: remember perm_invent window geometry +X11: handle X errors via panic General New Features diff --git a/src/mon.c b/src/mon.c index 49ab5ac6a..079321f41 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mon.c $NHDT-Date: 1526132509 2018/05/12 13:41:49 $ $NHDT-Branch: master $:$NHDT-Revision: 1.252 $ */ +/* NetHack 3.6 mon.c $NHDT-Date: 1539479657 2018/10/14 01:14:17 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.260 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2659,7 +2659,10 @@ setmangry(mtmp, via_attack) struct monst *mtmp; boolean via_attack; { - if (via_attack && sengr_at("Elbereth", u.ux, u.uy, TRUE)) { + if (via_attack && sengr_at("Elbereth", u.ux, u.uy, TRUE) + /* only hypocritical if monster is vulnerable to Elbereth (or + peaceful--not vulnerable but attacking it is hypocritical) */ + && (onscary(u.ux, u.uy, mtmp) || mtmp->mpeaceful)) { You_feel("like a hypocrite."); /* AIS: Yes, I know alignment penalties and bonuses aren't balanced at the moment. This is about correct relative to other "small" @@ -2668,7 +2671,8 @@ boolean via_attack; violating your own request. I know 5 isn't actually large, but it's intentionally larger than the 1s and 2s that are normally given for this sort of thing. */ - adjalign(-5); + /* reduce to 3 (average) when alignment is already very low */ + adjalign((u.ualign.record > 5) ? -5 : -rnd(5)); if (!Blind) pline("The engraving beneath you fades."); diff --git a/src/u_init.c b/src/u_init.c index 44fb9142a..5b5c5113f 100644 --- a/src/u_init.c +++ b/src/u_init.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 u_init.c $NHDT-Date: 1526755625 2018/05/19 18:47:05 $ $NHDT-Branch: NetHack-3.6.2 $:$NHDT-Revision: 1.42 $ */ +/* NetHack 3.6 u_init.c $NHDT-Date: 1539510426 2018/10/14 09:47:06 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.43 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2017. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1112,10 +1112,13 @@ register struct trobj *trop; discover_object(POT_OIL, TRUE, FALSE); if (obj->oclass == ARMOR_CLASS) { - if (is_shield(obj) && !uarms) { + if (is_shield(obj) && !uarms && !(uwep && bimanual(uwep))) { setworn(obj, W_ARMS); - if (uswapwep) - setuswapwep((struct obj *) 0); + /* 3.6.2: this used to unset uswapwep if it was set, but + wearing a shield doesn't prevent having an alternate + weapon ready to swap with the primary; just make sure we + aren't two-weaponing (academic; no one starts that way) */ + u.twoweap = FALSE; } else if (is_helmet(obj) && !uarmh) setworn(obj, W_ARMH); else if (is_gloves(obj) && !uarmg) @@ -1135,10 +1138,11 @@ register struct trobj *trop; if (is_ammo(obj) || is_missile(obj)) { if (!uquiver) setuqwep(obj); - } else if (!uwep) + } else if (!uwep && (!uarms || !bimanual(obj))) { setuwep(obj); - else if (!uswapwep) + } else if (!uswapwep) { setuswapwep(obj); + } } if (obj->oclass == SPBOOK_CLASS && obj->otyp != SPE_BLANK_PAPER) initialspell(obj); diff --git a/win/X11/winX.c b/win/X11/winX.c index 39c650973..c79376c35 100644 --- a/win/X11/winX.c +++ b/win/X11/winX.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 winX.c $NHDT-Date: 1526429314 2018/05/16 00:08:34 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.50 $ */ +/* NetHack 3.6 winX.c $NHDT-Date: 1539392992 2018/10/13 01:09:52 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.57 $ */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ @@ -85,6 +85,8 @@ int click_x, click_y, click_button; /* Click position on a map window */ /* (filled by set_button_values()). */ int updated_inventory; +static int (*old_error_handler) (Display *, XErrorEvent *); + #if !defined(NO_SIGNAL) && defined(SAFERHANGUP) #if XtSpecificationRelease >= 6 #define X11_HANGUP_SIGNAL @@ -148,6 +150,7 @@ static void FDECL(nhFreePixel, (XtAppContext, XrmValuePtr, XtPointer, static boolean FDECL(new_resource_macro, (String, unsigned)); static void NDECL(load_default_resources); static void NDECL(release_default_resources); +static int FDECL(panic_on_error, (Display *, XErrorEvent *)); #ifdef X11_HANGUP_SIGNAL static void FDECL(X11_sig, (int)); static void FDECL(X11_sig_cb, (XtPointer, XtSignalId *)); @@ -1273,6 +1276,21 @@ static XtResource resources[] = { #endif }; +static int +panic_on_error(display, error) +Display *display; +XErrorEvent *error; +{ + char buf[BUFSZ]; + XGetErrorText(display, error->error_code, buf, BUFSZ); + fprintf(stderr, "X Error: code %i (%s), request %i, minor %i, serial %lu\n", + error->error_code, buf, + error->request_code, error->minor_code, + error->serial); + panic("X Error"); + return 0; +} + void X11_init_nhwindows(argcp, argv) int *argcp; @@ -1318,6 +1336,8 @@ char **argv; /* We don't need to realize the top level widget. */ + old_error_handler = XSetErrorHandler(panic_on_error); + #ifdef TEXTCOLOR /* add new color converter to deal with overused colormaps */ XtSetTypeConverter(XtRString, XtRPixel, nhCvtStringToPixel, @@ -2539,7 +2559,7 @@ String *params; Cardinal *num_params; { Arg arg[2]; - Widget horiz_sb, vert_sb; + Widget horiz_sb, vert_sb, scrollw; float top, shown; Boolean do_call; int direction; @@ -2552,7 +2572,7 @@ Cardinal *num_params; direction = atoi(params[0]); - Widget scrollw = viewport; + scrollw = viewport; do { horiz_sb = XtNameToWidget(scrollw, "*horizontal"); vert_sb = XtNameToWidget(scrollw, "*vertical");