return 0;
}
+/* 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)
+
STATIC_OVL void
list_vanquished(defquery, ask)
char defquery;
upstart(buf));
prev_mlet = mlet;
}
- if ((mons[i].geno & G_UNIQ) && i != PM_HIGH_PRIEST) {
+ if (UniqCritterIndx(i)) {
Sprintf(buf, "%s%s",
!type_is_pname(&mons[i]) ? "the " : "",
mons[i].mname);
{
int i, n = 0;
- for (i = LOW_PM; i < NUMMONS; ++i)
- if (mvitals[i].mvflags & G_GENOD)
+ for (i = LOW_PM; i < NUMMONS; ++i) {
+ if (mvitals[i].mvflags & G_GENOD) {
++n;
-
+ if (UniqCritterIndx(i))
+ impossible("unique creature '%d: %s' genocided?",
+ i, mons[i].mname);
+ }
+ }
return n;
}
{
int i, n = 0;
- for (i = LOW_PM; i < NUMMONS; ++i)
- if (!(mvitals[i].mvflags & G_GENOD) && (mvitals[i].mvflags & G_GONE)
- && !(mons[i].geno & G_UNIQ))
+ for (i = LOW_PM; i < NUMMONS; ++i) {
+ if (UniqCritterIndx(i))
+ continue;
+ if ((mvitals[i].mvflags & G_GONE) == G_EXTINCT)
++n;
-
+ }
return n;
}
putstr(klwin, 0, buf);
putstr(klwin, 0, "");
- for (i = LOW_PM; i < NUMMONS; i++)
- if (mvitals[i].mvflags & G_GONE && !(mons[i].geno & G_UNIQ)) {
- if ((mons[i].geno & G_UNIQ) && i != PM_HIGH_PRIEST)
- Sprintf(buf, "%s%s",
- !type_is_pname(&mons[i]) ? "" : "the ",
- mons[i].mname);
- else
- Strcpy(buf, makeplural(mons[i].mname));
- if (!(mvitals[i].mvflags & G_GENOD))
+ for (i = LOW_PM; i < NUMMONS; i++) {
+ /* uniques can't be genocided but can become extinct;
+ however, they're never reported as extinct, so skip them */
+ if (UniqCritterIndx(i))
+ continue;
+ if (mvitals[i].mvflags & G_GONE) {
+ Strcpy(buf, makeplural(mons[i].mname));
+ /*
+ * "Extinct" is unfortunate terminology. A species
+ * is marked extinct when its birth limit is reached,
+ * but there might be members of the species still
+ * alive, contradicting the meaning of the word.
+ */
+ if ((mvitals[i].mvflags & G_GONE) == G_EXTINCT)
Strcat(buf, " (extinct)");
putstr(klwin, 0, buf);
}
-
+ }
putstr(klwin, 0, "");
if (ngenocided > 0) {
Sprintf(buf, "%d species genocided.", ngenocided);
/* Riders are immune to polymorph and green slime
(but apparent Rider might actually be a doppelganger) */
- if (is_rider(mtmp->data) && mtmp->cham == NON_PM)
- return 0;
+ if (mtmp->cham == NON_PM) { /* not a shapechanger */
+ if (is_rider(olddata))
+ return 0;
+ /* make Nazgul and erinyes immune too, to reduce chance of
+ anomalous extinction feedback during final disclsoure */
+ if (mbirth_limit(monsndx(olddata)) < MAXMONNO)
+ return 0;
+ }
if (msg) {
/* like Monnam() but never mention saddle */