Skip to content

Commit

Permalink
Merge branch '7.1-savebreaking' into master
Browse files Browse the repository at this point in the history
There were a few small conflicts. Not sure how those came about, because
master ought to have been merged into 7.1-savebreaking.
  • Loading branch information
copperwater committed May 26, 2022
2 parents 25e6962 + 7459180 commit be9a7ce
Show file tree
Hide file tree
Showing 357 changed files with 20,310 additions and 10,024 deletions.
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ These are hit-or-miss methods at best. You may not get a useful response with th

The preferred method of bug reporting is to open an issue on GitHub, because those are more persistent than chat and are visible to anyone viewing the repository. Note that a bug present in xNetHack may also be present in vanilla NetHack, and in that case it will be referred to the DevTeam for them to fix unless it's really severe.

### How to make a suggestion

Making a GitHub issue is the best way to suggest something as well. This ensures it won't get lost in chatter, and issues tend to get earlier attention and priority over items that come out of discussion in other forums.

### How to contribute code

The best way to do this is to open a pull request on GitHub, or if that's too much of a hassle and the code change isn't extensive, a patch file might be accepted.
Expand Down
14 changes: 9 additions & 5 deletions Files
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ outdated:
(files that are no longer maintained for current game code)
.travis.yml

outdated/dat:
(files that are no longer maintained for current game code)
symbols

outdated/include:
(files for GEM versions)
bitmfile.h gem_rsc.h load_img.h wingem.h
Expand Down Expand Up @@ -359,12 +363,12 @@ vmsmain.c vmsmisc.c vmstty.c vmsunix.c
sys/windows:
(files for Windows 7/8.x/10/11 version)
.nethackrc.template Install.windows Makefile.mingw32
Makefile.mingw32.depend Makefile.msc console.rc
Makefile.mingw32.depend Makefile.nmake console.rc
consoletty.c nethack.def nhico.uu
nhsetup.bat ntsound.c porthelp
stub-pdcscrn.c stubs.c sysconf.template
win10.c win10.h win32api.h
windmain.c windsys.c winos.h
stubs.c sysconf.template win10.c
win10.h win32api.h windmain.c
windsys.c winos.h

sys/windows/vs:
(files for Visual Studio 2017 or 2019 or 2022 Community Edition builds)
Expand Down Expand Up @@ -525,7 +529,7 @@ win/share:
bmptiles.c gifread.c giftiles.c monsters.txt nhicns.uu
nhsplash.xpm objects.txt other.txt ppmwrite.c renumtiles.pl
safeproc.c thintile.c tile.doc tile.h tile2bmp.c
tilemap.c tileset.c tiletext.c
tilemap.c tileset.c tiletext.c tiletxt.c

win/shim:
(file in top directory)
Expand Down
12 changes: 6 additions & 6 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ NetHack 3.6.
NetHack 3.7.0 work-in-progress is not a release of NetHack. As a .0 version,
and still very early in its development cycle, there has already been changes
made, and there will continue to be many more prior to an eventual release.
The file doc/fixes37.0 in the source distribution will be updated with a list
of fixes as they are committed.
The file doc/fixes3-7-0.txt in the source distribution will be updated with
a list of fixes as they are committed.

In short -- there are likely to be bugs. Don't treat NetHack-3.7 branch as
released code, and if stability is paramount, then the most recent
Expand All @@ -18,9 +18,9 @@ We're making the .0 work-in-progress available so that you can observe, test
out, and contribute to its development. Constructive suggestions, GitHub pull
requests, and bug reports are all welcome and encouraged.

The file doc/fixes37.0 in the source distribution has a full list of bug-fixes
included so far, as well as brief mentions of some of the other code changes.
The text in there was written for the development team's own use and is
The file doc/fixes3-7-0.txt in the source distribution has a full list of
bug-fixes included so far, as well as brief mentions of some of the other code
changes. 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 in
that file. Some entries might be considered "spoilers", particularly in the
"new features" section.
Expand Down Expand Up @@ -211,6 +211,6 @@ In our own patches, we will assume that your code is synchronized with ours.

-- Good luck, and happy Hacking --

