Merge branch 'NetHack-3.6.2'
This commit is contained in:
+10
-11
@@ -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
|
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,
|
||||||
@@ -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
|
panic when turned into a statue if separate mon->minvent items merged
|
||||||
lock picking context could end up with stale container pointer if container
|
lock picking context could end up with stale container pointer if container
|
||||||
being forced/unlocked/locked got destroyed or sent to another level
|
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
|
stranded in a one-square long temporary corridor adjacent to vault
|
||||||
wall and periodically saying "Move along!"
|
wall and periodically saying "Move along!"
|
||||||
if game ends while hero is in a vault wall breach or in guard's temporary
|
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
|
NetHack Community Patches (or Variation) Included
|
||||||
-------------------------------------------------
|
-------------------------------------------------
|
||||||
curses: the community patch for an optional curses window-port was
|
curses: the community patch for an optional curses window-port has been
|
||||||
incorporated into the NetHack source code tree. The curses
|
adopted. The curses window-port evolved from work originally done
|
||||||
window-port evolved from work originally done by Karl Garrison,
|
by Karl Garrison, and has been in use in several NetHack variants
|
||||||
and has been in use in several NetHack variants and on
|
and on nethack.alt.org and on www.hardfought.org/nethack/ for a
|
||||||
nethack.alt.org and on www.hardfought.org/nethack/ for a while.
|
while. It is available and tested for 3.6.2 for Windows console
|
||||||
It is available and tested for 3.6.2 for Windows with PDCurses
|
with PDCurses layered underneath, and for Mac OSX and Unix (using
|
||||||
layered underneath, and for Mac OSX and Unix (using ncurses as
|
ncurses as the layer underneath). It may also work for MS-DOS with
|
||||||
the layer underneath). It may also work for DOS with PDCurses
|
PDCurses, but that has not been tested.
|
||||||
layered underneath, but that has not been tested.
|
|
||||||
|
|
||||||
|
|
||||||
Code Cleanup and Reorganization
|
Code Cleanup and Reorganization
|
||||||
|
|||||||
+16
-14
@@ -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) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -108,21 +108,24 @@ boolean resuming;
|
|||||||
g.context.mon_moving = FALSE;
|
g.context.mon_moving = FALSE;
|
||||||
|
|
||||||
if (!monscanmove && g.youmonst.movement < NORMAL_SPEED) {
|
if (!monscanmove && g.youmonst.movement < NORMAL_SPEED) {
|
||||||
/* both you and the monsters are out of steam this round
|
/* both hero and monsters are out of steam this round */
|
||||||
*/
|
|
||||||
/* set up for a new turn */
|
|
||||||
struct monst *mtmp;
|
struct monst *mtmp;
|
||||||
|
|
||||||
|
/* set up for a new turn */
|
||||||
mcalcdistress(); /* adjust monsters' trap, blind, etc */
|
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)
|
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon)
|
||||||
mtmp->movement += mcalcmove(mtmp);
|
mtmp->movement += mcalcmove(mtmp);
|
||||||
|
|
||||||
if (!rn2(u.uevent.udemigod
|
/* occasionally add another monster; since this takes
|
||||||
? 25
|
place after movement has been allotted, the new
|
||||||
: (depth(&u.uz) > depth(&stronghold_level))
|
monster effectively loses its first turn */
|
||||||
? 50
|
if (!rn2(u.uevent.udemigod ? 25
|
||||||
: 70))
|
: (depth(&u.uz) > depth(&stronghold_level)) ? 50
|
||||||
|
: 70))
|
||||||
(void) makemon((struct permonst *) 0, 0, 0,
|
(void) makemon((struct permonst *) 0, 0, 0,
|
||||||
NO_MM_FLAGS);
|
NO_MM_FLAGS);
|
||||||
|
|
||||||
@@ -133,11 +136,11 @@ boolean resuming;
|
|||||||
} else {
|
} else {
|
||||||
moveamt = g.youmonst.data->mmove;
|
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 */
|
/* gain a free action on 2/3 of turns */
|
||||||
if (rn2(3) != 0)
|
if (rn2(3) != 0)
|
||||||
moveamt += NORMAL_SPEED;
|
moveamt += NORMAL_SPEED;
|
||||||
} else if (Fast) {
|
} else if (Fast) { /* intrinsic */
|
||||||
/* gain a free action on 1/3 of turns */
|
/* gain a free action on 1/3 of turns */
|
||||||
if (rn2(3) == 0)
|
if (rn2(3) == 0)
|
||||||
moveamt += NORMAL_SPEED;
|
moveamt += NORMAL_SPEED;
|
||||||
@@ -318,8 +321,7 @@ boolean resuming;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (g.youmonst.movement
|
} while (g.youmonst.movement < NORMAL_SPEED); /* hero can't move */
|
||||||
< NORMAL_SPEED); /* hero can't move loop */
|
|
||||||
|
|
||||||
/******************************************/
|
/******************************************/
|
||||||
/* once-per-hero-took-time things go here */
|
/* once-per-hero-took-time things go here */
|
||||||
|
|||||||
@@ -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) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -652,12 +652,12 @@ struct monst *mon;
|
|||||||
mmove = ((rn2(2) ? 4 : 5) * mmove) / 3;
|
mmove = ((rn2(2) ? 4 : 5) * mmove) / 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Randomly round the monster's speed to a multiple of NORMAL_SPEED. This
|
/* Randomly round the monster's speed to a multiple of NORMAL_SPEED.
|
||||||
makes it impossible for the player to predict when they'll get a free
|
This makes it impossible for the player to predict when they'll get
|
||||||
turn (thus preventing exploits like "melee kiting"), while retaining
|
a free turn (thus preventing exploits like "melee kiting"), while
|
||||||
guarantees about shopkeepers not being outsped by a normal-speed player,
|
retaining guarantees about shopkeepers not being outsped by a
|
||||||
normal-speed players being unable to open up a gap when fleeing a
|
normal-speed player, normal-speed players being unable to open up
|
||||||
normal-speed monster, etc.*/
|
a gap when fleeing a normal-speed monster, etc. */
|
||||||
mmove_adj = mmove % NORMAL_SPEED;
|
mmove_adj = mmove % NORMAL_SPEED;
|
||||||
mmove -= mmove_adj;
|
mmove -= mmove_adj;
|
||||||
if (rn2(NORMAL_SPEED) < mmove_adj)
|
if (rn2(NORMAL_SPEED) < mmove_adj)
|
||||||
@@ -678,8 +678,9 @@ mcalcdistress()
|
|||||||
if (DEADMONSTER(mtmp))
|
if (DEADMONSTER(mtmp))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* must check non-moving monsters once/turn in case
|
/* must check non-moving monsters once/turn in case they managed
|
||||||
* they managed to end up in liquid */
|
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 (mtmp->data->mmove == 0) {
|
||||||
if (g.vision_full_recalc)
|
if (g.vision_full_recalc)
|
||||||
vision_recalc(0);
|
vision_recalc(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user