Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cca!mirror!rayssd!brunix!nancy!rph From: rph@nancy (Richard Hughey) Newsgroups: comp.sources.bugs,rec.games.hack Subject: Nethack bugs Message-ID: <18831@brunix.UUCP> Date: Mon, 28-Sep-87 09:39:36 EDT Article-I.D.: brunix.18831 Posted: Mon Sep 28 09:39:36 1987 Date-Received: Wed, 30-Sep-87 05:48:57 EDT Sender: root@brunix.UUCP Reply-To: rph@brunix.UUCP (Richard Hughey) Organization: Brown University Computer Science Dept. Lines: 149 Xref: mnetor comp.sources.bugs:330 rec.games.hack:1521 Here are some nethack bug fixes I've attempted to mail to genat!mike with no luck. The first two I poste awhile ago. 8/85 Change "+" into '+' in case 6 of the gods being pleased. Currently, if a dog is leashed and the leash is dropped, the dog is still leashed. The code can be added to drop(obj) in do.c: #ifedf WALKIES if (obj->otyp == LEASH) { register struct monst *mtmp = fmon; while (mtmp && !mtmp->mleashed) mtmp = mtmp->nmon; if (mtmp) { pline ("Your leash is tied around your hand."); return (0); } } #endif 9/2/87 Change to panic (end.c) to save a '.e' file before aborting. * home(); cls(); * pline(" Suddenly, the dungeon collapses."); * #ifdef RPH * pline("Report error to %s and it may be possible to rebuild.",WIZARD); * more(); * (void) sprintf (SAVEF, "%s.e", SAVEF); * dosave0(0); * #endif * fputs(" ERROR: ", stdout); Change to dorestore (save.c) to allow the wizard to play saved files of any player. Helpful to debugging panics. * #ifdef WIZARD * #ifdef RPH * if (!wizard) * #endif * if(tmp != getuid()) { /* strange ... */ * (void) close(fd); * (void) unlink(SAVEF); * puts("Saved game was not yours."); * restoring = FALSE; * return(0); * } * #endif 9/14/87 options.c(215): change 'o' to 'O' in 'Type o help for help'. 9/15/87 makemon.c: Superpowerful demons made more often & more dependent on amulet stolen: * #ifdef HARD * if(ptr->mlet == '&' && (Inhell || u.udemigod) ) { * /* originally rn2(5+!Inhell), made harder -- rph */ * if(!rn2(3 + !Inhell + !u.udemigod)) { * if (rn2(3 + Inhell)) mtmp->data = &d_lord; wizard.c: To code if wizard cancelled, in inrange(), change to !rn2(4) from rn2(4). * /* these two used to be !rn2(4) & !rn2(2). Now doesn't work */ * /* 25% if hard or 50% if not hard, instead of 75%, 50% */ * #ifdef HARD * !rn2(4) * #else * !rn2(2) Also case 2 (cloning) of wizard spells changed from rnd(5) which is never zero to rn2(3). * case 2: * /* was (== 1 && !rnd(5)), which always == 0 */ * /* since 1<=rnd(5)<=5 and && is lower than == */ * if ((flags.no_of_wizards == 1) && !rn2(3)) { * /* if only 1 wizard, clone himself */ * pline ("Double Trouble..."); * clonewiz(mtmp); * } clonewiz(): Location of clone changed to u.ux, u.uy from mtmp->mx, my, since there's a monster at this location (1) so new wiz will not be created. This really should be changed to being next to the wizard, but that would cause a special case in make_mon I didn't feel like adding. * if(mtmp2 = makemon(PM_WIZARD, u.ux, u.uy)) { nasty(): changed so not to bomb if u.ulevel < 3. (important, really, only in wizard mode). * nastynum = sizeof(nasties); * tmp = (u.ulevel > 3) ? u.ulevel : 3; /* just in case -- rph */ * for(i = rnd(tmp/3); i > 0; --i) { makemon.c: makemon: the mess picking a random monster was fixed, so now bats will exist in nethack, and kops won't be created. Also so that no error results from genociding the kops. * } else { * ct = CMNUM - strlen(fut_geno); * if(index(fut_geno, 'm')) ct++; /*make only1minotaur */ * if(index(fut_geno, '@')) ct++; /* CMNUM+1 and CMNUM */ * #ifdef KOPS /* Don't create KOPS & DON'T count them twice. rph. */ * if(!index(fut_geno, 'K')) ct--; * #endif * if(ct <= 0) return(0); /* no more monsters! */ * tmp = 7; * #ifdef KOPS * tmp--; * #endif * #ifdef ROCKMOLE * if(dlevel<4) tmp--; * #endif * /* tmp was 7 in next line. rph */ * tmp = rn2(ct*dlevel/24 + tmp); * if(tmp < dlevel - 4) tmp = rn2(ct*dlevel/24 + 12); * if(tmp >= ct) tmp = rn1(ct - ct/2, ct/2); * * ct = 0; * for(; ct < CMNUM; ct++){ * ptr = &mons[ct]; * #ifdef KOPS * if(ptr->mlet == 'K') { * continue; * } * #endif * if(index(fut_geno, ptr->mlet)) continue; * if(tmp-- <= 0) goto gotmon; * } * panic("makemon? %d %d %d", ct, tmp, CMNUM); ------------------------------ Richard Hughey CSNET: rph%cs.brown.edu@relay.cs.net Brown University BITNET: rph@browncs (decvax, ihnp4, allegra)!brunix!rph