Fix: NH004 Problem: msummon() assumes that ndemon() et. al. return 0 on failure, whereas these have been changed (since 3.2.3) to return NON_PM, presumably because 0 offically refers to giant ants. This causes the game to panic with an error of monsndx - could not index monster (-1) if the RNG is feeling particuarly unhelpful. Compatible with: NetHack 3.3.0 SlashEM 0.0.6E1F2 Author: J. Ali Harlow, ali@avrc.city.ac.uk Date: 1 Jun 2000 diff -Nacrd ../nethack-3.3.0/src/minion.c ./src/minion.c *** ../nethack-3.3.0/src/minion.c Tue Apr 25 16:51:13 2000 --- ./src/minion.c Thu Jun 1 21:23:17 2000 *************** *** 10,16 **** msummon(ptr) /* ptr summons a monster */ register struct permonst *ptr; { ! register int dtype = 0, cnt = 0; aligntyp atyp = sgn(ptr->maligntyp); if (is_dprince(ptr) || (ptr == &mons[PM_WIZARD_OF_YENDOR])) { --- 10,16 ---- msummon(ptr) /* ptr summons a monster */ register struct permonst *ptr; { ! register int dtype = NON_PM, cnt = 0; aligntyp atyp = sgn(ptr->maligntyp); if (is_dprince(ptr) || (ptr == &mons[PM_WIZARD_OF_YENDOR])) { *************** *** 31,37 **** cnt = (!rn2(4) && !is_lord(&mons[dtype])) ? 2 : 1; } ! if (!dtype) return; /* sanity checks */ if (cnt > 1 && (mons[dtype].geno & G_UNIQ)) cnt = 1; --- 31,37 ---- cnt = (!rn2(4) && !is_lord(&mons[dtype])) ? 2 : 1; } ! if (dtype < LOW_PM) return; /* sanity checks */ if (cnt > 1 && (mons[dtype].geno & G_UNIQ)) cnt = 1; *************** *** 41,47 **** */ if (mvitals[dtype].mvflags & G_GONE) { dtype = ndemon(atyp); ! if (!dtype) return; } while (cnt > 0) { --- 41,47 ---- */ if (mvitals[dtype].mvflags & G_GONE) { dtype = ndemon(atyp); ! if (dtype < LOW_PM) return; } while (cnt > 0) {