fuzzing hero boost
I watched the fuzzer run for a bit and noticed that Str and most other characteristics were steadily dropping until they hit 3 and not being recovered, so I gave the defenseless hero a chance to benefit from blessed restore ability occasionally. It hasn't helped much. Str and Con both still drop to 3. [If I had to guess, I'd go with side-effect of polymorphing, but not an intended one.]
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user