Merge branch 'NetHack-3.6'

This commit is contained in:
nhmall
2019-10-04 09:11:29 -04:00
7 changed files with 1465 additions and 1446 deletions

View File

@@ -671,7 +671,7 @@ struct monst *mtmp;
goldprob = is_captain ? 600 : 300;
gemprob = goldprob / 4;
if (rn2(1000) < goldprob) {
if ((otmp = mksobj(GOLD_PIECE, FALSE, FALSE)) != 0) {
if ((otmp = mksobj(GOLD_PIECE, TRUE, FALSE)) != 0) {
otmp->quan = 1L + rnd(goldprob);
otmp->owt = weight(otmp);
add_to_minv(mtmp, otmp);
@@ -687,7 +687,7 @@ struct monst *mtmp;
}
if (is_captain || !rn2(8)) {
otyp = shiny_obj(RING_CLASS);
if (otyp != STRANGE_OBJECT && (otmp = mksobj(otyp, FALSE, FALSE)) != 0)
if (otyp != STRANGE_OBJECT && (otmp = mksobj(otyp, TRUE, FALSE)) != 0)
add_to_minv(mtmp, otmp);
}
}

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 pager.c $NHDT-Date: 1562632673 2019/07/09 00:37:53 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.154 $ */
/* NetHack 3.6 pager.c $NHDT-Date: 1570142734 2019/10/03 22:45:34 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.156 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2018. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1575,7 +1575,7 @@ whatdoes_help()
{
dlb *fp;
char *p, buf[BUFSZ];
winid tmpwin = create_nhwindow(NHW_TEXT);
winid tmpwin;
fp = dlb_fopen(KEYHELP, "r");
if (!fp) {
@@ -1583,6 +1583,7 @@ whatdoes_help()
display_nhwindow(WIN_MESSAGE, TRUE);
return;
}
tmpwin = create_nhwindow(NHW_TEXT);
while (dlb_fgets(buf, (int) sizeof buf, fp)) {
if (*buf == '#')
continue;

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 pickup.c $NHDT-Date: 1562203851 2019/07/04 01:30:51 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.229 $ */
/* NetHack 3.6 pickup.c $NHDT-Date: 1570142736 2019/10/03 22:45:36 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.234 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1051,11 +1051,13 @@ int how; /* type of query */
if (curr) {
*pick_list = (menu_item *) alloc(sizeof(menu_item));
(*pick_list)->item.a_int = curr->oclass;
return 1;
n = 1;
} else {
debugpline0("query_category: no single object match");
n = 0;
}
return 0;
/* early return is ok; there's no temp window yet */
return n;
}
win = create_nhwindow(NHW_MENU);
@@ -1108,7 +1110,8 @@ int how; /* type of query */
pack++;
if (invlet >= 'u') {
impossible("query_category: too many categories");
return 0;
n = 0;
goto query_done;
}
} while (*pack);
@@ -1168,6 +1171,7 @@ int how; /* type of query */
}
end_menu(win, qstr);
n = select_menu(win, how, pick_list);
query_done:
destroy_nhwindow(win);
if (n < 0)
n = 0; /* caller's don't expect -1 */