Merge branch 'NetHack-3.6.2'
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.303 $ $NHDT-Date: 1555201701 2019/04/14 00:28:21 $
|
||||
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.304 $ $NHDT-Date: 1555552900 2019/04/18 02:01:40 $
|
||||
|
||||
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,
|
||||
@@ -359,7 +359,7 @@ monster with multiple items in inventory could trigger 'dealloc_obj with nobj'
|
||||
panic when turned into a statue if separate mon->minvent items merged
|
||||
lock picking context could end up with stale container pointer if container
|
||||
being forced/unlocked/locked got destroyed or sent to another level
|
||||
teleporting out a vault after guard appears could result in the guard being
|
||||
teleporting out of a vault after guard appears could result in the guard being
|
||||
stranded in a one-square long temporary corridor adjacent to vault
|
||||
wall and periodically saying "Move along!"
|
||||
if game ends while hero is in a vault wall breach or in guard's temporary
|
||||
@@ -696,15 +696,14 @@ tty: support statuslines:3 and dynamically switching between 2 and 3 with 'O'
|
||||
|
||||
NetHack Community Patches (or Variation) Included
|
||||
-------------------------------------------------
|
||||
curses: the community patch for an optional curses window-port was
|
||||
incorporated into the NetHack source code tree. The curses
|
||||
window-port evolved from work originally done by Karl Garrison,
|
||||
and has been in use in several NetHack variants and on
|
||||
nethack.alt.org and on www.hardfought.org/nethack/ for a while.
|
||||
It is available and tested for 3.6.2 for Windows with PDCurses
|
||||
layered underneath, and for Mac OSX and Unix (using ncurses as
|
||||
the layer underneath). It may also work for DOS with PDCurses
|
||||
layered underneath, but that has not been tested.
|
||||
curses: the community patch for an optional curses window-port has been
|
||||
adopted. The curses window-port evolved from work originally done
|
||||
by Karl Garrison, and has been in use in several NetHack variants
|
||||
and on nethack.alt.org and on www.hardfought.org/nethack/ for a
|
||||
while. It is available and tested for 3.6.2 for Windows console
|
||||
with PDCurses layered underneath, and for Mac OSX and Unix (using
|
||||
ncurses as the layer underneath). It may also work for MS-DOS with
|
||||
PDCurses, but that has not been tested.
|
||||
|
||||
|
||||
Code Cleanup and Reorganization
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 allmain.c $NHDT-Date: 1554895741 2019/04/10 11:29:01 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.99 $ */
|
||||
/* NetHack 3.6 allmain.c $NHDT-Date: 1555552624 2019/04/18 01:57:04 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.100 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -108,21 +108,24 @@ boolean resuming;
|
||||
g.context.mon_moving = FALSE;
|
||||
|
||||
if (!monscanmove && g.youmonst.movement < NORMAL_SPEED) {
|
||||
/* both you and the monsters are out of steam this round
|
||||
*/
|
||||
/* set up for a new turn */
|
||||
/* both hero and monsters are out of steam this round */
|
||||
struct monst *mtmp;
|
||||
|
||||
/* set up for a new turn */
|
||||
mcalcdistress(); /* adjust monsters' trap, blind, etc */
|
||||
|
||||
/* reallocate movement rations to monsters */
|
||||
/* reallocate movement rations to monsters; don't need
|
||||
to skip dead monsters here because they will have
|
||||
been purged at end of their previous round of moving */
|
||||
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon)
|
||||
mtmp->movement += mcalcmove(mtmp);
|
||||
|
||||
if (!rn2(u.uevent.udemigod
|
||||
? 25
|
||||
: (depth(&u.uz) > depth(&stronghold_level))
|
||||
? 50
|
||||
: 70))
|
||||
/* occasionally add another monster; since this takes
|
||||
place after movement has been allotted, the new
|
||||
monster effectively loses its first turn */
|
||||
if (!rn2(u.uevent.udemigod ? 25
|
||||
: (depth(&u.uz) > depth(&stronghold_level)) ? 50
|
||||
: 70))
|
||||
(void) makemon((struct permonst *) 0, 0, 0,
|
||||
NO_MM_FLAGS);
|
||||
|
||||
@@ -133,11 +136,11 @@ boolean resuming;
|
||||
} else {
|
||||
moveamt = g.youmonst.data->mmove;
|
||||
|
||||
if (Very_fast) { /* speed boots or potion */
|
||||
if (Very_fast) { /* speed boots, potion, or spell */
|
||||
/* gain a free action on 2/3 of turns */
|
||||
if (rn2(3) != 0)
|
||||
moveamt += NORMAL_SPEED;
|
||||
} else if (Fast) {
|
||||
} else if (Fast) { /* intrinsic */
|
||||
/* gain a free action on 1/3 of turns */
|
||||
if (rn2(3) == 0)
|
||||
moveamt += NORMAL_SPEED;
|
||||
@@ -318,8 +321,7 @@ boolean resuming;
|
||||
}
|
||||
}
|
||||
}
|
||||
} while (g.youmonst.movement
|
||||
< NORMAL_SPEED); /* hero can't move loop */
|
||||
} while (g.youmonst.movement < NORMAL_SPEED); /* hero can't move */
|
||||
|
||||
/******************************************/
|
||||
/* once-per-hero-took-time things go here */
|
||||
|
||||
19
src/mon.c
19
src/mon.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 mon.c $NHDT-Date: 1555022326 2019/04/11 22:38:46 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.281 $ */
|
||||
/* NetHack 3.6 mon.c $NHDT-Date: 1555552629 2019/04/18 01:57:09 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.282 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -652,12 +652,12 @@ struct monst *mon;
|
||||
mmove = ((rn2(2) ? 4 : 5) * mmove) / 3;
|
||||
}
|
||||
|
||||
/* Randomly round the monster's speed to a multiple of NORMAL_SPEED. This
|
||||
makes it impossible for the player to predict when they'll get a free
|
||||
turn (thus preventing exploits like "melee kiting"), while retaining
|
||||
guarantees about shopkeepers not being outsped by a normal-speed player,
|
||||
normal-speed players being unable to open up a gap when fleeing a
|
||||
normal-speed monster, etc.*/
|
||||
/* Randomly round the monster's speed to a multiple of NORMAL_SPEED.
|
||||
This makes it impossible for the player to predict when they'll get
|
||||
a free turn (thus preventing exploits like "melee kiting"), while
|
||||
retaining guarantees about shopkeepers not being outsped by a
|
||||
normal-speed player, normal-speed players being unable to open up
|
||||
a gap when fleeing a normal-speed monster, etc. */
|
||||
mmove_adj = mmove % NORMAL_SPEED;
|
||||
mmove -= mmove_adj;
|
||||
if (rn2(NORMAL_SPEED) < mmove_adj)
|
||||
@@ -678,8 +678,9 @@ mcalcdistress()
|
||||
if (DEADMONSTER(mtmp))
|
||||
continue;
|
||||
|
||||
/* must check non-moving monsters once/turn in case
|
||||
* they managed to end up in liquid */
|
||||
/* must check non-moving monsters once/turn in case they managed
|
||||
to end up in water or lava; note: when not in liquid they regen,
|
||||
shape-shift, timeout temporary maladies just like other monsters */
|
||||
if (mtmp->data->mmove == 0) {
|
||||
if (g.vision_full_recalc)
|
||||
vision_recalc(0);
|
||||
|
||||
Reference in New Issue
Block a user