From: snelling@bnr.ca (Peter Snelling)
Subject: Listing Genocided Monsters
Reply-To: snelling@bnr.ca (Peter Snelling)
Organization: Bell-Northern Research Ltd.
Date: Thu, 27 Aug 92 21:37:16 GMT

I have made a modification to the source to allow you to identify 
monsters which have been genocided.  You can do this by pressing 
"\" during the game (it is appended to the list of discoveries), 
or by pressing ? when asked what you want to genocide.

The modifications are all surrounded by SNELLING_MODS, which you
would have to define to make this work as shown:

-------------------------------------------------
At the very end of file o_init.c:

    if (ct == 0) {
        You("haven't discovered anything yet...");
        cornline(3, NULL);
    } else
        cornline(2, NULL);

#ifdef SNELLING_MODS
    ct = 0;
    cornline(0, "Genocides");
    for(i=0;mons[i].mlet; i++) {
       if ((mons[i].geno & G_GENOD)) {
          ct++;
          cornline(1, makeplural(mons[i].mname));
                                       }
                               }
    if (ct == 0) {
        cornline(3, NULL);
    } else
        cornline(2, NULL);

#endif /* SNELLING_MODS */

    return 0;
}
----------------------------------------------------
in read.c at around line 870:

do_class_genocide()
{
        register int i, j, immunecnt, gonecnt, goodcnt;
        char buf[BUFSZ];

        for(j=0; ; j++) {
                if (j >= 5) {
                        pline(thats_enough_tries);
                        return;
                }
                do {
#ifdef SNELLING_MODS
   do {
    pline(
    "What class of monsters do you wish to genocide? [type a letter or ?] ");
                        getlin(buf);
    if (buf[0]=='?') {
        int ct = 0;
        cornline(0, "Genocides");
        for(i=0;mons[i].mlet; i++) {
            if ((mons[i].geno & G_GENOD)) {
                ct++;
                cornline(1, makeplural(mons[i].mname));
                                          }
                                   }
        if (ct == 0) {
            You("haven't genocided anything yet...");
            cornline(3, NULL);
                     } else
            cornline(2, NULL);
                     }
      } while (buf[0]=='?');
#else /* SNELLING_MODS */
    pline("What class of monsters do you wish to genocide? [type a letter] ");
                        getlin(buf);
#endif /* SNELLING_MODS */

                } while (buf[0]=='\033' || strlen(buf) != 1);
------------------------------------------------------------
And then basically the same code in read.c at around line 1000

do_genocide(how)
int how;
/* 0 = no genocide; create monsters (cursed scroll) */
/* 1 = normal genocide */
/* 3 = forced genocide of player */
{
        char buf[BUFSZ];
        register int    i, j, killplayer = 0;
        register struct permonst *ptr;
        register struct monst *mtmp, *mtmp2;

        if (how & PLAYER) {
                ptr = player_mon();
                Strcpy(buf, ptr->mname);
                killplayer++;
        } else {
            for(j = 0; ; j++) {
                if(j >= 5) {
                    pline(thats_enough_tries);
                    return;
                }
#ifdef SNELLING_MODS
  do {
    pline("What monster do you want to genocide? [type the name or ?] ");
                        getlin(buf);
    if (buf[0]=='?') {
        int ct = 0;
        cornline(0, "Genocides");
        for(i=0;mons[i].mlet; i++) {
            if ((mons[i].geno & G_GENOD)) {
                ct++;
                cornline(1, makeplural(mons[i].mname));
                                          }
                                   }
        if (ct == 0) {
            You("haven't genocided anything yet...");
            cornline(3, NULL);
                     } else
            cornline(2, NULL);
                     }
     } while (buf[0]=='?');
#else /* SNELLLING_MODS */
    pline("What monster do you want to genocide? [type the name] ");
                        getlin(buf);
#endif /* SNELLING_MODS */

                if(strlen(buf) && (!strncmp(buf, pl_character, PL_CSIZ))) {
        /* Note: pl_character starts with capitals and player_mon does not */
                    ptr = player_mon();
----------------------------------------------------------------

Try it and let me know what you think.

I may eventually get around to improving listing discoveries so
that it records stuff about special levels, but it's a lot harder 
than the above.

-- 
Peter Snelling
Newsgroups: rec.games.hack