Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
This commit is contained in:
113
Files
113
Files
@@ -1,4 +1,3 @@
|
|||||||
sh: dat/GENFILES: No such file or directory
|
|
||||||
This is a listing of all files in a full NetHack 3.6 distribution, organized
|
This is a listing of all files in a full NetHack 3.6 distribution, organized
|
||||||
in their standard manner on a UNIX system. It indicates which files are
|
in their standard manner on a UNIX system. It indicates which files are
|
||||||
necessary for which versions, so that you can tell which files may be deleted
|
necessary for which versions, so that you can tell which files may be deleted
|
||||||
@@ -31,15 +30,15 @@ prepare-commit-msg
|
|||||||
|
|
||||||
dat:
|
dat:
|
||||||
(files for all versions)
|
(files for all versions)
|
||||||
Arch.des Barb.des Caveman.des Healer.des Knight.des
|
Arch.des Barb.des Caveman.des GENFILES Healer.des
|
||||||
Monk.des Priest.des Ranger.des Rogue.des Samurai.des
|
Knight.des Monk.des Priest.des Ranger.des Rogue.des
|
||||||
Tourist.des Valkyrie.des Wizard.des bigroom.des bogusmon.txt
|
Samurai.des Tourist.des Valkyrie.des Wizard.des bigroom.des
|
||||||
castle.des cmdhelp data.base dungeon.def endgame.des
|
bogusmon.txt castle.des cmdhelp data.base dungeon.def
|
||||||
engrave.txt epitaph.txt gehennom.des help hh
|
endgame.des engrave.txt epitaph.txt gehennom.des help
|
||||||
history keyhelp knox.des license medusa.des
|
hh history keyhelp knox.des license
|
||||||
mines.des opthelp oracle.des oracles.txt quest.txt
|
medusa.des mines.des opthelp oracle.des oracles.txt
|
||||||
rumors.fal rumors.tru sokoban.des symbols tower.des
|
quest.txt rumors.fal rumors.tru sokoban.des symbols
|
||||||
tribute wizhelp yendor.des
|
tower.des tribute wizhelp yendor.des
|
||||||
|
|
||||||
doc:
|
doc:
|
||||||
(files for all versions)
|
(files for all versions)
|
||||||
@@ -74,16 +73,16 @@ beconf.h botl.h color.h config.h config1.h
|
|||||||
context.h coord.h decl.h def_os2.h dgn_file.h
|
context.h coord.h decl.h def_os2.h dgn_file.h
|
||||||
display.h dlb.h dungeon.h engrave.h extern.h
|
display.h dlb.h dungeon.h engrave.h extern.h
|
||||||
flag.h func_tab.h global.h hack.h integer.h
|
flag.h func_tab.h global.h hack.h integer.h
|
||||||
lev.h lint.h mail.h mextra.h mfndpos.h
|
isaac64.h lev.h lint.h mail.h mextra.h
|
||||||
micro.h mkroom.h monattk.h mondata.h monflag.h
|
mfndpos.h micro.h mkroom.h monattk.h mondata.h
|
||||||
monst.h monsym.h ntconf.h obj.h objclass.h
|
monflag.h monst.h monsym.h ntconf.h obj.h
|
||||||
os2conf.h patchlevel.h pcconf.h permonst.h prop.h
|
objclass.h os2conf.h patchlevel.h pcconf.h permonst.h
|
||||||
qtext.h quest.h rect.h region.h rm.h
|
prop.h qtext.h quest.h rect.h region.h
|
||||||
skills.h sp_lev.h spell.h sys.h system.h
|
rm.h skills.h sp_lev.h spell.h sys.h
|
||||||
tcap.h tileset.h timeout.h tosconf.h tradstdc.h
|
system.h tcap.h tileset.h timeout.h tosconf.h
|
||||||
trampoli.h trap.h unixconf.h vision.h vmsconf.h
|
tradstdc.h trampoli.h trap.h unixconf.h vision.h
|
||||||
wceconf.h winami.h wincurs.h winprocs.h wintype.h
|
vmsconf.h wceconf.h winami.h wincurs.h winprocs.h
|
||||||
you.h youprop.h
|
wintype.h you.h youprop.h
|
||||||
|
|
||||||
(file for tty versions)
|
(file for tty versions)
|
||||||
wintty.h
|
wintty.h
|
||||||
@@ -99,19 +98,19 @@ bones.c botl.c cmd.c dbridge.c decl.c detect.c
|
|||||||
dig.c display.c dlb.c do.c do_name.c do_wear.c
|
dig.c display.c dlb.c do.c do_name.c do_wear.c
|
||||||
dog.c dogmove.c dokick.c dothrow.c drawing.c dungeon.c
|
dog.c dogmove.c dokick.c dothrow.c drawing.c dungeon.c
|
||||||
eat.c end.c engrave.c exper.c explode.c extralev.c
|
eat.c end.c engrave.c exper.c explode.c extralev.c
|
||||||
files.c fountain.c hack.c hacklib.c invent.c light.c
|
files.c fountain.c hack.c hacklib.c invent.c isaac64.c
|
||||||
lock.c mail.c makemon.c mapglyph.c mcastu.c mhitm.c
|
light.c lock.c mail.c makemon.c mapglyph.c mcastu.c
|
||||||
mhitu.c minion.c mklev.c mkmap.c mkmaze.c mkobj.c
|
mhitm.c mhitu.c minion.c mklev.c mkmap.c mkmaze.c
|
||||||
mkroom.c mon.c mondata.c monmove.c monst.c mplayer.c
|
mkobj.c mkroom.c mon.c mondata.c monmove.c monst.c
|
||||||
mthrowu.c muse.c music.c o_init.c objects.c objnam.c
|
mplayer.c mthrowu.c muse.c music.c o_init.c objects.c
|
||||||
options.c pager.c pickup.c pline.c polyself.c potion.c
|
objnam.c options.c pager.c pickup.c pline.c polyself.c
|
||||||
pray.c priest.c quest.c questpgr.c read.c rect.c
|
potion.c pray.c priest.c quest.c questpgr.c read.c
|
||||||
region.c restore.c rip.c rnd.c role.c rumors.c
|
rect.c region.c restore.c rip.c rnd.c role.c
|
||||||
save.c shk.c shknam.c sit.c sounds.c sp_lev.c
|
rumors.c save.c shk.c shknam.c sit.c sounds.c
|
||||||
spell.c steal.c steed.c sys.c teleport.c timeout.c
|
sp_lev.c spell.c steal.c steed.c sys.c teleport.c
|
||||||
topten.c track.c trap.c u_init.c uhitm.c vault.c
|
timeout.c topten.c track.c trap.c u_init.c uhitm.c
|
||||||
version.c vision.c weapon.c were.c wield.c windows.c
|
vault.c version.c vision.c weapon.c were.c wield.c
|
||||||
wizard.c worm.c worn.c write.c zap.c
|
windows.c wizard.c worm.c worn.c write.c zap.c
|
||||||
|
|
||||||
sys/amiga:
|
sys/amiga:
|
||||||
(files for Amiga versions - untested for 3.6.2)
|
(files for Amiga versions - untested for 3.6.2)
|
||||||
@@ -394,6 +393,54 @@ tiles.vcxproj uudecode.vcxproj
|
|||||||
This is a list of files produced by auxiliary programs. They can all be
|
This is a list of files produced by auxiliary programs. They can all be
|
||||||
regenerated from the files in the distribution.
|
regenerated from the files in the distribution.
|
||||||
|
|
||||||
|
dat:
|
||||||
|
(file generated by dgn_comp at playground creation time)
|
||||||
|
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
|
||||||
|
|
||||||
|
(files generated by makedefs at playground creation time)
|
||||||
|
data dungeon.pdf options oracles quest.dat rumors
|
||||||
|
|
||||||
|
(files generated for Qt interface on Mac OS X)
|
||||||
|
Info.plist nethack.icns
|
||||||
|
|
||||||
|
(files generated for win32 at compile time)
|
||||||
|
dlb.lst porthelp
|
||||||
|
|
||||||
|
(files generated for win32 gui at compile time)
|
||||||
|
guioptions
|
||||||
|
|
||||||
|
(files generated for win32 tty at compile time)
|
||||||
|
ttyoptions
|
||||||
|
|
||||||
|
(tile files optionally generated for X ports at playground creation time)
|
||||||
|
pet_mark.xbm rip.xpm x11tiles
|
||||||
|
|
||||||
Arc-fila.lev Arc-filb.lev Arc-goal.lev Arc-loca.lev Arc-strt.lev
|
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
|
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
|
Cav-fila.lev Cav-filb.lev Cav-goal.lev Cav-loca.lev Cav-strt.lev
|
||||||
|
|||||||
1
dat/.gitattributes
vendored
1
dat/.gitattributes
vendored
@@ -4,5 +4,6 @@
|
|||||||
data.base NHSUBST
|
data.base NHSUBST
|
||||||
symbols NHSUBST
|
symbols NHSUBST
|
||||||
tribute NHSUBST
|
tribute NHSUBST
|
||||||
|
GENFILES NHSUBST
|
||||||
* NH_filestag=(file%s_for_all_versions)
|
* NH_filestag=(file%s_for_all_versions)
|
||||||
..files NH_filegenprog
|
..files NH_filegenprog
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
# NetHack 3.6 GENFILES $NHDT-Date: 1550799147 2019/02/22 01:32:27 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.0 $
|
||||||
|
# Copyright (c) 2018 by Kenneth Lorber
|
||||||
|
# NetHack may be freely redistributed. See license for details.
|
||||||
|
|
||||||
# 2 sections:
|
# 2 sections:
|
||||||
# *.lev entries are generated by reading *.des
|
# *.lev entries are generated by reading *.des
|
||||||
|
|||||||
2016
doc/Guidebook.txt
2016
doc/Guidebook.txt
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
|||||||
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.259 $ $NHDT-Date: 1550629490 2019/02/20 02:24:50 $
|
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.261 $ $NHDT-Date: 1550800390 2019/02/22 01:53:10 $
|
||||||
|
|
||||||
This fixes36.2 file is here to capture information about updates in the 3.6.x
|
This fixes36.2 file is here to capture information about updates in the 3.6.x
|
||||||
lineage following the release of 3.6.1 in April 2018. Please note, however,
|
lineage following the release of 3.6.1 in April 2018. Please note, however,
|
||||||
@@ -373,6 +373,13 @@ when donning armor, defer flagging its +/- value--which can be deduced from
|
|||||||
then (player might still deduce the +/- value but hero won't learn it)
|
then (player might still deduce the +/- value but hero won't learn it)
|
||||||
a monster with resistances supplied by worn armor would lose them if that
|
a monster with resistances supplied by worn armor would lose them if that
|
||||||
monster went through a shape change even if the armor stayed worn
|
monster went through a shape change even if the armor stayed worn
|
||||||
|
after using 'f' to fire/throw with autoquiver enabled and numpad off, then
|
||||||
|
using ^A to repeat, if ammo was just used up and there's nothing
|
||||||
|
suitable to autoquiver it would pick the item in the inventory slot
|
||||||
|
corresponding to the direction letter from preceding 'fire' (and if
|
||||||
|
there was such an item, then ask for direction since ^A data ran out)
|
||||||
|
early rolling boulder trap lacking any boulder might still have the corpse
|
||||||
|
of a dead adventurer
|
||||||
|
|
||||||
|
|
||||||
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
|
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 dothrow.c $NHDT-Date: 1545597420 2018/12/23 20:37:00 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.155 $ */
|
/* NetHack 3.6 dothrow.c $NHDT-Date: 1550784489 2019/02/21 21:28:09 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.157 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -384,6 +384,8 @@ dofire()
|
|||||||
/* if autoquiver is disabled or has failed, prompt for missile;
|
/* if autoquiver is disabled or has failed, prompt for missile;
|
||||||
fill quiver with it if it's not wielded */
|
fill quiver with it if it's not wielded */
|
||||||
if (!obj) {
|
if (!obj) {
|
||||||
|
/* direction of previous throw is not suitable answer here */
|
||||||
|
in_doagain = FALSE;
|
||||||
obj = getobj(uslinging() ? bullets : toss_objs, "throw");
|
obj = getobj(uslinging() ? bullets : toss_objs, "throw");
|
||||||
/* Q command doesn't allow gold in quiver */
|
/* Q command doesn't allow gold in quiver */
|
||||||
if (obj && !obj->owornmask && obj->oclass != COIN_CLASS)
|
if (obj && !obj->owornmask && obj->oclass != COIN_CLASS)
|
||||||
@@ -727,12 +729,11 @@ int x, y;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME:
|
/* FIXME:
|
||||||
* Each trap should really trigger on the recoil if
|
* Each trap should really trigger on the recoil if it would
|
||||||
* it would trigger during normal movement. However,
|
* trigger during normal movement. However, not all the possible
|
||||||
* not all the possible side-effects of this are
|
* side-effects of this are tested [as of 3.4.0] so we trigger
|
||||||
* tested [as of 3.4.0] so we trigger those that
|
* those that we have tested, and offer a message for the ones
|
||||||
* we have tested, and offer a message for the
|
* that we have not yet tested.
|
||||||
* ones that we have not yet tested.
|
|
||||||
*/
|
*/
|
||||||
if ((ttmp = t_at(x, y)) != 0) {
|
if ((ttmp = t_at(x, y)) != 0) {
|
||||||
if (stopping_short) {
|
if (stopping_short) {
|
||||||
@@ -1037,7 +1038,7 @@ boolean hitsroof;
|
|||||||
} else if (petrifier && !Stone_resistance
|
} else if (petrifier && !Stone_resistance
|
||||||
&& !(poly_when_stoned(youmonst.data)
|
&& !(poly_when_stoned(youmonst.data)
|
||||||
&& polymon(PM_STONE_GOLEM))) {
|
&& polymon(PM_STONE_GOLEM))) {
|
||||||
petrify:
|
petrify:
|
||||||
killer.format = KILLED_BY;
|
killer.format = KILLED_BY;
|
||||||
Strcpy(killer.name, "elementary physics"); /* "what goes up..." */
|
Strcpy(killer.name, "elementary physics"); /* "what goes up..." */
|
||||||
You("turn to stone.");
|
You("turn to stone.");
|
||||||
@@ -1104,9 +1105,9 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */
|
|||||||
if ((obj->cursed || obj->greased) && (u.dx || u.dy) && !rn2(7)) {
|
if ((obj->cursed || obj->greased) && (u.dx || u.dy) && !rn2(7)) {
|
||||||
boolean slipok = TRUE;
|
boolean slipok = TRUE;
|
||||||
|
|
||||||
if (ammo_and_launcher(obj, uwep))
|
if (ammo_and_launcher(obj, uwep)) {
|
||||||
pline("%s!", Tobjnam(obj, "misfire"));
|
pline("%s!", Tobjnam(obj, "misfire"));
|
||||||
else {
|
} else {
|
||||||
/* only slip if it's greased or meant to be thrown */
|
/* only slip if it's greased or meant to be thrown */
|
||||||
if (obj->greased || throwing_weapon(obj))
|
if (obj->greased || throwing_weapon(obj))
|
||||||
/* BUG: this message is grammatically incorrect if obj has
|
/* BUG: this message is grammatically incorrect if obj has
|
||||||
@@ -1150,7 +1151,8 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */
|
|||||||
if (u.dz < 0
|
if (u.dz < 0
|
||||||
/* Mjollnir must we wielded to be thrown--caller verifies this;
|
/* Mjollnir must we wielded to be thrown--caller verifies this;
|
||||||
aklys must we wielded as primary to return when thrown */
|
aklys must we wielded as primary to return when thrown */
|
||||||
&& ((Role_if(PM_VALKYRIE) && obj->oartifact == ART_MJOLLNIR) || tethered_weapon)
|
&& ((Role_if(PM_VALKYRIE) && obj->oartifact == ART_MJOLLNIR)
|
||||||
|
|| tethered_weapon)
|
||||||
&& !impaired) {
|
&& !impaired) {
|
||||||
pline("%s the %s and returns to your hand!", Tobjnam(obj, "hit"),
|
pline("%s the %s and returns to your hand!", Tobjnam(obj, "hit"),
|
||||||
ceiling(u.ux, u.uy));
|
ceiling(u.ux, u.uy));
|
||||||
@@ -1190,8 +1192,8 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* crossbow range is independent of strength */
|
/* crossbow range is independent of strength */
|
||||||
crossbowing =
|
crossbowing = (ammo_and_launcher(obj, uwep)
|
||||||
(ammo_and_launcher(obj, uwep) && weapon_type(uwep) == P_CROSSBOW);
|
&& weapon_type(uwep) == P_CROSSBOW);
|
||||||
urange = (crossbowing ? 18 : (int) ACURRSTR) / 2;
|
urange = (crossbowing ? 18 : (int) ACURRSTR) / 2;
|
||||||
/* balls are easy to throw or at least roll;
|
/* balls are easy to throw or at least roll;
|
||||||
* also, this insures the maximum range of a ball is greater
|
* also, this insures the maximum range of a ball is greater
|
||||||
@@ -1360,7 +1362,8 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */
|
|||||||
thrownobj = (struct obj *) 0;
|
thrownobj = (struct obj *) 0;
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
if (tethered_weapon) tmp_at(DISP_END, 0);
|
if (tethered_weapon)
|
||||||
|
tmp_at(DISP_END, 0);
|
||||||
/* when this location is stepped on, the weapon will be
|
/* when this location is stepped on, the weapon will be
|
||||||
auto-picked up due to 'obj->was_thrown' of 1;
|
auto-picked up due to 'obj->was_thrown' of 1;
|
||||||
addinv() prevents thrown Mjollnir from being placed
|
addinv() prevents thrown Mjollnir from being placed
|
||||||
@@ -1425,8 +1428,7 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* an object may hit a monster; various factors adjust the chance of hitting
|
/* an object may hit a monster; various factors adjust chance of hitting */
|
||||||
*/
|
|
||||||
int
|
int
|
||||||
omon_adj(mon, obj, mon_notices)
|
omon_adj(mon, obj, mon_notices)
|
||||||
struct monst *mon;
|
struct monst *mon;
|
||||||
@@ -1525,7 +1527,7 @@ register struct obj *obj; /* thrownobj or kickedobj or uwep */
|
|||||||
* No bonuses for fleeing or stunned targets (they don't dodge
|
* No bonuses for fleeing or stunned targets (they don't dodge
|
||||||
* melee blows as readily, but dodging arrows is hard anyway).
|
* melee blows as readily, but dodging arrows is hard anyway).
|
||||||
* Not affected by traps, etc.
|
* Not affected by traps, etc.
|
||||||
* Certain items which don't in themselves do damage ignore tmp.
|
* Certain items which don't in themselves do damage ignore 'tmp'.
|
||||||
* Distance and monster size affect chance to hit.
|
* Distance and monster size affect chance to hit.
|
||||||
*/
|
*/
|
||||||
tmp = -1 + Luck + find_mac(mon) + u.uhitinc
|
tmp = -1 + Luck + find_mac(mon) + u.uhitinc
|
||||||
@@ -1848,7 +1850,7 @@ register struct obj *obj;
|
|||||||
(void) mpickobj(mon, obj); /* may merge and free obj */
|
(void) mpickobj(mon, obj); /* may merge and free obj */
|
||||||
ret = 1;
|
ret = 1;
|
||||||
|
|
||||||
nopick:
|
nopick:
|
||||||
if (!Blind)
|
if (!Blind)
|
||||||
pline1(buf);
|
pline1(buf);
|
||||||
if (!tele_restrict(mon))
|
if (!tele_restrict(mon))
|
||||||
|
|||||||
33
src/mklev.c
33
src/mklev.c
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 mklev.c $NHDT-Date: 1511681724 2017/11/26 07:35:24 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.47 $ */
|
/* NetHack 3.6 mklev.c $NHDT-Date: 1550800390 2019/02/22 01:53:10 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.59 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Alex Smith, 2017. */
|
/*-Copyright (c) Alex Smith, 2017. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -89,7 +89,7 @@ xchar xl, yl, xh, yh;
|
|||||||
/* cannot find something reasonable -- strange */
|
/* cannot find something reasonable -- strange */
|
||||||
x = xl;
|
x = xl;
|
||||||
y = yh;
|
y = yh;
|
||||||
gotit:
|
gotit:
|
||||||
cc->x = x;
|
cc->x = x;
|
||||||
cc->y = y;
|
cc->y = y;
|
||||||
return;
|
return;
|
||||||
@@ -99,11 +99,12 @@ void
|
|||||||
sort_rooms()
|
sort_rooms()
|
||||||
{
|
{
|
||||||
#if defined(SYSV) || defined(DGUX)
|
#if defined(SYSV) || defined(DGUX)
|
||||||
qsort((genericptr_t) rooms, (unsigned) nroom, sizeof(struct mkroom),
|
#define CAST_nroom (unsigned) nroom
|
||||||
do_comp);
|
|
||||||
#else
|
#else
|
||||||
qsort((genericptr_t) rooms, nroom, sizeof(struct mkroom), do_comp);
|
#define CAST_nroom nroom /*as-is*/
|
||||||
#endif
|
#endif
|
||||||
|
qsort((genericptr_t) rooms, CAST_nroom, sizeof (struct mkroom), do_comp);
|
||||||
|
#undef CAST_nroom
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC_OVL void
|
STATIC_OVL void
|
||||||
@@ -728,11 +729,12 @@ makelevel()
|
|||||||
/* make a secret treasure vault, not connected to the rest */
|
/* make a secret treasure vault, not connected to the rest */
|
||||||
if (do_vault()) {
|
if (do_vault()) {
|
||||||
xchar w, h;
|
xchar w, h;
|
||||||
|
|
||||||
debugpline0("trying to make a vault...");
|
debugpline0("trying to make a vault...");
|
||||||
w = 1;
|
w = 1;
|
||||||
h = 1;
|
h = 1;
|
||||||
if (check_room(&vault_x, &w, &vault_y, &h, TRUE)) {
|
if (check_room(&vault_x, &w, &vault_y, &h, TRUE)) {
|
||||||
fill_vault:
|
fill_vault:
|
||||||
add_room(vault_x, vault_y, vault_x + w, vault_y + h, TRUE, VAULT,
|
add_room(vault_x, vault_y, vault_x + w, vault_y + h, TRUE, VAULT,
|
||||||
FALSE);
|
FALSE);
|
||||||
level.flags.has_vault = 1;
|
level.flags.has_vault = 1;
|
||||||
@@ -785,7 +787,7 @@ makelevel()
|
|||||||
mkroom(COCKNEST);
|
mkroom(COCKNEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
skip0:
|
skip0:
|
||||||
/* Place multi-dungeon branch. */
|
/* Place multi-dungeon branch. */
|
||||||
place_branch(branchp, 0, 0);
|
place_branch(branchp, 0, 0);
|
||||||
|
|
||||||
@@ -848,6 +850,7 @@ skip0:
|
|||||||
if (!rn2(27 + 3 * abs(depth(&u.uz)))) {
|
if (!rn2(27 + 3 * abs(depth(&u.uz)))) {
|
||||||
char buf[BUFSZ];
|
char buf[BUFSZ];
|
||||||
const char *mesg = random_engraving(buf);
|
const char *mesg = random_engraving(buf);
|
||||||
|
|
||||||
if (mesg) {
|
if (mesg) {
|
||||||
do {
|
do {
|
||||||
x = somex(croom);
|
x = somex(croom);
|
||||||
@@ -859,7 +862,7 @@ skip0:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
skip_nonrogue:
|
skip_nonrogue:
|
||||||
if (!rn2(3)) {
|
if (!rn2(3)) {
|
||||||
(void) mkobj_at(0, somex(croom), somey(croom), TRUE);
|
(void) mkobj_at(0, somex(croom), somey(croom), TRUE);
|
||||||
tryct = 0;
|
tryct = 0;
|
||||||
@@ -1259,6 +1262,7 @@ struct mkroom *croom;
|
|||||||
coord *tm;
|
coord *tm;
|
||||||
{
|
{
|
||||||
register int kind;
|
register int kind;
|
||||||
|
struct trap *t;
|
||||||
unsigned lvl = level_difficulty();
|
unsigned lvl = level_difficulty();
|
||||||
coord m;
|
coord m;
|
||||||
|
|
||||||
@@ -1367,7 +1371,11 @@ coord *tm;
|
|||||||
|| (avoid_boulder && sobj_at(BOULDER, m.x, m.y)));
|
|| (avoid_boulder && sobj_at(BOULDER, m.x, m.y)));
|
||||||
}
|
}
|
||||||
|
|
||||||
(void) maketrap(m.x, m.y, kind);
|
t = maketrap(m.x, m.y, kind);
|
||||||
|
/* we should always get type of trap we're asking for (occupied() test
|
||||||
|
should prevent cases where that might not happen) but be paranoid */
|
||||||
|
kind = t ? t->ttyp : NO_TRAP;
|
||||||
|
|
||||||
if (kind == WEB)
|
if (kind == WEB)
|
||||||
(void) makemon(&mons[PM_GIANT_SPIDER], m.x, m.y, NO_MM_FLAGS);
|
(void) makemon(&mons[PM_GIANT_SPIDER], m.x, m.y, NO_MM_FLAGS);
|
||||||
|
|
||||||
@@ -1392,8 +1400,13 @@ coord *tm;
|
|||||||
lethal, and tend not to generate on shallower levels anyway.
|
lethal, and tend not to generate on shallower levels anyway.
|
||||||
Finally, pits are excluded because it's weird to see an item
|
Finally, pits are excluded because it's weird to see an item
|
||||||
in a pit and yet not be able to identify that the pit is there. */
|
in a pit and yet not be able to identify that the pit is there. */
|
||||||
if (lvl <= (unsigned) rnd(4)
|
if (kind != NO_TRAP && lvl <= (unsigned) rnd(4)
|
||||||
&& kind != SQKY_BOARD && kind != RUST_TRAP
|
&& kind != SQKY_BOARD && kind != RUST_TRAP
|
||||||
|
/* rolling bounder trap might not have a boulder if there was no
|
||||||
|
viable path (such as when placed in the corner of a room), in
|
||||||
|
which case tx,ty==launch.x,y; no boulder => no dead predecessor */
|
||||||
|
&& !(kind == ROLLING_BOULDER_TRAP
|
||||||
|
&& t->launch.x == t->tx && t->launch.y == t->ty)
|
||||||
&& !is_pit(kind) && kind < HOLE) {
|
&& !is_pit(kind) && kind < HOLE) {
|
||||||
/* Object generated by the trap; initially NULL, stays NULL if
|
/* Object generated by the trap; initially NULL, stays NULL if
|
||||||
we fail to generate an object or if the trap doesn't
|
we fail to generate an object or if the trap doesn't
|
||||||
|
|||||||
Reference in New Issue
Block a user