Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7

This commit is contained in:
nhmall
2019-11-23 18:58:34 -05:00
3 changed files with 733 additions and 736 deletions

160
Files
View File

@@ -30,29 +30,49 @@ prepare-commit-msg
dat:
(files for all versions)
Arch.des Barb.des Caveman.des GENFILES Healer.des
Knight.des Monk.des Priest.des Ranger.des Rogue.des
Samurai.des Tourist.des Valkyrie.des Wizard.des bigroom.des
bogusmon.txt castle.des cmdhelp data.base dungeon.def
endgame.des engrave.txt epitaph.txt gehennom.des help
hh history keyhelp knox.des license
medusa.des mines.des opthelp oracle.des oracles.txt
quest.txt rumors.fal rumors.tru sokoban.des symbols
tower.des tribute wizhelp yendor.des
Arc-fila.lua Arc-filb.lua Arc-goal.lua Arc-loca.lua Arc-strt.lua
Bar-fila.lua Bar-filb.lua Bar-goal.lua Bar-loca.lua Bar-strt.lua
Cav-fila.lua Cav-filb.lua Cav-goal.lua Cav-loca.lua Cav-strt.lua
GENFILES Hea-fila.lua Hea-filb.lua Hea-goal.lua Hea-loca.lua
Hea-strt.lua Kni-fila.lua Kni-filb.lua Kni-goal.lua Kni-loca.lua
Kni-strt.lua Mon-fila.lua Mon-filb.lua Mon-goal.lua Mon-loca.lua
Mon-strt.lua Pri-fila.lua Pri-filb.lua Pri-goal.lua Pri-loca.lua
Pri-strt.lua Ran-fila.lua Ran-filb.lua Ran-goal.lua Ran-loca.lua
Ran-strt.lua Rog-fila.lua Rog-filb.lua Rog-goal.lua Rog-loca.lua
Rog-strt.lua Sam-fila.lua Sam-filb.lua Sam-goal.lua Sam-loca.lua
Sam-strt.lua Tou-fila.lua Tou-filb.lua Tou-goal.lua Tou-loca.lua
Tou-strt.lua Val-fila.lua Val-filb.lua Val-goal.lua Val-loca.lua
Val-strt.lua Wiz-fila.lua Wiz-filb.lua Wiz-goal.lua Wiz-loca.lua
Wiz-strt.lua air.lua asmodeus.lua astral.lua baalz.lua
bigrm-1.lua bigrm-2.lua bigrm-3.lua bigrm-4.lua bigrm-5.lua
bigrm-6.lua bigrm-7.lua bigrm-8.lua bigrm-9.lua bigrm-10.lua
bogusmon.txt castle.lua cmdhelp data.base dungeon.lua
earth.lua engrave.txt epitaph.txt fakewiz1.lua fakewiz2.lua
fire.lua help hh history juiblex.lua
keyhelp knox.lua license medusa-1.lua medusa-2.lua
medusa-3.lua medusa-4.lua minefill.lua minend-1.lua minend-2.lua
minend-3.lua mines.des minetn-1.lua minetn-2.lua minetn-3.lua
minetn-4.lua minetn-5.lua minetn-6.lua minetn-7.lua nhlib.lua
opthelp oracle.lua oracles.txt orcus.lua quest.txt
rumors.fal rumors.tru sanctum.lua soko1-1.lua soko1-2.lua
soko2-1.lua soko2-2.lua soko3-1.lua soko3-2.lua soko4-1.lua
soko4-2.lua symbols tower1.lua tower2.lua tower3.lua
tribute valley.lua water.lua wizard1.lua wizard2.lua
wizard3.lua wizhelp
doc:
(files for all versions)
Guidebook.mn Guidebook.tex Guidebook.txt config.nh dgn_comp.6
dgn_comp.txt dlb.6 dlb.txt fixes10.0 fixes14.f
fixes22.0 fixes23.e fixes30.0 fixes30.pl01 fixes30.pl02
fixes30.pl03 fixes30.pl04 fixes30.pl05 fixes30.pl06 fixes30.pl07
fixes30.pl08 fixes30.pl09 fixes30.pl10 fixes31.1 fixes31.2
fixes31.3 fixes32.0 fixes32.1 fixes32.2 fixes32.3
fixes33.0 fixes33.1 fixes34.0 fixes34.1 fixes34.2
fixes34.3 fixes35.0 fixes36.0 fixes36.1 fixes36.2
fixes36.3 lev_comp.6 lev_comp.txt makedefs.6 makedefs.txt
mn.7 mnh.7 nethack.6 nethack.txt recover.6
recover.txt tmac.n tmac.nh window.doc
Guidebook.mn Guidebook.tex Guidebook.txt config.nh dlb.6
dlb.txt fixes10.0 fixes14.f fixes22.0 fixes23.e
fixes30.0 fixes30.pl01 fixes30.pl02 fixes30.pl03 fixes30.pl04
fixes30.pl05 fixes30.pl06 fixes30.pl07 fixes30.pl08 fixes30.pl09
fixes30.pl10 fixes31.1 fixes31.2 fixes31.3 fixes32.0
fixes32.1 fixes32.2 fixes32.3 fixes33.0 fixes33.1
fixes34.0 fixes34.1 fixes34.2 fixes34.3 fixes35.0
fixes36.0 fixes36.1 fixes36.2 fixes36.3 fixes37.0
fixesXX.X makedefs.6 makedefs.txt mn.7 mnh.7
nethack.6 nethack.txt recover.6 recover.txt tmac.n
tmac.nh window.doc
include:
(files for GEM versions)
@@ -102,15 +122,17 @@ files.c fountain.c hack.c hacklib.c invent.c isaac64.c
light.c lock.c mail.c makemon.c mapglyph.c mcastu.c
mhitm.c mhitu.c minion.c mklev.c mkmap.c mkmaze.c
mkobj.c mkroom.c mon.c mondata.c monmove.c monst.c
mplayer.c mthrowu.c muse.c music.c o_init.c objects.c
objnam.c options.c pager.c pickup.c pline.c polyself.c
potion.c pray.c priest.c quest.c questpgr.c read.c
rect.c region.c restore.c rip.c rnd.c role.c
rumors.c save.c shk.c shknam.c sit.c sounds.c
sp_lev.c spell.c steal.c steed.c sys.c teleport.c
timeout.c topten.c track.c trap.c u_init.c uhitm.c
vault.c version.c vision.c weapon.c were.c wield.c
windows.c wizard.c worm.c worn.c write.c zap.c
mplayer.c mthrowu.c muse.c music.c nhlsel.c nhlua.c
o_init.c objects.c objnam.c options.c pager.c pickup.c
pline.c polyself.c potion.c pray.c priest.c quest.c
questpgr.c read.c rect.c region.c restore.c rip.c
rnd.c role.c rumors.c save.c sfascii.c sfbase.c
sfdata.c sflendian.c sfstruct.c shk.c shknam.c sit.c
sounds.c sp_lev.c spell.c steal.c steed.c sys.c
teleport.c timeout.c topten.c track.c trap.c u_init.c
uhitm.c vault.c version.c vision.c weapon.c were.c
wield.c windows.c wizard.c worm.c worn.c write.c
zap.c
sys/amiga:
(files for Amiga versions - untested for 3.6.2)
@@ -148,8 +170,8 @@ Makefile1.cross Makefile2.cross SCHEMA35.MSC moveinit.pat
msdos.c msdoshlp.txt ovlinit.c pckeys.c
pctiles.c pctiles.h pcvideo.h portio.h
schema1.BC schema2.BC schema3.MSC setup.bat
sound.c tile2bin.c vesa.h video.c
vidtxt.c vidvesa.c vidvga.c
tile2bin.c vesa.h video.c vidtxt.c
vidvesa.c vidvga.c
(files for running MSDOS binary under Windows)
nhico.uu nhpif.uu
@@ -189,9 +211,6 @@ pcsys.c pcunix.c
(files for UNIX and Be versions)
ioctl.c unixtty.c
(lex/yacc output for special level and dungeon compilers)
dgn_comp.h dgn_lex.c dgn_yacc.c lev_comp.h lev_lex.c lev_yacc.c
(posix regex for versions that include regex in their C library)
posixregex.c
@@ -284,13 +303,14 @@ stubs.c sysconf.template win10.c
win10.h win32api.h windmain.c
winnt.c winos.h
test:
(files in top directory)
test_des.lua test_lev.lua test_sel.lua test_src.lua
util:
(files for all versions)
dgn_main.c dlb_main.c lev_main.c makedefs.c mdgrep.h mdgrep.pl
panic.c recover.c
(lex/yacc input for special level and dungeon compilers)
dgn_comp.l dgn_comp.y lev_comp.l lev_comp.y
dlb_main.c makedefs.c mdgrep.h mdgrep.pl panic.c readtags.c
recover.c
win/Qt:
(files for the Qt 3 widget library - X11, Windows, Mac OS X, or Qtopia)
@@ -364,21 +384,20 @@ getline.c termcap.c topl.c wintty.c
win/win32:
(files for Windows versions - tested up to Windows 10)
NetHackW.c NetHackW.exe.manifest NetHackW.rc
dgnstuff-mingw32.mak dgnstuff.mak levstuff-mingw32.mak
levstuff.mak mhaskyn.c mhaskyn.h
mhdlg.c mhdlg.h mhfont.c
mhfont.h mhinput.c mhinput.h
mhmain.c mhmain.h mhmap.c
mhmap.h mhmenu.c mhmenu.h
mhmsg.h mhmsgwnd.c mhmsgwnd.h
mhrip.c mhrip.h mhsplash.c
mhsplash.h mhstatus.c mhstatus.h
mhtext.c mhtext.h mnsel.uu
mnselcnt.uu mnunsel.uu mswproc.c
nethack.rc nhresource.h petmark.uu
pilemark.uu record.uu resource.h
rip.uu splash.uu tiles-mingw32.mak
tiles.mak winMS.h
mhaskyn.c mhaskyn.h mhdlg.c
mhdlg.h mhfont.c mhfont.h
mhinput.c mhinput.h mhmain.c
mhmain.h mhmap.c mhmap.h
mhmenu.c mhmenu.h mhmsg.h
mhmsgwnd.c mhmsgwnd.h mhrip.c
mhrip.h mhsplash.c mhsplash.h
mhstatus.c mhstatus.h mhtext.c
mhtext.h mnsel.uu mnselcnt.uu
mnunsel.uu mswproc.c nethack.rc
nhresource.h petmark.uu pilemark.uu
record.uu resource.h rip.uu
splash.uu tiles-mingw32.mak tiles.mak
winMS.h
win/win32/vs2017:
(files for Visual Studio 2017 Community Edition builds)
@@ -386,18 +405,16 @@ NetHack.sln NetHack.vcxproj
NetHackPackage.appxmanifest NetHackPackage.wapproj
NetHackProperties.props NetHackW.vcxproj
PDCurses.vcxproj Package.StoreAssociation.xml
ScreenShot.PNG afterdgncomp.proj
afterdlb.proj afterlevcomp.proj
ScreenShot.PNG afterdlb.proj
aftermakedefs.proj afternethack.proj
afterrecover.proj aftertile2bmp.proj
aftertilemap.proj afteruudecode.proj
build.bat common.props
config.props console.props
default.props default_dll.props
default_lib.props dgncomp.vcxproj
dirs.props dlb.vcxproj
dll.props files.props
levcomp.vcxproj makedefs.vcxproj
default_lib.props dirs.props
dlb.vcxproj dll.props
files.props makedefs.vcxproj
nh340key.def nh340key.vcxproj
nhdefkey.def nhdefkey.vcxproj
nhraykey.def nhraykey.vcxproj
@@ -468,30 +485,9 @@ dat:
dungeon
(files generated by lev_comp at playground creation time)
Arc-fila.lev Arc-filb.lev Arc-goal.lev Arc-loca.lev Arc-strt.lev
Bar-fila.lev Bar-filb.lev Bar-goal.lev Bar-loca.lev Bar-strt.lev
Cav-fila.lev Cav-filb.lev Cav-goal.lev Cav-loca.lev Cav-strt.lev
Hea-fila.lev Hea-filb.lev Hea-goal.lev Hea-loca.lev Hea-strt.lev
Kni-fila.lev Kni-filb.lev Kni-goal.lev Kni-loca.lev Kni-strt.lev
Mon-fila.lev Mon-filb.lev Mon-goal.lev Mon-loca.lev Mon-strt.lev
Pri-fila.lev Pri-filb.lev Pri-goal.lev Pri-loca.lev Pri-strt.lev
Ran-fila.lev Ran-filb.lev Ran-goal.lev Ran-loca.lev Ran-strt.lev
Rog-fila.lev Rog-filb.lev Rog-goal.lev Rog-loca.lev Rog-strt.lev
Sam-fila.lev Sam-filb.lev Sam-goal.lev Sam-loca.lev Sam-strt.lev
Tou-fila.lev Tou-filb.lev Tou-goal.lev Tou-loca.lev Tou-strt.lev
Val-fila.lev Val-filb.lev Val-goal.lev Val-loca.lev Val-strt.lev
Wiz-fila.lev Wiz-filb.lev Wiz-goal.lev Wiz-loca.lev Wiz-strt.lev
air.lev asmodeus.lev astral.lev baalz.lev bigrm-1.lev
bigrm-2.lev bigrm-3.lev bigrm-4.lev bigrm-5.lev bigrm-6.lev
bigrm-7.lev bigrm-8.lev bigrm-9.lev bigrm-10.lev castle.lev
earth.lev fakewiz1.lev fakewiz2.lev fire.lev juiblex.lev
knox.lev medusa-1.lev medusa-2.lev medusa-3.lev medusa-4.lev
minefill.lev minend-1.lev minend-2.lev minend-3.lev minetn-1.lev
minetn-2.lev minetn-3.lev minetn-4.lev minetn-5.lev minetn-6.lev
minetn-7.lev oracle.lev orcus.lev sanctum.lev soko1-1.lev
soko1-2.lev soko2-1.lev soko2-2.lev soko3-1.lev soko3-2.lev
soko4-1.lev soko4-2.lev tower1.lev tower2.lev tower3.lev
valley.lev water.lev wizard1.lev wizard2.lev wizard3.lev
minetn-7.lev
(files generated by makedefs at playground creation time)
data dungeon.pdf options oracles quest.dat rumors

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 monmove.c $NHDT-Date: 1574475416 2019/11/23 02:16:56 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.114 $ */
/* NetHack 3.6 monmove.c $NHDT-Date: 1574530078 2019/11/23 17:27:58 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.115 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2006. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1673,15 +1673,16 @@ xchar x, y; /* spot 'mtmp' is considering moving to */
return TRUE;
}
/* oversimplification: creatures that bargethrough can't do so when
target monster is in rock or closed door or water (in particular,
avoid moving to spots where mondied() won't leave a corpse) */
/* oversimplification: creatures that bargethrough can't swap places
when target monster is in rock or closed door or water (in particular,
avoid moving to spots where mondied() won't leave a corpse; doesn't
matter whether barger is capable of moving to such a target spot if
it were unoccupied) */
if (!accessible(x, y)
/* mondied() allows ispool() as an exception to !accessible(),
but we'll only do that if both or neither of mtmp's spot and
destination spot are water so that we don't swap a water
critter onto land or the inverse */
&& (!is_pool(x, y) ^ !is_pool(mtmp->mx, mtmp->my)))
/* mondied() allows is_pool() as an exception to !accessible(),
but we'll only do that if 'mtmp' is already at a water location
so that we don't swap a water critter onto land */
&& !(is_pool(x, y) && is_pool(mtmp->mx, mtmp->my)))
return TRUE;
return FALSE;