rph@nancy (Richard Hughey) (09/28/87)
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 <cr> 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
tlh@pbhyf.UUCP (Lee Hounshell) (09/29/87)
In article <18831@brunix.UUCP> rph@brunix.UUCP (Richard Hughey) writes: >Here are some nethack bug fixes I've attempted to mail to >genat!mike with no luck. The first two I poste awhile ago... Thanks Richard.. Perhaps these fixes will solve my second problem, but I'll post them both anyway (just in case). I've also been having a few problems with nethack that I was going to ask for fixes to.. Namely, whenever a dart or crossbow bolt is thrown (either at me or by me), my screen messes up. (it looks like $<50> or some such). Does anyone know what causes this? Second, I've been getting a bunch of errors on levels 20, 21 and 30 where I'll move somewhere and get the message: panic: the dungeon collapses error in makemon? This happens so often, that I've been forced to make copies of my "save" file so that the game can be "restored" to my last saved position.. I'd much rather just be able to play the game without worrying about this. If anyone feels the urge to do some "serious debugging," I can mail them a copy of my save files for them to play with in "wizard" mode.. or even better, if you have fixes to either of these problems, please email or post.. I'm running on a 3B1 computer. Lee Hounshell - ptsfa!pbhacker!tlh
rph@nancy.UUCP (10/01/87)
In article <2160@pbhyf.UUCP> tlh@pbhyf.UUCP (Lee Hounshell) writes: >In article <18831@brunix.UUCP> rph@brunix.UUCP (Richard Hughey) writes: >>Here are some nethack bug fixes I've attempted to mail to >>genat!mike with no luck. The first two I poste awhile ago... > >Thanks Richard.. You're welcome. >Perhaps these fixes will solve my second problem, but I'll post them >both anyway (just in case). I've also been having a few problems with >nethack that I was going to ask for fixes to.. > >Namely, whenever a dart or crossbow bolt is thrown (either at me or by me), >my screen messes up. (it looks like $<50> or some such). Does anyone know >what causes this? > I've never seen this happen on our vax 4.3 or ultrix microvax, so I can't be any help here. >Second, I've been getting a bunch of errors on levels 20, 21 and 30 where >I'll move somewhere and get the message: > >panic: the dungeon collapses >error in makemon? > >Lee Hounshell - ptsfa!pbhacker!tlh This is what the bug fixes to makemon I posted fix. The problem comes about from makemon never randomly creating Kops. The original code doesn't work when either the kops have been genocided or (equavalently), 100 kops have been created. Only thing I can recomend is to either recompile w/ the mods, or keep replacing. It was for this bug that I originally introduced the '.e' files to panic in an attempt to keep the players happy. One of these produced a level with no corriders when reinstated. weird. I'll post more fixes and changes (mostly in difficulty) as I continue to spend more time than I ought on this game. ------------------------------ Richard Hughey CSNET: rph%cs.brown.edu@relay.cs.net Brown University BITNET: rph@browncs (decvax, ihnp4, allegra)!brunix!rph