# $NHDT-Date: 1583508658 2020/03/06 15:30:58 $ $NHDT-Branch: NetHack-3.6-Mar2020 $:$NHDT-Revision: 1.80 $
# $NHDT-Date: 1652133501 2022/05/09 21:58:21 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.97 $
# Copyright (c) 2012 by Michael Allison
# NetHack may be freely redistributed. See license for details.
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ steps:
export LUA_VERSION=5.4.4
#
# 64-bit
#export CURLSRC=https://github.com/brechtsanders/winlibs_mingw/releases/download/11.2.0-9.0.0-ucrt-r4/winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64ucrt-9.0.0-r4.zip
#export CURLSRC=https://github.com/brechtsanders/winlibs_mingw/releases/download/11.2.0-9.0.0-ucrt-r5/winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64ucrt-9.0.0-r5.zip
#export CURLDST=mingw-x64.zip
#export MINGWBIN=mingw64
#export MSYSTEM=MINGW64
#
# 32-bit
export CURLSRC=https://github.com/brechtsanders/winlibs_mingw/releases/download/11.2.0-9.0.0-ucrt-r4/winlibs-i686-posix-dwarf-gcc-11.2.0-mingw-w64ucrt-9.0.0-r4.zip
export CURLSRC=https://github.com/brechtsanders/winlibs_mingw/releases/download/11.2.0-9.0.0-ucrt-r5/winlibs-i686-posix-dwarf-gcc-11.2.0-mingw-w64ucrt-9.0.0-r5.zip
export CURLDST=mingw-x86.zip
export MINGWBIN=mingw32
export MSYSTEM=MINGW32
Expand Down
1 change: 1 addition & 0 deletions dat/.gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*.def NHSUBST
*.des NHSUBST
*.txt NHSUBST
*.lua NHSUBST
data.base NHSUBST
symbols NHSUBST
tribute NHSUBST
Expand Down
17 changes: 9 additions & 8 deletions dat/Arc-fila.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- NetHack 3.7 Arch.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $
-- NetHack Archeologist Arc-fila.lua $NHDT-Date: 1652195998 2022/05/10 15:19:58 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $
-- Copyright (c) 1989 by Jean-Christophe Collet
-- Copyright (c) 1991 by M. Stephenson
-- NetHack may be freely redistributed. See license for details.
Expand All @@ -15,25 +15,26 @@ des.terrain({ selection=trees, typ="T" })

-- make random slices through jungle bits
for i=1,20 do
local lx, ly = alllev:rndcoord()
local pt = alllev:rndcoord()
local lx, ly = pt.x, pt.y
local lx2, ly2 = lx + math.random(-10,10), ly + math.random(-5, 5)
if alllev:get(lx2, ly2) > 0 then
des.terrain({ selection=selection.randline(lx, ly, lx2, ly2, 40), typ='.' })
end
end

-- "stairs" on opposite ends
local leftstair = { selection.line(0,0, 0,20):rndcoord() }
local rightstair = { selection.line(78,1, 78,20):rndcoord() }
local leftstair = selection.line(0,0, 0,20):rndcoord()
local rightstair = selection.line(78,1, 78,20):rndcoord()
-- guarantee a clearing around the stairs
des.terrain({ selection = selection.ellipse(leftstair[1], leftstair[2], 2, 3, 1), typ='.' })
des.terrain({ selection = selection.ellipse(rightstair[1], rightstair[2], 2, 3, 1), typ='.' })
des.terrain({ selection = selection.ellipse(leftstair.x, leftstair.y, 2, 3, 1), typ='.' })
des.terrain({ selection = selection.ellipse(rightstair.x, rightstair.y, 2, 3, 1), typ='.' })
des.stair({ dir = "up", coord = leftstair })
des.stair({ dir = "down", coord = rightstair })

-- make a path through the forest (not guaranteed to not require getting through
-- a diagonal choke point of two trees)
local path = selection.randline(leftstair[1], leftstair[2], rightstair[1], rightstair[2], 80)
local path = selection.randline(leftstair.x, leftstair.y, rightstair.x, rightstair.y, 80)
des.replace_terrain({ selection=path, --:percentage(75),
fromterrain='T', toterrain='.' })

Expand Down Expand Up @@ -96,7 +97,7 @@ end
-- make "no item on top" a makemon flag
dryspots = alllev:clone():filter_mapchar(".")
for i=1,11 do
des.monster({ class="S", coord={dryspots:rndcoord(1)} })
des.monster("S", dryspots:rndcoord(1))
end
if didwater then
des.monster("giant eel")
Expand Down
21 changes: 11 additions & 10 deletions dat/Arc-filb.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- NetHack 3.7 Arch.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $
-- NetHack Archeologist Arc-filb.lua $NHDT-Date: 1652195998 2022/05/10 15:19:58 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $
-- Copyright (c) 1989 by Jean-Christophe Collet
-- Copyright (c) 1991 by M. Stephenson
-- NetHack may be freely redistributed. See license for details.
Expand Down Expand Up @@ -136,7 +136,8 @@ for i=1,60 do
local wallsE = selection.match(".w ")
local wallsW = selection.match(" w.")
local allwalls = wallsN | wallsS | wallsE | wallsW
local wx, wy = allwalls:rndcoord(1) -- remove this spot from allwalls
local wallpt = allwalls:rndcoord(1) -- remove this spot from allwalls
local wx, wy = wallpt.x, wallpt.y

