Merge branch 'NetHack-3.6.2'

This commit is contained in:
nhmall
2018-10-27 19:30:23 -04:00
17 changed files with 283 additions and 251 deletions

View File

@@ -1833,6 +1833,41 @@ int final;
difalgn ? align_str(u.ualignbase[A_ORIGINAL]) : "");
putstr(en_win, 0, buf);
}
/* 3.6.2: dungeon level, so that ^X really has all status info as
claimed by the comment below; this reveals more information than
the basic status display, but that's one of the purposes of ^X;
similar information is revealed by #overview; the "You died in
<location>" given by really_done() is more rudimentary than this */
*buf = *tmpbuf = '\0';
if (In_endgame(&u.uz)) {
int egdepth = observable_depth(&u.uz);
(void) endgamelevelname(tmpbuf, egdepth);
Sprintf(buf, "in the endgame, on the %s%s",
!strncmp(tmpbuf, "Plane", 5) ? "Elemental " : "", tmpbuf);
} else if (Is_knox(&u.uz)) {
/* this gives away the fact that the knox branch is only 1 level */
Sprintf(buf, "on the %s level", dungeons[u.uz.dnum].dname);
/* TODO? maybe phrase it differently when actually inside the fort,
if we're able to determine that (not trivial) */
} else {
char dgnbuf[QBUFSZ];
Strcpy(dgnbuf, dungeons[u.uz.dnum].dname);
if (!strncmpi(dgnbuf, "The ", 4))
*dgnbuf = lowc(*dgnbuf);
Sprintf(tmpbuf, "level %d",
In_quest(&u.uz) ? dunlev(&u.uz) : depth(&u.uz));
/* TODO? maybe extend this bit to include various other automatic
annotations from the dungeon overview code */
if (Is_rogue_level(&u.uz))
Strcat(tmpbuf, ", a primitive area");
else if (Is_bigroom(&u.uz) && !Blind)
Strcat(tmpbuf, ", a very big room");
Sprintf(buf, "in %s, on %s", dgnbuf, tmpbuf);
}
you_are(buf, "");
}
/* characteristics: expanded version of bottom line strength, dexterity, &c;

View File

@@ -71,7 +71,6 @@ STATIC_DCL void FDECL(traverse_mapseenchn, (BOOLEAN_P, winid,
int, int, int *));
STATIC_DCL const char *FDECL(seen_string, (XCHAR_P, const char *));
STATIC_DCL const char *FDECL(br_string2, (branch *));
STATIC_DCL const char *FDECL(endgamelevelname, (char *, int));
STATIC_DCL const char *FDECL(shop_string, (int));
STATIC_DCL char *FDECL(tunesuffix, (mapseen *, char *));
@@ -2775,7 +2774,7 @@ branch *br;
}
/* get the name of an endgame level; topten.c does something similar */
STATIC_OVL const char *
const char *
endgamelevelname(outbuf, indx)
char *outbuf;
int indx;

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 eat.c $NHDT-Date: 1502754159 2017/08/14 23:42:39 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.179 $ */
/* NetHack 3.6 eat.c $NHDT-Date: 1540596900 2018/10/26 23:35:00 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.193 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
@@ -110,14 +110,18 @@ register struct obj *obj;
return (boolean) (obj->oclass == FOOD_CLASS);
}
/* used for hero init, life saving (if choking), and prayer results of fix
starving, fix weak from hunger, or golden glow boon (if u.uhunger < 900) */
void
init_uhunger()
{
context.botl = (u.uhs != NOT_HUNGRY || ATEMP(A_STR) < 0);
u.uhunger = 900;
u.uhs = NOT_HUNGRY;
if (ATEMP(A_STR) < 0)
if (ATEMP(A_STR) < 0) {
ATEMP(A_STR) = 0;
(void) encumber_msg();
}
}
/* tin types [SPINACH_TIN = -1, overrides corpsenm, nut==600] */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 hack.c $NHDT-Date: 1518861490 2018/02/17 09:58:10 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.182 $ */
/* NetHack 3.6 hack.c $NHDT-Date: 1540591769 2018/10/26 22:09:29 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.194 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Derek S. Ray, 2015. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1213,8 +1213,10 @@ struct trap *desttrap; /* nonnull if another trap at <x,y> */
break;
case TT_WEB:
if (uwep && uwep->oartifact == ART_STING) {
/* escape trap but don't move and don't destroy it */
u.utrap = 0; /* caller will call reset_utrap() */
pline("Sting cuts through the web!");
break; /* escape trap but don't move */
break;
}
if (--u.utrap) {
if (flags.verbose) {

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 pray.c $NHDT-Date: 1539804904 2018/10/17 19:35:04 $ $NHDT-Branch: keni-makedefsm $:$NHDT-Revision: 1.103 $ */
/* 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 $ */
/* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1074,7 +1074,11 @@ aligntyp g_align;
u.uhp = u.uhpmax;
if (Upolyd)
u.mh = u.mhmax;
ABASE(A_STR) = AMAX(A_STR);
if (ABASE(A_STR) < AMAX(A_STR)) {
ABASE(A_STR) = AMAX(A_STR);
context.botl = 1; /* before potential message */
(void) encumber_msg();
}
if (u.uhunger < 900)
init_uhunger();
/* luck couldn't have been negative at start of prayer because

View File

@@ -62,7 +62,6 @@ struct toptenentry {
STATIC_DCL void FDECL(topten_print, (const char *));
STATIC_DCL void FDECL(topten_print_bold, (const char *));
STATIC_DCL xchar FDECL(observable_depth, (d_level *));
STATIC_DCL void NDECL(outheader);
STATIC_DCL void FDECL(outentry, (int, struct toptenentry *, BOOLEAN_P));
STATIC_DCL void FDECL(discardexcess, (FILE *));
@@ -178,7 +177,7 @@ const char *x;
putstr(toptenwin, ATR_BOLD, x);
}
STATIC_OVL xchar
int
observable_depth(lev)
d_level *lev;
{