diff --git a/dat/opthelp b/dat/opthelp index 0bcc8547e..29fcb2404 100644 --- a/dat/opthelp +++ b/dat/opthelp @@ -43,6 +43,8 @@ perm_invent keep inventory in a permanent window [FALSE] pickup_thrown override pickup_types for thrown objects [TRUE] pushweapon when wielding a new weapon, put your previously [FALSE] wielded weapon into the secondary weapon slot +quick_farsight usually skip the chance to browse the map when [FALSE] + randomly triggered clairvoyance takes place rawio allow the use of raw I/O [FALSE] rest_on_space count the space bar as a rest character [FALSE] safe_pet prevent you from (knowingly) attacking your pet(s) [TRUE] diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index c85238f4d..0b0ecd10d 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -1,4 +1,4 @@ -.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.337 $ $NHDT-Date: 1576431522 2019/12/15 17:38:42 $ +.\" $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.345 $ $NHDT-Date: 1577050469 2019/12/22 21:34:29 $ .\" .\" This is an excerpt from the 'roff' man page from the 'groff' package. .\" NetHack's Guidebook.mn currently does *not* adhere to these guidelines. @@ -3422,6 +3422,14 @@ something pushes the old item into your alternate weapon slot (default off). Likewise for the \(oqa\(cq (apply) command if it causes the applied item to become wielded. Persistent. +.lp quick_farsight +When set, usually prevents the \(lqyou sense your surroundings\(rq message +where play pauses to allow you to browse the map whenever clairvoyance +randomly activates. +Some situations, such as being underwater or engulfed, ignore this option. +It does not affect the clairvoyance spell where pausing to examine revealed +objects or monsters is less intrusive. +Default is off. Persistent. .lp "race " Selects your race (for example, \(lqrace:human\(rq). Default is random. diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 4e36344af..48ed797a9 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -3760,7 +3760,16 @@ Using the `w' (wield) command when already wielding something pushes the old item into your alternate weapon slot (default off). Likewise for the `a' (apply) command if it causes the applied item to become wielded. Persistent. -%.Ip +%.lp +\item[\ib(quick\verb+_+farsight} +When set, usually prevents the ``you sense your surroundings'' message +where play pauses to allow you to browse the map whenever clairvoyance +randomly activates. +Some situations, such as being underwater or engulfed, ignore this option. +It does not affect the clairvoyance spell where pausing to examine revealed +objects or monsters is less intrusive. +Default is off. Persistent. +%.lp \item[\ib{race}] Selects your race (for example, ``{\tt race:human}''). Default is random. If you prefix the value with `{\tt !}' or ``{\tt no}'', you will diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 63c0f879d..742e3dd85 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.26 $ $NHDT-Date: 1577050214 2019/12/22 21:30:14 $ +$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.27 $ $NHDT-Date: 1577050470 2019/12/22 21:34:30 $ General Fixes and Modified Features ----------------------------------- @@ -42,6 +42,9 @@ split off some of the functionality that was in makedefs (compiled-in options replace quest.txt and associated conversion to quest.dat via makedefs with lua quest texts loaded at runtime some altars are displayed in different colors (for tty and curses at least) +add 'quick_farsight' option to provide some control over random clairvoyance + where pausing to be able to browse temporarily visible aspects of the + revealed map can seem intrusive; doesn't affect clairvoyance spell Platform- and/or Interface-Specific New Features diff --git a/include/flag.h b/include/flag.h index d0237d628..e1091a562 100644 --- a/include/flag.h +++ b/include/flag.h @@ -1,4 +1,4 @@ -/* NetHack 3.7 flag.h $NHDT-Date: 1574982014 2019/11/28 23:00:14 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.166 $ */ +/* NetHack 3.7 flag.h $NHDT-Date: 1577050470 2019/12/22 21:34:30 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.167 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2006. */ /* NetHack may be freely redistributed. See license for details. */ @@ -16,19 +16,19 @@ */ struct flag { - boolean acoustics; /* allow dungeon sound messages */ - boolean autodig; /* MRKR: Automatically dig */ - boolean autoquiver; /* Automatically fill quiver */ - boolean autoopen; /* open doors by walking into them */ - boolean beginner; - boolean biff; /* enable checking for mail */ - boolean bones; /* allow saving/loading bones */ - boolean confirm; /* confirm before hitting tame monsters */ - boolean dark_room; /* show shadows in lit rooms */ - boolean debug; /* in debugging mode */ + boolean acoustics; /* allow dungeon sound messages */ + boolean autodig; /* MRKR: Automatically dig */ + boolean autoquiver; /* Automatically fill quiver */ + boolean autoopen; /* open doors by walking into them */ + boolean beginner; /* True early in each game; affects feedback */ + boolean biff; /* enable checking for mail */ + boolean bones; /* allow saving/loading bones */ + boolean confirm; /* confirm before hitting tame monsters */ + boolean dark_room; /* show shadows in lit rooms */ + boolean debug; /* in debugging mode (aka wizard mode) */ #define wizard flags.debug - boolean end_own; /* list all own scores */ - boolean explore; /* in exploration mode */ + boolean end_own; /* list all own scores */ + boolean explore; /* in exploration mode (aka discover mode) */ #define discover flags.explore boolean female; boolean friday13; /* it's Friday the 13th */ @@ -44,6 +44,8 @@ struct flag { boolean pickup; /* whether you pickup or move and look */ boolean pickup_thrown; /* auto-pickup items you threw */ boolean pushweapon; /* When wielding, push old weapon into second slot */ + boolean quick_farsight; /* True disables map browsing during random + * clairvoyance */ boolean rest_on_space; /* space means rest */ boolean safe_dog; /* give complete protection to the dog */ boolean showexp; /* show experience points */ diff --git a/include/patchlevel.h b/include/patchlevel.h index 4f90efd41..8fd411eb1 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -1,4 +1,4 @@ -/* NetHack 3.7 patchlevel.h $NHDT-Date: 1577050214 2019/12/22 21:30:14 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.141 $ */ +/* NetHack 3.7 patchlevel.h $NHDT-Date: 1577050471 2019/12/22 21:34:31 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.142 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -14,7 +14,7 @@ * Incrementing EDITLEVEL can be used to force invalidation of old bones * and save files. */ -#define EDITLEVEL 4 +#define EDITLEVEL 5 #define COPYRIGHT_BANNER_A "NetHack, Copyright 1985-2019" #define COPYRIGHT_BANNER_B \ diff --git a/src/detect.c b/src/detect.c index e35d3829a..417afb595 100644 --- a/src/detect.c +++ b/src/detect.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 detect.c $NHDT-Date: 1575245054 2019/12/02 00:04:14 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.100 $ */ +/* NetHack 3.6 detect.c $NHDT-Date: 1577050472 2019/12/22 21:34:32 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.110 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2018. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1314,7 +1314,8 @@ struct obj *sobj; /* scroll--actually fake spellbook--object */ /* fake spellbook 'sobj' implies hero has cast the spell; when book is blessed, casting is skilled or expert level; if already clairvoyant, non-skilled spell acts like skilled */ - extended = (sobj && (sobj->blessed || Clairvoyant)); + extended = (sobj && (sobj->blessed || Clairvoyant)), + random_farsight = !sobj; int newglyph, oldglyph, lo_y = ((u.uy - 5 < 0) ? 0 : u.uy - 5), hi_y = ((u.uy + 6 >= ROWNO) ? ROWNO - 1 : u.uy + 6), @@ -1391,7 +1392,18 @@ struct obj *sobj; /* scroll--actually fake spellbook--object */ } } - if (!g.level.flags.hero_memory || unconstrained || mdetected || odetected) { + /* when this instance of clairvoyance is random (see allmain()) and + the only reason to browse the map is that previously undetected + monster(s) or object(s) have been revealed, player can prevent + the you-sense-your-surroundings message and browse operation from + happening by setting 'quick_farsight' option; for clairvoyance + spell, that option is ignored because the message and the pause + for map browsing isn't as intrusive in that circumstance */ + if (random_farsight && flags.quick_farsight) + mdetected = odetected = FALSE; + + if (!g.level.flags.hero_memory || unconstrained + || mdetected || odetected) { flush_screen(1); /* flush temp screen */ /* the getpos() prompt from browse_map() is only shown when flags.verbose is set, but make this unconditional so that diff --git a/src/options.c b/src/options.c index 357902582..d6129dd97 100644 --- a/src/options.c +++ b/src/options.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 options.c $NHDT-Date: 1575245078 2019/12/02 00:04:38 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.391 $ */ +/* NetHack 3.7 options.c $NHDT-Date: 1577050473 2019/12/22 21:34:33 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.422 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2008. */ /* NetHack may be freely redistributed. See license for details. */ @@ -184,6 +184,7 @@ static const struct Bool_Opt { { "popup_dialog", &iflags.wc_popup_dialog, FALSE, SET_IN_GAME }, /*WC*/ { "preload_tiles", &iflags.wc_preload_tiles, TRUE, DISP_IN_GAME }, /*WC*/ { "pushweapon", &flags.pushweapon, FALSE, SET_IN_GAME }, + { "quick_farsight", &flags.quick_farsight, FALSE, SET_IN_GAME }, #if defined(MICRO) && !defined(AMIGA) { "rawio", &iflags.rawio, FALSE, DISP_IN_GAME }, #else