From: PatR Date: Tue, 25 Oct 2022 20:58:26 +0000 (-0700) Subject: \#wizborn fix X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1ccad11fab7a870bee059beb3c6a061564b7c3a8;p=nethack \#wizborn fix The #wizborn command shows 'E' for an extinct species and 'G' for a genocided one, but if a species first becomes extinct and then later gets genocided, instead of showing both flags it stopped showing either. I was going to add a second flag column and show 'E' and 'G' separately but decided to stick with one column and display 'X' for the unlikely 'both extinct and genocided' case. --- diff --git a/src/insight.c b/src/insight.c index 8ae7b0b8d..ad5521531 100644 --- a/src/insight.c +++ b/src/insight.c @@ -2635,11 +2635,13 @@ doborn(void) putstr(datawin, 0, "died born"); for (i = LOW_PM; i < NUMMONS; i++) if (g.mvitals[i].born || g.mvitals[i].died - || (g.mvitals[i].mvflags & G_GONE)) { + || (g.mvitals[i].mvflags & G_GONE) != 0) { Sprintf(buf, fmt, g.mvitals[i].died, g.mvitals[i].born, - ((g.mvitals[i].mvflags & G_GONE) == G_EXTINCT) ? 'E' : - ((g.mvitals[i].mvflags & G_GONE) == G_GENOD) ? 'G' : ' ', + ((g.mvitals[i].mvflags & G_GONE) == G_EXTINCT) ? 'E' + : ((g.mvitals[i].mvflags & G_GONE) == G_GENOD) ? 'G' + : ((g.mvitals[i].mvflags & G_GONE) != 0) ? 'X' + : ' ', mons[i].pmnames[NEUTRAL]); putstr(datawin, 0, buf); nborn += g.mvitals[i].born; @@ -2676,8 +2678,10 @@ list_vanquished(char defquery, boolean ask) boolean dumping; /* for DUMPLOG; doesn't need to be conditional */ dumping = (defquery == 'd'); - if (dumping) + if (dumping) { defquery = 'y'; + ask = FALSE; /* redundant; caller passes False with defquery=='d' */ + } /* get totals first */ ntypes = 0;