-- des.terrain({ selection = wallsN, typ="}" })
local north, south, east, west = false, false, false, false
Expand Down Expand Up @@ -191,13 +192,13 @@ if n_ends > 0 then
-- Attempt to place the downstair sufficiently far away from the upstair.
local stairell = selection.ellipse(ustairx, ustairy, 20, 10, 1):negate()
local far_ends = stairell & deadends
local dstairx,dstairy = far_ends:rndcoord()
if dstairx < 0 or dstairy < 0 then
local dstair = far_ends:rndcoord()
if dstair.x < 0 or dstair.y < 0 then
-- pick any dead end; potential future extension is to find the furthest
-- one away
dstairx, dstairy = deadends:rndcoord()
dstair = deadends:rndcoord()
end
des.stair({ dir = "down", coord = {dstairx, dstairy} })
des.stair({ dir = "down", coord = dstair })
else
des.stair("down")
end
Expand All @@ -211,7 +212,7 @@ end
local n_mummies = 10 + d(4,4)
local mummies_in_ends = math.min(math.floor(n_ends * 3 / 4), n_mummies)
function mkmummy(deadend)
local template = { class='M', id='human mummy', waiting=1, coord={deadends:rndcoord()} }
local template = { class='M', id='human mummy', waiting=1, coord=deadends:rndcoord() }
if not deadend then
template['coord'] = nil
end
Expand Down Expand Up @@ -240,7 +241,7 @@ for i=1,4+d(6) do
if snk_room == nil then
des.monster(snkid)
else
des.monster({ id=snkid, coord={snakerooms[snk_room]:rndcoord()} })
des.monster({ id=snkid, coord=snakerooms[snk_room]:rndcoord() })
end
end

