Merge branch 'NetHack-3.6.0'

This commit is contained in:
nhmall
2015-12-17 08:45:19 -05:00
47 changed files with 583 additions and 301 deletions
+14 -14
View File
@@ -86,7 +86,7 @@ wield.c windows.c wizard.c worm.c worn.c
write.c zap.c write.c zap.c
sys/amiga: sys/amiga:
(files for Amiga versions - untested for 3.6.0) (files for Amiga versions - untested for 3.6.1)
Build.ami Install.ami Makefile.agc Makefile.ami NetHack.cnf Build.ami Install.ami Makefile.agc Makefile.ami NetHack.cnf
amidos.c amidos.p amifont.uu amifont8.uu amigst.c amidos.c amidos.p amifont.uu amifont8.uu amigst.c
amii.hlp amimenu.c amirip.c amisnd.c amistack.c amii.hlp amimenu.c amirip.c amisnd.c amistack.c
@@ -97,12 +97,12 @@ winfuncs.c winkey.c winmenu.c winproto.h winreq.c
winstr.c xpm2iff.c winstr.c xpm2iff.c
sys/atari: sys/atari:
(files for Atari version - untested for 3.6.0) (files for Atari version - untested for 3.6.1)
Install.tos atarifnt.uue nethack.mnu setup.g tos.c Install.tos atarifnt.uue nethack.mnu setup.g tos.c
unx2atar.sed unx2atar.sed
sys/be: sys/be:
(files for BeOS version - untested for 3.6.0) (files for BeOS version - untested for 3.6.1)
README bemain.c README bemain.c
sys/mac: sys/mac:
@@ -115,7 +115,7 @@ macwin.c mgetline.c mmodal.c mrecover.c mrecover.hqx
mttymain.c mttymain.c
sys/msdos: sys/msdos:
(files for MSDOS version - untested for 3.6.0) (files for MSDOS version - untested for 3.6.1)
Install.dos Makefile.BC Makefile.GCC Makefile.MSC moveinit.pat Install.dos Makefile.BC Makefile.GCC Makefile.MSC moveinit.pat
msdos.c msdoshlp.txt ovlinit.c pckeys.c pctiles.c msdos.c msdoshlp.txt ovlinit.c pckeys.c pctiles.c
pctiles.h pcvideo.h portio.h schema1.BC schema2.BC pctiles.h pcvideo.h portio.h schema1.BC schema2.BC
@@ -125,17 +125,17 @@ video.c vidtxt.c vidvga.c
nhico.uu nhpif.uu nhico.uu nhpif.uu
sys/os2: sys/os2:
(files for OS/2 version - untested for 3.6.0) (files for OS/2 version - untested for 3.6.1)
Install.os2 Makefile.os2 nhpmico.uu os2.c Install.os2 Makefile.os2 nhpmico.uu os2.c
sys/share: sys/share:
(files for MSDOS and OS/2 versions - untested for 3.6.0) (files for MSDOS and OS/2 versions - untested for 3.6.1)
Makefile.lib termcap.uu Makefile.lib termcap.uu
(file for MSDOS, OS/2, NT, Amiga, and Atari versions - untested for 3.6.0) (file for MSDOS, OS/2, NT, Amiga, and Atari versions - untested for 3.6.1)
pcmain.c pcmain.c
(files for MSDOS, OS/2, NT, and Atari versions - untested for 3.6.0) (files for MSDOS, OS/2, NT, and Atari versions - untested for 3.6.1)
pcsys.c pcunix.c pcsys.c pcunix.c
(file for MSDOS, OS/2, and Atari versions - untested for 3.6.0) (file for MSDOS, OS/2, and Atari versions - untested for 3.6.1)
NetHack.cnf pctty.c NetHack.cnf pctty.c
(files for UNIX and Be versions) (files for UNIX and Be versions)
ioctl.c unixtty.c ioctl.c unixtty.c
@@ -189,7 +189,7 @@ spec_lev.com sysconf vmsbuild.com vmsfiles.c vmsmail.c
vmsmain.c vmsmisc.c vmstty.c vmsunix.c vmsmain.c vmsmisc.c vmstty.c vmsunix.c
sys/wince: sys/wince:
(files for Windows CE and PocketPC - untested for 3.6.0) (files for Windows CE and PocketPC - untested for 3.6.1)
Install.ce bootstrp.mak celib.c cesetup.bat cesound.c Install.ce bootstrp.mak celib.c cesetup.bat cesound.c
defaults.nh keypad.uu menubar.uu mhaskyn.c mhaskyn.h defaults.nh keypad.uu menubar.uu mhaskyn.c mhaskyn.h
mhcmd.c mhcmd.h mhcolor.c mhcolor.h mhdlg.c mhcmd.c mhcmd.h mhcolor.c mhcolor.h mhdlg.c
@@ -202,11 +202,11 @@ resource.h winMS.h winhack.c winhack.rc winhcksp.rc
winmain.c winmain.c
sys/wince/ceinc: sys/wince/ceinc:
(header files for Windows CE and PocketPC - untested for 3.6.0) (header files for Windows CE and PocketPC - untested for 3.6.1)
assert.h errno.h fcntl.h assert.h errno.h fcntl.h
sys/wince/ceinc/sys: sys/wince/ceinc/sys:
(sys/stat.h for Windows CE and PocketPC - untested for 3.6.0) (sys/stat.h for Windows CE and PocketPC - untested for 3.6.1)
stat.h stat.h
sys/winnt: sys/winnt:
@@ -242,13 +242,13 @@ win/chain:
wc_chainin.c wc_chainout.c wc_trace.c wc_chainin.c wc_chainout.c wc_trace.c
win/gem: win/gem:
(files for GEM versions - untested for 3.6.0) (files for GEM versions - untested for 3.6.1)
Install.gem bitmfile.c gem_rsc.uu gem_rso.uu gr_rect.c Install.gem bitmfile.c gem_rsc.uu gem_rso.uu gr_rect.c
gr_rect.h load_img.c tile2img.c title.uu wingem.c gr_rect.h load_img.c tile2img.c title.uu wingem.c
wingem1.c xpm2img.c wingem1.c xpm2img.c
win/gnome: win/gnome:
(files for GNOME versions - untested for 3.6.0) (files for GNOME versions - untested for 3.6.1)
README gn_xpms.h gnaskstr.c gnaskstr.h gnbind.c README gn_xpms.h gnaskstr.c gnaskstr.h gnbind.c
gnbind.h gnglyph.c gnglyph.h gnmain.c gnmain.h gnbind.h gnglyph.c gnglyph.h gnmain.c gnmain.h
gnmap.c gnmap.h gnmenu.c gnmenu.h gnmesg.c gnmap.c gnmap.h gnmenu.c gnmenu.h gnmesg.c
+3 -3
View File
@@ -1,13 +1,13 @@
NetHack 3.6.0 -- General information NetHack 3.6.1 -- General information
NetHack 3.6 is an enhancement to the dungeon exploration game NetHack. NetHack 3.6 is an enhancement to the dungeon exploration game NetHack.
It is a distant descendent of Rogue and Hack, and a direct descendent of It is a distant descendent of Rogue and Hack, and a direct descendent of
NetHack 3.4. In order to avoid confusion with interim development code NetHack 3.4. In order to avoid confusion with interim development code
that was posted online in 2014 by others, there is no NetHack 3.5 release. that was posted online in 2014 by others, there is no NetHack 3.5 release.
NetHack 3.6.0 contains some code reorganization, new features, and bugfixes. NetHack 3.6.1 contains several dozen bugfixes.
The file doc/fixes36.0 in the source distribution has a full list of each. The file doc/fixes36.1 in the source distribution has a full list of each.
The text in there was written for the development team's own use and is The text in there was written for the development team's own use and is
provided "as is", so please do not ask us to further explain the entries provided "as is", so please do not ask us to further explain the entries
in that file. Some entries might be considered "spoilers", particularly in that file. Some entries might be considered "spoilers", particularly
+12 -7
View File
@@ -184,25 +184,30 @@ with some of the beloved community patches. Many bugs were fixed and some
code was restructured. code was restructured.
The development team, as well as Steve VanDevender and Kevin Smolkowski The development team, as well as Steve VanDevender and Kevin Smolkowski
ensured that NetHack 3.6.0 continued to operate on various Unix flavors ensured that NetHack 3.6 continued to operate on various Unix flavors
as well as maintaining the X11 interface. as well as maintaining the X11 interface.
Ken Lorber, Haoyang Wang, Pat Rankin, and Dean Luick maintained the port Ken Lorber, Haoyang Wang, Pat Rankin, and Dean Luick maintained the port
of NetHack 3.6.0 for Mac. of NetHack 3.6 for Mac.
Michael Allison, Derek S. Ray, Yitzhak Sapir, Alex Kompel, Dion Nicolaas, Michael Allison, Derek S. Ray, Yitzhak Sapir, Alex Kompel, Dion Nicolaas,
and David Cohrs maintained the port of NetHack 3.6.0 for Microsoft Windows. and David Cohrs maintained the port of NetHack 3.6 for Microsoft Windows.
Pat Rankin attempted to keep the VMS port running for NetHack 3.6.0, Pat Rankin attempted to keep the VMS port running for NetHack 3.6,
hindered by limited access. Kevin Smolkowski has updated and tested it hindered by limited access. Kevin Smolkowski has updated and tested it
for the most recent version of OpenVMS (V8.4 as of this writing) on Alpha for the most recent version of OpenVMS (V8.4 as of this writing) on Alpha
and Integrity (aka Itanium aka IA64) but not VAX. and Integrity (aka Itanium aka IA64) but not VAX.
This version of the game is special in a particular way. Near the end of The 3.6 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 development of 3.6.0, one of the significant inspirations for many of
the humorous and fun features found in the game, author Terry Pratchett, the humorous and fun features found in the game, author Terry Pratchett,
passed away. This version of the game includes a tribute to him. passed away. The 3.6 version of the game includes a tribute to him.
The 3.6 development team consisting of Michael Allison, Warwick Allison,
Ken Arromdee, David Cohrs, Jessie Collet, Sean Hunt, Pasi Kallinen,
Ken Lorber, Dean Luick, Pat Rankin, Derek Ray, Mike Stephenson,
Janet Walz, and Paul Winner released 3.6.1 as a bug fix release in
January 2016.
An official NetHack web site continues to be maintained by Ken Lorber at An official NetHack web site continues to be maintained by Ken Lorber at
http://www.nethack.org/. http://www.nethack.org/.
+1
View File
@@ -2,6 +2,7 @@ Boolean options not under specific compile flags (with default values in []):
(You can learn which options exist in your version by checking your current (You can learn which options exist in your version by checking your current
option setting, which is reached via the 'O' cmd.) option setting, which is reached via the 'O' cmd.)
autodescribe describe the terrain under cursor [FALSE]
autodig dig if moving and wielding digging tool [FALSE] autodig dig if moving and wielding digging tool [FALSE]
autoopen walking into a door attempts to open it [TRUE] autoopen walking into a door attempts to open it [TRUE]
autopickup automatically pick up objects you move over [TRUE] autopickup automatically pick up objects you move over [TRUE]
+2
View File
@@ -156,6 +156,7 @@ Some questions the Sphynx asks just *don't* have any answers.
Sometimes "mu" is the answer. Sometimes "mu" is the answer.
Sorry, no fortune this time. Better luck next cookie! Sorry, no fortune this time. Better luck next cookie!
Spare your scrolls of make-edible until it's really necessary! Spare your scrolls of make-edible until it's really necessary!
Sticks and stones may break your bones but manes will never hurt you.
Stormbringer doesn't steal souls. People steal souls. Stormbringer doesn't steal souls. People steal souls.
Suddenly, the dungeon will collapse... Suddenly, the dungeon will collapse...
Taming a mail daemon may cause a system security violation. Taming a mail daemon may cause a system security violation.
@@ -165,6 +166,7 @@ The longer the wand the better.
The magic word is "XYZZY". The magic word is "XYZZY".
The meek shall inherit your bones files. The meek shall inherit your bones files.
The mines are dark and deep, and I have levels to go before I sleep. The mines are dark and deep, and I have levels to go before I sleep.
The more you use the E word, the better.
The use of dynamite is dangerous. The use of dynamite is dangerous.
There are no worms in the UNIX version. There are no worms in the UNIX version.
There is a trap on this level! There is a trap on this level!
+8 -6
View File
@@ -10,17 +10,19 @@
# #
# #
%title The Colour of Magic (2) %title The Colour of Magic (2)
# p. 67 (Signet edition)
%passage 1 %passage 1
It has been remarked before that those who are sensitive to radiation in It has been remarked before that those who are sensitive to radiations in
the far octarine - the eighth colour, the pigment of the Imagination - can the far octarine--the eighth colour, the pigment of the Imagination--can
see things that others cannot. see things that others cannot.
Thus it was that Rincewind, hurrying through the crowded, flare-lit, Thus it was that Rincewind, hurrying through the crowded, flare-lit,
evening bazarrs of Morpork with the Luggage trundling behind him, jostled a evening bazaars of Morpork with the Luggage trundling behind him, jostled
tall figure, turned to deliver a few suitable curses, and beheld Death. a tall dark figure, turned to deliver a few suitable curses, and beheld
Death.
It had to be Death. No-one else went around with empty eye sockets and, of It had to be Death. No-one else went around with empty eye sockets and,
course, the scythe over one shoulder was another clue. of course, the scythe over one shoulder was another clue. [...]
[The Colour of Magic, by Terry Pratchett] [The Colour of Magic, by Terry Pratchett]
%e passage 1 %e passage 1
+18 -6
View File
@@ -1,11 +1,11 @@
.\" $NHDT-Branch: master $:$NHDT-Revision: 1.188 $ $NHDT-Date: 1449420465 2015/12/06 16:47:45 $ .\" $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.191 $ $NHDT-Date: 1450306152 2015/12/16 22:49:12 $
.ds h0 "NetHack Guidebook .ds h0 "NetHack Guidebook
.ds h1 .ds h1
.ds h2 % .ds h2 %
.ds vr "NetHack 3.6 .ds vr "NetHack 3.6
.ds f0 "\*(vr .ds f0 "\*(vr
.ds f1 .ds f1
.ds f2 "December 7, 2015 .ds f2 "December 16, 2015
.\" labeled paragraph start (should be part of tmac.n, but I don't want to .\" labeled paragraph start (should be part of tmac.n, but I don't want to
.\" make changes to that file) .\" make changes to that file)
.\" .PS word .\" .PS word
@@ -1970,6 +1970,9 @@ The default is to randomly pick an appropriate alignment.
If you prefix a `!' or ``no'' to the value, you can If you prefix a `!' or ``no'' to the value, you can
exclude that alignment from being picked randomly. exclude that alignment from being picked randomly.
Cannot be set with the `O' command. Persistent. Cannot be set with the `O' command. Persistent.
.lp autodescribe
Automatically describe the terrain under cursor when asked to get a location
on the map.
.lp autodig .lp autodig
Automatically dig if you are wielding a digging tool and moving into a place Automatically dig if you are wielding a digging tool and moving into a place
that can be dug (default false). Persistent. that can be dug (default false). Persistent.
@@ -2457,6 +2460,7 @@ and prior versions (ex. ``suppress_alert:3.3.1'').
.lp symset .lp symset
This option may be used to select one of the named symbol sets found within This option may be used to select one of the named symbol sets found within
``symbols'' to alter the symbols displayed on the screen. ``symbols'' to alter the symbols displayed on the screen.
Use ``symset:default'' to explicitly select the default symbols.
.lp "time " .lp "time "
Show the elapsed game time in turns on bottom line (default off). Persistent. Show the elapsed game time in turns on bottom line (default off). Persistent.
.lp timed_delay .lp timed_delay
@@ -2667,7 +2671,8 @@ Regular expressions are normally POSIX extended regular expressions. It is
possible to compile NetHack without regular expression support on a platform possible to compile NetHack without regular expression support on a platform
where there is no regular expression library. While this is not true of any where there is no regular expression library. While this is not true of any
modern platform, if your NetHack was built this way, patterns are instead glob modern platform, if your NetHack was built this way, patterns are instead glob
patterns. patterns. This applies to Autopickup exceptions, Message types, Menu colors,
and User sounds.
.hn 2 .hn 2
Configuring Autopickup Exceptions Configuring Autopickup Exceptions
.pg .pg
@@ -3481,15 +3486,22 @@ with some of the beloved community patches. Many bugs were fixed and a
large amount of code was restructured. large amount of code was restructured.
.pg .pg
\fBThe development team, as well as \fBSteve VanDevender\fP and \fBThe development team, as well as \fBSteve VanDevender\fP and
\fBKevin Smolkowski\fP ensured that NetHack 3.6.0 continued to operate on \fBKevin Smolkowski\fP ensured that NetHack 3.6 continued to operate on
various Unix flavors and maintained the X11 interface. various Unix flavors and maintained the X11 interface.
.pg .pg
\fBKen Lorber\fP, \fBHaoyang Wang\fP, \fBPat Rankin\fP, and \fBDean Luick\fP \fBKen Lorber\fP, \fBHaoyang Wang\fP, \fBPat Rankin\fP, and \fBDean Luick\fP
maintained the port of NetHack 3.6.0 for Mac. maintained the port of NetHack 3.6 for Mac.
.pg .pg
\fBMichael Allison\fP, \fBDerek S. Ray\fP, \fBYitzhak Sapir\fP, \fBMichael Allison\fP, \fBDerek S. Ray\fP, \fBYitzhak Sapir\fP,
\fBAlex Kompel\fP, and \fBDion Nicolaas\fP maintained the port of \fBAlex Kompel\fP, and \fBDion Nicolaas\fP maintained the port of
NetHack 3.6.0 for Microsoft Windows. NetHack 3.6 for Microsoft Windows.
.pg
The 3.6 development team consisting of
\fBMichael Allison\fP, \fBWarwick Allison\fP, \fBKen Arromdee\fP,
\fBDavid Cohrs\fP, \fBJessie Collet\fP, \fBSean Hunt\fP,
\fBPasi Kallinen\fP, \fBKen Lorber\fP, \fBDean Luick\fP, \fBPat Rankin\fP,
\fBMike Stephenson\fP, \fBDerek S. Ray\fP, \fBJanet Walz\fP, and \fBPaul Winner\fP
released 3.6.1 as a bug fix release in January 2016.
.pg .pg
The official NetHack web site is maintained by \fBKen Lorber\fP at http://www.nethack.org/. The official NetHack web site is maintained by \fBKen Lorber\fP at http://www.nethack.org/.
.pg .pg
+21 -7
View File
@@ -1,5 +1,5 @@
\documentstyle[titlepage,longtable]{article} \documentstyle[titlepage,longtable]{article}
% NetHack 3.6 Guidebook.tex $NHDT-Date: 1431192762 2015/05/09 17:32:42 $ $NHDT-Branch: master $:$NHDT-Revision: 1.60 $ */ % NetHack 3.6 Guidebook.tex $NHDT-Date: 1431192762 2015/12/16 17:32:42 $ $NHDT-Branch: master $:$NHDT-Revision: 1.60 $ */
%+% we're still limping along in LaTeX 2.09 compatibility mode %+% we're still limping along in LaTeX 2.09 compatibility mode
%-%\documentclass{article} %-%\documentclass{article}
%-%\usepackage{hyperref} % before longtable %-%\usepackage{hyperref} % before longtable
@@ -45,7 +45,7 @@
%.au %.au
\author{Original version - Eric S. Raymond\\ \author{Original version - Eric S. Raymond\\
(Edited and expanded for 3.6 by Mike Stephenson and others)} (Edited and expanded for 3.6 by Mike Stephenson and others)}
\date{December 7, 2015} \date{December 16, 2015}
\maketitle \maketitle
@@ -2377,6 +2377,10 @@ If you prefix `{\tt !}' or ``{\tt no}'' to the value, you can
exclude that alignment from being picked randomly. exclude that alignment from being picked randomly.
Cannot be set with the `{\tt O}' command. Persistent. Cannot be set with the `{\tt O}' command. Persistent.
%.lp %.lp
\item[\ib{autodescribe}]
Automatically describe the terrain under cursor when asked to get a location
on the map.
%.lp
\item[\ib{autodig}] \item[\ib{autodig}]
Automatically dig if you are wielding a digging tool and moving into a place Automatically dig if you are wielding a digging tool and moving into a place
that can be dug (default false). Persistent. that can be dug (default false). Persistent.
@@ -2944,6 +2948,7 @@ and prior versions (ex.\ ``{\tt suppress\verb+_+alert:3.3.1}'')
\item[\ib{symset}] \item[\ib{symset}]
This option may be used to select one of the named symbol sets found within This option may be used to select one of the named symbol sets found within
{\tt symbols} to alter the symbols displayed on the screen. {\tt symbols} to alter the symbols displayed on the screen.
Use ``{\tt symset:default}'' to explicitly select the default symbols.
%.lp %.lp
\item[\ib{time}] \item[\ib{time}]
Show the elapsed game time in turns on bottom line (default off). Persistent. Show the elapsed game time in turns on bottom line (default off). Persistent.
@@ -3223,7 +3228,8 @@ Regular expressions are normally POSIX extended regular expressions. It is
possible to compile NetHack without regular expression support on a platform where possible to compile NetHack without regular expression support on a platform where
there is no regular expression library. While this is not true of any modern there is no regular expression library. While this is not true of any modern
platform, if your NetHack was built this way, patterns are instead glob platform, if your NetHack was built this way, patterns are instead glob
patterns. patterns. This applies to Autopickup exceptions, Message types, Menu colors,
and User sounds.
%.hn 2 %.hn 2
\subsection*{Configuring Autopickup Exceptions} \subsection*{Configuring Autopickup Exceptions}
@@ -4180,22 +4186,30 @@ version merges work done by the development team since the previous release
with some of the beloved community patches. Many bugs were fixed and a with some of the beloved community patches. Many bugs were fixed and a
large amount of code was restructured. large amount of code was restructured.
%.pg %.pg
\medskip \medskip
The development team, as well as {\it Steve VanDevender} and The development team, as well as {\it Steve VanDevender} and
{\it Kevin Smolkowski} ensured that NetHack 3.6.0 continued to operate on {\it Kevin Smolkowski} ensured that NetHack 3.6 continued to operate on
various Unix flavors and maintained the X11 interface. various Unix flavors and maintained the X11 interface.
%.pg %.pg
{\it Ken Lorber}, {\it Haoyang Wang}, {\it Pat Rankin}, and {\it Dean Luick} {\it Ken Lorber}, {\it Haoyang Wang}, {\it Pat Rankin}, and {\it Dean Luick}
maintained the port of NetHack 3.6.0 for Mac. maintained the port of NetHack 3.6 for Mac.
%.pg %.pg
\medskip \medskip
{\it Michael Allison}, {\it Derek S. Ray}, {\it Yitzhak Sapir}, {\it Michael Allison}, {\it Derek S. Ray}, {\it Yitzhak Sapir},
{\it Alex Kompel}, and {\it Dion Nicolaas} maintained the port of {\it Alex Kompel}, and {\it Dion Nicolaas} maintained the port of
NetHack 3.6.0 for Microsoft Windows. NetHack 3.6 for Microsoft Windows.
%.pg
\medskip
The 3.6 development team consisting of
{\it Michael Allison}, {\it Warwick Allison}, {\it Ken Arromdee},
{\it David Cohrs}, {\it Jessie Collet}, {\it Sean Hunt},
{\it Pasi Kallinen}, {\it Ken Lorber}, {\it Dean Luick}, {\it Pat Rankin},
{\it Mike Stephenson}, {\it Derek S. Ray}, {\it Janet Walz}, and {\it Paul Winner}
released 3.6.1 as a bug fix release in January 2016.
%.pg %.pg
\medskip \medskip
+24
View File
@@ -15,10 +15,33 @@ support explicit 'symset:default' and 'symset:Default symbols' in options
crash during startup if player name set as 'player' in defaults crash during startup if player name set as 'player' in defaults
any existing vampire shape-shifted into critter (fog cloud, bat, wolf) became any existing vampire shape-shifted into critter (fog cloud, bat, wolf) became
an unkillable critter if vampires were genocided an unkillable critter if vampires were genocided
unlike in previous versions, an uncursed scroll of enchant armor failed to
uncurse the piece of armor being enchanted (change was unintentional)
slice of {pizza,cake,&} pluralized as "slouse of ..." due to false match
with "lice" (discovered pre-3.6.0-release)
change dipping prompt to not ignore 'called' and 'named' attributes of item
to be dipped
avoid 'the unlabeled {scroll,spellbook} fades' when blank item is hit by water
wrong message given when high priest on astral plane rejects being assigned a
name (got the one for unique monsters instead of the one for priests)
negative intrinsic protection shouldn't confer MC=1, "you are warded" (not
possible from divine protection but is possible from eating rings)
make a slight adjustment to the quickmimic() sense wording
fix typo in passage 1 of The Colour of Magic
falling asleep when reading dull spellbook ignored sleep resistance
getpos() complaint about invalid movement keystroke didn't describe meta-chars
accurately
'realtime' value in xlogfile was incorrect if 'checkpoint' option was active
make a previously-discovered scroll written with marker while blind have its
label known so it can be read while blind
#name or C for discoveries list that spanned multiple pages would exit on
space instead of advancing to next page (workaround: use '>' instead)
Platform- and/or Interface-Specific Fixes Platform- and/or Interface-Specific Fixes
----------------------------------------- -----------------------------------------
tty: M-N gave "Unknown command 'M-" with "'." finishing the sentence on the
line below it, leaving bogus '.' displayed on the top row of the map
unix/X11: in top level Makefile, some commented out definitions of VARDATND unix/X11: in top level Makefile, some commented out definitions of VARDATND
misspelled pilemark.xbm (as pilemark.xpm) misspelled pilemark.xbm (as pilemark.xpm)
win32gui: getversionstring() was overflowing the provided Help About buffer win32gui: getversionstring() was overflowing the provided Help About buffer
@@ -32,6 +55,7 @@ X11: core bug for '`' (backtick) command was only noticed by X11 interface,
General New Features General New Features
-------------------- --------------------
naming Sting or Orcrist now breaks illiterate conduct naming Sting or Orcrist now breaks illiterate conduct
different feedback for reading a scroll of mail created by writing with marker
Platform- and/or Interface-Specific New Features Platform- and/or Interface-Specific New Features
+20 -5
View File
@@ -1,5 +1,5 @@
.TH RECOVER 6 "7 December 2015" .TH RECOVER 6 "9 January 1993"
.\" NetHack 3.6 recover.6 $NHDT-Date: 1449616497 2015/12/08 23:14:57 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.7 $ .\" NetHack 3.6 recover.6 $NHDT-Date: 1450129883 2015/12/14 21:51:23 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.8 $
.UC 4 .UC 4
.SH NAME .SH NAME
recover \- recover a NetHack game interrupted by disaster recover \- recover a NetHack game interrupted by disaster
@@ -34,11 +34,26 @@ It overrides the value from NETHACKDIR, HACKDIR, or the directory
specified by the game administrator during compilation specified by the game administrator during compilation
(usually /usr/games/lib/nethackdir). (usually /usr/games/lib/nethackdir).
.PP .PP
^?ALLDOCS
For recovery to be possible, For recovery to be possible,
the run-time option .I nethack
must have been compiled with the INSURANCE option, and the run-time option
.I checkpoint .I checkpoint
must have been on. must also have been on.
.PP ^:
^?INSURANCE
For recovery to be possible,
.I nethack
must have been compiled with the INSURANCE option (this configuration was),
and the run-time option
.I checkpoint
must also have been on.
^:
This configuration of
.I nethack
was created without support for recovery.
^.
^.
NetHack normally writes out files for levels as the player leaves them, NetHack normally writes out files for levels as the player leaves them,
so they will be ready for return visits. so they will be ready for return visits.
When checkpointing, NetHack also writes out the level entered and When checkpointing, NetHack also writes out the level entered and
+107 -56
View File
@@ -1,81 +1,132 @@
RECOVER(6) RECOVER(6)
RECOVER(6) 1993 RECOVER(6)
NAME NAME
recover - recover a NetHack game interrupted by disaster recover - recover a NetHack game interrupted by disaster
SYNOPSIS SYNOPSIS
recover [ -d directory ] base1 base2 ... recover [ -d directory ] base1 base2 ...
DESCRIPTION DESCRIPTION
Occasionally, a NetHack game will be interrupted by disaster when the Occasionally, a NetHack game will be interrupted by disaster
game or the system crashes. Prior to NetHack v3.1, these games were when the game or the system crashes. Prior to NetHack v3.1,
lost because various information like the player's inventory was kept these games were lost because various information like the
only in memory. Now, all pertinent information can be written out to player's inventory was kept only in memory. Now, all per-
disk, so such games can be recovered at the point of the last level tinent information can be written out to disk, so such games
change. can be recovered at the point of the last level change.
The base options tell recover which files to process. Each base option The base options tell recover which files to process. Each
specifies recovery of a separate game. base option specifies recovery of a separate game.
The -d option, which must be the first argument if it appears, supplies The -d option, which must be the first argument if it
a directory which is the NetHack playground. It overrides the value appears, supplies a directory which is the NetHack play-
from NETHACKDIR, HACKDIR, or the directory specified by the game admin- ground. It overrides the value from NETHACKDIR, HACKDIR, or
istrator during compilation (usually /usr/games/lib/nethackdir). the directory specified by the game administrator during
compilation (usually /usr/games/lib/nethackdir).
For recovery to be possible, the run-time option checkpoint must have For recovery to be possible, nethack must have been compiled
been on. with the INSURANCE option, and the run-time option check-
point must also have been on. NetHack normally writes out
files for levels as the player leaves them, so they will be
ready for return visits. When checkpointing, NetHack also
writes out the level entered and the current game state on
every level change. This naturally slows level changes down
somewhat.
NetHack normally writes out files for levels as the player leaves them, The level file names are of the form base.nn, where nn is an
so they will be ready for return visits. When checkpointing, NetHack internal bookkeeping number for the level. The file base.0
also writes out the level entered and the current game state on every is used for game identity, locking, and, when checkpointing,
level change. This naturally slows level changes down somewhat. for the game state. Various OSes use different strategies
for constructing the base name. Microcomputers use the
character name, possibly truncated and modified to be a
legal filename on that system. Multi-user systems use the
(modified) character name prefixed by a user number to avoid
conflicts, or "xlock" if the number of concurrent players is
being limited. It may be necessary to look in the play-
ground to find the correct base name of the interrupted
game. recover will transform these level files into a save
file of the same name as nethack would have used.
The level file names are of the form base.nn, where nn is an internal Since recover must be able to read and delete files from the
bookkeeping number for the level. The file base.0 is used for game playground and create files in the save directory, it has
identity, locking, and, when checkpointing, for the game state. Vari- interesting interactions with game security. Giving ordi-
ous OSes use different strategies for constructing the base name. nary players access to recover through setuid or setgid is
Microcomputers use the character name, possibly truncated and modified tantamount to leaving the playground world-writable, with
to be a legal filename on that system. Multi-user systems use the respect to both cheating and messing up other players. For
(modified) character name prefixed by a user number to avoid conflicts,
or "xlock" if the number of concurrent players is being limited. It
may be necessary to look in the playground to find the correct base
name of the interrupted game. recover will transform these level files
into a save file of the same name as nethack would have used.
Since recover must be able to read and delete files from the playground
and create files in the save directory, it has interesting interactions
with game security. Giving ordinary players access to recover through
setuid or setgid is tantamount to leaving the playground world-
writable, with respect to both cheating and messing up other players.
For a single-user system, this of course does not change anything, so
some of the microcomputer ports install recover by default.
For a multi-user system, the game administrator may want to arrange for
all .0 files in the playground to be fed to recover when the host January Last change: 9 1
machine boots, and handle game crashes individually. If the user popu-
lation is sufficiently trustworthy, recover can be installed with the
same permissions the nethack executable has. In either case, recover
is easily compiled from the distribution utility directory.
RECOVER(6) 1993 RECOVER(6)
a single-user system, this of course does not change any-
thing, so some of the microcomputer ports install recover by
default.
For a multi-user system, the game administrator may want to
arrange for all .0 files in the playground to be fed to
recover when the host machine boots, and handle game crashes
individually. If the user population is sufficiently
trustworthy, recover can be installed with the same permis-
sions the nethack executable has. In either case, recover
is easily compiled from the distribution utility directory.
NOTES NOTES
Like nethack itself, recover will overwrite existing savefiles of the Like nethack itself, recover will overwrite existing save-
same name. Savefiles created by recover are uncompressed; they may be files of the same name. Savefiles created by recover are
compressed afterwards if desired, but even a compression-using nethack uncompressed; they may be compressed afterwards if desired,
will find them in the uncompressed form. but even a compression-using nethack will find them in the
uncompressed form.
SEE ALSO SEE ALSO
nethack(6) nethack(6)
BUGS BUGS
recover makes no attempt to find out if a base name specifies a game in recover makes no attempt to find out if a base name speci-
progress. If multiple machines share a playground, this would be fies a game in progress. If multiple machines share a play-
impossible to determine. ground, this would be impossible to determine.
recover should be taught to use the nethack playground locking mecha- recover should be taught to use the nethack playground lock-
nism to avoid conflicts. ing mechanism to avoid conflicts.
January Last change: 9 2
4th Berkeley Distribution 7 December 2015 RECOVER(6)
+1
View File
@@ -212,6 +212,7 @@ struct instance_flags {
boolean use_status_hilites; /* use color in status line */ boolean use_status_hilites; /* use color in status line */
boolean use_background_glyph; /* use background glyph when appropriate */ boolean use_background_glyph; /* use background glyph when appropriate */
boolean hilite_pile; /* mark piles of objects with a hilite */ boolean hilite_pile; /* mark piles of objects with a hilite */
boolean autodescribe; /* autodescribe mode in getpos() */
#if 0 #if 0
boolean DECgraphics; /* use DEC VT-xxx extended character set */ boolean DECgraphics; /* use DEC VT-xxx extended character set */
boolean IBMgraphics; /* use IBM extended character set */ boolean IBMgraphics; /* use IBM extended character set */
+3 -3
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 global.h $NHDT-Date: 1449116298 2015/12/03 04:18:18 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.46 $ */ /* NetHack 3.6 global.h $NHDT-Date: 1450306170 2015/12/16 22:49:30 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.47 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -7,9 +7,9 @@
#include <stdio.h> #include <stdio.h>
/* #define BETA */ /* development or beta testing [MRS] */ #define BETA /* development or beta testing [MRS] */
/* #define DEBUG */ #define DEBUG
/* /*
* Files expected to exist in the playground directory. * Files expected to exist in the playground directory.
+2 -2
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 obj.h $NHDT-Date: 1445126423 2015/10/18 00:00:23 $ $NHDT-Branch: master $:$NHDT-Revision: 1.50 $ */ /* NetHack 3.6 obj.h $NHDT-Date: 1450306176 2015/12/16 22:49:36 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.51 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -111,7 +111,7 @@ struct obj {
int corpsenm; /* type of corpse is mons[corpsenm] */ int corpsenm; /* type of corpse is mons[corpsenm] */
#define leashmon corpsenm /* gets m_id of attached pet */ #define leashmon corpsenm /* gets m_id of attached pet */
#define fromsink corpsenm /* a potion from a sink */ #define fromsink corpsenm /* a potion from a sink */
#define novelidx corpsenm /* 3.6.0 tribute - the index of the novel title */ #define novelidx corpsenm /* 3.6 tribute - the index of the novel title */
#define record_achieve_special corpsenm #define record_achieve_special corpsenm
int usecount; /* overloaded for various things that tally */ int usecount; /* overloaded for various things that tally */
#define spestudied usecount /* # of times a spellbook has been studied */ #define spestudied usecount /* # of times a spellbook has been studied */
+10 -5
View File
@@ -1,19 +1,19 @@
/* NetHack 3.6 patchlevel.h $NHDT-Date: 1447755971 2015/11/17 10:26:11 $ $NHDT-Branch: master $:$NHDT-Revision: 1.112 $ */ /* NetHack 3.6 patchlevel.h $NHDT-Date: 1450306740 2015/12/16 22:59:00 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.115 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
/* NetHack 3.6.0 */ /* NetHack 3.6.1 */
#define VERSION_MAJOR 3 #define VERSION_MAJOR 3
#define VERSION_MINOR 6 #define VERSION_MINOR 6
/* /*
* PATCHLEVEL is updated for each release. * PATCHLEVEL is updated for each release.
*/ */
#define PATCHLEVEL 0 #define PATCHLEVEL 1
/* /*
* Incrementing EDITLEVEL can be used to force invalidation of old bones * Incrementing EDITLEVEL can be used to force invalidation of old bones
* and save files. * and save files.
*/ */
#define EDITLEVEL 2 #define EDITLEVEL 0
#define COPYRIGHT_BANNER_A "NetHack, Copyright 1985-2015" #define COPYRIGHT_BANNER_A "NetHack, Copyright 1985-2015"
#define COPYRIGHT_BANNER_B \ #define COPYRIGHT_BANNER_B \
@@ -30,11 +30,16 @@
* PP = patch level, ee = edit level, L = literal suffix "L", * PP = patch level, ee = edit level, L = literal suffix "L",
* with all four numbers specified as two hexadecimal digits. * with all four numbers specified as two hexadecimal digits.
*/ */
/* #define VERSION_COMPATIBILITY 0x03050000L */ #define VERSION_COMPATIBILITY 0x03060002L
/****************************************************************************/ /****************************************************************************/
/* Version 3.6.x */ /* Version 3.6.x */
/* Patch 1, [insert date here]
* A couple of dozen bug fixes.
*
*/
/* /*
* NetHack 3.6.0, December 7, 2015 * NetHack 3.6.0, December 7, 2015
* *
+127
View File
@@ -1,4 +1,131 @@
/* clang-format off */ /* clang-format off */
/* XPM */
static const char *blind_xpm[] = {
/* width height ncolors chars_per_pixel */
"40 40 5 1",
/* colors */
" c #000000",
". c None",
"X c #909090",
"o c #606060",
"O c #303030",
/* pixels */
"........................................",
"........................................",
"........................................",
"........................................",
"........................................",
"........................................",
"........................................",
"........................................",
"........................................",
"........................................",
"........................................",
"........................................",
"....ooooooooooooooooooooooooooooooooX...",
".... o...",
".... o...",
".... o...",
".... o...",
"......o ..o ......",
"......X O..X O......",
"....... o... o......",
".......o ....o .......",
"........O X.....O X.......",
".........O X.......O X........",
"..........o OX.........o OX.........",
"........................................",
"........................................",
"........................................",
"........................................",
"........................................",
"........................................",
"........................................",
"........................................",
"........................................",
"........................................",
"........................................",
"........................................",
"........................................",
"........................................",
"........................................",
"........................................"
};
/* XPM */
static const char *cha_xpm[] = {
/* width height ncolors chars_per_pixel */
"40 40 14 1",
/* colors */
" c #F85848",
". c #949E9E",
"X c #F8B090",
"o c #E00028",
"O c #D4D4D4",
"+ c None",
"@ c #B0B0B0",
"# c #F82C24",
"$ c #F89E6C",
"% c #FF0000",
"& c #909090",
"* c #FFFFFF",
"= c #CEAA90",
"- c #DADAB6",
/* pixels */
"++++++++++++++++++++++++++++++++++++++++",
"++++++++++++++++++++++++++++++++++++++++",
"++++++++++++++++++++++++++++++++++++++++",
"++++++++++++++++++++++++++++++++++++++++",
"++++++++++++++++++++++++++++++++++++++++",
"++++++++++++++++++++++++++++++++++++++++",
"++++++++++++++++++++++++++++++++++++++++",
"++++++++++++++++++++++++++++++++++++++++",
"++++++++++++++++++++++++++++++++++++++++",
"++++++++++++++++++++++++++++++++++++++++",
"++++++++++++++++++++++++++++++++++++++++",
"++++++++++++++++++++++++++++++++++++++++",
"+++++++++++++++=#%#=+=#%% ++++++++++++++",
"++++++++++++++ %O%%%#%$$%o%=++++++++++++",
"+++++++++++++# +#%%o%%o%%%%% +++++++++++",
"+++++++++++ %%%%%%%%%%%%%%%%o#=+++++++++",
"+++++++++ o%%%%%%%%%%%%%%%%%%%%# +++++++",
"++++++ #%%%%%%o%%%o%%o%%o%o%%%%%o%o +++",
"++=#%%o%%%#= =*+**O*+**O*+- = =%%%%#@+++",
"++++ %=++*+*+**O****O****O*O*O*OO%=+++++",
"+++++.%=OO+*O*OO****+****+*O*+O&%=@+++++",
"++++++=%=*OO+**O**O*O**O*O*OO+$%=+++++++",
"+++++++#% +*OOOO****+****@O+*#%=++++++++",
"++++++++#%#*+**+O+OO+O+OOO*O#o#+++++++++",
"+++++++++o% O**+****O****O*#%%=+++++++++",
"+++++++++ %%#O*O****+****+ %o#++++++++++",
"++++++++++o%% XO*O**O*O**#%%%+++++++++++",
"++++++++++ %%%o%$-**+**$%%%%=+++++++++++",
"+++++++++++o%%$X$%%%%%%#= o#++++++++++++",
"++++++++++@ %%%o#O$$+$$$%%%=++++++++++++",
"++++++++++++#o%%%%%%%%o%%%=@++++++++++++",
"+++++++++++++ %%%%%%%%%%o=++++++++++++++",
"+++++++++++++++= & & @++++++++++++++++",
"++++++++++++++++++++++++++++++++++++++++",
"++++++++++++++++++++++++++++++++++++++++",
"++++++++++++++++++++++++++++++++++++++++",
"++++++++++++++++++++++++++++++++++++++++",
"++++++++++++++++++++++++++++++++++++++++",
"++++++++++++++++++++++++++++++++++++++++",
"++++++++++++++++++++++++++++++++++++++++"
};
/* XPM */
static const char *chaotic_xpm[] = {
/* width height ncolors chars_per_pixel */
"40 40 9 1",
/* colors */
" c #000000",
". c #5C7A7A",
"X c None",
"o c #B0B0B0",
"O c #909090",
"+ c #788C8C",
"@ c #606060",
"# c #FFFFFF",
"$ c #303030",
/* pixels */ /* pixels */
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+6 -5
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 you.h $NHDT-Date: 1432512782 2015/05/25 00:13:02 $ $NHDT-Branch: master $:$NHDT-Revision: 1.29 $ */ /* NetHack 3.6 you.h $NHDT-Date: 1450231172 2015/12/16 01:59:32 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.30 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -68,10 +68,11 @@ struct u_achieve {
}; };
struct u_realtime { struct u_realtime {
long long realtime; /* accumulated playing time in seconds */
realtime; /* actual playing time up until the last restore, seconds */ time_t start_timing; /* time game was started or restored or 'realtime'
time_t restored; /* time the game was started or restored */ was last updated (savegamestate for checkpoint) */
time_t endtime; time_t finish_time; /* end of 'realtime' interval: time of save or
end of game; used for topten/logfile/xlogfile */
}; };
/* KMH, conduct -- /* KMH, conduct --
+3 -8
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 allmain.c $NHDT-Date: 1446975459 2015/11/08 09:37:39 $ $NHDT-Branch: master $:$NHDT-Revision: 1.66 $ */ /* NetHack 3.6 allmain.c $NHDT-Date: 1450231173 2015/12/16 01:59:33 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.67 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -587,18 +587,13 @@ newgame()
com_pager(1); com_pager(1);
} }
urealtime.realtime = 0L;
urealtime.start_timing = getnow();
#ifdef INSURANCE #ifdef INSURANCE
save_currentstate(); save_currentstate();
#endif #endif
program_state.something_worth_saving++; /* useful data now exists */ program_state.something_worth_saving++; /* useful data now exists */
urealtime.realtime = 0L;
#if defined(BSD) && !defined(POSIX_TYPES)
(void) time((long *) &urealtime.restored);
#else
(void) time(&urealtime.restored);
#endif
/* Success! */ /* Success! */
welcome(TRUE); welcome(TRUE);
return; return;
+9 -6
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 bones.c $NHDT-Date: 1449269914 2015/12/04 22:58:34 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.66 $ */ /* NetHack 3.6 bones.c $NHDT-Date: 1450261363 2015/12/16 10:22:43 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.67 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985,1993. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985,1993. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -118,15 +118,18 @@ boolean restore;
free_oname(otmp); free_oname(otmp);
} }
if (otmp->otyp == SLIME_MOLD) if (otmp->otyp == SLIME_MOLD) {
goodfruit(otmp->spe); goodfruit(otmp->spe);
#ifdef MAIL #ifdef MAIL
else if (otmp->otyp == SCR_MAIL) } else if (otmp->otyp == SCR_MAIL) {
otmp->spe = 1; /* 0: delivered in-game via external event;
1: from bones or wishing; 2: written with marker */
if (otmp->spe == 0)
otmp->spe = 1;
#endif #endif
else if (otmp->otyp == EGG) } else if (otmp->otyp == EGG) {
otmp->spe = 0; otmp->spe = 0;
else if (otmp->otyp == TIN) { } else if (otmp->otyp == TIN) {
/* make tins of unique monster's meat be empty */ /* make tins of unique monster's meat be empty */
if (otmp->corpsenm >= LOW_PM if (otmp->corpsenm >= LOW_PM
&& unique_corpstat(&mons[otmp->corpsenm])) && unique_corpstat(&mons[otmp->corpsenm]))
+19 -37
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 cmd.c $NHDT-Date: 1449736557 2015/12/10 08:35:57 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.208 $ */ /* NetHack 3.6 cmd.c $NHDT-Date: 1450178549 2015/12/15 11:22:29 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.209 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -107,7 +107,7 @@ extern int NDECL(dowield); /**/
extern int NDECL(dowieldquiver); /**/ extern int NDECL(dowieldquiver); /**/
extern int NDECL(dozap); /**/ extern int NDECL(dozap); /**/
extern int NDECL(doorganize); /**/ extern int NDECL(doorganize); /**/
#endif /* DUMB */ #endif /* DUMB */
static int NDECL(dosuspend_core); /**/ static int NDECL(dosuspend_core); /**/
@@ -3402,15 +3402,8 @@ register char *cmd;
register const struct func_tab *tlist; register const struct func_tab *tlist;
int res, NDECL((*func)); int res, NDECL((*func));
#if 0
/* obsolete - scan through the cmdlist array looking for *cmd */
for (tlist = cmdlist; tlist->f_char; tlist++) {
if ((*cmd & 0xff) != (tlist->f_char & 0xff))
continue;
#else
/* current - use *cmd to directly index cmdlist array */ /* current - use *cmd to directly index cmdlist array */
if ((tlist = Cmd.commands[*cmd & 0xff]) != 0) { if ((tlist = Cmd.commands[*cmd & 0xff]) != 0) {
#endif
if (u.uburied && !tlist->can_if_buried) { if (u.uburied && !tlist->can_if_buried) {
You_cant("do that while you are buried!"); You_cant("do that while you are buried!");
res = 0; res = 0;
@@ -3433,23 +3426,13 @@ register char *cmd;
} }
if (bad_command) { if (bad_command) {
char expcmd[10]; char expcmd[20]; /* we expect 'cmd' to point to 1 or 2 chars */
register char c, *cp = expcmd; register char c;
expcmd[0] = '\0';
while ((c = *cmd++) != '\0')
Strcat(expcmd, visctrl(c)); /* add 1..4 chars plus terminator */
while ((c = *cmd++) != '\0'
&& (int) (cp - expcmd) < (int) (sizeof expcmd - 3)) {
if (c >= 040 && c < 0177) {
*cp++ = c;
} else if (c & 0200) {
*cp++ = 'M';
*cp++ = '-';
*cp++ = c & ~0200;
} else {
*cp++ = '^';
*cp++ = c ^ 0100;
}
}
*cp = '\0';
if (!prefix_seen || !iflags.cmdassist if (!prefix_seen || !iflags.cmdassist
|| !help_dir(0, "Invalid direction key!")) || !help_dir(0, "Invalid direction key!"))
Norep("Unknown command '%s'.", expcmd); Norep("Unknown command '%s'.", expcmd);
@@ -3587,10 +3570,9 @@ retry:
if (!index(quitchars, dirsym)) { if (!index(quitchars, dirsym)) {
help_requested = (dirsym == '?'); help_requested = (dirsym == '?');
if (help_requested || iflags.cmdassist) { if (help_requested || iflags.cmdassist) {
did_help = did_help = help_dir((s && *s == '^') ? dirsym : 0,
help_dir((s && *s == '^') ? dirsym : 0, help_requested ? (const char *) 0
help_requested ? (const char *) 0 : "Invalid direction key!");
: "Invalid direction key!");
if (help_requested) if (help_requested)
goto retry; goto retry;
} }
@@ -4121,14 +4103,14 @@ char def;
iflags.last_msg = PLNMSG_UNKNOWN; /* most recent pline is clobbered */ iflags.last_msg = PLNMSG_UNKNOWN; /* most recent pline is clobbered */
/* maximum acceptable length is QBUFSZ-1 */ /* maximum acceptable length is QBUFSZ-1 */
if (strlen(query) < QBUFSZ) if (strlen(query) >= QBUFSZ) {
return (*windowprocs.win_yn_function)(query, resp, def); /* caller shouldn't have passed anything this long */
paniclog("Query truncated: ", query);
/* caller shouldn't have passed anything this long */ (void) strncpy(qbuf, query, QBUFSZ - 1 - 3);
paniclog("Query truncated: ", query); Strcpy(&qbuf[QBUFSZ - 1 - 3], "...");
(void) strncpy(qbuf, query, QBUFSZ - 1 - 3); query = qbuf;
Strcpy(&qbuf[QBUFSZ - 1 - 3], "..."); }
return (*windowprocs.win_yn_function)(qbuf, resp, def); return (*windowprocs.win_yn_function)(query, resp, def);
} }
/* for paranoid_confirm:quit,die,attack prompting */ /* for paranoid_confirm:quit,die,attack prompting */
+10 -11
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 do_name.c $NHDT-Date: 1449914085 2015/12/12 09:54:45 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.78 $ */ /* NetHack 3.6 do_name.c $NHDT-Date: 1450178550 2015/12/15 11:22:30 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.80 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -54,7 +54,7 @@ const char *goal;
putstr(tmpwin, 0, "Use [HJKL] to move the cursor 8 units at a time."); 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, "Or enter a background symbol (ex. <).");
putstr(tmpwin, 0, "Use @ to move the cursor on yourself."); putstr(tmpwin, 0, "Use @ to move the cursor on yourself.");
if (getpos_hilitefunc != NULL) if (getpos_hilitefunc)
putstr(tmpwin, 0, "Use $ to display valid locations."); putstr(tmpwin, 0, "Use $ to display valid locations.");
putstr(tmpwin, 0, "Use # to toggle automatic description."); putstr(tmpwin, 0, "Use # to toggle automatic description.");
/* disgusting hack; the alternate selection characters work for any /* disgusting hack; the alternate selection characters work for any
@@ -80,7 +80,6 @@ const char *goal;
int cx, cy, i, c; int cx, cy, i, c;
int sidx, tx, ty; int sidx, tx, ty;
boolean msg_given = TRUE; /* clear message window by default */ boolean msg_given = TRUE; /* clear message window by default */
boolean auto_msg = FALSE;
boolean show_goal_msg = FALSE; boolean show_goal_msg = FALSE;
static const char pick_chars[] = ".,;:"; static const char pick_chars[] = ".,;:";
const char *cp; const char *cp;
@@ -108,7 +107,7 @@ const char *goal;
curs(WIN_MAP, cx, cy); curs(WIN_MAP, cx, cy);
flush_screen(0); flush_screen(0);
show_goal_msg = FALSE; show_goal_msg = FALSE;
} else if (auto_msg && !msg_given && !hilite_state) { } else if (iflags.autodescribe && !msg_given && !hilite_state) {
coord cc; coord cc;
int sym = 0; int sym = 0;
char tmpbuf[BUFSZ]; char tmpbuf[BUFSZ];
@@ -132,7 +131,7 @@ const char *goal;
flush_screen(0); flush_screen(0);
} }
if (auto_msg) if (iflags.autodescribe)
msg_given = FALSE; msg_given = FALSE;
if (c == '\033') { if (c == '\033') {
@@ -197,7 +196,7 @@ const char *goal;
/* update message window to reflect that we're still targetting */ /* update message window to reflect that we're still targetting */
show_goal_msg = TRUE; show_goal_msg = TRUE;
msg_given = TRUE; msg_given = TRUE;
} else if ((c == '$') && (getpos_hilitefunc != NULL)) { } else if (c == '$' && getpos_hilitefunc) {
if (!hilite_state) { if (!hilite_state) {
(*getpos_hilitefunc)(0); (*getpos_hilitefunc)(0);
(*getpos_hilitefunc)(1); (*getpos_hilitefunc)(1);
@@ -205,11 +204,11 @@ const char *goal;
} }
goto nxtc; goto nxtc;
} else if (c == '#') { } else if (c == '#') {
auto_msg = !auto_msg; iflags.autodescribe = !iflags.autodescribe;
pline("Automatic description %sis %s.", pline("Automatic description %sis %s.",
flags.verbose ? "of features under cursor " : "", flags.verbose ? "of features under cursor " : "",
auto_msg ? "on" : "off"); iflags.autodescribe ? "on" : "off");
if (!auto_msg) if (!iflags.autodescribe)
show_goal_msg = TRUE; show_goal_msg = TRUE;
msg_given = TRUE; msg_given = TRUE;
goto nxtc; goto nxtc;
@@ -307,7 +306,7 @@ const char *goal;
clear_nhwindow(WIN_MESSAGE); clear_nhwindow(WIN_MESSAGE);
ccp->x = cx; ccp->x = cx;
ccp->y = cy; ccp->y = cy;
getpos_hilitefunc = NULL; getpos_hilitefunc = (void FDECL((*), (int))) 0;
return result; return result;
} }
@@ -463,7 +462,7 @@ do_mname()
/* unique monsters have their own specific names or titles; /* unique monsters have their own specific names or titles;
shopkeepers, temple priests and other minions use alternate shopkeepers, temple priests and other minions use alternate
name formatting routines which ignore any user-supplied name */ name formatting routines which ignore any user-supplied name */
if (mtmp->data->geno & G_UNIQ) if ((mtmp->data->geno & G_UNIQ) && !mtmp->ispriest)
pline("%s doesn't like being called names!", upstart(monnambuf)); pline("%s doesn't like being called names!", upstart(monnambuf));
else if (mtmp->isshk else if (mtmp->isshk
&& !(Deaf || mtmp->msleeping || !mtmp->mcanmove && !(Deaf || mtmp->msleeping || !mtmp->mcanmove
+5 -3
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 dogmove.c $NHDT-Date: 1446604109 2015/11/04 02:28:29 $ $NHDT-Branch: master $:$NHDT-Revision: 1.56 $ */ /* NetHack 3.6 dogmove.c $NHDT-Date: 1450061092 2015/12/14 02:44:52 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.57 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -1094,8 +1094,8 @@ struct monst *mtmp;
(on the other hand, perhaps you're sensing a brief glimpse (on the other hand, perhaps you're sensing a brief glimpse
of its mind as it changes form) */ of its mind as it changes form) */
newsym(mtmp->mx, mtmp->my); newsym(mtmp->mx, mtmp->my);
You("%s %s appear where %s was!", You("%s %s %sappear%s where %s was!",
cansee(mtmp->mx, mtmp->my) ? "see" : "sense", cansee(mtmp->mx, mtmp->my) ? "see" : "sense that",
(mtmp->m_ap_type == M_AP_FURNITURE) (mtmp->m_ap_type == M_AP_FURNITURE)
? an(defsyms[mtmp->mappearance].explanation) ? an(defsyms[mtmp->mappearance].explanation)
: (mtmp->m_ap_type == M_AP_OBJECT : (mtmp->m_ap_type == M_AP_OBJECT
@@ -1107,6 +1107,8 @@ struct monst *mtmp;
: (mtmp->m_ap_type == M_AP_MONSTER) : (mtmp->m_ap_type == M_AP_MONSTER)
? an(mons[mtmp->mappearance].mname) ? an(mons[mtmp->mappearance].mname)
: something, : something,
cansee(mtmp->mx, mtmp->my) ? "" : "has ",
cansee(mtmp->mx, mtmp->my) ? "" : "ed",
buf); buf);
display_nhwindow(WIN_MAP, TRUE); display_nhwindow(WIN_MAP, TRUE);
} }
+3 -3
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 end.c $NHDT-Date: 1448241780 2015/11/23 01:23:00 $ $NHDT-Branch: master $:$NHDT-Revision: 1.108 $ */ /* NetHack 3.6 end.c $NHDT-Date: 1450231174 2015/12/16 01:59:34 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.110 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -951,8 +951,8 @@ int how;
/* remember time of death here instead of having bones, rip, and /* remember time of death here instead of having bones, rip, and
topten figure it out separately and possibly getting different topten figure it out separately and possibly getting different
time or even day if player is slow responding to --More-- */ time or even day if player is slow responding to --More-- */
endtime = getnow(); urealtime.finish_time = endtime = getnow();
urealtime.realtime += (long) (endtime - urealtime.restored); urealtime.realtime += (long) (endtime - urealtime.start_timing);
/* Sometimes you die on the first move. Life's not fair. /* Sometimes you die on the first move. Life's not fair.
* On those rare occasions you get hosed immediately, go out * On those rare occasions you get hosed immediately, go out
+17 -13
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 hacklib.c $NHDT-Date: 1446336792 2015/11/01 00:13:12 $ $NHDT-Branch: master $:$NHDT-Revision: 1.44 $ */ /* NetHack 3.6 hacklib.c $NHDT-Date: 1450178551 2015/12/15 11:22:31 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.46 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* Copyright (c) Robert Patrick Rankin, 1991 */ /* Copyright (c) Robert Patrick Rankin, 1991 */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -373,20 +373,24 @@ char *
visctrl(c) visctrl(c)
char c; char c;
{ {
Static char ccc[3]; Static char ccc[5];
register int i = 0;
c &= 0177; if ((uchar) c & 0200) {
ccc[2] = '\0'; ccc[i++] = 'M';
if (c < 040) { ccc[i++] = '-';
ccc[0] = '^';
ccc[1] = c | 0100; /* letter */
} else if (c == 0177) {
ccc[0] = '^';
ccc[1] = c & ~0100; /* '?' */
} else {
ccc[0] = c; /* printable character */
ccc[1] = '\0';
} }
c &= 0177;
if (c < 040) {
ccc[i++] = '^';
ccc[i++] = c | 0100; /* letter */
} else if (c == 0177) {
ccc[i++] = '^';
ccc[i++] = c & ~0100; /* '?' */
} else {
ccc[i++] = c; /* printable character */
}
ccc[i] = '\0';
return ccc; return ccc;
} }
+2 -2
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 invent.c $NHDT-Date: 1447576348 2015/11/15 08:32:28 $ $NHDT-Branch: master $:$NHDT-Revision: 1.179 $ */ /* NetHack 3.6 invent.c $NHDT-Date: 1450306195 2015/12/16 22:49:55 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.180 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -820,7 +820,7 @@ have_lizard()
return FALSE; return FALSE;
} }
/* 3.6.0 tribute */ /* 3.6 tribute */
struct obj * struct obj *
u_have_novel() u_have_novel()
{ {
+23 -22
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 mail.c $NHDT-Date: 1436754892 2015/07/13 02:34:52 $ $NHDT-Branch: master $:$NHDT-Revision: 1.20 $ */ /* NetHack 3.6 mail.c $NHDT-Date: 1450261364 2015/12/16 10:22:44 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.22 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -11,25 +11,24 @@
* Notify user when new mail has arrived. Idea by Merlyn Leroy. * Notify user when new mail has arrived. Idea by Merlyn Leroy.
* *
* The mail daemon can move with less than usual restraint. It can: * The mail daemon can move with less than usual restraint. It can:
* - move diagonally from a door * - move diagonally from a door
* - use secret and closed doors * - use secret and closed doors
* - run through a monster ("Gangway!", etc.) * - run through a monster ("Gangway!", etc.)
* - run over pools & traps * - run over pools & traps
* *
* Possible extensions: * Possible extensions:
* - Open the file MAIL and do fstat instead of stat for efficiency. * - Open the file MAIL and do fstat instead of stat for efficiency.
* (But sh uses stat, so this cannot be too bad.) * (But sh uses stat, so this cannot be too bad.)
* - Examine the mail and produce a scroll of mail named "From somebody". * - Examine the mail and produce a scroll of mail named "From somebody".
* - Invoke MAILREADER in such a way that only this single letter is * - Invoke MAILREADER in such a way that only this single mail is read.
*read. * - Do something to the text when the scroll is enchanted or cancelled.
* - Do something to the text when the scroll is enchanted or cancelled. * - Make the daemon always appear at a stairwell, and have it find a
* - Make the daemon always appear at a stairwell, and have it find a * path to the hero.
* path to the hero.
* *
* Note by Olaf Seibert: On the Amiga, we usually don't get mail. So we go * Note by Olaf Seibert: On the Amiga, we usually don't get mail. So we go
* through most of the effects at 'random' moments. * through most of the effects at 'random' moments.
* Note by Paul Winner: The MSDOS port also 'fakes' the mail daemon at * Note by Paul Winner: The MSDOS port also 'fakes' the mail daemon at
* random intervals. * random intervals.
*/ */
STATIC_DCL boolean FDECL(md_start, (coord *)); STATIC_DCL boolean FDECL(md_start, (coord *));
@@ -418,9 +417,9 @@ ckmailstatus()
return; return;
} }
if (--mustgetmail <= 0) { if (--mustgetmail <= 0) {
static struct mail_info deliver = { MSG_MAIL, static struct mail_info deliver = {
"I have some mail for you", 0, MSG_MAIL, "I have some mail for you", 0, 0
0 }; };
newmail(&deliver); newmail(&deliver);
mustgetmail = -1; mustgetmail = -1;
} }
@@ -429,7 +428,7 @@ ckmailstatus()
/*ARGSUSED*/ /*ARGSUSED*/
void void
readmail(otmp) readmail(otmp)
struct obj *otmp; struct obj *otmp UNUSED;
{ {
static char *junk[] = { static char *junk[] = {
NULL, /* placeholder for "Report bugs to <devteam@nethack.org>.", */ NULL, /* placeholder for "Report bugs to <devteam@nethack.org>.", */
@@ -502,7 +501,7 @@ ckmailstatus()
/*ARGSUSED*/ /*ARGSUSED*/
void void
readmail(otmp) readmail(otmp)
struct obj *otmp; struct obj *otmp UNUSED;
{ {
#ifdef DEF_MAILREADER /* This implies that UNIX is defined */ #ifdef DEF_MAILREADER /* This implies that UNIX is defined */
register const char *mr = 0; register const char *mr = 0;
@@ -518,8 +517,8 @@ struct obj *otmp;
#else #else
#ifndef AMS /* AMS mailboxes are directories */ #ifndef AMS /* AMS mailboxes are directories */
display_file(mailbox, TRUE); display_file(mailbox, TRUE);
#endif /* AMS */ #endif /* AMS */
#endif /* DEF_MAILREADER */ #endif /* DEF_MAILREADER */
/* get new stat; not entirely correct: there is a small time /* get new stat; not entirely correct: there is a small time
window where we do not see new mail */ window where we do not see new mail */
@@ -585,6 +584,8 @@ struct obj *otmp;
vms_doshell(cmd, TRUE); vms_doshell(cmd, TRUE);
(void) sleep(1); (void) sleep(1);
} }
#else
nhUse(otmp);
#endif /* SHELL */ #endif /* SHELL */
} }
+2 -2
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 mhitu.c $NHDT-Date: 1446854230 2015/11/06 23:57:10 $ $NHDT-Branch: master $:$NHDT-Revision: 1.130 $ */ /* NetHack 3.6 mhitu.c $NHDT-Date: 1450016149 2015/12/13 14:15:49 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.131 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -827,7 +827,7 @@ struct monst *mon;
} else if (mc < 1) { } else if (mc < 1) {
/* intrinsic Protection is weaker (play balance; obtaining divine /* intrinsic Protection is weaker (play balance; obtaining divine
protection is too easy); it confers minimum mc 1 instead of 0 */ protection is too easy); it confers minimum mc 1 instead of 0 */
if ((is_you && ((HProtection && u.ublessed) || u.uspellprot)) if ((is_you && ((HProtection && u.ublessed > 0) || u.uspellprot))
/* aligned priests and angels have innate intrinsic Protection */ /* aligned priests and angels have innate intrinsic Protection */
|| (mon->data == &mons[PM_ALIGNED_PRIEST] || is_minion(mon->data))) || (mon->data == &mons[PM_ALIGNED_PRIEST] || is_minion(mon->data)))
mc = 1; mc = 1;
+3 -3
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 o_init.c $NHDT-Date: 1449588093 2015/12/08 15:21:33 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.21 $ */ /* NetHack 3.6 o_init.c $NHDT-Date: 1450318588 2015/12/17 02:16:28 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.22 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -688,8 +688,8 @@ rename_disco()
if (oclass != prev_class) { if (oclass != prev_class) {
any.a_int = 0; any.a_int = 0;
add_menu(tmpwin, NO_GLYPH, &any, ' ', iflags.menu_headings, add_menu(tmpwin, NO_GLYPH, &any, 0, 0, iflags.menu_headings,
ATR_NONE, let_to_name(oclass, FALSE, FALSE), let_to_name(oclass, FALSE, FALSE),
MENU_UNSELECTED); MENU_UNSELECTED);
prev_class = oclass; prev_class = oclass;
} }
+13 -2
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 objnam.c $NHDT-Date: 1449740045 2015/12/10 09:34:05 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.155 $ */ /* NetHack 3.6 objnam.c $NHDT-Date: 1450306207 2015/12/16 22:50:07 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.158 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -1874,6 +1874,15 @@ const char *const *alt_as_is; /* another set like as_is[] */
} }
} }
/* avoid false hit on one_off[].plur == "lice";
if more of these turn up, one_off[] entries will need to flagged
as to which are whole words and which are matchable as suffices
then matching in the loop below will end up becoming more complex */
if (!strcmpi(basestr, "slice")) {
if (to_plural)
(void) strkitten(basestr, 's');
return TRUE;
}
for (sp = one_off; sp->sing; sp++) { for (sp = one_off; sp->sing; sp++) {
/* check whether endstring already matches */ /* check whether endstring already matches */
same = to_plural ? sp->plur : sp->sing; same = to_plural ? sp->plur : sp->sing;
@@ -3336,6 +3345,8 @@ typfnd:
break; break;
#ifdef MAIL #ifdef MAIL
case SCR_MAIL: case SCR_MAIL:
/* 0: delivered in-game via external event (or randomly for fake mail);
1: from bones or wishing; 2: written with marker */
otmp->spe = 1; otmp->spe = 1;
break; break;
#endif #endif
@@ -3468,7 +3479,7 @@ typfnd:
if (aname && objtyp == otmp->otyp) if (aname && objtyp == otmp->otyp)
name = aname; name = aname;
/* 3.6.0 tribute - fix up novel */ /* 3.6 tribute - fix up novel */
if (otmp->otyp == SPE_NOVEL) { if (otmp->otyp == SPE_NOVEL) {
const char *novelname; const char *novelname;
+1
View File
@@ -75,6 +75,7 @@ static struct Bool_Opt {
#else #else
{ "asksavedisk", (boolean *) 0, FALSE, SET_IN_FILE }, { "asksavedisk", (boolean *) 0, FALSE, SET_IN_FILE },
#endif #endif
{ "autodescribe", &iflags.autodescribe, FALSE, SET_IN_GAME },
{ "autodig", &flags.autodig, FALSE, SET_IN_GAME }, { "autodig", &flags.autodig, FALSE, SET_IN_GAME },
{ "autoopen", &flags.autoopen, TRUE, SET_IN_GAME }, { "autoopen", &flags.autoopen, TRUE, SET_IN_GAME },
{ "autopickup", &flags.pickup, TRUE, SET_IN_GAME }, { "autopickup", &flags.pickup, TRUE, SET_IN_GAME },
+11 -6
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 potion.c $NHDT-Date: 1446861768 2015/11/07 02:02:48 $ $NHDT-Branch: master $:$NHDT-Revision: 1.121 $ */ /* NetHack 3.6 potion.c $NHDT-Date: 1449977945 2015/12/13 03:39:05 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.122 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -1759,6 +1759,7 @@ dodip()
char allowall[2]; char allowall[2];
short mixture; short mixture;
char qbuf[QBUFSZ], qtoo[QBUFSZ]; char qbuf[QBUFSZ], qtoo[QBUFSZ];
const char *shortestname; /* last resort obj name for prompt */
allowall[0] = ALL_CLASSES; allowall[0] = ALL_CLASSES;
allowall[1] = '\0'; allowall[1] = '\0';
@@ -1767,13 +1768,13 @@ dodip()
if (inaccessible_equipment(obj, "dip", FALSE)) if (inaccessible_equipment(obj, "dip", FALSE))
return 0; return 0;
Sprintf(qbuf, "dip %s into", thesimpleoname(obj)); shortestname = is_plural(obj) ? "them" : "it";
here = levl[u.ux][u.uy].typ; here = levl[u.ux][u.uy].typ;
/* Is there a fountain to dip into here? */ /* Is there a fountain to dip into here? */
if (IS_FOUNTAIN(here)) { if (IS_FOUNTAIN(here)) {
/* "Dip <the object> into the fountain?" */ /* "Dip <the object> into the fountain?" */
Sprintf(qtoo, "%s the fountain?", qbuf); if (yn(safe_qbuf(qbuf, "Dip ", " into the fountain?", obj,
if (yn(upstart(qtoo)) == 'y') { doname, thesimpleoname, shortestname)) == 'y') {
dipfountain(obj); dipfountain(obj);
return 1; return 1;
} }
@@ -1781,8 +1782,9 @@ dodip()
const char *pooltype = waterbody_name(u.ux, u.uy); const char *pooltype = waterbody_name(u.ux, u.uy);
/* "Dip <the object> into the {pool, moat, &c}?" */ /* "Dip <the object> into the {pool, moat, &c}?" */
Sprintf(qtoo, "%s the %s?", qbuf, pooltype); Sprintf(qtoo, " into the %s?", pooltype);
if (yn(upstart(qtoo)) == 'y') { if (yn(safe_qbuf(qbuf, "Dip ", qtoo, obj,
doname, thesimpleoname, shortestname)) == 'y') {
if (Levitation) { if (Levitation) {
floating_above(pooltype); floating_above(pooltype);
} else if (u.usteed && !is_swimmer(u.usteed->data) } else if (u.usteed && !is_swimmer(u.usteed->data)
@@ -1799,6 +1801,9 @@ dodip()
} }
/* "What do you want to dip <the object> into?" */ /* "What do you want to dip <the object> into?" */
Strcpy(qbuf, safe_qbuf(qtoo, "What do you want to dip ", " into?", obj,
doname, thesimpleoname, shortestname)
+ sizeof "What do you want to " - sizeof "");
potion = getobj(beverages, qbuf); /* "dip into" */ potion = getobj(beverages, qbuf); /* "dip into" */
if (!potion) if (!potion)
return 0; return 0;
+19 -10
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 read.c $NHDT-Date: 1449645144 2015/12/09 07:12:24 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.126 $ */ /* NetHack 3.6 read.c $NHDT-Date: 1450261365 2015/12/16 10:22:45 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.128 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -970,12 +970,16 @@ struct obj *sobj; /* scroll, or fake spellbook object for scroll-like spell */
#ifdef MAIL #ifdef MAIL
case SCR_MAIL: case SCR_MAIL:
known = TRUE; known = TRUE;
if (sobj->spe) if (sobj->spe == 2)
/* "stamped scroll" created via magic marker--without a stamp */
pline("This scroll is marked \"postage due\".");
else if (sobj->spe)
/* scroll of mail obtained from bones file or from wishing;
* note to the puzzled: the game Larn actually sends you junk
* mail if you win!
*/
pline( pline(
"This seems to be junk mail addressed to the finder of the Eye of Larn."); "This seems to be junk mail addressed to the finder of the Eye of Larn.");
/* note to the puzzled: the game Larn actually sends you junk
* mail if you win!
*/
else else
readmail(sobj); readmail(sobj);
break; break;
@@ -1050,9 +1054,12 @@ struct obj *sobj; /* scroll, or fake spellbook object for scroll-like spell */
useup(otmp); useup(otmp);
break; break;
} }
s = scursed ? -1 : otmp->spe >= 9 s = scursed ? -1
? (rn2(otmp->spe) == 0) : (otmp->spe >= 9)
: sblessed ? rnd(3 - otmp->spe / 3) : 1; ? (rn2(otmp->spe) == 0)
: sblessed
? rnd(3 - otmp->spe / 3)
: 1;
if (s >= 0 && Is_dragon_scales(otmp)) { if (s >= 0 && Is_dragon_scales(otmp)) {
/* dragon scales get turned into dragon scale mail */ /* dragon scales get turned into dragon scale mail */
pline("%s merges and hardens!", Yname2(otmp)); pline("%s merges and hardens!", Yname2(otmp));
@@ -1075,8 +1082,8 @@ struct obj *sobj; /* scroll, or fake spellbook object for scroll-like spell */
s == 0 ? "violently " : "", s == 0 ? "violently " : "",
otense(otmp, Blind ? "vibrate" : "glow"), otense(otmp, Blind ? "vibrate" : "glow"),
(!Blind && !same_color) ? " " : "", (!Blind && !same_color) ? " " : "",
(Blind || same_color) ? "" (Blind || same_color)
: hcolor(scursed ? NH_BLACK : NH_SILVER), ? "" : hcolor(scursed ? NH_BLACK : NH_SILVER),
(s * s > 1) ? "while" : "moment"); (s * s > 1) ? "while" : "moment");
/* [this cost handling will need updating if shop pricing is /* [this cost handling will need updating if shop pricing is
ever changed to care about curse/bless status of armor] */ ever changed to care about curse/bless status of armor] */
@@ -1086,6 +1093,8 @@ struct obj *sobj; /* scroll, or fake spellbook object for scroll-like spell */
curse(otmp); curse(otmp);
else if (sblessed && !otmp->blessed) else if (sblessed && !otmp->blessed)
bless(otmp); bless(otmp);
else if (!scursed && otmp->cursed)
uncurse(otmp);
if (s) { if (s) {
otmp->spe += s; otmp->spe += s;
adj_abon(otmp, s); adj_abon(otmp, s);
+5 -8
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 restore.c $NHDT-Date: 1446892455 2015/11/07 10:34:15 $ $NHDT-Branch: master $:$NHDT-Revision: 1.101 $ */ /* NetHack 3.6 restore.c $NHDT-Date: 1450231174 2015/12/16 01:59:34 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.102 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -568,13 +568,10 @@ unsigned int *stuckid, *steedid;
foo = time_from_yyyymmddhhmmss(timebuf); foo = time_from_yyyymmddhhmmss(timebuf);
ReadTimebuf(ubirthday); ReadTimebuf(ubirthday);
mread(fd, &urealtime.realtime, sizeof(urealtime.realtime)); mread(fd, &urealtime.realtime, sizeof urealtime.realtime);
ReadTimebuf(urealtime.restored); ReadTimebuf(urealtime.start_timing); /** [not used] **/
#if defined(BSD) && !defined(POSIX_TYPES) /* current time is the time to use for next urealtime.realtime update */
(void) time((long *) &urealtime.restored); urealtime.start_timing = getnow();
#else
(void) time(&urealtime.restored);
#endif
set_uasmon(); set_uasmon();
#ifdef CLIPPING #ifdef CLIPPING
+2 -2
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 role.c $NHDT-Date: 1446861770 2015/11/07 02:02:50 $ $NHDT-Branch: master $:$NHDT-Revision: 1.34 $ */ /* NetHack 3.6 role.c $NHDT-Date: 1450320155 2015/12/17 02:42:35 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.35 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985-1999. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985-1999. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -1927,7 +1927,7 @@ winid where;
any.a_int = 0; any.a_int = 0;
/* use four spaces of padding to fake a grayed out menu choice */ /* use four spaces of padding to fake a grayed out menu choice */
Sprintf(buf, "%4s%s forces %s", "", constrainer, forcedvalue); Sprintf(buf, "%4s%s forces %s", "", constrainer, forcedvalue);
add_menu(where, NO_GLYPH, &any, ' ', 0, ATR_NONE, buf, add_menu(where, NO_GLYPH, &any, 0, 0, ATR_NONE, buf,
MENU_UNSELECTED); MENU_UNSELECTED);
} else if (what) { } else if (what) {
any.a_int = RS_menu_arg(which); any.a_int = RS_menu_arg(which);
+8 -5
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 save.c $NHDT-Date: 1448241784 2015/11/23 01:23:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.95 $ */ /* NetHack 3.6 save.c $NHDT-Date: 1450231175 2015/12/16 01:59:35 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.98 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -289,12 +289,15 @@ register int fd, mode;
#ifdef SYSFLAGS #ifdef SYSFLAGS
bwrite(fd, (genericptr_t) &sysflags, sizeof(struct sysflag)); bwrite(fd, (genericptr_t) &sysflags, sizeof(struct sysflag));
#endif #endif
urealtime.realtime += (long) (getnow() - urealtime.restored); urealtime.finish_time = getnow();
urealtime.realtime += (long) (urealtime.finish_time
- urealtime.start_timing);
bwrite(fd, (genericptr_t) &u, sizeof(struct you)); bwrite(fd, (genericptr_t) &u, sizeof(struct you));
bwrite(fd, yyyymmddhhmmss(ubirthday), 14); bwrite(fd, yyyymmddhhmmss(ubirthday), 14);
bwrite(fd, (genericptr_t) &urealtime.realtime, bwrite(fd, (genericptr_t) &urealtime.realtime, sizeof urealtime.realtime);
sizeof(urealtime.realtime)); bwrite(fd, yyyymmddhhmmss(urealtime.start_timing), 14); /** Why? **/
bwrite(fd, yyyymmddhhmmss(urealtime.restored), 14); /* this is the value to use for the next update of urealtime.realtime */
urealtime.start_timing = urealtime.finish_time;
save_killers(fd, mode); save_killers(fd, mode);
/* must come before migrating_objs and migrating_mons are freed */ /* must come before migrating_objs and migrating_mons are freed */
+2 -2
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 shknam.c $NHDT-Date: 1448094342 2015/11/21 08:25:42 $ $NHDT-Branch: master $:$NHDT-Revision: 1.38 $ */ /* NetHack 3.6 shknam.c $NHDT-Date: 1450306213 2015/12/16 22:50:13 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.39 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -454,7 +454,7 @@ boolean mkspecl;
struct permonst *ptr; struct permonst *ptr;
int atype; int atype;
/* 3.6.0 tribute */ /* 3.6 tribute */
if (mkspecl && (!strcmp(shp->name, "rare books") if (mkspecl && (!strcmp(shp->name, "rare books")
|| !strcmp(shp->name, "second-hand bookstore"))) { || !strcmp(shp->name, "second-hand bookstore"))) {
struct obj *novel = mksobj_at(SPE_NOVEL, sx, sy, FALSE, FALSE); struct obj *novel = mksobj_at(SPE_NOVEL, sx, sy, FALSE, FALSE);
+2 -2
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 sounds.c $NHDT-Date: 1446713641 2015/11/05 08:54:01 $ $NHDT-Branch: master $:$NHDT-Revision: 1.74 $ */ /* NetHack 3.6 sounds.c $NHDT-Date: 1450306219 2015/12/16 22:50:19 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.75 $ */
/* Copyright (c) 1989 Janet Walz, Mike Threepoint */ /* Copyright (c) 1989 Janet Walz, Mike Threepoint */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -908,7 +908,7 @@ register struct monst *mtmp;
break; break;
} }
case MS_RIDER: case MS_RIDER:
/* 3.6.0 tribute */ /* 3.6 tribute */
if (ptr == &mons[PM_DEATH] if (ptr == &mons[PM_DEATH]
&& !context.tribute.Deathnotice && u_have_novel()) { && !context.tribute.Deathnotice && u_have_novel()) {
struct obj *book = u_have_novel(); struct obj *book = u_have_novel();
+3 -3
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 spell.c $NHDT-Date: 1447653429 2015/11/16 05:57:09 $ $NHDT-Branch: master $:$NHDT-Revision: 1.72 $ */ /* NetHack 3.6 spell.c $NHDT-Date: 1450306224 2015/12/16 22:50:24 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.74 $ */
/* Copyright (c) M. Stephenson 1988 */ /* Copyright (c) M. Stephenson 1988 */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -430,7 +430,7 @@ register struct obj *spellbook;
boolean too_hard = FALSE; boolean too_hard = FALSE;
/* attempting to read dull book may make hero fall asleep */ /* attempting to read dull book may make hero fall asleep */
if (!confused && booktype != SPE_BLANK_PAPER if (!confused && !Sleep_resistance
&& !strcmp(OBJ_DESCR(objects[booktype]), "dull")) { && !strcmp(OBJ_DESCR(objects[booktype]), "dull")) {
const char *eyes; const char *eyes;
int dullbook = rnd(25) - ACURR(A_WIS); int dullbook = rnd(25) - ACURR(A_WIS);
@@ -465,7 +465,7 @@ register struct obj *spellbook;
return 1; return 1;
} }
/* 3.6.0 tribute */ /* 3.6 tribute */
if (booktype == SPE_NOVEL) { if (booktype == SPE_NOVEL) {
/* Obtain current Terry Pratchett book title */ /* Obtain current Terry Pratchett book title */
const char *tribtitle = noveltitle(&spellbook->novelidx); const char *tribtitle = noveltitle(&spellbook->novelidx);
+3 -4
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 topten.c $NHDT-Date: 1448117546 2015/11/21 14:52:26 $ $NHDT-Branch: master $:$NHDT-Revision: 1.40 $ */ /* NetHack 3.6 topten.c $NHDT-Date: 1450231176 2015/12/16 01:59:36 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.41 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -330,8 +330,8 @@ struct toptenentry *tt;
Fprintf(rfile, "%cconduct=0x%lx%cturns=%ld%cachieve=0x%lx", XLOG_SEP, Fprintf(rfile, "%cconduct=0x%lx%cturns=%ld%cachieve=0x%lx", XLOG_SEP,
encodeconduct(), XLOG_SEP, moves, XLOG_SEP, encodeachieve()); encodeconduct(), XLOG_SEP, moves, XLOG_SEP, encodeachieve());
Fprintf(rfile, "%crealtime=%ld%cstarttime=%ld%cendtime=%ld", XLOG_SEP, Fprintf(rfile, "%crealtime=%ld%cstarttime=%ld%cendtime=%ld", XLOG_SEP,
(long) urealtime.realtime, XLOG_SEP, (long) ubirthday, XLOG_SEP, (long) urealtime.realtime, XLOG_SEP,
(long) urealtime.endtime); (long) ubirthday, XLOG_SEP, (long) urealtime.finish_time);
Fprintf(rfile, "%cgender0=%s%calign0=%s", XLOG_SEP, Fprintf(rfile, "%cgender0=%s%calign0=%s", XLOG_SEP,
genders[flags.initgend].filecode, XLOG_SEP, genders[flags.initgend].filecode, XLOG_SEP,
aligns[1 - u.ualignbase[A_ORIGINAL]].filecode); aligns[1 - u.ualignbase[A_ORIGINAL]].filecode);
@@ -516,7 +516,6 @@ time_t when;
t0->birthdate = yyyymmdd(ubirthday); t0->birthdate = yyyymmdd(ubirthday);
t0->deathdate = yyyymmdd(when); t0->deathdate = yyyymmdd(when);
t0->tt_next = 0; t0->tt_next = 0;
urealtime.endtime = when;
#ifdef UPDATE_RECORD_IN_PLACE #ifdef UPDATE_RECORD_IN_PLACE
t0->fpos = -1L; t0->fpos = -1L;
#endif #endif
+6 -4
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 trap.c $NHDT-Date: 1448492213 2015/11/25 22:56:53 $ $NHDT-Branch: master $:$NHDT-Revision: 1.249 $ */ /* NetHack 3.6 trap.c $NHDT-Date: 1449977947 2015/12/13 03:39:07 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.250 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -3345,10 +3345,11 @@ boolean force;
*/ */
return ER_NOTHING; return ER_NOTHING;
} else if (obj->oclass == SCROLL_CLASS) { } else if (obj->oclass == SCROLL_CLASS) {
if (obj->otyp == SCR_BLANK_PAPER
#ifdef MAIL #ifdef MAIL
if (obj->otyp == SCR_MAIL) || obj->otyp == SCR_MAIL
return 0;
#endif #endif
) return 0;
if (carried(obj)) if (carried(obj))
pline("Your %s %s.", ostr, vtense(ostr, "fade")); pline("Your %s %s.", ostr, vtense(ostr, "fade"));
@@ -3362,8 +3363,9 @@ boolean force;
if (obj->otyp == SPE_BOOK_OF_THE_DEAD) { if (obj->otyp == SPE_BOOK_OF_THE_DEAD) {
pline("Steam rises from %s.", the(xname(obj))); pline("Steam rises from %s.", the(xname(obj)));
return 0; return 0;
} else if (obj->otyp == SPE_BLANK_PAPER) {
return 0;
} }
if (carried(obj)) if (carried(obj))
pline("Your %s %s.", ostr, vtense(ostr, "fade")); pline("Your %s %s.", ostr, vtense(ostr, "fade"));
+15 -6
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 write.c $NHDT-Date: 1446078770 2015/10/29 00:32:50 $ $NHDT-Branch: master $:$NHDT-Revision: 1.16 $ */ /* NetHack 3.6 write.c $NHDT-Date: 1450261366 2015/12/16 10:22:46 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.17 $ */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
#include "hack.h" #include "hack.h"
@@ -58,7 +58,7 @@ register struct obj *otmp;
} }
/* decide whether the hero knowns a particular scroll's label; /* decide whether the hero knowns a particular scroll's label;
unfortunately, we can't track things are haven't been added to unfortunately, we can't track things that haven't been added to
the discoveries list and aren't present in current inventory, the discoveries list and aren't present in current inventory,
so some scrolls with ought to yield True will end up False */ so some scrolls with ought to yield True will end up False */
STATIC_OVL boolean STATIC_OVL boolean
@@ -335,11 +335,20 @@ found:
new_obj->cursed = (curseval < 0); new_obj->cursed = (curseval < 0);
#ifdef MAIL #ifdef MAIL
if (new_obj->otyp == SCR_MAIL) if (new_obj->otyp == SCR_MAIL)
new_obj->spe = 1; /* 0: delivered in-game via external event (or randomly for fake mail);
1: from bones or wishing; 2: written with marker */
new_obj->spe = 2;
#endif #endif
new_obj = /* unlike alchemy, for example, a successful result yields the
hold_another_object(new_obj, "Oops! %s out of your grasp!", specifically chosen item so hero recognizes it even if blind;
The(aobjnam(new_obj, "slip")), (const char *) 0); the exception is for being lucky writing an undiscovered scroll,
where the label associated with the type-name isn't known yet */
new_obj->dknown = label_known(new_obj->otyp, invent) ? 1 : 0;
new_obj = hold_another_object(new_obj, "Oops! %s out of your grasp!",
The(aobjnam(new_obj, "slip")),
(const char *) 0);
nhUse(new_obj); /* try to avoid complaint about dead assignment */
return 1; return 1;
} }
+5 -5
View File
@@ -5,7 +5,7 @@
NetHack 3.6 on a Windows system NetHack 3.6 on a Windows system
(Windows 7/8.x/10 or later only. XP may work but is untested) (Windows 7/8.x/10 or later only. XP may work but is untested)
============================================================== ==============================================================
Last revision: $NHDT-Date: 1447979773 2015/11/20 00:36:13 $ Last revision: $NHDT-Date: 1450306349 2015/12/16 22:52:29 $
Credit for the porting of NetHack to the Win32 Console Subsystem goes to Credit for the porting of NetHack to the Win32 Console Subsystem goes to
the NT Porting Team started by Michael Allison. the NT Porting Team started by Michael Allison.
@@ -16,7 +16,7 @@ contributed the port.
The PC Windows porting team consisting of Michael Allison, David Cohrs, The PC Windows porting team consisting of Michael Allison, David Cohrs,
Alex Kompel, Dion Nicolaas, Yitzhak Sapir, and Janet Walz maintained the Alex Kompel, Dion Nicolaas, Yitzhak Sapir, and Janet Walz maintained the
tty and graphical win32 versions of NetHack 3.6.0. tty and graphical win32 versions of NetHack 3.6.1.
You can build a TTY version of NetHack and a Windows Graphical You can build a TTY version of NetHack and a Windows Graphical
version. You can use one of the following build environments: version. You can use one of the following build environments:
@@ -90,7 +90,7 @@ a 32-bit x86 version, or a 64-bit x64 version. The default Makefile
is set up for a 32-bit x86 version, but that's only because it will is set up for a 32-bit x86 version, but that's only because it will
run on the most number of existing Windows environments. run on the most number of existing Windows environments.
NetHack's save files and bones files in the 3.6.0 release have not NetHack's save files and bones files in the 3.6.1 release have not
evolved enough to allow them to interchange between the 32-bit version evolved enough to allow them to interchange between the 32-bit version
and the 64-bit version (or between different platforms). Hopefully and the 64-bit version (or between different platforms). Hopefully
that will change in an upcoming release. that will change in an upcoming release.
@@ -508,10 +508,10 @@ II. Executing the game
If you will be running it by launching it from a shortcut, just use If you will be running it by launching it from a shortcut, just use
the following information when setting up the shortcut. the following information when setting up the shortcut.
Description : NetHack 3.6.0 Console version Description : NetHack 3.6.1 Console version
Command Line : C:\NETHACK\BINARY\NETHACK.EXE Command Line : C:\NETHACK\BINARY\NETHACK.EXE
Description : NetHack 3.6.0 Graphical Interface Description : NetHack 3.6.1 Graphical Interface
Command Line : C:\NETHACK\BINARY\NETHACKW.EXE Command Line : C:\NETHACK\BINARY\NETHACKW.EXE
(changing the directory to the appropriate one of course) (changing the directory to the appropriate one of course)
+1 -1
View File
@@ -1,5 +1,5 @@
NAME NETHACK NAME NETHACK
DESCRIPTION 'NetHack 3.6.0 for Windows NT' DESCRIPTION 'NetHack 3.6.1 for Windows NT'
EXETYPE WINDOWS EXETYPE WINDOWS
STUB 'WINSTUB.EXE' STUB 'WINSTUB.EXE'
CODE PRELOAD MOVEABLE DISCARDABLE CODE PRELOAD MOVEABLE DISCARDABLE
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/osascript #!/usr/bin/osascript
# NetHack 3.6.0 NetHackGuidebook.applescript $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ # NetHack 3.6.1 NetHackGuidebook.applescript $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2011 # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2011
# NetHack may be freely redistributed. See license for details. # NetHack may be freely redistributed. See license for details.
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/osascript #!/usr/bin/osascript
# NetHack 3.6.0 NetHackTerm.applescript $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ # NetHack 3.6.1 NetHackTerm.applescript $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2011 # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2011
# NetHack may be freely redistributed. See license for details. # NetHack may be freely redistributed. See license for details.
+7 -7
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 wintty.c $NHDT-Date: 1449052583 2015/12/02 10:36:23 $ $NHDT-Branch: master $:$NHDT-Revision: 1.116 $ */ /* NetHack 3.6 wintty.c $NHDT-Date: 1450320157 2015/12/17 02:42:37 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.117 $ */
/* Copyright (c) David Cohrs, 1991 */ /* Copyright (c) David Cohrs, 1991 */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -418,7 +418,7 @@ makepicks:
/* add miscellaneous menu entries */ /* add miscellaneous menu entries */
role_menu_extra(ROLE_RANDOM, win); role_menu_extra(ROLE_RANDOM, win);
any.a_int = 0; /* separator, not a choice */ any.a_int = 0; /* separator, not a choice */
add_menu(win, NO_GLYPH, &any, ' ', 0, ATR_NONE, "", add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, "",
MENU_UNSELECTED); MENU_UNSELECTED);
role_menu_extra(RS_RACE, win); role_menu_extra(RS_RACE, win);
role_menu_extra(RS_GENDER, win); role_menu_extra(RS_GENDER, win);
@@ -502,7 +502,7 @@ makepicks:
/* add miscellaneous menu entries */ /* add miscellaneous menu entries */
role_menu_extra(ROLE_RANDOM, win); role_menu_extra(ROLE_RANDOM, win);
any.a_int = 0; /* separator, not a choice */ any.a_int = 0; /* separator, not a choice */
add_menu(win, NO_GLYPH, &any, ' ', 0, ATR_NONE, "", add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, "",
MENU_UNSELECTED); MENU_UNSELECTED);
role_menu_extra(RS_ROLE, win); role_menu_extra(RS_ROLE, win);
role_menu_extra(RS_GENDER, win); role_menu_extra(RS_GENDER, win);
@@ -591,7 +591,7 @@ makepicks:
/* add miscellaneous menu entries */ /* add miscellaneous menu entries */
role_menu_extra(ROLE_RANDOM, win); role_menu_extra(ROLE_RANDOM, win);
any.a_int = 0; /* separator, not a choice */ any.a_int = 0; /* separator, not a choice */
add_menu(win, NO_GLYPH, &any, ' ', 0, ATR_NONE, "", add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, "",
MENU_UNSELECTED); MENU_UNSELECTED);
role_menu_extra(RS_ROLE, win); role_menu_extra(RS_ROLE, win);
role_menu_extra(RS_RACE, win); role_menu_extra(RS_RACE, win);
@@ -676,7 +676,7 @@ makepicks:
setup_algnmenu(win, TRUE, ROLE, RACE, GEND); setup_algnmenu(win, TRUE, ROLE, RACE, GEND);
role_menu_extra(ROLE_RANDOM, win); role_menu_extra(ROLE_RANDOM, win);
any.a_int = 0; /* separator, not a choice */ any.a_int = 0; /* separator, not a choice */
add_menu(win, NO_GLYPH, &any, ' ', 0, ATR_NONE, "", add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, "",
MENU_UNSELECTED); MENU_UNSELECTED);
role_menu_extra(RS_ROLE, win); role_menu_extra(RS_ROLE, win);
role_menu_extra(RS_RACE, win); role_menu_extra(RS_RACE, win);
@@ -760,11 +760,11 @@ makepicks:
races[RACE].adj, races[RACE].adj,
(GEND == 1 && roles[ROLE].name.f) ? roles[ROLE].name.f (GEND == 1 && roles[ROLE].name.f) ? roles[ROLE].name.f
: roles[ROLE].name.m); : roles[ROLE].name.m);
add_menu(win, NO_GLYPH, &any, ' ', 0, ATR_NONE, pbuf, add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, pbuf,
MENU_UNSELECTED); MENU_UNSELECTED);
/* blank separator */ /* blank separator */
any.a_int = 0; any.a_int = 0;
add_menu(win, NO_GLYPH, &any, ' ', 0, ATR_NONE, "", MENU_UNSELECTED); add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, "", MENU_UNSELECTED);
/* [ynaq] menu choices */ /* [ynaq] menu choices */
any.a_int = 1; any.a_int = 1;
add_menu(win, NO_GLYPH, &any, 'y', 0, ATR_NONE, "Yes; start game", add_menu(win, NO_GLYPH, &any, 'y', 0, ATR_NONE, "Yes; start game",
+2 -2
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 mswproc.c $NHDT-Date: 1449751720 2015/12/10 12:48:40 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.95 $ */ /* NetHack 3.6 mswproc.c $NHDT-Date: 1450306253 2015/12/16 22:50:53 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.96 $ */
/* Copyright (C) 2001 by Alex Kompel */ /* Copyright (C) 2001 by Alex Kompel */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -2222,7 +2222,7 @@ logDebug(const char *fmt, ...)
/* Reading and writing settings from the registry. */ /* Reading and writing settings from the registry. */
#define CATEGORYKEY "Software" #define CATEGORYKEY "Software"
#define COMPANYKEY "NetHack" #define COMPANYKEY "NetHack"
#define PRODUCTKEY "NetHack 3.6.0" #define PRODUCTKEY "NetHack 3.6.1"
#define SETTINGSKEY "Settings" #define SETTINGSKEY "Settings"
#define MAINSHOWSTATEKEY "MainShowState" #define MAINSHOWSTATEKEY "MainShowState"
#define MAINMINXKEY "MainMinX" #define MAINMINXKEY "MainMinX"