Merge branch 'NetHack-3.6.2'
This commit is contained in:
40
src/cmd.c
40
src/cmd.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 cmd.c $NHDT-Date: 1544050555 2018/12/05 22:55:55 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.314 $ */
|
||||
/* NetHack 3.6 cmd.c $NHDT-Date: 1544695944 2018/12/13 10:12:24 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.318 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -2019,6 +2019,22 @@ int final;
|
||||
enl_msg(Your_wallet, "contains ", "contained ", buf, "");
|
||||
}
|
||||
}
|
||||
|
||||
if (flags.pickup) {
|
||||
char ocl[MAXOCLASSES + 1];
|
||||
|
||||
Strcpy(buf, "on");
|
||||
oc_to_str(flags.pickup_types, ocl);
|
||||
Sprintf(eos(buf), " for %s%s%s",
|
||||
*ocl ? "'" : "", *ocl ? ocl : "all types", *ocl ? "'" : "");
|
||||
if (flags.pickup_thrown && *ocl) /* *ocl: don't show if 'all types' */
|
||||
Strcat(buf, " plus thrown");
|
||||
if (iflags.autopickup_exceptions[AP_GRAB]
|
||||
|| iflags.autopickup_exceptions[AP_LEAVE])
|
||||
Strcat(buf, ", with exceptions");
|
||||
} else
|
||||
Strcpy(buf, "off");
|
||||
enl_msg("Auto-pickup ", "is ", "was ", buf, "");
|
||||
}
|
||||
|
||||
/* characteristics: expanded version of bottom line strength, dexterity, &c */
|
||||
@@ -4421,6 +4437,28 @@ randomkey()
|
||||
return c;
|
||||
}
|
||||
|
||||
void
|
||||
random_response(buf, sz)
|
||||
char *buf;
|
||||
int sz;
|
||||
{
|
||||
char c;
|
||||
int count = 0;
|
||||
|
||||
for (;;) {
|
||||
c = randomkey();
|
||||
if (c == '\n')
|
||||
break;
|
||||
if (c == '\033') {
|
||||
count = 0;
|
||||
break;
|
||||
}
|
||||
if (count < sz - 1)
|
||||
buf[count++] = c;
|
||||
}
|
||||
buf[count] = '\0';
|
||||
}
|
||||
|
||||
int
|
||||
ch2spkeys(c, start, end)
|
||||
char c;
|
||||
|
||||
21
src/end.c
21
src/end.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 end.c $NHDT-Date: 1544003110 2018/12/05 09:45:10 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.156 $ */
|
||||
/* NetHack 3.6 end.c $NHDT-Date: 1544666123 2018/12/13 01:55:23 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.157 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -577,13 +577,13 @@ VA_DECL(const char *, str)
|
||||
? "Program initialization has failed."
|
||||
: "Suddenly, the dungeon collapses.");
|
||||
#ifndef MICRO
|
||||
#if defined(NOTIFY_NETHACK_BUGS)
|
||||
#ifdef NOTIFY_NETHACK_BUGS
|
||||
if (!wizard)
|
||||
raw_printf("Report the following error to \"%s\" or at \"%s\".",
|
||||
DEVTEAM_EMAIL, DEVTEAM_URL);
|
||||
else if (program_state.something_worth_saving)
|
||||
raw_print("\nError save file being written.\n");
|
||||
#else
|
||||
#else /* !NOTIFY_NETHACK_BUGS */
|
||||
if (!wizard) {
|
||||
const char *maybe_rebuild = !program_state.something_worth_saving
|
||||
? "."
|
||||
@@ -599,7 +599,7 @@ VA_DECL(const char *, str)
|
||||
raw_printf("Report error to \"%s\"%s", WIZARD_NAME,
|
||||
maybe_rebuild);
|
||||
}
|
||||
#endif
|
||||
#endif /* ?NOTIFY_NETHACK_BUGS */
|
||||
/* XXX can we move this above the prints? Then we'd be able to
|
||||
* suppress "it may be possible to rebuild" based on dosave0()
|
||||
* or say it's NOT possible to rebuild. */
|
||||
@@ -611,7 +611,7 @@ VA_DECL(const char *, str)
|
||||
raw_printf("%s", sysopt.recover);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif /* !MICRO */
|
||||
{
|
||||
char buf[BUFSZ];
|
||||
|
||||
@@ -1055,7 +1055,16 @@ int how;
|
||||
if (iflags.debug_fuzzer) {
|
||||
if (!(program_state.panicking || how == PANICKED)) {
|
||||
savelife(how);
|
||||
killer.name[0] = 0;
|
||||
/* periodically restore characteristics and lost exp levels */
|
||||
if (!rn2(10)) {
|
||||
struct obj *potion = mksobj(POT_RESTORE_ABILITY, TRUE, FALSE);
|
||||
|
||||
bless(potion);
|
||||
(void) peffects(potion); /* always -1 for restore ability */
|
||||
/* not useup(); we haven't put this potion into inventory */
|
||||
obfree(potion, (struct obj *) 0);
|
||||
}
|
||||
killer.name[0] = '\0';
|
||||
killer.format = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 options.c $NHDT-Date: 1544396581 2018/12/09 23:03:01 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.340 $ */
|
||||
/* NetHack 3.6 options.c $NHDT-Date: 1544669666 2018/12/13 02:54:26 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.344 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Michael Allison, 2008. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -557,7 +557,6 @@ STATIC_DCL int NDECL(count_menucolors);
|
||||
STATIC_DCL boolean FDECL(parse_role_opts, (BOOLEAN_P, const char *,
|
||||
char *, char **));
|
||||
|
||||
STATIC_DCL void FDECL(oc_to_str, (char *, char *));
|
||||
STATIC_DCL void FDECL(doset_add_menu, (winid, const char *, int));
|
||||
STATIC_DCL void FDECL(opts_add_others, (winid, const char *, int,
|
||||
char *, int));
|
||||
@@ -2986,12 +2985,17 @@ boolean tinitial, tfrom_file;
|
||||
use_menu = TRUE;
|
||||
if (flags.menu_style == MENU_TRADITIONAL
|
||||
|| flags.menu_style == MENU_COMBINATION) {
|
||||
boolean wasspace;
|
||||
|
||||
use_menu = FALSE;
|
||||
Sprintf(qbuf, "New %s: [%s am] (%s)", fullname, ocl,
|
||||
*tbuf ? tbuf : "all");
|
||||
getlin(qbuf, abuf);
|
||||
wasspace = (abuf[0] == ' '); /* before mungspaces */
|
||||
op = mungspaces(abuf);
|
||||
if (abuf[0] == '\0' || abuf[0] == '\033')
|
||||
if (wasspace && !abuf[0])
|
||||
; /* one or more spaces will remove old value */
|
||||
else if (!abuf[0] || abuf[0] == '\033')
|
||||
op = tbuf; /* restore */
|
||||
else if (abuf[0] == 'm')
|
||||
use_menu = TRUE;
|
||||
@@ -4081,7 +4085,7 @@ static NEARDATA const char *sortltype[] = { "none", "loot", "full" };
|
||||
* Convert the given string of object classes to a string of default object
|
||||
* symbols.
|
||||
*/
|
||||
STATIC_OVL void
|
||||
void
|
||||
oc_to_str(src, dest)
|
||||
char *src, *dest;
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 steed.c $NHDT-Date: 1544608468 2018/12/12 09:54:28 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.60 $ */
|
||||
/* NetHack 3.6 steed.c $NHDT-Date: 1544666049 2018/12/13 01:54:09 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.61 $ */
|
||||
/* Copyright (c) Kevin Hugo, 1998-1999. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -756,7 +756,7 @@ int x, y;
|
||||
return;
|
||||
}
|
||||
if (level.monsters[x][y])
|
||||
impossible("placing monster over another?");
|
||||
impossible("placing monster over another at <%d,%d>?", x, y);
|
||||
mon->mx = x, mon->my = y;
|
||||
level.monsters[x][y] = mon;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user