-/* NetHack 3.6 end.c $NHDT-Date: 1488075979 2017/02/26 02:26:19 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.127 $ */
+/* NetHack 3.6 end.c $NHDT-Date: 1488788512 2017/03/06 08:21:52 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.129 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
display_inventory((char *) 0, TRUE);
container_contents(invent, TRUE, TRUE, FALSE);
enlightenment((BASICENLIGHTENMENT | MAGICENLIGHTENMENT),
- (how >= PANICKED) ? ENL_GAMEOVERALIVE
- : ENL_GAMEOVERDEAD);
+ (how >= PANICKED) ? ENL_GAMEOVERALIVE : ENL_GAMEOVERDEAD);
putstr(0, 0, "");
- list_vanquished('y', FALSE);
+ list_vanquished('d', FALSE); /* 'd' => 'y' */
putstr(0, 0, "");
- list_genocided('a', FALSE);
+ list_genocided('d', FALSE); /* 'd' => 'y' */
putstr(0, 0, "");
show_conduct((how >= PANICKED) ? 1 : 2);
putstr(0, 0, "");
done_stopprint = 1; /* just avoid any more output */
#ifdef DUMPLOG
- dump_redirect(TRUE);
- genl_outrip(0, how, endtime);
- dump_redirect(FALSE);
+ /* 'how' reasons beyond genocide shouldn't show tombstone;
+ for normal end of game, genocide doesn't either */
+ if (how <= GENOCIDED) {
+ dump_redirect(TRUE);
+ genl_outrip(0, how, endtime);
+ dump_redirect(FALSE);
+ }
#endif
if (u.uhave.amulet) {
Strcat(killer.name, " (with the Amulet)");
/* high priests aren't unique but are flagged as such to simplify something */
#define UniqCritterIndx(mndx) ((mons[mndx].geno & G_UNIQ) \
- && mndx != PM_HIGH_PRIEST)
+ && mndx != PM_HIGH_PRIEST)
STATIC_OVL void
list_vanquished(defquery, ask)
winid klwin;
short mindx[NUMMONS];
char c, buf[BUFSZ], buftoo[BUFSZ];
+ boolean dumping; /* for DUMPLOG; doesn't need to be conditional */
+
+ dumping = (defquery == 'd');
+ if (dumping)
+ defquery = 'y';
/* get totals first */
ntypes = 0;
klwin = create_nhwindow(NHW_MENU);
putstr(klwin, 0, "Vanquished creatures:");
- putstr(klwin, 0, "");
+ if (!dumping)
+ putstr(klwin, 0, "");
qsort((genericptr_t) mindx, ntypes, sizeof *mindx, vanqsort_cmp);
for (ni = 0; ni < ntypes; ni++) {
* putstr(klwin, 0, "and a partridge in a pear tree");
*/
if (ntypes > 1) {
- putstr(klwin, 0, "");
+ if (!dumping)
+ putstr(klwin, 0, "");
Sprintf(buf, "%ld creatures vanquished.", total_killed);
putstr(klwin, 0, buf);
}
} else if (defquery == 'a') {
/* #dovanquished rather than final disclosure, so pline() is ok */
pline("No monsters have been vanquished.");
+#ifdef DUMPLOG
+ } else if (dumping) {
+ putstr(0, 0, "No monsters were vanquished."); /* not pline() */
+#endif
}
}
char c;
winid klwin;
char buf[BUFSZ];
+ boolean dumping; /* for DUMPLOG; doesn't need to be conditional */
+
+ dumping = (defquery == 'd');
+ if (dumping)
+ defquery = 'y';
ngenocided = num_genocides();
nextinct = num_extinct();
(ngenocided) ? "Genocided" : "Extinct",
(nextinct && ngenocided) ? " or extinct" : "");
putstr(klwin, 0, buf);
- putstr(klwin, 0, "");
+ if (!dumping)
+ putstr(klwin, 0, "");
for (i = LOW_PM; i < NUMMONS; i++) {
/* uniques can't be genocided but can become extinct;
if (UniqCritterIndx(i))
continue;
if (mvitals[i].mvflags & G_GONE) {
- Strcpy(buf, makeplural(mons[i].mname));
+ Sprintf(buf, " %s", makeplural(mons[i].mname));
/*
* "Extinct" is unfortunate terminology. A species
* is marked extinct when its birth limit is reached,
putstr(klwin, 0, buf);
}
}
- putstr(klwin, 0, "");
+ if (!dumping)
+ putstr(klwin, 0, "");
if (ngenocided > 0) {
Sprintf(buf, "%d species genocided.", ngenocided);
putstr(klwin, 0, buf);
display_nhwindow(klwin, TRUE);
destroy_nhwindow(klwin);
}
+#ifdef DUMPLOG
+ } else if (dumping) {
+ putstr(0, 0, "No species were genocided or became extinct.");
+#endif
}
}