Merge branch 'master' into derek-farming

* master: (41 commits)
  Add more explicit helpless reasons
  add data.base suggestion for whistle
  Use existing function to count containers
  ...

Conflicts:
	src/do.c
	src/hack.c
	src/invent.c
	src/mon.c
	src/objnam.c
This commit is contained in:
Derek S. Ray
2015-03-29 17:32:12 -04:00
56 changed files with 3316 additions and 2131 deletions
+16
View File
@@ -5321,6 +5321,22 @@ web
Oh what a tangled web we weave,
When first we practise to deceive!
[ Marmion, by Sir Walter Scott ]
whistle
There were legends both on the front and on the back of the
whistle. The one read thus:
FLA FUR BIS FLE The other: QUIS EST ISTE QUI VENIT
'I ought to be able to make it out,' he thought;
'but I suppose I am a little rusty in my Latin.
When I come to think of it, I don't believe I even
know the word for a whistle. The long one does seem
simple enough. It ought to mean, "Who is this who is coming?"
Well, the best way to find out is evidently to whistle
for him.'
[Ghost Stories of an Antiquary, by Montague Rhodes James
'Oh, Whistle, and I'll Come to You My Lad']
# werecritter -- see "lycanthrope"
*wight
When he came to himself again, for a moment he could recall
+38 -36
View File
@@ -128,20 +128,20 @@ just before the release of NetHack 3.4.0 in March 2002.
As with version 3.3, various people contributed to the game as a whole as
well as supporting ports on the different platforms that NetHack runs on:
Pat Rankin maintained 3.5 for VMS.
Pat Rankin maintained 3.4 for VMS.
Michael Allison maintained NetHack 3.5 for the MS-DOS platform.
Michael Allison maintained NetHack 3.4 for the MS-DOS platform.
Paul Winner and Yitzhak Sapir provided encouragement.
Dean Luick, Mark Modrall, and Kevin Hugo maintained and enhanced the
Macintosh port of 3.4.
Michael Allison, David Cohrs, Alex Kompel, Dion Nicolaas, and Yitzhak Sapir
maintained and enhanced 3.5 for the Microsoft Windows platform. Alex Kompel
maintained and enhanced 3.4 for the Microsoft Windows platform. Alex Kompel
contributed a new graphical interface for the Windows port. Alex Kompel also
contributed a Windows CE port for 3.4.1.
Ron Van Iwaarden maintained 3.5 for OS/2.
Ron Van Iwaarden maintained 3.4 for OS/2.
Janne Salmijarvi and Teemu Suikki maintained and enhanced the
Amiga port of 3.5 after Janne Salmijarvi resurrected it for 3.3.1.
@@ -174,7 +174,6 @@ At the beginning of development for what would eventually get released
as 3.6.0, the development team consisted of Michael Allison,
Warwick Allison, Ken Arromdee, David Cohrs, Jessie Collet, Ken Lorber,
Dean Luick, Pat Rankin, Mike Stephenson, Janet Walz, and Paul Winner.
Leading up to the release of 3.6.0 in early 2015, new members Sean Hunt,
Pasi Kallinen, and Derek S. Ray joined the NetHack development team.
@@ -211,7 +210,9 @@ people primarily responsible for the public NetHack servers available for
playing the game at nethack.alt.org and devnull.net. In addition to providing
a way for the public to play a game of NetHack from almost anywhere, they
have hosted annual NetHack tournaments for many, many years.
<FIXME> write up something for Robin, M. Drew Streib, Pasi Kallinen
On behalf of the NetHack community, thank you very much to
M. Drew Streib, Pasi Kallinen and Robin Bandy.
- - - - - - - - - -
@@ -220,11 +221,11 @@ particularly intriguing modification to help out with the game. The Gods of
the Dungeon sometimes make note of the names of the worst of these miscreants
in this, the list of Dungeoneers:
Adam Aronow Izchak Miller Mike Stephenson
Alex Kompel J. Ali Harlow Norm Meluch
Andreas Dorn Janet Walz Olaf Seibert
Andy Church Janne Salmijarvi Pasi Kallinen
Andy Swanson Jean-Christophe Collet Pat Rankin
Adam Aronow J. Ali Harlow Mike Stephenson
Alex Kompel Janet Walz Norm Meluch
Andreas Dorn Janne Salmijarvi Olaf Seibert
Andy Church Jean-Christophe Collet Pasi Kallinen
Andy Swanson Jeff Bailey Pat Rankin
Ari Huttunen Jochen Erwied Paul Winner
Barton House John Kallen Pierre Martineau
Benson I. Margulies John Rupley Ralf Brown
@@ -233,29 +234,30 @@ in this, the list of Dungeoneers:
Bruce Cox Jon W{tte Richard Beigel
Bruce Holloway Jonathan Handler Richard P. Hughey
Bruce Mewborne Joshua Delahunty Rob Menke
Carl Schelin Keizo Yamamoto Robin Johnson
Chris Russo Ken Arnold Roderick Schertler
David Cohrs Ken Arromdee Roland McGrath
David Damerell Ken Lorber Ron Van Iwaarden
David Gentzel Ken Washikita Ronnen Miller
David Hairston Kevin Darcy Ross Brown
Dean Luick Kevin Hugo Sascha Wostmann
Del Lamb Kevin Sitze Scott Bigham
Derek S. Ray Kevin Smolkowski Scott R. Turner
Deron Meranda Kevin Sweet Sean Hunt
Dion Nicolaas Lars Huttar Stephen Spackman
Dylan O'Donnell Leon Arnott Stephen White
Eric Backus Malcolm Ryan Steve Creps
Eric Hendrickson Mark Gooderum Steve Linhart
Eric R. Smith Mark Modrall Steve VanDevender
Eric S. Raymond Marvin Bressler Teemu Suikki
Erik Andersen Matthew Day Tim Lennan
Frederick Roeber Merlyn LeRoy Timo Hakulinen
Gil Neiger Michael Allison Tom Almy
Greg Laskin Michael Feir Tom West
Greg Olson Michael Hamel Warren Cheung
Gregg Wonderly Michael Sokolov Warwick Allison
Hao-yang Wang Mike Engber Yitzhak Sapir
Helge Hafting Mike Gallop
Irina Rempt-Drijfhout Mike Passaretti
Carl Schelin Keizo Yamamoto Robin Bandy
Chris Russo Ken Arnold Robin Johnson
David Cohrs Ken Arromdee Roderick Schertler
David Damerell Ken Lorber Roland McGrath
David Gentzel Ken Washikita Ron Van Iwaarden
David Hairston Kevin Darcy Ronnen Miller
Dean Luick Kevin Hugo Ross Brown
Del Lamb Kevin Sitze Sascha Wostmann
Derek S. Ray Kevin Smolkowski Scott Bigham
Deron Meranda Kevin Sweet Scott R. Turner
Dion Nicolaas Lars Huttar Sean Hunt
Dylan O'Donnell Leon Arnott Stephen Spackman
Eric Backus M. Drew Streib Stephen White
Eric Hendrickson Malcolm Ryan Steve Creps
Eric R. Smith Mark Gooderum Steve Linhart
Eric S. Raymond Mark Modrall Steve VanDevender
Erik Andersen Marvin Bressler Teemu Suikki
Frederick Roeber Matthew Day Tim Lennan
Gil Neiger Merlyn LeRoy Timo Hakulinen
Greg Laskin Michael Allison Tom Almy
Greg Olson Michael Feir Tom West
Gregg Wonderly Michael Hamel Warren Cheung
Hao-yang Wang Michael Sokolov Warwick Allison
Helge Hafting Mike Engber Yitzhak Sapir
Irina Rempt-Drijfhout Mike Gallop
Izchak Miller Mike Passaretti
+1
View File
@@ -45,6 +45,7 @@ tombstone print tombstone when you die [TRUE]
toptenwin print topten in a window rather than stdout [FALSE]
travel enable the command to travel to a map location via [TRUE]
a shortest-path algorithm, usually invoked by '_'.
use_darkgray use bold black instead of blue for black glyphs. [TRUE]
use_inverse display detected monsters in highlighted manner [FALSE]
verbose print more commentary during the game [TRUE]
+110 -49
View File
@@ -1,12 +1,12 @@
.\" $NHDT-Branch$:$NHDT-Revision$ $NHDT-Date$
.\" $Revision: 1.130 $ $Date: 2012/05/02 00:38:30 $
.\" $Revision: 1.130 $ $Date: 2015/03/27 00:38:30 $
.ds h0 "NetHack Guidebook
.ds h1
.ds h2 %
.ds vr "NetHack 3.6
.ds f0 "\*(vr
.ds f1
.ds f2 "March 16, 2015
.ds f2 "March 27, 2015
.\" labeled paragraph start (should be part of tmac.n, but I don't want to
.\" make changes to that file)
.\" .PS word
@@ -710,12 +710,6 @@ the exchange still takes place.
.lp X
Toggle two-weapon combat, if your character can do it. Also available
via the ``#twoweapon'' extended command
.lp ""
Since using this command by accident would be troublesome, you are asked
to confirm your intent before switching to explore mode. By default
the response 'y' acknowledges that intent. You can set the
.op paraniod_confirmation
option to require a response of "yes" instead.
.lp ^X
Display basic information about your character.
.lp ""
@@ -848,7 +842,7 @@ You probably shouldn't start off a new game by praying right away.)
Since using this command by accident can cause trouble, there is an
option to make you confirm your intent before praying. It is enabled
by default, and you can reset the
.op paraniod_confirmation
.op paranoid_confirmation
option to disable it.
.lp #quit
Quit the program without saving your game.
@@ -856,7 +850,7 @@ Quit the program without saving your game.
Since using this command by accident would throw away the current game,
you are asked to confirm your intent before quitting. By default a
response of 'y' acknowledges that intent. You can set the
.op paraniod_confirmation
.op paranoid_confirmation
option to require a response of "yes" instead.
.lp #ride
Ride (or stop riding) a monster.
@@ -1138,7 +1132,7 @@ In most circumstances, if you attempt to attack a peaceful monster by
moving into its location, you'll be asked to confirm your intent. By
default an answer of 'y' acknowledges that intent,
which can be error prone if you're using 'y' to move. You can set the
.op paraniod_confirmation
.op paranoid_confirmation
option to require a response of "yes" instead.
.pg
If you can't see a monster (if it is invisible, or if you are blinded),
@@ -2175,7 +2169,7 @@ is the same as specifying 0.
(Settings 2 and 4 are for compatibility with MSDOS or old PC Hack;
in addition to the different behavior for `5', `Alt-5' acts as `G'
and `Alt-0' acts as `I'.
Setting -1 is to accomodate some German keyboards which have the
Setting -1 is to accommodate some German keyboards which have the
location of the `y' and `z' keys swapped.)
When moving by numbers, to enter a count prefix for those commands
which accept one (such as ``12s'' to search twelve times), precede it
@@ -2459,6 +2453,8 @@ Specify the name of an alternative tile file to override the default.
Specify the preferred height of each tile in a tile capable port.
.lp tile_width
Specify the preferred width of each tile in a tile capable port
.lp use_darkgray
Use bold black instead of blue for black glyphs (TTY only).
.lp use_inverse
NetHack should display inverse when the game specifies it.
.lp vary_msgcount
@@ -2994,7 +2990,7 @@ command-line switch or with the
.op playmode:explore
option. The other is to issue the ``#exploremode'' extended command while
already playing the game. Starting a new game in explore mode provides your
character with a wand of wishing in initial inventory; switching via `X'
character with a wand of wishing in initial inventory; switching
during play does not. The other benefits of explore mode are left for
the trepid reader to discover.
.pg
@@ -3162,7 +3158,7 @@ available web-site listing all the bugs that had been discovered. Despite
that constantly growing bug list, 3.3 proved stable enough to last for
more than a year and a half.
.pg
The 3.5 development team initially consisted of
The 3.4 development team initially consisted of
\fBMichael Allison\fP, \fBKen Arromdee\fP,
\fBDavid Cohrs\fP, \fBJessie Collet\fP, \fBKevin Hugo\fP, \fBKen Lorber\fP,
\fBDean Luick\fP, \fBPat Rankin\fP, \fBMike Stephenson\fP,
@@ -3172,16 +3168,16 @@ just before the release of NetHack 3.4.0 in March 2002.
As with version 3.3, various people contributed to the game as a whole as
well as supporting ports on the different platforms that NetHack runs on:
.pg
\fBPat Rankin\fP maintained 3.5 for VMS.
\fBPat Rankin\fP maintained 3.4 for VMS.
.pg
\fBMichael Allison\fP maintained NetHack 3.5 for the MS-DOS platform. \fBPaul Winner\fP
\fBMichael Allison\fP maintained NetHack 3.4 for the MS-DOS platform. \fBPaul Winner\fP
and \fBYitzhak Sapir\fP provided encouragement.
.pg
\fBDean Luick\fP, \fBMark Modrall\fP, and \fBKevin Hugo\fP maintained and enhanced the
Macintosh port of 3.4.
.pg
\fBMichael Allison\fP, \fBDavid Cohrs\fP, \fBAlex Kompel\fP, \fBDion Nicolaas\fP, and
\fBYitzhak Sapir\fP maintained and enhanced 3.5 for the Microsoft Windows platform.
\fBYitzhak Sapir\fP maintained and enhanced 3.4 for the Microsoft Windows platform.
\fBAlex Kompel\fP contributed a new graphical interface for the Windows port.
\fBAlex Kompel\fP also contributed a Windows CE port for 3.4.1.
.pg
@@ -3191,13 +3187,77 @@ early 2006. A great many thanks to Ron for keeping NetHack alive on OS/2
all these years.
.pg
\fBJanne Salmijarvi\fP and \fBTeemu Suikki\fP maintained and
enhanced the Amiga port of 3.5 after \fBJanne Salmijarvi\fP resurrected
enhanced the Amiga port of 3.4 after \fBJanne Salmijarvi\fP resurrected
it for 3.3.1.
.pg
\fBChristian ``Marvin'' Bressler\fP maintained 3.5 for the Atari after he
\fBChristian ``Marvin'' Bressler\fP maintained 3.4 for the Atari after he
resurrected it for 3.3.1.
.pg
The release of NetHack 3.4.3 in December 2003 marked the beginning of a
long release hiatus. 3.4.3 proved to be a remarkably stable version that
provided continued enjoyment by the community for more than a decade. The
devteam slowly and quietly continued to work on the game behind the scenes
during the tenure of 3.4.3. It was during that same period that several new
variants emerged within the NetHack community. Notably sporkhack by
\fBDerek S. Ray\fP, unnethack by \fBPatric Mueller\fP, nitrohack and its
successors originally by \fBDaniel Thaler\fP and then by \fBAlex Smith\fP,
and Dynahack by \fBTung Nguyen\fP. Some of those variants continue to be
developed, maintained, and enjoyed by the community to this day.
.pg
In September 2014, an interim snapshot of the code under development was
released publicly by other parties. Since that code was a work-in-progress
and had not gone through a period of debugging, it was decided that the
version numbers present on that code snapshot would be retired and never
used in an official NetHack release. An announcement was posted on the
devteam's official nethack.org website to that effect, stating that there
would never be a 3.4.4, 3.5, or 3.5.0 official release version.
.pg
In January 2015, preparation began for the release of NetHack 3.6
.pg
At the beginning of development for what would eventually get released
as 3.6.0, the development team consisted of \fBWarwick Allison\fP,
\fBMichael Allison\fP, \fBKen Arromdee\fP,
\fBDavid Cohrs\fP, \fBJessie Collet\fP,
\fBKen Lorber\fP, \fBDean Luick\fP, \fBPat Rankin\fP,
\fBMike Stephenson\fP, \fBJanet Walz\fP, and \fBPaul Winner\fP.
Leading up to the release of 3.6.0 in early 2015, new members
\fBSean Hunt\fP, \fBPasi Kallinen\fP, and \fBDerek S. Ray\fP
joined the NetHack development team,
.pg
\fB3.6.0 TODO insert apprpriate description of 3.6.0 here
.pg
\fBThe development team, as well as \fBSteve VanDevender\fP and
\fBKevin Smolkowski\fP ensured that NetHack 3.6.0 continued to operate on
various Unix flavors as well as maintaining the X11 interface.
.pg
\fBKen Lorber\fP, \fBHaoyang Wang\fP, \fBPat Rankin\fP, and \fBDean Luick\fP
maintained the port of NetHack 3.6.0 for Mac.
.pg
\fBMichael Allison\fP, \fBDerek S. Ray\fP, \fBYitzhak Sapir\fP,
\fBAlex Kompel\fP, and \fBDavid Cohrs\fP maintained the port of
NetHack 3.6.0 for Microsoft Windows.
.pg
\fBJeff Bailey\fP created and maintained a port of NetHack 3.6.0 for Chrome.
.pg
TODO \fBAlex Kompel\fP maintained a port of NetHack 3.6.0 to Windows Phone.
.pg
\fBThis version of the game is special in a particular way. Near the end of
the development of 3.6, one of the significant inspirations for many of the
humorous and fun features found in the game, author \fBTerry Pratchett\fP,
passed away. This version of the game is dedicated to him.
.pg
The official NetHack web site is maintained by \fBKen Lorber\fP at http://www.nethack.org/.
.pg
SHOUT-OUTS
.pg
The devteam would like to give a special "shout-out" to thank the generous
people primarily responsible for the public NetHack servers available for
playing the game at nethack.alt.org and devnull.net. In addition to providing
a way for the public to play a game of NetHack from almost anywhere, they
have hosted annual NetHack tournaments for many, many years.
.pg
On behalf of the NetHack community, thank you very much to
\fBM. Drew Streib\fP, \fBPasi Kallinen\fP and \fBRobin Bandy\fP.
.pg
- - - - - - - - - -
.pg
@@ -3210,11 +3270,11 @@ in this, the list of Dungeoneers:
center;
c c c.
.\"TABLE_START
Adam Aronow Izchak Miller Mike Stephenson
Alex Kompel J. Ali Harlow Norm Meluch
Andreas Dorn Janet Walz Olaf Seibert
Andy Church Janne Salmijarvi Pasi Kallinen
Andy Swanson Jean-Christophe Collet Pat Rankin
Adam Aronow J. Ali Harlow Mike Stephenson
Alex Kompel Janet Walz Norm Meluch
Andreas Dorn Janne Salmijarvi Olaf Seibert
Andy Church Jean-Christophe Collet Pasi Kallinen
Andy Swanson Jeff Bailey Pat Rankin
Ari Huttunen Jochen Erwied Paul Winner
Barton House John Kallen Pierre Martineau
Benson I. Margulies John Rupley Ralf Brown
@@ -3223,31 +3283,32 @@ Boudewijn Waijers Johnny Lee Richard Addison
Bruce Cox Jon W{tte Richard Beigel
Bruce Holloway Jonathan Handler Richard P. Hughey
Bruce Mewborne Joshua Delahunty Rob Menke
Carl Schelin Keizo Yamamoto Robin Johnson
Chris Russo Ken Arnold Roderick Schertler
David Cohrs Ken Arromdee Roland McGrath
David Damerell Ken Lorber Ron Van Iwaarden
David Gentzel Ken Washikita Ronnen Miller
David Hairston Kevin Darcy Ross Brown
Dean Luick Kevin Hugo Sascha Wostmann
Del Lamb Kevin Sitze Scott Bigham
Derek S. Ray Kevin Smolkowski Scott R. Turner
Deron Meranda Kevin Sweet Sean Hunt
Dion Nicolaas Lars Huttar Stephen Spackman
Dylan O'Donnell Leon Arnott Stephen White
Eric Backus Malcolm Ryan Steve Creps
Eric Hendrickson Mark Gooderum Steve Linhart
Eric R. Smith Mark Modrall Steve VanDevender
Eric S. Raymond Marvin Bressler Teemu Suikki
Erik Andersen Matthew Day Tim Lennan
Frederick Roeber Merlyn LeRoy Timo Hakulinen
Gil Neiger Michael Allison Tom Almy
Greg Laskin Michael Feir Tom West
Greg Olson Michael Hamel Warren Cheung
Gregg Wonderly Michael Sokolov Warwick Allison
Hao-yang Wang Mike Engber Yitzhak Sapir
Helge Hafting Mike Gallop
Irina Rempt-Drijfhout Mike Passaretti
Carl Schelin Keizo Yamamoto Robin Bandy
Chris Russo Ken Arnold Robin Johnson
David Cohrs Ken Arromdee Roderick Schertler
David Damerell Ken Lorber Roland McGrath
David Gentzel Ken Washikita Ron Van Iwaarden
David Hairston Kevin Darcy Ronnen Miller
Dean Luick Kevin Hugo Ross Brown
Del Lamb Kevin Sitze Sascha Wostmann
Derek S. Ray Kevin Smolkowski Scott Bigham
Deron Meranda Kevin Sweet Scott R. Turner
Dion Nicolaas Lars Huttar Sean Hunt
Dylan O'Donnell Leon Arnott Stephen Spackman
Eric Backus M. Drew Streib Stephen White
Eric Hendrickson Malcolm Ryan Steve Creps
Eric R. Smith Mark Gooderum Steve Linhart
Eric S. Raymond Mark Modrall Steve VanDevender
Erik Andersen Marvin Bressler Teemu Suikki
Frederick Roeber Matthew Day Tim Lennan
Gil Neiger Merlyn LeRoy Timo Hakulinen
Greg Laskin Michael Allison Tom Almy
Greg Olson Michael Feir Tom West
Gregg Wonderly Michael Hamel Warren Cheung
Hao-yang Wang Michael Sokolov Warwick Allison
Helge Hafting Mike Engber Yitzhak Sapir
Irina Rempt-Drijfhout Mike Gallop
Izchak Miller Mike Passaretti
.\"TABLE_END Do not delete this line.
.TE
+211 -62
View File
@@ -33,7 +33,7 @@
\begin{document}
%
% input file: guidebook.mn
% $Revision: 1.122 $ $Date: 2015/03/16 06:00:00 $
% $Revision: 1.122 $ $Date: 2015/03/27 06:00:00 $
%
%.ds h0 "
%.ds h1 %.ds h2 \%
@@ -46,7 +46,7 @@
%.au
\author{Eric S. Raymond\\
(Edited and expanded for 3.6)}
\date{March 16, 2015}
\date{March 27, 2015}
\maketitle
@@ -862,13 +862,8 @@ two-weapon combat. Note that if one of these slots is empty,
the exchange still takes place.
%.lp
\item[\tb{X}]
Enter explore (discovery) mode, explained in its own section later.\\
%.lp ""
Since using this command by accident would be troublesome, you are asked
to confirm your intent before switching to explore mode. By default
the response `{\tt y}' acknowledges that intent. You can set the
{\it paranoid\_confirmation\/}
option to require a response of ``yes'' instead.
Toggle two-weapon combat, if your character can do it. Also available
via the ``{\tt \#twoweapon}'' extended command
%.lp
\item[\tb{\^{}X}]
Display basic information about your character.\\
@@ -2224,7 +2219,8 @@ command allows you to view all options and change most of them.
You can also set options automatically by placing them in the
``NETHACKOPTIONS'' environment variable or in a configuration file.
Some versions of {\it NetHack\/} also have front-end programs that allow
you to set options before starting the game.
you to set options before starting the game or a global configuration
for system administrators.
%.hn 2
\subsection*{Using the NETHACKOPTIONS environment variable}
@@ -2275,8 +2271,7 @@ each entry. Such a sequence can be continued to multiple lines by putting a
`{\tt \verb+\+}' at the end of each line to be continued.
%.pg
If your copy of the game included the compile time AUTOPICKUP\_EXCEPTIONS
option, then any line starting with ``{\tt AUTOPICKUP\_EXCEPTION=}''
Any line starting with ``{\tt AUTOPICKUP\_EXCEPTION=}''
is taken as defining an exception to the ``{\tt pickup\_types}'' option.
There is a section of this Guidebook that discusses that.
@@ -2327,6 +2322,9 @@ or make ready
with the `Q' command instead. If no weapon is found or the option is
false, the `t' (throw) command is executed instead. (default false)
%.lp
\item[\ib{bones}]
Allow saving and loading bones files. (default true)
%.lp
\item[\ib{boulder}]
Set the character used to display boulders (default is rock class symbol).
%.lp
@@ -2475,6 +2473,9 @@ Enable mail delivery during the game (default on).
An obsolete synonym for ``{\tt gender:male}''. Cannot be set with the
`{\tt O}' command.
%.lp
\item[\ib{mention\_walls}]
Give feedback when walking against a wall (default off).
%.lp
\item[\ib{menustyle}]
Controls the interface used when you need to choose various objects (in
response to the Drop command, for instance). The value specified should
@@ -2520,13 +2521,16 @@ Default `\verb+|+'.
Menu character accelerator to goto the next menu page.
Implemented by the Amiga, Gem and tty ports.
Default `\verb+>+'.
\item[\ib{menu\_objsyms}]
Show object symbols in menu headings in menus where
the object symbols act as menu accelerators (default off).
\item[\ib{menu\_previous\_page}]
Menu character accelerator to goto the previous menu page.
Implemented by the Amiga, Gem and tty ports.
Default `\verb+<+'.
\item[\ib{menu\_search}]
Menu character accelerator to search for a menu item.
Implemented by the Amiga, Gem and X11 ports.
Implemented by the Amiga, Gem, X11 and tty ports.
Default `:'.
\item[\ib{menu\_select\_all}]
Menu character accelerator to select all items in a menu.
@@ -2600,7 +2604,7 @@ is the same as specifying {\tt 0}.
(Settings {\tt 2} and {\tt 4} are for compatibility with MSDOS or old PC Hack;
in addition to the different behavior for `{\tt 5}', `{\tt Alt-5}' acts as `{\tt G}'
and `{\tt Alt-0}' acts as `{\tt I}'.
Setting {\tt -1} is to accomodate some German keyboards which have the
Setting {\tt -1} is to accommodate some German keyboards which have the
location of the `{\tt y}' and `{\tt z}' keys swapped.)
When moving by numbers, to enter a count prefix for those commands
which accept one (such as ``{\tt 12s}'' to search twelve times), precede it
@@ -2678,10 +2682,8 @@ match an autopickup exception. Default is on.
%.lp
\item[\ib{pickup\_types}]
Specify the object types to be picked up when ``{\it autopickup\/}''
is on. Default is all types. If your copy of the game has the
compile time option AUTOPICKUP\_EXCEPTIONS included,
you may be able to use ``{\it autopickup\_exception\/}'' configuration
file lines to further refine ``{\it autopickup\/}'' behavior.
is on. Default is all types. You can use ``{\it autopickup\_exception\/}''
configuration file lines to further refine ``{\it autopickup\/}'' behavior.
%.lp
\item[\ib{pile\_limit}]
When walking across a pile of objects on the floor, threshold at which
@@ -2962,6 +2964,9 @@ Specify the preferred height of each tile in a tile capable port.
\item[\ib{tile\_width}]
Specify the preferred width of each tile in a tile capable port
%.lp
\item[\ib{use\_darkgray}]
Use bold black instead of blue for black glyphs (TTY only).
%.lp
\item[\ib{use\_inverse}]
NetHack should display inverse when the game specifies it.
%.lp
@@ -3074,10 +3079,8 @@ Cannot be set with the `{\tt O}' command.
\subsection*{Configuring autopickup exceptions}
%.pg
There is a compile time option called AUTOPICKUP_EXCEPTIONS.
If your copy of the game was built with that option defined, you can
further refine the behavior of the ``{\tt autopickup}'' option beyond
what is available through the ``{\tt pickup\_types}'' option.
You can further refine the behavior of the ``{\tt autopickup}'' option
beyond what is available through the ``{\tt pickup\_types}'' option.
%.pg
By placing ``{\tt autopickup\_exception}'' lines in your configuration
@@ -3459,6 +3462,65 @@ If this is the case, disable the number\_pad option and use the traditional
Rogue-like commands.
\elist
%.hn2
\subsection*{Global Configuration for System Administrators}
%.pg
If NetHack is compiled with the SYSCF option, a system administrator
should set up a global configuration; this is a file in the
same format as the traditional per-user configuration file (see above).
This file should be named sysconf and placed in the same directory as
the other NetHack support files.
The options recognized in this file are listed below. Any option not
set uses a compiled-in default (which may not be appropriate for your
system).
%.pg
\blist{}
%.lp
\item[\ib{WIZARDS}]
A space-separated list of user name who are allowed to play in wizard
mode (the debugging mode, not the magic-useing role). A value of a single
asterisk (*) allows anyone to start a game in wizard mode.
%.lp
\item[\ib{SHELLERS}]
A list of users who are allowed to use the shell escape command (!).
The syntax is the same as WIZARDS.
%.lp
\item[\ib{MAXPLAYERS}]
Limit the maximum number of games taht can be running at the same time.
%.lp
\item[\ib{SUPPORT}]
A string explainign how to get local support (no default value).
%.lp
\item[\ib{RECOVER}]
A string explaining how to recover a game on this system (no default value).
%.lp
\item[\ib{SEDUCE}]
0 or 1 to disable or enable, respectively, the SEDUCE option (see the source)
for details on this function.
\elist
%.pg
The following options affect the score file:
\blist {}
%.pg
%.lp
\item[\ib{PERSMAX}]
Maximum number of entries for one person
%.lp
\item[\ib{ENTRYMAX}]
Maximum number of entries in the score file
%.lp
\item[\ib{POINTSMIN}]
Minimum number of points to get an entry in the score file.
%.lp
\item[\ib{PERS_IS_UID}]
0 or 1 to use user names or numeric userids, respectively, to identify
unique people for the score file
\elist
%.hn 1
\section{Scoring}
@@ -3505,9 +3567,9 @@ There are two ways of enabling explore mode. One is to start the game
with the {\tt -X}
command-line switch or with the
{\it playmode:explore\/}
option. The other is to issue the `{\tt X}' command while already
playing the game. Starting a new game in explore mode provides your
character with a wand of wishing in initial inventory; switching via `X'
option. The other is to issue the `{\tt \#exploremode}' extended command while
already playing the game. Starting a new game in explore mode provides your
character with a wand of wishing in initial inventory; switching
during play does not. The other benefits of explore mode are left for
the trepid reader to discover.
@@ -3728,7 +3790,7 @@ more than a year and a half.
%.pg
\medskip
The 3.5 development team initially consisted of
The 3.4 development team initially consisted of
{\it Michael Allison}, {\it Ken Arromdee},
{\it David Cohrs}, {\it Jessie Collet}, {\it Kevin Hugo}, {\it Ken Lorber},
{\it Dean Luick}, {\it Pat Rankin}, {\it Mike Stephenson},
@@ -3743,11 +3805,11 @@ runs on:
%.pg
\medskip
\nd{\it Pat Rankin} maintained 3.5 for VMS.
\nd{\it Pat Rankin} maintained 3.4 for VMS.
%.pg
\medskip
\nd {\it Michael Allison} maintained NetHack 3.5 for the MS-DOS platform.
\nd {\it Michael Allison} maintained NetHack 3.4 for the MS-DOS platform.
{\it Paul Winner} and {\it Yitzhak Sapir} provided encouragement.
%.pg
@@ -3758,7 +3820,7 @@ enhanced the Macintosh port of 3.4.
%.pg
\medskip
\nd {\it Michael Allison}, {\it David Cohrs}, {\it Alex Kompel}, {\it Dion Nicolaas}, and
{\it Yitzhak Sapir} maintained and enhanced 3.5 for the Microsoft Windows platform.
{\it Yitzhak Sapir} maintained and enhanced 3.4 for the Microsoft Windows platform.
{\it Alex Kompel} contributed a new graphical interface for the Windows port.
{\it Alex Kompel} also contributed a Windows CE port for 3.4.1.
@@ -3772,23 +3834,109 @@ all these years.
%.pg
\medskip
\nd {\it Janne Salmij\"{a}rvi} and {\it Teemu Suikki} maintained
and enhanced the Amiga port of 3.5 after {\it Janne Salmij\"{a}rvi} resurrected
and enhanced the Amiga port of 3.4 after {\it Janne Salmij\"{a}rvi} resurrected
it for 3.3.1.
%.pg
\medskip
\nd {\it Christian ``Marvin'' Bressler} maintained 3.5 for the Atari after he
\nd {\it Christian ``Marvin'' Bressler} maintained 3.4 for the Atari after he
resurrected it for 3.3.1.
%.pg
\medskip
\nd There is a NetHack web site maintained by {\it Ken Lorber} at
The release of NetHack 3.4.3 in December 2003 marked the beginning of a
long release hiatus. 3.4.3 proved to be a remarkably stable version that
provided continued enjoyment by the community for more than a decade. The
devteam slowly and quietly continued to work on the game behind the scenes
during the tenure of 3.4.3. It was during that same period that several new
variants emerged within the NetHack community. Notably sporkhack by
Derek S. Ray, unnethack by Patric Mueller, nitrohack and its successors
originally by Daniel Thaler and then by Alex Smith, and
Dynahack by Tung Nguyen. Some of those variants continue to be developed,
maintained, and enjoyed by the community to this day.
%.pg
\medskip
In September 2014, an interim snapshot of the code under development was
released publicly by other parties. Since that code was a work-in-progress
and had not gone through a period of debugging, it was decided that the
version numbers present on that code snapshot would be retired and never
used in an official NetHack release. An announcement was posted on the
devteam's official nethack.org website to that effect, stating that there
would never be a 3.4.4, 3.5, or 3.5.0 official release version.
%.pg
\medskip
In January 2015, preparation began for the release of NetHack 3.6
%.pg
\medskip
At the beginning of development for what would eventually get released
as 3.6.0, the development team consisted of {\it Warwick Allison},
{\it Michael Allison}, {\it Ken Arromdee},
{\it David Cohrs}, {\it Jessie Collet},
{\it Ken Lorber}, {\it Dean Luick}, {\it Pat Rankin},
{\it Mike Stephenson}, {\it Janet Walz}, and {\it Paul Winner}.
Leading up to the release of 3.6.0 in early 2015, new members
{\it Sean Hunt}, {\it Pasi Kallinen}, and {\it Derek S. Ray}
joined the NetHack development team,
%.pg
\medskip
3.6.0 TODO insert apprpriate description of 3.6.0 here
%.pg
\medskip
The development team, as well as {\it Steve VanDevender} and
{\it Kevin Smolkowski} ensured that NetHack 3.6.0 continued to operate on
various Unix flavors as well as maintaining the X11 interface.
{\it Ken Lorber}, {\it Haoyang Wang}, {\it Pat Rankin}, and {\it Dean Luick}
maintained the port of NetHack 3.6.0 for Mac.
%.pg
\medskip
{\it Michael Allison}, {\it Derek S. Ray}, {\it Yitzhak Sapir},
{\it Alex Kompel}, and {\it David Cohrs} maintained the port of
NetHack 3.6.0 for Microsoft Windows.
%.pg
\medskip
{\it Jeff Bailey} created and maintained a port of NetHack 3.6.0 for Chrome.
%.pg
\medskip
{\it Alex Kompel} maintained a port of NetHack 3.6.0 to Windows Phone. <FIXME>?
%.pg
\medskip
This version of the game is special in a particular way. Near the end of
the development of 3.6, one of the significant inspirations for many of the
humorous and fun features found in the game, author {\it Terry Pratchett},
passed away. This version of the game is dedicated to him.
%.pg
\medskip
\nd The official NetHack web site is maintained by {\it Ken Lorber} at
{\catcode`\#=11
\special{html:<a href="http://www.nethack.org/">}}
http:{\tt /}{\tt /}www.nethack.org{\tt /}.
{\catcode`\#=11
\special{html:</a>}}
%.pg
%.hn 2
\subsection*{Shout Outs}
\nd The devteam would like to give a special "shout-out" to thank the generous
people primarily responsible for the public NetHack servers available for
playing the game at nethack.alt.org and devnull.net. In addition to providing
a way for the public to play a game of NetHack from almost anywhere, they
have hosted annual NetHack tournaments for many, many years.
%.pg
\nd On behalf of the NetHack community, thank you very much to
{\it M. Drew Streib}, {\it Pasi Kallinen} and {\it Robin Bandy}.
%.pg
%.hn 3
\subsection*{Dungeoneers}
\bigskip
@@ -3801,11 +3949,11 @@ in this, the list of Dungeoneers:
\begin{center}
\begin{tabular}{lll}
%TABLE_START
Adam Aronow & Izchak Miller & Mike Stephenson\\
Alex Kompel & J. Ali Harlow & Norm Meluch\\
Andreas Dorn & Janet Walz & Olaf Seibert\\
Andy Church & Janne Salmij\"{a}rvi & Pasi Kallinen\\
Andy Swanson & Jean-Christophe Collet & Pat Rankin\\
Adam Aronow & J. Ali Harlow & Mike Stephenson\\
Alex Kompel & Janet Walz & Norm Meluch\\
Andreas Dorn & Janne Salmij\"{a}rvi & Olaf Seibert\\
Andy Church & Jean-Christophe Collet & Pasi Kallinen\\
Andy Swanson & Jeff Bailey & Pat Rankin\\
Ari Huttunen & Jochen Erwied & Paul Winner\\
Barton House & John Kallen & Pierre Martineau\\
Benson I. Margulies & John Rupley & Ralf Brown\\
@@ -3814,31 +3962,32 @@ Boudewijn Waijers & Johnny Lee & Richard Addison\\
Bruce Cox & Jon W\{tte & Richard Beigel\\
Bruce Holloway & Jonathan Handler & Richard P. Hughey\\
Bruce Mewborne & Joshua Delahunty & Rob Menke\\
Carl Schelin & Keizo Yamamoto & Robin Johnson\\
Chris Russo & Ken Arnold & Roderick Schertler\\
David Cohrs & Ken Arromdee & Roland McGrath\\
David Damerell & Ken Lorber & Ron Van Iwaarden\\
David Gentzel & Ken Washikita & Ronnen Miller\\
David Hairston & Kevin Darcy & Ross Brown\\
Dean Luick & Kevin Hugo & Sascha Wostmann\\
Del Lamb & Kevin Sitze & Scott Bigham\\
Derek S. Ray & Kevin Smolkowski & Scott R. Turner\\
Deron Meranda & Kevin Sweet & Sean Hunt\\
Dion Nicolaas & Lars Huttar & Stephen Spackman\\
Dylan O'Donnell & Leon Arnott & Stephen White\\
Eric Backus & Malcolm Ryan & Steve Creps\\
Eric Hendrickson & Mark Gooderum & Steve Linhart\\
Eric R. Smith & Mark Modrall & Steve VanDevender\\
Eric S. Raymond & Marvin Bressler & Teemu Suikki\\
Erik Andersen & Matthew Day & Tim Lennan\\
Frederick Roeber & Merlyn LeRoy & Timo Hakulinen\\
Gil Neiger & Michael Allison & Tom Almy\\
Greg Laskin & Michael Feir & Tom West\\
Greg Olson & Michael Hamel & Warren Cheung\\
Gregg Wonderly & Michael Sokolov & Warwick Allison\\
Hao-yang Wang & Mike Engber & Yitzhak Sapir\\
Helge Hafting & Mike Gallop\\
Irina Rempt-Drijfhout & Mike Passaretti
Carl Schelin & Keizo Yamamoto & Robin Bandy\\
Chris Russo & Ken Arnold & Robin Johnson\\
David Cohrs & Ken Arromdee & Roderick Schertler\\
David Damerell & Ken Lorber & Roland McGrath\\
David Gentzel & Ken Washikita & Ron Van Iwaarden\\
David Hairston & Kevin Darcy & Ronnen Miller\\
Dean Luick & Kevin Hugo & Ross Brown\\
Del Lamb & Kevin Sitze & Sascha Wostmann\\
Derek S. Ray & Kevin Smolkowski & Scott Bigham\\
Deron Meranda & Kevin Sweet & Scott R. Turner\\
Dion Nicolaas & Lars Huttar & Sean Hunt\\
Dylan O'Donnell & Leon Arnott & Stephen Spackman\\
Eric Backus & M. Drew Streib & Stephen White\\
Eric Hendrickson & Malcolm Ryan & Steve Creps\\
Eric R. Smith & Mark Gooderum & Steve Linhart\\
Eric S. Raymond & Mark Modrall & Steve VanDevender\\
Erik Andersen & Marvin Bressler & Teemu Suikki\\
Frederick Roeber & Matthew Day & Tim Lennan\\
Gil Neiger & Merlyn LeRoy & Timo Hakulinen\\
Greg Laskin & Michael Allison & Tom Almy\\
Greg Olson & Michael Feir & Tom West\\
Gregg Wonderly & Michael Hamel & Warren Cheung\\
Hao-yang Wang & Michael Sokolov & Warwick Allison\\
Helge Hafting & Mike Engber & Yitzhak Sapir\\
Irina Rempt-Drijfhout & Mike Gallop\\
Izchak Miller & Mike Passaretti
%TABLE_END Do not delete this line.
\end{tabular}
\end{center}
+2313 -1851
View File
File diff suppressed because it is too large Load Diff
+30 -17
View File
@@ -63,7 +63,7 @@ wizard mode: avoid division by 0 crash for level teleport in the endgame if
don't #sit on an object in a pit if you're only on the precipice
fix message when pushing a boulder into a pool while riding
plural of "Nazgul" is "Nazgul" not "Nazguls"
trap messages referring to named steed were ackwardly worded when hallucination
trap messages referring to named steed were awkwardly worded when hallucination
overrode use of the name
some actions such as eating corpses off the floor didn't check whether hero
could reach the bottom of a pit
@@ -117,7 +117,7 @@ shopkeeper removal of trap from shop doorway yields an open door instead of
a closed one if an intact open door is present
guarantee that hostile djinn released from bottles really are hostile
handle lava when removing or losing water walking boots
fix incomplete sentence occuring when unique monster's corpse fell down stairs
fix incomplete sentence occurring when unique monster's corpse fell down stairs
fractured boulders or statues produced inconsistent object settings on the
resulting rocks
really fix rolling boulder bug C340-18, the previous "fix" reversed the test
@@ -165,7 +165,7 @@ clean up messages when you stop levitation while riding a flying steed
monsters evading a kick on noteleport levels would cause a "teleports" message
interrupt current activity during certain stages of petrification or vomiting
warning about bad food didn't recognize tin of Medusa meat
eating tainted Medusa corpse caused food poisioning instead of petrification
eating tainted Medusa corpse caused food poisoning instead of petrification
avoid potential stale pointer use after magic bag explosion
nymphs and monkeys can't steal rings worn under gloves
monkeys can't steal rings worn under cursed weapon
@@ -237,7 +237,7 @@ when there were multiple boulders at a location, moving one of them sometimes
resulted in line-of-sight anomalies
unicorn can't catch gems if it is asleep or paralyzed
fix grammar when choking on gold
prevent lose-level+regain-level cycle from arbritrarily boosting HP and Pw
prevent lose-level+regain-level cycle from arbitrarily boosting HP and Pw
prevent polymorphing into "new man" at low level from magnifying HP and Pw
some messages which referred to "mirror" ought to have used "looking glass"
incubi react to mirrors
@@ -360,8 +360,8 @@ code handling a monster's use of potion or food to cure stoning or confusion
properly handle destruction of equipment carried by monsters hit by
disintegration breath; life-saving retained conferred properties of
formerly worn items (loss of steed's saddle caused much confusion)
don't exercize or abuse wisdom when rumors get used for random graffiti
don't exercize wisdom twice for each minor oracle consultation
don't exercise or abuse wisdom when rumors get used for random graffiti
don't exercise wisdom twice for each minor oracle consultation
don't welcome the hero to Delphi if the Oracle was angered before first entry
create_object() created lizard corpses without timers and troll corpses with
their revive timers, then changed the corpsenm field
@@ -383,7 +383,7 @@ specifying role and/or race along with an invalid alignment for it/them in
temple donation can recover protection previously stolen by attrcurse attack
even when protection amount is so big that no increment would be given
meditating monsters stop meditating when affected by something which wakes
sleeping mosnters
sleeping monsters
monsters capable of hiding can't do so when trapped or while holding you
limit recursive calls to spoteffects (poly'd hero fell into water, reverted
to human because of it, fell into same water, then crawled out twice)
@@ -474,7 +474,7 @@ suppress corpse from bones data if death is due to being dissolved in lava
suppress "you rise from the dead" if game ends due to be turned into slime
hero poly'd into stone golem and wielding cockatrice corpse casts stone-to-
flesh at self to become flesh golem will revert to stone if no gloves
don't give erroneous "<mon> disppears" message for hero poly'd into quantum
don't give erroneous "<mon> disappears" message for hero poly'd into quantum
mechanic who hits engulfer while swallowed and blinded
demon lords/princes can't be summoned to the elemental or Astral planes
feedback from casting spell of protection was wrong in some situations
@@ -496,7 +496,7 @@ can't eat an artifact you're unable to touch
attempting to kick beyond map edge performed an out of array bounds memory
access; symptom seen was "show_glyph: bad pos" warning when blind
attempting to engrave with an empty wand should always use a turn
don't access freed memory after engraving "wrests one last charnge" from wand
don't access freed memory after engraving "wrests one last charge" from wand
a magic portal could be rendered inactive for the hero if a successful
hangup save took place during level change; leaving the level by any
means other than triggering the portal would reactivate it
@@ -645,7 +645,7 @@ secret door detection's trap finding is no longer blocked by water or clouds
potion thrown by monster which hit a long worm's tail gave feedback about
hitting its head
implement energy vortex's previously unused energy drain attack
changing alignment type resets alignment record to 0 (nomimally aligned)
changing alignment type resets alignment record to 0 (nominally aligned)
jellyfish do not technically have a head
while polymorphed, suppress attribute gain/lose earned by pre-poly exercise
wizard mode #monpolycontrol prompting asked about "it" when monster was unseen
@@ -670,7 +670,7 @@ if polymorph causes a monster to drop items, they won't be used up via
monsters who ate green slime corpses weren't turned into green slime
"hand slip" while naming an object would never pick 'z' as a substitute letter
hero would "gladly take off <armor>" for nymph or succubus even while asleep
concealed mimic wasn't revealed if kicking attmpt yielded a clumsy miss
concealed mimic wasn't revealed if kicking attempt yielded a clumsy miss
too accurate feedback given to a blinded hero when a monster summons insects
if life-saved steed became untame, repeated "placing steed onto map?" warnings
would be given as long as the hero remained mounted
@@ -730,7 +730,7 @@ shouldn't have been able write scrolls by guessing type name when they're
scrolls given names can be written by assigned name as well as by description
fix writing feedback "the spellbook warps strangely, then turns parchment"
make stone artifacts usually resist stone-to-flesh
when reading an unknown scroll and learning it, discovery of teleporation was
when reading an unknown scroll and learning it, discovery of teleportation was
too late if hero happened to land on another scroll of teleportation
using an unlocking tool on a closed door which was actually a mimic reported
that there was no door to unlock instead of exposing the mimic
@@ -760,7 +760,7 @@ for number_pad:2 (MSDOS compatibility), M-5 (Alt+5, or Shift+keypad5 using
MSDOS/Windows keystroke hackery) didn't function as G movement prefix
if an angry shopkeeper chased the hero to a different level and then got paid
off, he'd dismiss kops on that other level but not on his shop level
objects inside the Wizard's Tower can't be teleport to outside and vica versa
objects inside the Wizard's Tower can't be teleport to outside and vice versa
dying in lava and being life-saved or leaving bones would destroy ring of
fire resistance if it happened to be made of wood, and also burn up
scrolls of fire and spellbook of fireball
@@ -786,7 +786,7 @@ when shop prices are adjusted, handle roundoff (integer truncation) better
for hero poly'd into a monster form that lacks a weapon attack but has a claw
attack, use wielded weapon even when claw attack isn't the very first
rename the SLEEPING property and Sleeping attribute to SLEEPY and Sleepy, resp.
character escape sequence handling during options processing was vulernable
character escape sequence handling during options processing was vulnerable
to malformed escapes and could potentially be abused to clobber the
stack and launch a buffer overrun attack
give alternate message for "<mon> turns to flee" when mon can't move
@@ -815,7 +815,7 @@ hangup save made during magic mapping or <foo> detection performed while
underwater could put hero on top of the water after restore
fix bug preventing stone-resistant monsters w/o gloves from wielding cockatrices
items conferring life drain resistance were affected by drain life spell
'a'pply command could be used to recogniize undiscovered potions of oil
'a'pply command could be used to recognize undiscovered potions of oil
fix replacing an existing bones file in wizard mode [load?y, unlink?n, die?y,
save?y, replace?y] for configurations using external file compression
theft of worn armor with wear/unwear delay would interfere with completion of
@@ -872,7 +872,7 @@ data.base "gelatinous cube" and "jack boot" have their own entries
data.base "vampire bat" matched twice; use the bat entry
data.base dagger attribution started with spaces instead of tabs
remove 'if (Deaf)' guards preceding You_hear which already checks deafness
tse a menu to loot multiple containers
use a menu to loot multiple containers
do_look() in post-3.4.3 used glyph prior to setting it in pager.c
charge for a boulder that fills a pit in shop
abuse wisdom in keeping with Rider eating message
@@ -885,6 +885,14 @@ after object loss through polyshudder don't get left hiding under nothing
if you're polymorphed into a hider
show object symbols in menu headings in menus where those object symbols
act as menu accelerators, toggleable via "menu_objsyms" option
show t-shirt text at end of game inventory disclose
hitting with a polearm remembers the position of the last monster you hit
allow showing legal polearm positions when asked for location to hit
add messages for trying to pick up some terrain features
boomerang makes noise when hitting a sink
non-pet rust monsters would eat rust-proofed non-digestibles but ignore
those non-digestibles otherwise
kicking a grave may topple the gravestone
Platform- and/or Interface-Specific Fixes
@@ -985,7 +993,7 @@ burying a punishment ball no longer ends your punishment
add clicklook option to allow looking at things on the display by clicking
right mouse button when floating mouse pointer over them
Izchak's lighting store is now able to stock oil for your lamp
provide core support for saving of messsage history in save file
provide core support for saving of message history in save file
the following actions can now be continued after save/restore: digging,
eating, studying, removing armor
hero-created and monster-created ice will eventually melt away
@@ -1096,6 +1104,10 @@ pressing @ when cursor positioning moves cursor on top of hero
pressing # when cursor positioning toggles automatic description of features
under the cursor
cursor positioning ignores uninteresting dungeon features
allow reading many more items
when you're hiding under something a zap downward should not hit that
something, while a zap upward should
show more explicit reason why player was helpless at death
Platform- and/or Interface-Specific New Features
@@ -1133,6 +1145,7 @@ adopt/adapt/improve the Paranoid_Quit patch; default is paranoid_confirm:pray
paranoid_confirm:Remove always pick from inventory for 'R' and 'T'
adopt/adapt/improve Dungeon Overview
Aardvark Joe's Extended Logfile
Michael Deutschmann's use_darkgray
Code Cleanup and Reorganization
+6
View File
@@ -73,6 +73,11 @@ struct warntype_info {
short speciesidx; /* index of above in mons[] (for save/restore) */
};
struct polearm_info {
struct monst *hitmon; /* the monster we tried to hit last */
unsigned m_id; /* monster id of hitmon, in save file */
};
struct context_info {
unsigned ident; /* social security number for each monster */
unsigned no_of_wizards; /* 0, 1 or 2 (wizard and his shadow) */
@@ -103,6 +108,7 @@ struct context_info {
struct book_info spbook;
struct takeoff_info takeoff;
struct warntype_info warntype;
struct polearm_info polearm;
};
extern NEARDATA struct context_info context;
+1
View File
@@ -28,6 +28,7 @@ E char SAVEP[];
E NEARDATA int bases[MAXOCLASSES];
E NEARDATA int multi;
E const char *multi_reason;
E NEARDATA int nroom;
E NEARDATA int nsubroom;
E NEARDATA int occtime;
+3 -1
View File
@@ -364,6 +364,7 @@ E void NDECL(heal_legs);
/* ### do_name.c ### */
E int FDECL(getpos, (coord *,BOOLEAN_P,const char *));
E void FDECL(getpos_sethilite, (void (*f)(int) ));
E void FDECL(new_mname, (struct monst *,int));
E void FDECL(free_mname, (struct monst *));
E void FDECL(new_oname, (struct obj *,int));
@@ -1827,6 +1828,7 @@ E long NDECL(random);
/* ### read.c ### */
E void FDECL(learnscroll, (struct obj *));
E char *FDECL(tshirt_text, (struct obj *, char *));
E int NDECL(doread);
E boolean FDECL(is_chargeable, (struct obj *));
E void FDECL(recharge, (struct obj *,int));
@@ -2630,7 +2632,7 @@ E boolean FDECL(obj_resists, (struct obj *,int,int));
E boolean FDECL(obj_shudders, (struct obj *));
E void FDECL(do_osshock, (struct obj *));
E int FDECL(bhito, (struct obj *,struct obj *));
E int FDECL(bhitpile, (struct obj *,int (*)(OBJ_P,OBJ_P),int,int));
E int FDECL(bhitpile, (struct obj *,int (*)(OBJ_P,OBJ_P),int,int,SCHAR_P));
E int FDECL(zappable, (struct obj *));
E void FDECL(zapnodir, (struct obj *));
E int NDECL(dozap);
+1
View File
@@ -295,6 +295,7 @@ struct instance_flags {
boolean wc2_softkeyboard; /* use software keyboard */
boolean wc2_wraptext; /* wrap text */
boolean wc2_selectsaved; /* display a menu of user's saved games */
boolean wc2_darkgray; /* try to use dark-gray color for black glyphs */
boolean cmdassist; /* provide detailed assistance for some commands */
boolean clicklook; /* allow right-clicking for look */
boolean obsolete; /* obsolete options can point at this, it isn't used */
+11
View File
@@ -308,6 +308,17 @@ struct obj {
|| (otmp)->otyp == WAX_CANDLE\
|| (otmp)->otyp == POT_OIL)
/* things that can be read */
#define is_readable(otmp) ((otmp)->otyp == FORTUNE_COOKIE\
|| (otmp)->otyp == T_SHIRT\
|| (otmp)->otyp == ALCHEMY_SMOCK\
|| (otmp)->otyp == CREDIT_CARD\
|| (otmp)->otyp == CAN_OF_GREASE\
|| (otmp)->otyp == MAGIC_MARKER\
|| (otmp)->oclass == COIN_CLASS\
|| (otmp)->oartifact == ART_ORB_OF_FATE\
|| (otmp)->otyp == CANDY_BAR)
/* special stones */
#define is_graystone(obj) ((obj)->otyp == LUCKSTONE || \
(obj)->otyp == LOADSTONE || \
+1 -1
View File
@@ -14,7 +14,7 @@
* Incrementing EDITLEVEL can be used to force invalidation of old bones
* and save files.
*/
#define EDITLEVEL 58
#define EDITLEVEL 59
#define COPYRIGHT_BANNER_A \
"NetHack, Copyright 1985-2015"
+2 -1
View File
@@ -219,7 +219,8 @@ NEARDATA struct window_procs windowprocs;
#define WC2_WRAPTEXT 0x04L /* 03 wrap long lines of text */
#define WC2_HILITE_STATUS 0x08L /* 04 hilite fields in status */
#define WC2_SELECTSAVED 0x10L /* 05 saved game selection menu */
/* 27 free bits */
#define WC2_DARKGRAY 0x20L /* 06 use bold black for black glyphs */
/* 26 free bits */
#define ALIGN_LEFT 1
#define ALIGN_RIGHT 2
+82 -13
View File
@@ -27,6 +27,7 @@ STATIC_DCL void FDECL(use_trap, (struct obj *));
STATIC_DCL void FDECL(use_stone, (struct obj *));
STATIC_PTR int NDECL(set_trap); /* occupation callback */
STATIC_DCL int FDECL(use_whip, (struct obj *));
STATIC_PTR void FDECL(display_polearm_positions, (int));
STATIC_DCL int FDECL(use_pole, (struct obj *));
STATIC_DCL int FDECL(use_cream_pie, (struct obj *));
STATIC_DCL int FDECL(use_grapple, (struct obj *));
@@ -736,8 +737,10 @@ struct obj *obj;
pline("Yow! The %s stares back!", mirror);
else
pline("Yikes! You've frozen yourself!");
if (!Hallucination || !rn2(4))
if (!Hallucination || !rn2(4)) {
nomul(-rnd(MAXULEV + 6 - u.ulevel));
multi_reason = "gazing into a mirror";
}
nomovemsg = 0; /* default, "you can move again" */
}
} else if (youmonst.data->mlet == S_VAMPIRE)
@@ -915,6 +918,7 @@ struct obj **optr;
break;
case 2: /* no explanation; it just happens... */
nomovemsg = "";
multi_reason = NULL;
nomul(-rnd(2));
break;
}
@@ -1508,6 +1512,7 @@ int magic; /* 0=Physical, otherwise skill level */
teleds(cc.x, cc.y, TRUE);
sokoban_guilt();
nomul(-1);
multi_reason = "jumping around";
nomovemsg = "";
morehungry(rnd(25));
return 1;
@@ -2531,6 +2536,54 @@ static const char
cant_see_spot[] = "won't hit anything if you can't see that spot.",
cant_reach[] = "can't reach that spot from here.";
/* find pos of monster in range, if only one monster */
boolean
find_poleable_mon(pos, min_range, max_range)
coord *pos;
int min_range, max_range;
{
struct monst *mtmp;
struct monst *selmon = NULL;
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon)
if (mtmp && !DEADMONSTER(mtmp) && !mtmp->mtame &&
cansee(mtmp->mx, mtmp->my) &&
distu(mtmp->mx, mtmp->my) <= max_range &&
distu(mtmp->mx, mtmp->my) >= min_range) {
if (selmon) return FALSE;
selmon = mtmp;
}
if (!selmon) return FALSE;
pos->x = selmon->mx;
pos->y = selmon->my;
return TRUE;
}
int polearm_range_min = -1;
int polearm_range_max = -1;
void
display_polearm_positions(state)
int state;
{
if (state == 0) {
tmp_at(DISP_BEAM, cmap_to_glyph(S_flashbeam));
} else if (state == 1) {
int x,y, dx,dy;
for (dx = -4; dx <= 4; dx++)
for (dy = -4; dy <= 4; dy++) {
x = dx + (int)u.ux;
y = dy + (int)u.uy;
if (isok(x, y) &&
distu(x, y) >= polearm_range_min &&
distu(x, y) <= polearm_range_max) {
tmp_at(x, y);
}
}
} else {
tmp_at(DISP_END, 0);
}
}
/* Distance attacks by pole-weapons */
STATIC_OVL int
use_pole(obj)
@@ -2539,6 +2592,7 @@ use_pole(obj)
int res = 0, typ, max_range, min_range, glyph;
coord cc;
struct monst *mtmp;
struct monst *hitm = context.polearm.hitmon;
/* Are you allowed to use the pole? */
if (u.uswallow) {
@@ -2551,15 +2605,7 @@ use_pole(obj)
}
/* assert(obj == uwep); */
/* Prompt for a location */
pline(where_to_hit);
cc.x = u.ux;
cc.y = u.uy;
if (getpos(&cc, TRUE, "the spot to hit") < 0)
return res; /* ESC; uses turn iff polearm became wielded */
glyph = glyph_at(cc.x, cc.y);
/*
/*
* Calculate allowable range (pole's reach is always 2 steps):
* unskilled and basic: orthogonal direction, 4..4;
* skilled: as basic, plus knight's jump position, 4..5;
@@ -2579,6 +2625,26 @@ use_pole(obj)
if (typ == P_NONE || P_SKILL(typ) <= P_BASIC) max_range = 4;
else if (P_SKILL(typ) == P_SKILLED) max_range = 5;
else max_range = 8; /* (P_SKILL(typ) >= P_EXPERT) */
polearm_range_min = min_range;
polearm_range_max = max_range;
/* Prompt for a location */
pline(where_to_hit);
cc.x = u.ux;
cc.y = u.uy;
if (!find_poleable_mon(&cc, min_range, max_range) &&
hitm && !DEADMONSTER(hitm) && cansee(hitm->mx, hitm->my) &&
distu(hitm->mx,hitm->my) <= max_range &&
distu(hitm->mx,hitm->my) >= min_range) {
cc.x = hitm->mx;
cc.y = hitm->my;
}
getpos_sethilite(display_polearm_positions);
if (getpos(&cc, TRUE, "the spot to hit") < 0)
return res; /* ESC; uses turn iff polearm became wielded */
glyph = glyph_at(cc.x, cc.y);
if (distu(cc.x, cc.y) > max_range) {
pline("Too far!");
return (res);
@@ -2596,11 +2662,13 @@ use_pole(obj)
return res;
}
context.polearm.hitmon = NULL;
/* Attack the monster there */
bhitpos = cc;
if ((mtmp = m_at(bhitpos.x, bhitpos.y)) != (struct monst *)0) {
if (attack_checks(mtmp, uwep)) return res;
if (overexertion()) return 1; /* burn nutrition; maybe pass out */
context.polearm.hitmon = mtmp;
check_caitiff(mtmp);
notonhead = (bhitpos.x != mtmp->mx || bhitpos.y != mtmp->my);
(void) thitmonst(mtmp, uwep);
@@ -2828,6 +2896,7 @@ do_break_wand(obj)
boolean fillmsg = FALSE;
int expltype = EXPL_MAGICAL;
char confirm[QBUFSZ], buf[BUFSZ];
boolean is_fragile = (!strcmp(OBJ_DESCR(objects[obj->otyp]), "balsa"));
if (yn(safe_qbuf(confirm, "Are you really sure you want to break ", "?",
obj, yname, ysimple_name, "the wand")) == 'n')
@@ -2836,7 +2905,7 @@ do_break_wand(obj)
if (nohands(youmonst.data)) {
You_cant("break %s without hands!", yname(obj));
return 0;
} else if (ACURR(A_STR) < 10) {
} else if (ACURR(A_STR) < (is_fragile ? 5 : 10)) {
You("don't have the strength to break %s!", yname(obj));
return 0;
}
@@ -2974,7 +3043,7 @@ do_break_wand(obj)
/* if (context.botl) bot(); */
}
if (affects_objects && level.objects[x][y]) {
(void) bhitpile(obj, bhito, x, y);
(void) bhitpile(obj, bhito, x, y, 0);
if (context.botl) bot(); /* potion effects */
}
} else {
@@ -2991,7 +3060,7 @@ do_break_wand(obj)
* since it's also used by retouch_equipment() for polyself.)
*/
if (affects_objects && level.objects[x][y]) {
(void) bhitpile(obj, bhito, x, y);
(void) bhitpile(obj, bhito, x, y, 0);
if (context.botl) bot(); /* potion effects */
}
damage = zapyourself(obj, FALSE);
+1
View File
@@ -983,6 +983,7 @@ char *hittee; /* target's name: "you" or mon_nam(mdef) */
resisted = TRUE;
} else {
nomul(-3);
multi_reason = "being scared stiff";
nomovemsg = "";
if (magr && magr == u.ustuck && sticks(youmonst.data)) {
u.ustuck = (struct monst *)0;
+1
View File
@@ -21,6 +21,7 @@ char *catmore = 0; /* default pager */
NEARDATA int bases[MAXOCLASSES] = DUMMY;
NEARDATA int multi = 0;
const char *multi_reason = NULL;
NEARDATA int nroom = 0;
NEARDATA int nsubroom = 0;
NEARDATA int occtime = 0;
+1
View File
@@ -890,6 +890,7 @@ struct obj *obj;
}
You("peer into %s...", the(xname(obj)));
nomul(-rnd(10));
multi_reason = "gazing into a crystal ball";
nomovemsg = "";
if (obj->spe <= 0)
pline_The("vision is unclear.");
+1
View File
@@ -1023,6 +1023,7 @@ struct obj *obj;
/* you ought to be able to let go; tough luck */
/* (maybe `move_into_trap()' would be better) */
nomul(-d(2,2));
multi_reason = "stuck in a spider web";
nomovemsg = "You pull free.";
} else if (lev->typ == IRONBARS) {
pline("Clang!");
+1
View File
@@ -1410,6 +1410,7 @@ boolean at_stairs, falling, portal;
/* assume this will always return TRUE when changing level */
(void) in_out_region(u.ux, u.uy);
(void) pickup(1);
context.polearm.hitmon = NULL;
}
STATIC_OVL void
+30 -1
View File
@@ -25,6 +25,17 @@ nextmbuf()
return bufs[bufidx];
}
/* function for getpos() to highlight desired map locations.
* parameter value 0 = initialize, 1 = highlight, 2 = done
*/
void (*getpos_hilitefunc)(int) = NULL;
void
getpos_sethilite(f)
void (*f)(int);
{
getpos_hilitefunc = f;
}
/* the response for '?' help request in getpos() */
STATIC_OVL void
getpos_help(force, goal)
@@ -41,6 +52,8 @@ const char *goal;
putstr(tmpwin, 0, "Use [HJKL] to move the cursor 8 units at a time.");
putstr(tmpwin, 0, "Or enter a background symbol (ex. <).");
putstr(tmpwin, 0, "Use @ to move the cursor on yourself.");
if (getpos_hilitefunc != NULL)
putstr(tmpwin, 0, "Use $ to display valid locations.");
putstr(tmpwin, 0, "Use # to toggle automatic description.");
/* disgusting hack; the alternate selection characters work for any
getpos call, but they only matter for dowhatis (and doquickwhatis) */
@@ -69,6 +82,7 @@ const char *goal;
boolean show_goal_msg = FALSE;
static const char pick_chars[] = ".,;:";
const char *cp;
boolean hilite_state = FALSE;
if (!goal) goal = "desired location";
if (flags.verbose) {
@@ -92,7 +106,7 @@ const char *goal;
curs(WIN_MAP, cx, cy);
flush_screen(0);
show_goal_msg = FALSE;
} else if (auto_msg && !msg_given) {
} else if (auto_msg && !msg_given && !hilite_state) {
coord cc;
int sym = 0;
char tmpbuf[BUFSZ];
@@ -110,6 +124,13 @@ const char *goal;
c = nh_poskey(&tx, &ty, &sidx);
if (hilite_state) {
(*getpos_hilitefunc)(2);
hilite_state = FALSE;
curs(WIN_MAP, cx, cy);
flush_screen(0);
}
if (auto_msg)
msg_given = FALSE;
@@ -174,6 +195,13 @@ const char *goal;
/* update message window to reflect that we're still targetting */
show_goal_msg = TRUE;
msg_given = TRUE;
} else if ((c == '$') && (getpos_hilitefunc != NULL)) {
if (!hilite_state) {
(*getpos_hilitefunc)(0);
(*getpos_hilitefunc)(1);
hilite_state = TRUE;
}
goto nxtc;
} else if (c == '#') {
auto_msg = !auto_msg;
pline("Automatic description %sis %s.",
@@ -269,6 +297,7 @@ const char *goal;
if (msg_given) clear_nhwindow(WIN_MESSAGE);
ccp->x = cx;
ccp->y = cy;
getpos_hilitefunc = NULL;
return result;
}
+2
View File
@@ -1407,6 +1407,7 @@ register struct obj *otmp;
if(cursed(otmp)) return(0);
if(delay) {
nomul(delay);
multi_reason = "disrobing";
if (is_helmet(otmp)) {
/* ick... */
nomovemsg = !strcmp(helm_simple_name(otmp), "hat") ?
@@ -1664,6 +1665,7 @@ dowear()
delay = -objects[otmp->otyp].oc_delay;
if(delay){
nomul(delay);
multi_reason = "dressing up";
if(is_boots(otmp)) afternmv = Boots_on;
if(is_helmet(otmp)) afternmv = Helmet_on;
if(is_gloves(otmp)) afternmv = Gloves_on;
+1
View File
@@ -685,6 +685,7 @@ migrate_to_level(mtmp, tolev, xyloc, cc)
mtmp->mux = new_lev.dnum;
mtmp->muy = new_lev.dlevel;
mtmp->mx = mtmp->my = 0; /* this implies migration */
if (mtmp == context.polearm.hitmon) context.polearm.hitmon = NULL;
}
/* return quality of food; the lower the better */
+22 -1
View File
@@ -991,7 +991,28 @@ dokick()
exercise(A_DEX, TRUE);
return(1);
}
if(IS_GRAVE(maploc->typ) || maploc->typ == IRONBARS)
if (IS_GRAVE(maploc->typ)) {
if(Levitation) goto dumb;
if (rn2(4)) goto ouch;
exercise(A_WIS, FALSE);
if (Role_if(PM_ARCHEOLOGIST) ||
Role_if(PM_SAMURAI) ||
((u.ualign.type == A_LAWFUL) && (u.ualign.record > -10))) {
adjalign(-sgn(u.ualign.type));
}
maploc->typ = ROOM;
maploc->doormask = 0;
(void) mksobj_at(ROCK, x,y, TRUE, FALSE);
del_engr_at(x,y);
if (Blind)
pline("Crack! %s broke!", Something);
else {
pline_The("headstone topples over and breaks!");
newsym(x,y);
}
return 1;
}
if(maploc->typ == IRONBARS)
goto ouch;
if(IS_TREE(maploc->typ)) {
struct obj *treefruit;
+1
View File
@@ -693,6 +693,7 @@ hurtle(dx, dy, range, verbose)
if(!range || (!dx && !dy) || u.ustuck) return; /* paranoia */
nomul(-range);
multi_reason = "moving through the air";
nomovemsg = ""; /* it just happens */
if (verbose)
You("%s in the opposite direction.", range > 1 ? "hurtle" : "float");
+4
View File
@@ -962,6 +962,7 @@ register int pm;
/* A pile of gold can't ride. */
if (u.usteed) dismount_steed(DISMOUNT_FELL);
nomul(-tmp);
multi_reason = "pretending to be a pile of gold";
Sprintf(buf, Hallucination ?
"You suddenly dread being peeled and mimic %s again!" :
"You now prefer mimicking %s again.",
@@ -1479,6 +1480,7 @@ struct obj *obj;
pline_The("world spins and %s %s.", what, where);
incr_itimeout(&HDeaf, duration);
nomul(-duration);
multi_reason = "unconscious from rotten food";
nomovemsg = "You are conscious again.";
afternmv = Hear_again;
return(1);
@@ -2677,6 +2679,7 @@ boolean incr;
if (!Levitation) selftouch("Falling, you");
incr_itimeout(&HDeaf, duration);
nomul(-duration);
multi_reason = "fainted from lack of food";
nomovemsg = "You regain consciousness.";
afternmv = unfaint;
newhs = FAINTED;
@@ -2853,6 +2856,7 @@ vomit() /* A good idea from David Neves */
else
make_sick(0L, (char *)0, TRUE, SICK_VOMITABLE);
nomul(-2);
multi_reason = "vomiting";
nomovemsg = You_can_move_again;
}
+6 -1
View File
@@ -465,7 +465,12 @@ int how;
Sprintf(eos(buf), " called %s", MNAME(mtmp));
}
if (multi) Strcat(buf, ", while helpless");
if (multi) {
if (multi_reason)
Sprintf(eos(buf), ", while %s", multi_reason);
else
Strcat(buf, ", while helpless");
}
Strcpy(killer.name, buf);
if (mptr->mlet == S_WRAITH)
u.ugrave_arise = PM_WRAITH;
+16 -1
View File
@@ -1568,6 +1568,7 @@ domove()
/* must come after we finished picking up, in spoteffects() */
if (cause_delay) {
nomul(-2);
multi_reason = "dragging an iron ball";
nomovemsg = "";
}
@@ -2207,7 +2208,19 @@ dopickup()
}
}
if (!OBJ_AT(u.ux, u.uy)) {
There("is nothing here to pick up.");
register struct rm *lev = &levl[u.ux][u.uy];
if (IS_THRONE(lev->typ))
pline("It must weigh%s a ton!",
lev->looted ? " almost" : "");
else if (IS_SINK(lev->typ))
pline_The("plumbing connects it to the floor.");
else if (IS_GRAVE(lev->typ))
You("don't need a gravestone. Yet.");
else if (IS_FOUNTAIN(lev->typ))
You("could drink the water...");
else if (IS_DOOR(lev->typ) && (lev->doormask & D_ISOPEN))
pline("It won't come off the hinges.");
else There("is nothing here to pick up.");
return 0;
}
if (!can_reach_floor(TRUE)) {
@@ -2422,6 +2435,7 @@ nomul(nval)
u.uinvulnerable = FALSE; /* Kludge to avoid ctrl-C bug -dlc */
u.usleep = 0;
multi = nval;
if (nval == 0) multi_reason = NULL;
context.travel = context.travel1 = context.mv = context.run = 0;
}
@@ -2436,6 +2450,7 @@ const char *msg_override;
if (*nomovemsg) pline1(nomovemsg);
nomovemsg = 0;
u.usleep = 0;
multi_reason = NULL;
if (afternmv) (*afternmv)();
afternmv = 0;
}
+2 -2
View File
@@ -927,8 +927,8 @@ register const char *let,*word;
/* "ugly check" for reading fortune cookies, part 2 */
if ((!strcmp(word, "read")
&& (otmp->otyp == FORTUNE_COOKIE || otmp->otyp == T_SHIRT)))
allowall = TRUE;
&& is_readable(otmp)))
allowall = usegold = TRUE;
}
}
bp[foo] = 0;
+1 -5
View File
@@ -1,4 +1,4 @@
/* NetHack 3.5 makemon.c $NHDT-Date: 1426465436 2015/03/16 00:23:56 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.74 $ */
/* NetHack 3.5 makemon.c $NHDT-Date: 1427440865 2015/03/27 07:21:05 $ $NHDT-Branch: master $:$NHDT-Revision: 1.75 $ */
/* NetHack 3.5 makemon.c $Date: 2012/01/29 00:34:33 $ $Revision: 1.69 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1884,10 +1884,6 @@ int *seencount; /* secondary output */
} while (--creatcnt > 0);
if (seecount) {
if (seencount) *seencount += seecount;
/* don't set contents-known flag if we just used last charge
(such suppression doesn't actually gain us much since
player can now deduce that the bag has become empty) */
if (bag->spe > 0) bag->cknown = 1;
if (bag->dknown) makeknown(BAG_OF_TRICKS);
} else if (!tipping) {
pline1(!moncount ? nothing_happens : "Nothing seems to happen.");
+2
View File
@@ -634,12 +634,14 @@ int spellnum;
if (multi >= 0)
You("stiffen briefly.");
nomul(-1);
multi_reason = "paralyzed by a monster";
} else {
if (multi >= 0)
You("are frozen in place!");
dmg = 4 + (int)mtmp->m_lev;
if (Half_spell_damage) dmg = (dmg + 1) / 2;
nomul(-dmg);
multi_reason = "paralyzed by a monster";
}
nomovemsg = 0;
dmg = 0;
+1
View File
@@ -1053,6 +1053,7 @@ dopois:
else You("are frozen by %s!", mon_nam(mtmp));
nomovemsg = You_can_move_again;
nomul(-rnd(10));
multi_reason = "paralyzed by a monster";
exercise(A_DEX, FALSE);
}
}
+7 -4
View File
@@ -634,7 +634,10 @@ meatmetal(mtmp)
/* Eats topmost metal object if it is there */
for (otmp = level.objects[mtmp->mx][mtmp->my];
otmp; otmp = otmp->nexthere) {
if (mtmp->data == &mons[PM_RUST_MONSTER] && !is_rustprone(otmp))
/* Don't eat indigestible/choking/inappropriate objects */
if ((mtmp->data == &mons[PM_RUST_MONSTER] && !is_rustprone(otmp)) ||
(otmp->otyp == AMULET_OF_STRANGULATION) ||
(otmp->otyp == RIN_SLOW_DIGESTION))
continue;
if (is_metallic(otmp) && !obj_resists(otmp, 5, 95) &&
touch_artifact(otmp,mtmp)) {
@@ -651,9 +654,7 @@ meatmetal(mtmp)
pline("%s spits %s out in disgust!",
Monnam(mtmp), distant_name(otmp,doname));
}
/* KMH -- Don't eat indigestible/choking objects */
} else if (otmp->otyp != AMULET_OF_STRANGULATION &&
otmp->otyp != RIN_SLOW_DIGESTION) {
} else {
if (cansee(mtmp->mx,mtmp->my) && flags.verbose)
pline("%s eats %s!", Monnam(mtmp),
distant_name(otmp,doname));
@@ -1256,6 +1257,8 @@ dmonsfree()
for (mtmp = &fmon; *mtmp;) {
freetmp = *mtmp;
if (freetmp->mhp <= 0 && !freetmp->isgd) {
if (freetmp == context.polearm.hitmon)
context.polearm.hitmon = NULL;
*mtmp = freetmp->nmon;
dealloc_monst(freetmp);
count++;
+17 -3
View File
@@ -497,6 +497,11 @@ register struct obj *obj;
}
if (pluralize) Strcpy(buf, makeplural(buf));
if (obj->otyp == T_SHIRT && program_state.gameover) {
char tmpbuf[BUFSZ];
Sprintf(eos(buf), " with text \"%s\"", tshirt_text(obj, tmpbuf));
}
if (has_oname(obj) && dknown) {
Strcat(buf, " named ");
nameit:
@@ -659,8 +664,9 @@ register struct obj *obj;
*/
register char *bp = xname(obj);
if (iflags.override_ID) known = cknown = bknown = lknown = TRUE;
else {
if (iflags.override_ID) {
known = cknown = bknown = lknown = TRUE;
} else {
known = obj->known;
cknown = obj->cknown;
bknown = obj->bknown;
@@ -693,7 +699,15 @@ register struct obj *obj;
/* "empty" goes at the beginning, but item count goes at the end */
if (cknown &&
(Is_container(obj) || obj->otyp == STATUE) && !Has_contents(obj))
/* bag of tricks: include "empty" prefix if it's known to
be empty but its precise number of charges isn't known
(when that is known, suffix of "(n:0)" will be appended,
making the prefix be redundant; note that 'known' flag
isn't set when emptiness gets discovered because then
charging magic would yield known number of new charges) */
(obj->otyp == BAG_OF_TRICKS ? (obj->spe == 0 && !obj->known) :
/* not bag of tricks: empty if container which has no contents */
(Is_container(obj) || obj->otyp == STATUE) && !Has_contents(obj)))
Strcat(prefix, "empty ");
if (bknown &&
+2
View File
@@ -201,6 +201,7 @@ static struct Bool_Opt
{"tombstone",&flags.tombstone, TRUE, SET_IN_GAME},
{"toptenwin",&iflags.toptenwin, FALSE, SET_IN_GAME},
{"travel", &flags.travelcmd, TRUE, SET_IN_GAME},
{"use_darkgray", &iflags.wc2_darkgray, TRUE, SET_IN_FILE},
#ifdef WIN32CON
{"use_inverse", &iflags.wc_inverse, TRUE, SET_IN_GAME}, /*WC*/
#else
@@ -4398,6 +4399,7 @@ struct wc_Opt wc2_options[] = {
{"fullscreen", WC2_FULLSCREEN},
{"softkeyboard", WC2_SOFTKEYBOARD},
{"wraptext", WC2_WRAPTEXT},
{"use_darkgray", WC2_DARKGRAY},
#ifdef STATUS_VIA_WINDOWPORT
{"hilite_status", WC2_HILITE_STATUS},
#endif
+2 -1
View File
@@ -447,7 +447,8 @@ const char **firstmatch;
{
boolean need_to_look = FALSE;
int glyph;
char look_buf[BUFSZ], prefix[BUFSZ];
static char look_buf[BUFSZ];
char prefix[BUFSZ];
int found = 0; /* count of matching syms found */
int i;
int skipped_venom = 0;
+4 -5
View File
@@ -1498,6 +1498,7 @@ doloot() /* loot a container on the floor or loot saddle from mon. */
char qbuf[BUFSZ];
int prev_inquiry = 0;
boolean prev_loot = FALSE;
int num_conts;
if (check_capacity((char *)0)) {
/* "Can't do that while carrying so much stuff." */
@@ -1518,15 +1519,11 @@ doloot() /* loot a container on the floor or loot saddle from mon. */
lootcont:
if (container_at(cc.x, cc.y, FALSE)) {
if ((num_conts = container_at(cc.x, cc.y, TRUE)) > 0) {
boolean anyfound = FALSE;
int num_conts = 0;
if (!able_to_loot(cc.x, cc.y, TRUE)) return 0;
for (cobj = level.objects[cc.x][cc.y]; cobj; cobj = cobj->nexthere)
if (Is_container(cobj)) num_conts++;
if (num_conts > 1) {
/* use a menu to loot many containers */
int n, i;
@@ -2124,6 +2121,7 @@ int held;
/* even if the trap fails, you've used up this turn */
if (multi >= 0) { /* in case we didn't become paralyzed */
nomul(-1);
multi_reason = "opening a container";
nomovemsg = "";
}
return 1;
@@ -2633,6 +2631,7 @@ struct obj *box; /* or bag */
/* even if the trap fails, you've used up this turn */
if (multi >= 0) { /* in case we didn't become paralyzed */
nomul(-1);
multi_reason = "tipping a container";
nomovemsg = "";
}
} else if (box->otyp == BAG_OF_TRICKS || box->otyp == HORN_OF_PLENTY) {
+1
View File
@@ -1285,6 +1285,7 @@ dogaze()
-d((int)mtmp->m_lev+1,
(int)mtmp->data->mattk[0].damd)
: -200);
multi_reason = "frozen by a monster's gaze";
nomovemsg = 0;
return 1;
} else
+4
View File
@@ -375,6 +375,7 @@ ghost_from_bottle()
if(flags.verbose)
You("are frightened to death, and unable to move.");
nomul(-3);
multi_reason = "being frightened to death";
nomovemsg = "You regain your composure.";
}
@@ -678,6 +679,7 @@ peffects(otmp)
Your("%s are frozen to the %s!",
makeplural(body_part(FOOT)), surface(u.ux, u.uy));
nomul(-(rn1(10, 25 - 12*bcsign(otmp))));
multi_reason = "frozen by a potion";
nomovemsg = You_can_move_again;
exercise(A_DEX, FALSE);
}
@@ -1467,6 +1469,7 @@ register struct obj *obj;
if (!Free_action) {
pline("%s seems to be holding you.", Something);
nomul(-rnd(5));
multi_reason = "frozen by a potion";
nomovemsg = You_can_move_again;
exercise(A_DEX, FALSE);
} else You("stiffen momentarily.");
@@ -1476,6 +1479,7 @@ register struct obj *obj;
if (!Free_action && !Sleep_resistance) {
You_feel("rather tired.");
nomul(-rnd(5));
multi_reason = "sleeping off a magical draught";
nomovemsg = You_can_move_again;
exercise(A_DEX, FALSE);
} else You("yawn.");
+3
View File
@@ -1269,6 +1269,7 @@ dosacrifice()
dmon->mpeaceful = TRUE;
You("are terrified, and unable to move.");
nomul(-3);
multi_reason = "being terrified of a demon";
nomovemsg = 0;
} else pline_The("%s.", demonless_msg);
}
@@ -1655,6 +1656,7 @@ dopray()
}
}
nomul(-3);
multi_reason = "praying";
nomovemsg = "You finish your prayer.";
afternmv = prayer_done;
@@ -1817,6 +1819,7 @@ doturn()
}
}
nomul(-5);
multi_reason = "trying to turn the monsters";
nomovemsg = You_can_move_again;
return(1);
}
+1
View File
@@ -475,6 +475,7 @@ int roomno;
if (flags.verbose)
You("are frightened to death, and unable to move.");
nomul(-3);
multi_reason = "being terrified of a demon";
nomovemsg = "You regain your composure.";
}
}
+147 -29
View File
@@ -53,6 +53,66 @@ struct obj *sobj;
(void) learnscrolltyp(sobj->otyp);
}
char *
erode_obj_text(otmp, buf)
struct obj *otmp;
char *buf;
{
int erosion = greatest_erosion(otmp);
if (erosion)
wipeout_text(buf,
(int)(strlen(buf) * erosion / (2*MAX_ERODE)),
otmp->o_id ^ (unsigned)ubirthday);
return buf;
}
char *
tshirt_text(tshirt, buf)
struct obj *tshirt;
char *buf;
{
static const char *shirt_msgs[] = { /* Scott Bigham */
"I explored the Dungeons of Doom and all I got was this lousy T-shirt!",
"Is that Mjollnir in your pocket or are you just happy to see me?",
"It's not the size of your sword, it's how #enhance'd you are with it.",
"Madame Elvira's House O' Succubi Lifetime Customer",
"Madame Elvira's House O' Succubi Employee of the Month",
"Ludios Vault Guards Do It In Small, Dark Rooms",
"Yendor Military Soldiers Do It In Large Groups",
"I survived Yendor Military Boot Camp",
"Ludios Accounting School Intra-Mural Lacrosse Team",
"Oracle(TM) Fountains 10th Annual Wet T-Shirt Contest",
"Hey, black dragon! Disintegrate THIS!",
"I'm With Stupid -->",
"Don't blame me, I voted for Izchak!",
"Don't Panic", /* HHGTTG */
"Furinkan High School Athletic Dept.", /* Ranma 1/2 */
"Hel-LOOO, Nurse!", /* Animaniacs */
};
Strcpy(buf, shirt_msgs[tshirt->o_id % SIZE(shirt_msgs)]);
return erode_obj_text(tshirt, buf);
}
char *
apron_text(apron, buf)
struct obj *apron;
char *buf;
{
static const char *apron_msgs[] = {
"Kiss the cook",
"I'm making SCIENCE!",
"Don't mess with the chef",
"Don't make me poison you",
"Gehennom's Kitchen",
"Rat: The other white meat",
"If you can't stand the heat, get out of Gehennom!",
"If we weren't meant to eat animals, why are they made out of meat?",
"If you don't like the food, I'll stab you",
};
Strcpy(buf, apron_msgs[apron->o_id % SIZE(apron_msgs)]);
return erode_obj_text(apron, buf);
}
int
doread()
{
@@ -72,34 +132,15 @@ doread()
if (!Blind) u.uconduct.literate++;
useup(scroll);
return(1);
} else if (scroll->otyp == T_SHIRT) {
static const char *shirt_msgs[] = { /* Scott Bigham */
"I explored the Dungeons of Doom and all I got was this lousy T-shirt!",
"Is that Mjollnir in your pocket or are you just happy to see me?",
"It's not the size of your sword, it's how #enhance'd you are with it.",
"Madame Elvira's House O' Succubi Lifetime Customer",
"Madame Elvira's House O' Succubi Employee of the Month",
"Ludios Vault Guards Do It In Small, Dark Rooms",
"Yendor Military Soldiers Do It In Large Groups",
"I survived Yendor Military Boot Camp",
"Ludios Accounting School Intra-Mural Lacrosse Team",
"Oracle(TM) Fountains 10th Annual Wet T-Shirt Contest",
"Hey, black dragon! Disintegrate THIS!",
"I'm With Stupid -->",
"Don't blame me, I voted for Izchak!",
"Don't Panic", /* HHGTTG */
"Furinkan High School Athletic Dept.", /* Ranma 1/2 */
"Hel-LOOO, Nurse!", /* Animaniacs */
};
} else if (scroll->otyp == T_SHIRT ||
scroll->otyp == ALCHEMY_SMOCK) {
char buf[BUFSZ];
int erosion;
if (Blind) {
You_cant("feel any Braille writing.");
return 0;
}
/* can't read shirt worn under suit (under cloak is ok though) */
if (uarm && scroll == uarmu) {
if (scroll->otyp == T_SHIRT && uarm && scroll == uarmu) {
pline("%s shirt is obscured by %s%s.",
scroll->unpaid ? "That" : "Your",
shk_your(buf, uarm), suit_simple_name(uarm));
@@ -108,13 +149,90 @@ doread()
u.uconduct.literate++;
if(flags.verbose)
pline("It reads:");
Strcpy(buf, shirt_msgs[scroll->o_id % SIZE(shirt_msgs)]);
erosion = greatest_erosion(scroll);
if (erosion)
wipeout_text(buf,
(int)(strlen(buf) * erosion / (2*MAX_ERODE)),
scroll->o_id ^ (unsigned)ubirthday);
pline("\"%s\"", buf);
pline("\"%s\"", (scroll->otyp == T_SHIRT)
? tshirt_text(scroll, buf)
: apron_text(scroll, buf));
return 1;
} else if (scroll->otyp == CREDIT_CARD) {
static const char *card_msgs[] = {
"Leprechaun Gold Tru$t - Shamrock Card",
"Magic Memory Vault Charge Card",
"Larn National Bank", /* Larn */
"First Bank of Omega", /* Omega */
"Bank of Zork - Frobozz Magic Card", /* Zork */
"Ankh-Morpork Merchant's Guild Barter Card",
"Ankh-Morpork Thieves' Guild Unlimited Transaction Card",
"Ransmannsby Moneylenders Association",
"Bank of Gehennom - 99% Interest Card",
"Yendorian Express - Copper Card",
"Yendorian Express - Silver Card",
"Yendorian Express - Gold Card",
"Yendorian Express - Mithril Card",
"Yendorian Express - Platinum Card", /* must be last */
};
if (Blind) {
You("feel the embossed numbers:");
} else {
if(flags.verbose)
pline("It reads:");
pline("\"%s\"", scroll->oartifact ? card_msgs[SIZE(card_msgs)-1]
: card_msgs[scroll->o_id % (SIZE(card_msgs)-1)]);
}
/* Make a credit card number */
pline("\"%d0%d %d%d1 0%d%d0\"", ((scroll->o_id % 89)+10), (scroll->o_id % 4),
(((scroll->o_id * 499) % 899999) + 100000), (scroll->o_id % 10),
(!(scroll->o_id % 3)), ((scroll->o_id * 7) % 10));
u.uconduct.literate++;
return 1;
} else if (scroll->otyp == CAN_OF_GREASE) {
pline("This %s has no label.", singular(scroll, xname));
return 0;
} else if (scroll->otyp == MAGIC_MARKER) {
if (Blind) {
You_cant("feel any Braille writing.");
return 0;
}
if (flags.verbose)
pline("It reads:");
pline("\"Magic Marker(TM) Red Ink Marker Pen. Water Soluble.\"");
u.uconduct.literate++;
return 1;
} else if (scroll->oclass == COIN_CLASS) {
if (Blind)
You("feel the embossed words:");
else if (flags.verbose)
You("read:");
pline("\"1 Zorkmid. 857 GUE. In Frobs We Trust.\"");
u.uconduct.literate++;
return 1;
} else if (scroll->oartifact == ART_ORB_OF_FATE) {
if (Blind)
You("feel the engraved signature:");
else pline("It is signed:");
pline("\"Odin.\"");
u.uconduct.literate++;
return 1;
} else if (scroll->otyp == CANDY_BAR) {
static const char *wrapper_msgs[] = {
"Apollo", /* Lost */
"Moon Crunchy", /* South Park */
"Snacky Cake",
"Chocolate Nuggie",
"The Small Bar",
"Crispy Yum Yum",
"Nilla Crunchie",
"Berry Bar",
"Choco Nummer",
"Om-nom", /* Cat Macro */
"Fruity Oaty", /* Serenity */
"Wonka Bar" /* Charlie and the Chocolate Factory */
};
if (Blind) {
You_cant("feel any Braille writing.");
return 0;
}
pline("The wrapper reads: \"%s\"", wrapper_msgs[scroll->o_id % SIZE(wrapper_msgs)]);
u.uconduct.literate++;
return 1;
} else if (scroll->oclass != SCROLL_CLASS
&& scroll->oclass != SPBOOK_CLASS) {
+4
View File
@@ -446,6 +446,10 @@ boolean ghostly;
if (mtmp->isshk) restshk(mtmp, ghostly);
if (mtmp->ispriest) restpriest(mtmp, ghostly);
if (!ghostly) {
if (mtmp->m_id == context.polearm.m_id)
context.polearm.hitmon = mtmp;
}
mtmp2 = mtmp;
}
if(first && mtmp2->nmon){
+6 -1
View File
@@ -1124,8 +1124,13 @@ register struct monst *mtmp;
}
if (mtmp->minvent)
saveobjchn(fd,mtmp->minvent,mode);
if (release_data(mode))
if (release_data(mode)) {
if (mtmp == context.polearm.hitmon) {
context.polearm.m_id = mtmp->m_id;
context.polearm.hitmon = NULL;
}
dealloc_monst(mtmp);
}
mtmp = mtmp2;
}
if (perform_bwrite(mode))
+1
View File
@@ -710,6 +710,7 @@ register struct monst *mtmp;
pline("%s rattles noisily.", Monnam(mtmp));
You("freeze for a moment.");
nomul(-2);
multi_reason = "scared by rattling";
nomovemsg = 0;
break;
case MS_LAUGH:
+3
View File
@@ -329,6 +329,7 @@ learn(VOID_ARGS)
context.spbook.book = 0; /* no longer studying */
context.spbook.o_id = 0;
nomul(context.spbook.delay); /* remaining delay is uninterrupted */
multi_reason = "reading a book";
nomovemsg = 0;
context.spbook.delay = 0;
return(0);
@@ -506,6 +507,7 @@ register struct obj *spellbook;
boolean gone = cursed_book(spellbook);
nomul(context.spbook.delay); /* study time */
multi_reason = "reading a book";
nomovemsg = 0;
context.spbook.delay = 0;
if(gone || !rn2(3)) {
@@ -522,6 +524,7 @@ register struct obj *spellbook;
spellbook->in_use = FALSE;
}
nomul(context.spbook.delay);
multi_reason = "reading a book";
nomovemsg = 0;
context.spbook.delay = 0;
return(1);
+1
View File
@@ -361,6 +361,7 @@ gotobj:
named++;
/* the following is to set multi for later on */
nomul(-armordelay);
multi_reason = "taking off clothes";
nomovemsg = 0;
remove_worn_item(otmp, TRUE);
otmp->cursed = curssv;
+4
View File
@@ -51,6 +51,7 @@ stoned_dialogue()
case 3: /* limbs turned to stone */
stop_occupation();
nomul(-3); /* can't move anymore */
multi_reason = "getting stoned";
nomovemsg = You_can_move_again; /* not unconscious */
break;
default:
@@ -377,6 +378,7 @@ nh_timeout()
if (u.umoved && !Levitation) {
slip_or_trip();
nomul(-2);
multi_reason = "fumbling";
nomovemsg = "";
/* The more you are carrying the more likely you
* are to make noise when you fumble. Adjustments
@@ -409,6 +411,7 @@ boolean wakeup_msg;
{
stop_occupation();
nomul(how_long);
multi_reason = "sleeping";
/* generally don't notice sounds while sleeping */
if (wakeup_msg && multi == how_long) {
/* caller can follow with a direct call to Hear_again() if
@@ -1271,6 +1274,7 @@ do_storms()
if(!u.uinvulnerable) {
stop_occupation();
nomul(-3);
multi_reason = "hiding from thunderstorm";
nomovemsg = 0;
}
} else
+14
View File
@@ -66,6 +66,7 @@ STATIC_DCL void FDECL(discardexcess, (FILE *));
STATIC_DCL void FDECL(readentry, (FILE *,struct toptenentry *));
STATIC_DCL void FDECL(writeentry, (FILE *,struct toptenentry *));
STATIC_DCL void FDECL(writexlentry, (FILE*, struct toptenentry *));
STATIC_DCL long NDECL(encodexlogflags);
STATIC_DCL long NDECL(encodeconduct);
STATIC_DCL long NDECL(encodeachieve);
STATIC_DCL void FDECL(free_ttlist, (struct toptenentry *));
@@ -341,10 +342,23 @@ struct toptenentry *tt;
Fprintf(rfile, "%cgender0=%s%calign0=%s",
XLOG_SEP, genders[flags.initgend].filecode,
XLOG_SEP, aligns[1 - u.ualignbase[A_ORIGINAL]].filecode);
Fprintf(rfile, "%cflags=0x%lx",
XLOG_SEP, encodexlogflags());
Fprintf(rfile, "\n");
#undef XLOG_SEP
}
STATIC_OVL long
encodexlogflags()
{
long e = 0L;
if (wizard) e |= 1L << 0;
if (discover) e |= 1L << 1;
return e;
}
STATIC_OVL long
encodeconduct()
{
+11 -6
View File
@@ -1,4 +1,4 @@
/* NetHack 3.5 trap.c $NHDT-Date: 1426805491 2015/03/19 22:51:31 $ $NHDT-Branch: water_damage $:$NHDT-Revision: 1.198 $ */
/* NetHack 3.5 trap.c $NHDT-Date: 1427331767 2015/03/26 01:02:47 $ $NHDT-Branch: master $:$NHDT-Revision: 1.199 $ */
/* NetHack 3.5 trap.c $Date: 2013/03/14 01:58:21 $ $Revision: 1.179 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -3118,13 +3118,17 @@ acid_damage(obj)
struct obj *obj;
{
/* Scrolls but not spellbooks can be erased by acid. */
struct monst *victim =
carried(obj) ? &youmonst : mcarried(obj) ? obj->ocarry : NULL;
boolean vismon = victim && (victim != &youmonst) && canseemon(victim);
struct monst *victim;
boolean vismon;
if (obj->greased)
if (!obj) return;
victim = carried(obj) ? &youmonst : mcarried(obj) ? obj->ocarry : NULL;
vismon = victim && (victim != &youmonst) && canseemon(victim);
if (obj->greased) {
grease_protect(obj, NULL, victim);
else if (obj->oclass == SCROLL_CLASS && obj->otyp != SCR_BLANK_PAPER) {
} else if (obj->oclass == SCROLL_CLASS && obj->otyp != SCR_BLANK_PAPER) {
if (obj->otyp != SCR_BLANK_PAPER
#ifdef MAIL
&& obj->otyp != SCR_MAIL
@@ -4443,6 +4447,7 @@ boolean disarm;
if (!Free_action) {
pline("Suddenly you are frozen in place!");
nomul(-d(5, 6));
multi_reason = "frozen by a trap";
exercise(A_DEX, FALSE);
nomovemsg = You_can_move_again;
} else You("momentarily stiffen.");
+3
View File
@@ -1871,6 +1871,7 @@ register struct attack *mattk;
You("digest %s.", mon_nam(mdef));
if (Slow_digestion) tmp *= 2;
nomul(-tmp);
multi_reason = "digesting something";
nomovemsg = msgbuf;
} else pline1(msgbuf);
if (pd == &mons[PM_GREEN_SLIME]) {
@@ -2353,6 +2354,7 @@ boolean wep_was_destroyed;
You("are frozen by %s gaze!",
s_suffix(mon_nam(mon)));
nomul((ACURR(A_WIS) > 12 || rn2(4)) ? -tmp : -127);
multi_reason = "frozen by a monster's gaze";
nomovemsg = 0;
}
} else {
@@ -2366,6 +2368,7 @@ boolean wep_was_destroyed;
You("are frozen by %s!", mon_nam(mon));
nomovemsg = You_can_move_again;
nomul(-tmp);
multi_reason = "frozen by a monster";
exercise(A_DEX, FALSE);
}
break;
+1 -3
View File
@@ -1,4 +1,4 @@
/* NetHack 3.5 worn.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
/* NetHack 3.5 worn.c $NHDT-Date: 1427580338 2015/03/28 22:05:38 $ $NHDT-Branch: master $:$NHDT-Revision: 1.35 $ */
/* NetHack 3.5 worn.c $Date: 2013/11/05 00:57:56 $ $Revision: 1.32 $ */
/* SCCS Id: @(#)worn.c 3.5 2009/02/28 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
@@ -591,9 +591,7 @@ long flag;
case W_ARMS: return uarms;
case W_ARMG: return uarmg;
case W_ARMF: return uarmf;
#ifdef TOURIST
case W_ARMU: return uarmu;
#endif
default:
impossible("bad flag in which_armor");
return 0;
+35 -9
View File
@@ -1750,9 +1750,9 @@ struct obj *obj, *otmp;
if (Is_box(obj)) (void) boxlock(obj, otmp);
if (obj_shudders(obj)) {
boolean cover = ((obj->ox == u.ux && obj->oy == u.uy) &&
u.uundetected &&
hides_under(youmonst.data));
boolean cover = ((obj == level.objects[u.ux][u.uy]) &&
u.uundetected &&
hides_under(youmonst.data));
if (cansee(obj->ox, obj->oy)) learn_it = TRUE;
do_osshock(obj);
@@ -1892,10 +1892,11 @@ struct obj *obj, *otmp;
/* returns nonzero if something was hit */
int
bhitpile(obj,fhito,tx,ty)
bhitpile(obj,fhito,tx,ty,zdir)
struct obj *obj;
int FDECL((*fhito), (OBJ_P,OBJ_P));
int tx, ty;
schar zdir;
{
int hitanything = 0;
register struct obj *otmp, *next_obj;
@@ -1917,7 +1918,14 @@ bhitpile(obj,fhito,tx,ty)
for(otmp = level.objects[tx][ty]; otmp; otmp = next_obj) {
/* Fix for polymorph bug, Tim Wright */
next_obj = otmp->nexthere;
hitanything += (*fhito)(otmp, obj);
/*
* game flavor: if you are hiding under something,
* a zap downwards shouldn't hit that obj, so honor that.
*/
if (!(u.uundetected && (zdir > 0) &&
(otmp == level.objects[u.ux][u.uy]) &&
hides_under(youmonst.data)))
hitanything += (*fhito)(otmp, obj);
}
if(poly_zapped >= 0)
create_polymon(level.objects[tx][ty], poly_zapped);
@@ -2568,7 +2576,7 @@ struct obj *obj; /* wand or spell */
if (u.dz < 0) {
You("probe towards the %s.", ceiling(x,y));
} else {
ptmp += bhitpile(obj, bhito, x, y);
ptmp += bhitpile(obj, bhito, x, y, u.dz);
You("probe beneath the %s.", surface(x,y));
ptmp += display_binventory(x, y, TRUE);
}
@@ -2688,7 +2696,7 @@ struct obj *obj; /* wand or spell */
if (u.dz > 0) {
/* zapping downward */
(void) bhitpile(obj, bhito, x, y);
(void) bhitpile(obj, bhito, x, y, u.dz);
/* subset of engraving effects; none sets `disclose' */
if ((e = engr_at(x, y)) != 0 && e->engr_type != HEADSTONE) {
@@ -2724,6 +2732,22 @@ struct obj *obj; /* wand or spell */
break;
}
}
} else if (u.dz < 0) {
/* zapping upward */
/* game flavor: if you're hiding under "something"
* a zap upward should hit that "something".
*/
if (u.uundetected && hides_under(youmonst.data)) {
int hitit = 0;
otmp = level.objects[u.ux][u.uy];
if (otmp) hitit = bhito(otmp, obj);
if (hitit) {
(void) hideunder(&youmonst);
disclose = TRUE;
}
}
}
return disclose;
@@ -3095,7 +3119,7 @@ struct obj **pobj; /* object tossed/used, set to NULL
}
}
if(fhito) {
if(bhitpile(obj,fhito,bhitpos.x,bhitpos.y))
if(bhitpile(obj,fhito,bhitpos.x,bhitpos.y,0))
range--;
} else {
if(weapon == KICKED_WEAPON &&
@@ -3259,8 +3283,10 @@ int dx, dy;
}
tmp_at(bhitpos.x, bhitpos.y);
delay_output();
if(IS_SINK(levl[bhitpos.x][bhitpos.y].typ))
if(IS_SINK(levl[bhitpos.x][bhitpos.y].typ)) {
if (!Deaf) pline("Klonk!");
break; /* boomerang falls on sink */
}
/* ct==0, initial position, we want next delta to be same;
ct==5, opposite position, repeat delta undoes first one */
if (ct % 5 != 0) i += (counterclockwise ? -1 : 1);
+1
View File
@@ -16,6 +16,7 @@ HACKDIR=$(PREFIX)/games/lib/$(GAME)dir
SHELLDIR = $(PREFIX)/games
CFLAGS=-O -I../include -DNOTPARMDECL $(CFLAGS1) $(CFLAGS3)
CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\"
CFLAGS1=-DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\"
CFLAGS3=-DX11_GRAPHICS -DDEFAULT_WINDOW_SYS=\"X11\" -DNOTTYGRAPHICS
+105 -23
View File
@@ -809,10 +809,9 @@ cl_eos() /* free after Robert Viduya */
extern char *tparm();
#endif
# ifdef COLOR_BLACK /* trust include file */
#undef COLOR_BLACK
# else
# ifndef COLOR_BLACK /* trust include file */
# ifndef _M_UNIX /* guess BGR */
#define COLOR_BLACK 0
#define COLOR_BLUE 1
#define COLOR_GREEN 2
#define COLOR_CYAN 3
@@ -821,6 +820,7 @@ extern char *tparm();
#define COLOR_YELLOW 6
#define COLOR_WHITE 7
# else /* guess RGB */
#define COLOR_BLACK 0
#define COLOR_RED 1
#define COLOR_GREEN 2
#define COLOR_YELLOW 3
@@ -830,43 +830,125 @@ extern char *tparm();
#define COLOR_WHITE 7
# endif
# endif
#define COLOR_BLACK COLOR_BLUE
const int ti_map[8] = {
COLOR_BLACK, COLOR_RED, COLOR_GREEN, COLOR_YELLOW,
COLOR_BLUE, COLOR_MAGENTA, COLOR_CYAN, COLOR_WHITE };
/* Mapping data for the six terminfo colors that resolve to pairs of nethack
* colors. Black and white are handled specially.
*/
const struct {int ti_color, nh_color, nh_bright_color;} ti_map[6] =
{
{COLOR_RED,CLR_RED,CLR_ORANGE},
{COLOR_GREEN,CLR_GREEN,CLR_BRIGHT_GREEN},
{COLOR_YELLOW,CLR_BROWN,CLR_YELLOW},
{COLOR_BLUE,CLR_BLUE,CLR_BRIGHT_BLUE},
{COLOR_MAGENTA,CLR_MAGENTA,CLR_BRIGHT_MAGENTA},
{COLOR_CYAN,CLR_CYAN,CLR_BRIGHT_CYAN}
};
static void
init_hilite()
{
register int c;
char *setf, *scratch;
for (c = 0; c < SIZE(hilites); c++)
hilites[c] = nh_HI;
hilites[CLR_GRAY] = hilites[NO_COLOR] = (char *)0;
int md_len;
if (tgetnum("Co") < 8
|| (MD == NULL) || (strlen(MD) == 0)
|| ((setf = tgetstr("AF", (char **)0)) == (char *)0
&& (setf = tgetstr("Sf", (char **)0)) == (char *)0))
{
/* Fallback when colors not available
* It's arbitrary to collapse all colors except gray
* together, but that's what the previous code did.
*/
hilites[CLR_BLACK] = nh_HI;
hilites[CLR_RED] = nh_HI;
hilites[CLR_GREEN] = nh_HI;
hilites[CLR_BROWN] = nh_HI;
hilites[CLR_BLUE] = nh_HI;
hilites[CLR_MAGENTA] = nh_HI;
hilites[CLR_CYAN] = nh_HI;
hilites[CLR_GRAY] = "";
hilites[NO_COLOR] = "";
hilites[CLR_ORANGE] = nh_HI;
hilites[CLR_BRIGHT_GREEN] = nh_HI;
hilites[CLR_YELLOW] = nh_HI;
hilites[CLR_BRIGHT_BLUE] = nh_HI;
hilites[CLR_BRIGHT_MAGENTA] = nh_HI;
hilites[CLR_BRIGHT_CYAN] = nh_HI;
hilites[CLR_WHITE] = nh_HI;
return;
for (c = 0; c < CLR_MAX / 2; c++) {
scratch = tparm(setf, ti_map[c]);
if (c != CLR_GRAY) {
hilites[c] = (char *) alloc(strlen(scratch) + 1);
Strcpy(hilites[c], scratch);
}
if (c != CLR_BLACK) {
hilites[c|BRIGHT] = (char*) alloc(strlen(scratch)+strlen(MD)+1);
Strcpy(hilites[c|BRIGHT], MD);
Strcat(hilites[c|BRIGHT], scratch);
}
md_len = strlen(MD);
c = 6;
while (c--) {
char *work;
scratch = tparm(setf,ti_map[c].ti_color);
work = (char *) alloc(strlen(scratch) + md_len + 1);
Strcpy(work,MD);
hilites[ti_map[c].nh_bright_color] = work;
work += md_len;
Strcpy(work,scratch);
hilites[ti_map[c].nh_color] = work;
}
scratch = tparm(setf,COLOR_WHITE);
hilites[CLR_WHITE] = (char *) alloc(strlen(scratch) + md_len + 1);
Strcpy(hilites[CLR_WHITE],MD);
Strcat(hilites[CLR_WHITE],scratch);
hilites[CLR_GRAY] = "";
hilites[NO_COLOR] = "";
if (iflags.wc2_darkgray) {
/* On many terminals, esp. those using classic PC CGA/EGA/VGA
* textmode, specifying "hilight" and "black" simultaneously
* produces a dark shade of gray that is visible against a
* black background. We can use it to represent black objects.
*/
scratch = tparm(setf,COLOR_BLACK);
hilites[CLR_BLACK] = (char *) alloc(strlen(scratch) + md_len + 1);
Strcpy(hilites[CLR_BLACK],MD);
Strcat(hilites[CLR_BLACK],scratch);
} else {
/* But it's concievable that hilighted black-on-black could
* still be invisible on many others. We substitute blue for
* black.
*/
hilites[CLR_BLACK] = hilites[CLR_BLUE];
}
}
static void
kill_hilite()
{
/* if colors weren't available, no freeing needed */
if (hilites[CLR_BLACK] == nh_HI)
return;
if (hilites[CLR_BLACK] != hilites[CLR_BLUE])
free(hilites[CLR_BLACK]);
/* CLR_BLUE overlaps CLR_BRIGHT_BLUE, do not free */
/* CLR_GREEN overlaps CLR_BRIGHT_GREEN, do not free */
/* CLR_CYAN overlaps CLR_BRIGHT_CYAN, do not free */
/* CLR_RED overlaps CLR_ORANGE, do not free */
/* CLR_MAGENTA overlaps CLR_BRIGHT_MAGENTA, do not free */
/* CLR_BROWN overlaps CLR_YELLOW, do not free */
/* CLR_GRAY is a constant "", do not free */
/* NO_COLOR is a constant "", do not free */
free(hilites[CLR_BRIGHT_BLUE]);
free(hilites[CLR_BRIGHT_GREEN]);
free(hilites[CLR_BRIGHT_CYAN]);
free(hilites[CLR_YELLOW]);
free(hilites[CLR_ORANGE]);
free(hilites[CLR_BRIGHT_MAGENTA]);
free(hilites[CLR_WHITE]);
}
# else /* UNIX && TERMINFO */
# ifndef TOS
@@ -1011,7 +1093,6 @@ init_hilite()
# endif
# endif /* TOS */
}
# endif /* UNIX */
static void
kill_hilite()
@@ -1029,6 +1110,7 @@ kill_hilite()
# endif
return;
}
# endif /* UNIX */
#endif /* TEXTCOLOR */
+20 -5
View File
@@ -1,4 +1,4 @@
/* NetHack 3.5 wintty.c $NHDT-Date: 1426465444 2015/03/16 00:24:04 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.71 $ */
/* NetHack 3.5 wintty.c $NHDT-Date: 1427505884 2015/03/28 01:24:44 $ $NHDT-Branch: master $:$NHDT-Revision: 1.73 $ */
/* NetHack 3.5 wintty.c $Date: 2012/01/22 06:27:09 $ $Revision: 1.66 $ */
/* Copyright (c) David Cohrs, 1991 */
/* NetHack may be freely redistributed. See license for details. */
@@ -56,7 +56,7 @@ struct window_procs tty_procs = {
#if defined(SELECTSAVED)
WC2_SELECTSAVED|
#endif
0L,
WC2_DARKGRAY,
tty_init_nhwindows,
tty_player_selection,
tty_askname,
@@ -1391,10 +1391,11 @@ struct WinDesc *cw;
{
tty_menu_item *page_start, *page_end, *curr;
long count;
int n, curr_page, page_lines;
int n, curr_page, page_lines, resp_len;
boolean finished, counting, reset_count;
char *cp, *rp, resp[QBUFSZ], gacc[QBUFSZ],
*msave, *morestr;
*msave, *morestr, really_morc;
#define MENU_EXPLICIT_CHOICE 0x7f /* pseudo menu manipulation char */
curr_page = page_lines = 0;
page_start = page_end = 0;
@@ -1501,6 +1502,8 @@ struct WinDesc *cw;
page_lines = 0;
}
*rp = 0;
/* remember how many explicit menu choices there are */
resp_len = (int)strlen(resp);
/* corner window - clear extra lines from last page */
if (cw->offx) {
@@ -1533,7 +1536,15 @@ struct WinDesc *cw;
xwaitforspace(resp);
}
morc = map_menu_cmd(morc);
really_morc = morc; /* (only used with MENU_EXPLICIT_CHOICE */
if ((rp = index(resp, morc)) != 0 && rp < resp + resp_len)
/* explicit menu selection; don't override it if it also
happens to match a mapped menu command (such as ':' to
look inside a container vs ':' to search) */
morc = MENU_EXPLICIT_CHOICE;
else
morc = map_menu_cmd(morc);
switch (morc) {
case '0':
/* special case: '0' is also the default ball class */
@@ -1664,6 +1675,9 @@ struct WinDesc *cw;
}
}
break;
case MENU_EXPLICIT_CHOICE:
morc = really_morc;
/*FALLTHRU*/
default:
if (cw->how == PICK_NONE || !index(resp, morc)) {
/* unacceptable input received */
@@ -1809,6 +1823,7 @@ tty_display_nhwindow(window, blocking)
cw->offx = (uchar) (int)
max((int) 10, (int) (ttyDisplay->cols - cw->maxcol - 1));
#endif
if(cw->offx < 0) cw->offx = 0;
if(cw->type == NHW_MENU)
cw->offy = 0;
if(ttyDisplay->toplin == 1)