-$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.244 $ $NHDT-Date: 1549075239 2019/02/02 02:40:39 $
+$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.245 $ $NHDT-Date: 1549157810 2019/02/03 01:36:50 $
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,
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
+ 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
+ corridor, a message "you are encased in the rock" could be given when
+ guard repairs things (for possible bones); suppress it if hero is dead
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
-/* NetHack 3.6 extern.h $NHDT-Date: 1548982186 2019/02/01 00:49:46 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.691 $ */
+/* NetHack 3.6 extern.h $NHDT-Date: 1549157811 2019/02/03 01:36:51 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.692 $ */
/* Copyright (c) Steve Creps, 1988. */
/* NetHack may be freely redistributed. See license for details. */
E void FDECL(newegd, (struct monst *));
E void FDECL(free_egd, (struct monst *));
E boolean FDECL(grddead, (struct monst *));
+E struct monst *NDECL(findgd);
E void NDECL(vault_summon_gd);
E char FDECL(vault_occupied, (char *));
+E void FDECL(uleftvault, (struct monst *));
E void NDECL(invault);
E int FDECL(gd_move, (struct monst *));
E void NDECL(paygd);
-/* NetHack 3.6 hack.c $NHDT-Date: 1546656413 2019/01/05 02:46:53 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.203 $ */
+/* NetHack 3.6 hack.c $NHDT-Date: 1549157812 2019/02/03 01:36:52 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.206 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Derek S. Ray, 2015. */
/* NetHack may be freely redistributed. See license for details. */
int typefound, min_x, min_y, max_x, max_y_offset, step;
register struct rm *lev;
-#define goodtype(rno) \
- (!typewanted \
- || (typefound = rooms[rno - ROOMOFFSET].rtype) == typewanted \
+#define goodtype(rno) \
+ (!typewanted \
+ || (typefound = (rooms[rno - ROOMOFFSET].rtype == typewanted)) != 0 \
|| (typewanted == SHOPBASE && typefound > SHOPBASE))
switch (rno = levl[x][y].roomno) {
-/* NetHack 3.6 teleport.c $NHDT-Date: 1546655319 2019/01/05 02:28:39 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.83 $ */
+/* NetHack 3.6 teleport.c $NHDT-Date: 1549157815 2019/02/03 01:36:55 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.84 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2011. */
/* NetHack may be freely redistributed. See license for details. */
boolean allow_drag;
{
boolean ball_active, ball_still_in_range;
+ struct monst *vault_guard = vault_occupied(u.urooms) ? findgd() : 0;
if (u.utraptype == TT_BURIEDBALL) {
/* unearth it */
else
telescroll = 0; /* no discovery by scrolltele()'s caller */
}
+ /* sequencing issue: we want guard's alarm, if any, to occur before
+ room entry message, if any, so need to check for vault exit prior
+ to spoteffects; but spoteffects() sets up new value for u.urooms
+ and vault code depends upon that value, so we need to fake it */
+ if (vault_guard) {
+ char save_urooms[5]; /* [sizeof u.urooms] */
+
+ Strcpy(save_urooms, u.urooms);
+ Strcpy(u.urooms, in_rooms(u.ux, u.uy, VAULT));
+ /* if hero has left vault, make guard notice */
+ if (!vault_occupied(u.urooms))
+ uleftvault(vault_guard);
+ Strcpy(u.urooms, save_urooms); /* reset prior to spoteffects() */
+ }
+ /* possible shop entry message comes after guard's shrill whistle */
spoteffects(TRUE);
invocation_message();
}
-/* NetHack 3.6 vault.c $NHDT-Date: 1545269451 2018/12/20 01:30:51 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.59 $ */
+/* NetHack 3.6 vault.c $NHDT-Date: 1549157816 2019/02/03 01:36:56 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.60 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2011. */
/* NetHack may be freely redistributed. See license for details. */
STATIC_DCL void FDECL(restfakecorr, (struct monst *));
STATIC_DCL void FDECL(parkguard, (struct monst *));
STATIC_DCL boolean FDECL(in_fcorridor, (struct monst *, int, int));
-STATIC_DCL struct monst *NDECL(findgd);
STATIC_DCL boolean FDECL(find_guard_dest, (struct monst *, xchar *, xchar *));
STATIC_DCL void FDECL(move_gold, (struct obj *, int));
STATIC_DCL void FDECL(wallify_vault, (struct monst *));
}
if (sawcorridor)
pline_The("corridor disappears.");
- if (IS_ROCK(levl[u.ux][u.uy].typ))
+ /* only give encased message if hero is still alive (might get here
+ via paygd() when game is over; died: no message, quit: message) */
+ if (IS_ROCK(levl[u.ux][u.uy].typ) && (Upolyd ? u.mh : u.uhp) > 0)
You("are encased in rock.");
return TRUE;
}
return FALSE;
}
-STATIC_OVL
struct monst *
findgd()
{
return '\0';
}
+/* hero has teleported out of vault while a guard is active */
+void
+uleftvault(grd)
+struct monst *grd;
+{
+ /* only called if caller has checked vault_occupied() and findgd() */
+ if (!grd || !grd->isgd || DEADMONSTER(grd)) {
+ impossible("escaping vault without guard?");
+ return;
+ }
+ /* if carrying gold and arriving anywhere other than next to the guard,
+ set the guard loose */
+ if ((money_cnt(invent) || hidden_gold())
+ && um_dist(grd->mx, grd->my, 1)) {
+ if (grd->mpeaceful) {
+ if (canspotmon(grd)) /* see or sense via telepathy */
+ pline("%s becomes irate.", Monnam(grd));
+ grd->mpeaceful = 0; /* bypass setmangry() */
+ }
+ /* if arriving outside guard's temporary corridor, give the
+ guard an extra move to deliver message(s) and to teleport
+ out of and remove that corridor */
+ if (!in_fcorridor(grd, u.ux, u.uy))
+ (void) gd_move(grd);
+ }
+}
+
STATIC_OVL boolean
find_guard_dest(guard, rx, ry)
struct monst *guard;