Expand All @@ -254,7 +255,7 @@ for i = 1,10+d(10) do
des.object({ id="gold piece", quantity = d(250) })
end
for i=1,2+d(3) do
local template = { id="chest", coord={deadends:rndcoord()} }
local template = { id="chest", coord=deadends:rndcoord() }
if percent(50) then
-- make it a mummy trap
template['trapped'] = 1
Expand All @@ -268,6 +269,6 @@ end
local wpn_mats = { "copper", "silver", "gold", "bone" }
local wpns = { "short sword", "dagger", "knife", "spear", "javelin", "quarterstaff", "axe", "flail" }
for i=1,d(2,4) do
des.object({ id=wpns[d(#wpns)], material=wpn_mats[d(#wpn_mats)], coord={deadends:rndcoord()} })
des.object({ id=wpns[d(#wpns)], material=wpn_mats[d(#wpn_mats)], coord=deadends:rndcoord() })
end

27 changes: 12 additions & 15 deletions dat/Arc-goal.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- NetHack 3.7 Arch.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $
-- NetHack Archeologist Arc-goal.lua $NHDT-Date: 1652195998 2022/05/10 15:19:58 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
-- Copyright (c) 1989 by Jean-Christophe Collet
-- Copyright (c) 1991 by M. Stephenson
-- NetHack may be freely redistributed. See license for details.
Expand Down Expand Up @@ -78,7 +78,7 @@ for i=1,#statue_coords do
end
local rndstatue_mons = { 'couatl', 'human mummy', 'stone golem' }
for i=1,d(2,3) do
des.object({ id='statue', montype=rndstatue_mons[d(#rndstatue_mons)], historic=true, coord={non_hall_areas:rndcoord()} })
des.object({ id='statue', montype=rndstatue_mons[d(#rndstatue_mons)], historic=true, coord=non_hall_areas:rndcoord() })
end

-- Nemesis
Expand Down Expand Up @@ -128,18 +128,16 @@ des.monster({ id="archeologist", x=58, y=08, peaceful=0, waiting=1, inventory=he

-- Rubble from the dig operation
for i=1,20 do
des.object({ id="rock", coord={bigroom_and_tunnel:rndcoord()}, quantity=d(10) })
des.object({ id="rock", coord=bigroom_and_tunnel:rndcoord(), quantity=d(10) })
end
for i=1,d(2,3) do
des.object({ id="boulder", coord={tunnel_only:rndcoord()} })
des.object("boulder", tunnel_only:rndcoord())
end

-- Pits from the dig operation
for i=1,d(3,2) do
x1, y1 = bigroom_and_tunnel:rndcoord()
x2, y2 = tunnel_only:rndcoord()
des.trap('pit', x1, y1)
des.trap('pit', x2, y2)
des.trap('pit', bigroom_and_tunnel:rndcoord())
des.trap('pit', tunnel_only:rndcoord())
end

-- Identify dead ends for putting stuff in
Expand All @@ -153,19 +151,18 @@ deadends:set(41,17, 1)
for i=1,d(6,2) do
-- These ones aren't waiting for approach. They've already been disturbed by
-- the dig option.
des.monster({ id='human mummy', coord={non_hall_areas:rndcoord()} })
des.monster('human mummy', non_hall_areas:rndcoord())
end
for i=1,d(3) do
des.monster({ class='M', coord={deadends:rndcoord()} })
des.monster('M', deadends:rndcoord())
end
for i=1,d(2,3) do
des.monster({ class='S', coord={non_hall_areas:rndcoord()} })
des.monster('S', non_hall_areas:rndcoord())
end

-- Traps
for i=1,10+d(5) do
x1, y1 = non_hall_areas:rndcoord()
des.trap({ x=x1, y=y1, spider_on_web=false })
des.trap({ coord=non_hall_areas:rndcoord(), spider_on_web=false })
end
des.trap("rolling boulder")

Expand All @@ -174,7 +171,7 @@ for i=1,10 do
des.object({ id='gold piece', quantity = d(250) })
end
for i=1,d(2,2) do
local box = { id='chest', material='gold', coord={deadends:rndcoord()}, trapped=1, spe=3 }
local box = { id='chest', material='gold', coord=deadends:rndcoord(), trapped=1, spe=3 }
if percent(50) then
box['trapped'] = 1
box['spe'] = 3
Expand All @@ -185,5 +182,5 @@ end
local wpn_mats = { "copper", "silver", "gold", "bone" }
local wpns = { "short sword", "dagger", "knife", "spear", "javelin", "quarterstaff", "axe", "flail" }
for i=1,d(2,3) do
des.object({ id=wpns[d(#wpns)], material=wpn_mats[d(#wpn_mats)], coord={non_hall_areas:rndcoord()} })
des.object({ id=wpns[d(#wpns)], material=wpn_mats[d(#wpn_mats)], coord=non_hall_areas:rndcoord() })
end
18 changes: 9 additions & 9 deletions dat/Arc-loca.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- NetHack 3.7 Arch.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $
-- NetHack Archeologist Arc-loca.lua $NHDT-Date: 1652195999 2022/05/10 15:19:59 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
-- Copyright (c) 1989 by Jean-Christophe Collet
-- Copyright (c) 1991 by M. Stephenson
-- NetHack may be freely redistributed. See license for details.
Expand Down Expand Up @@ -68,7 +68,7 @@ function pickonepoint(list)
for i=1,#list do
tmpsel:set(list[i][1], list[i][2])
end
return {tmpsel:rndcoord()}
return tmpsel:rndcoord()
end
des.terrain({ coord = pickonepoint({{75,06},{74,07},{75,08}}), typ='S' }) -- door
des.terrain({ coord = pickonepoint({{64,07},{66,07},{68,05}}), typ='S' }) -- door
Expand Down Expand Up @@ -96,7 +96,7 @@ end
-- most of them will generate appropriate coordinates and a boulder.
local bouldertraps = selection.area(60,16,65,18)
for i=1,8 do
des.trap({ coord = {bouldertraps:rndcoord(1)}, type = "rolling boulder" })
des.trap("rolling boulder", bouldertraps:rndcoord(1))
end

-- Some loot.
Expand Down Expand Up @@ -166,7 +166,7 @@ for i=1,8 do
end
interior_spaces = selection.area(48,00,76,19):filter_mapchar('.')
for i=1,11 do
des.trap({ coord = {interior_spaces:rndcoord(1)}, spider_on_web = false })
des.trap({ coord = interior_spaces:rndcoord(1), spider_on_web = false })
end
for i=1,d(3) do
des.trap('fire')
Expand Down Expand Up @@ -210,12 +210,12 @@ des.monster({ id='human mummy', x=73, y=18, waiting=1 })
-- Other monsters
local valid_outside = outside:clone():filter_mapchar('.')
for i=1,d(3,2) do
des.monster({ class='S', coord={valid_outside:rndcoord(1)} })
des.monster('S', valid_outside:rndcoord(1))
end
des.monster({ class='f', coord={valid_outside:rndcoord(1)} })
des.monster({ class='Y', coord={valid_outside:rndcoord(1)} })
des.monster('f', valid_outside:rndcoord(1))
des.monster('Y', valid_outside:rndcoord(1))
for i=1,d(5) do
des.monster({ id='giant bat', coord={inside:rndcoord()} })
des.monster('giant bat', inside:rndcoord())
end

-- Loot cache buried not very deep
Expand All @@ -234,4 +234,4 @@ for i=1,#statue_coords do
end

-- Treasure?
des.engraving({ type="engrave", coord={outside:rndcoord()}, text="X marks the spot." })
des.engraving({ type="engrave", coord=outside:rndcoord(), text="X marks the spot." })
Loading

0 comments on commit be9a7ce

Please sign in to comment.