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.242 $ $NHDT-Date: 1548978603 2019/01/31 23:50:03 $
|
||||
$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,
|
||||
@@ -359,6 +359,12 @@ 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
|
||||
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
|
||||
@@ -372,6 +378,7 @@ orctown: orcs beyond the mines were being given any left-over booty and named
|
||||
as part of the same marauding gang operating within the mines
|
||||
make long extended commands list be more navigable
|
||||
simplify #wizidentify; don't rely on having bold menu entries
|
||||
add object class group accelerators to #wizidentify
|
||||
ensure tmp_at() structures are initialized for all code paths when swallowed
|
||||
trapped-vs-levitation/flying change broke Sting releasing hero from web
|
||||
life-saving while poly'd and Unchanging wasn't restoring u.mh (HP as monster)
|
||||
@@ -547,6 +554,7 @@ in wizard mode, ^T can be preceded by 'm' prefix in order to test teleporting
|
||||
without having wizard mode override various restrictions
|
||||
include isaac64 for pseudo random number generation
|
||||
core prng and display prng use different contexts
|
||||
when healing magic other than unicorn horn cures blindness, cure deafness too
|
||||
|
||||
|
||||
NetHack Community Patches (or Variation) Included
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* 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. */
|
||||
|
||||
@@ -2587,8 +2587,10 @@ E int FDECL(hide_privileges, (BOOLEAN_P));
|
||||
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);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* 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. */
|
||||
@@ -2268,9 +2268,9 @@ register int typewanted;
|
||||
int typefound, min_x, min_y, max_x, max_y_offset, step;
|
||||
register struct rm *lev;
|
||||
|
||||
#define goodtype(rno) \
|
||||
(!typewanted \
|
||||
|| (typefound = g.rooms[rno - ROOMOFFSET].rtype) == typewanted \
|
||||
#define goodtype(rno) \
|
||||
(!typewanted \
|
||||
|| (typefound = (g.rooms[rno - ROOMOFFSET].rtype == typewanted)) != 0 \
|
||||
|| (typewanted == SHOPBASE && typefound > SHOPBASE))
|
||||
|
||||
switch (rno = levl[x][y].roomno) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 invent.c $NHDT-Date: 1547025166 2019/01/09 09:12:46 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.250 $ */
|
||||
/* NetHack 3.6 invent.c $NHDT-Date: 1549075239 2019/02/02 02:40:39 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.252 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -2682,7 +2682,8 @@ long *out_cnt;
|
||||
else
|
||||
any.a_char = ilet;
|
||||
add_menu(win, obj_to_glyph(otmp, rn2_on_display_rng), &any, ilet,
|
||||
0, ATR_NONE, doname(otmp), MENU_UNSELECTED);
|
||||
wizid ? def_oc_syms[(int) otmp->oclass].sym : 0,
|
||||
ATR_NONE, doname(otmp), MENU_UNSELECTED);
|
||||
}
|
||||
}
|
||||
if (flags.sortpack) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 potion.c $NHDT-Date: 1547518427 2019/01/15 02:13:47 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.159 $ */
|
||||
/* NetHack 3.6 potion.c $NHDT-Date: 1549074254 2019/02/02 02:24:14 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.160 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1158,6 +1158,8 @@ register boolean curesick, cureblind;
|
||||
mundane 'dirt', but if it doesn't, blindness isn't cured */
|
||||
u.ucreamed = 0;
|
||||
make_blinded(0L, TRUE);
|
||||
/* heal deafness too */
|
||||
make_deaf(0L, TRUE);
|
||||
}
|
||||
if (curesick) {
|
||||
make_vomiting(0L, TRUE);
|
||||
@@ -1639,8 +1641,10 @@ register struct obj *obj;
|
||||
u.uhp++, g.context.botl = 1;
|
||||
if (obj->blessed)
|
||||
cureblind = TRUE;
|
||||
if (cureblind)
|
||||
if (cureblind) {
|
||||
make_blinded(0L, !u.ucreamed);
|
||||
make_deaf(0L, TRUE);
|
||||
}
|
||||
exercise(A_CON, TRUE);
|
||||
break;
|
||||
case POT_SICKNESS:
|
||||
|
||||
32
src/pray.c
32
src/pray.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 pray.c $NHDT-Date: 1540596912 2018/10/26 23:35:12 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.104 $ */
|
||||
/* NetHack 3.6 pray.c $NHDT-Date: 1549074257 2019/02/02 02:24:17 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.110 $ */
|
||||
/* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -242,6 +242,11 @@ in_trouble()
|
||||
&& (!u.uswallow
|
||||
|| !attacktype_fordmg(u.ustuck->data, AT_ENGL, AD_BLND)))
|
||||
return TROUBLE_BLIND;
|
||||
/* deafness isn't it's own trouble; healing magic cures deafness
|
||||
when it cures blindness, so do the same with trouble repair */
|
||||
if ((HDeaf & TIMEOUT) > 1L)
|
||||
return TROUBLE_BLIND;
|
||||
|
||||
for (i = 0; i < A_MAX; i++)
|
||||
if (ABASE(i) < AMAX(i))
|
||||
return TROUBLE_POISONED;
|
||||
@@ -508,14 +513,27 @@ int trouble;
|
||||
}
|
||||
(void) encumber_msg();
|
||||
break;
|
||||
case TROUBLE_BLIND: {
|
||||
case TROUBLE_BLIND: { /* handles deafness as well as blindness */
|
||||
char msgbuf[BUFSZ];
|
||||
const char *eyes = body_part(EYE);
|
||||
boolean cure_deaf = (HDeaf & TIMEOUT) ? TRUE : FALSE;
|
||||
|
||||
if (eyecount(g.youmonst.data) != 1)
|
||||
eyes = makeplural(eyes);
|
||||
Your("%s %s better.", eyes, vtense(eyes, "feel"));
|
||||
u.ucreamed = 0;
|
||||
make_blinded(0L, FALSE);
|
||||
msgbuf[0] = '\0';
|
||||
if (Blinded) {
|
||||
if (eyecount(g.youmonst.data) != 1)
|
||||
eyes = makeplural(eyes);
|
||||
Sprintf(msgbuf, "Your %s %s better", eyes, vtense(eyes, "feel"));
|
||||
u.ucreamed = 0;
|
||||
make_blinded(0L, FALSE);
|
||||
}
|
||||
if (cure_deaf) {
|
||||
make_deaf(0L, FALSE);
|
||||
if (!Deaf)
|
||||
Sprintf(eos(msgbuf), "%s can hear again",
|
||||
!*msgbuf ? "You" : " and you");
|
||||
}
|
||||
if (*msgbuf)
|
||||
pline("%s.", msgbuf);
|
||||
break;
|
||||
}
|
||||
case TROUBLE_WOUNDED_LEGS:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* 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. */
|
||||
@@ -249,6 +249,7 @@ register int nux, nuy;
|
||||
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 */
|
||||
@@ -351,6 +352,21 @@ boolean allow_drag;
|
||||
else
|
||||
g.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();
|
||||
}
|
||||
|
||||
35
src/vault.c
35
src/vault.c
@@ -1,4 +1,4 @@
|
||||
/* 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. */
|
||||
@@ -10,7 +10,6 @@ STATIC_DCL void FDECL(blackout, (int, int));
|
||||
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 *));
|
||||
@@ -104,7 +103,9 @@ boolean forceshow;
|
||||
}
|
||||
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;
|
||||
}
|
||||
@@ -199,7 +200,6 @@ int x, y;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
STATIC_OVL
|
||||
struct monst *
|
||||
findgd()
|
||||
{
|
||||
@@ -233,6 +233,33 @@ char *array;
|
||||
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(g.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;
|
||||
|
||||
Reference in New Issue
Block a user