Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC840302); site mcvax.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!mcvax!aeb From: aeb@mcvax.UUCP (Andries Brouwer) Newsgroups: net.games.hack Subject: Re: Y.A.H.B (Yet Another Hack BUG) Message-ID: <665@mcvax.UUCP> Date: Tue, 14-May-85 09:53:55 EDT Article-I.D.: mcvax.665 Posted: Tue May 14 09:53:55 1985 Date-Received: Thu, 16-May-85 20:11:40 EDT References: <5367@ucla-cs.ARPA> Reply-To: aeb@mcvax.UUCP (Andries Brouwer) Organization: CWI, Amsterdam Lines: 50 In article <5367@ucla-cs.ARPA> ryan@ucla-cs.UUCP writes: >I was playing hack last night when i tamed a mimic...... >When i tamed him i was stuck to him and then when i killed him >i was still stuck..... Yes, I cannot reproduce the bug on my machine, but reading the source shows that it works fine for me by some coincidence. The problem is that when you name or tame a monster, it is moved to a new monster structure but there may still be pointers around to the old structure. I'll think about this a little more, but the problem you mention is cured by adding the line if(u.ustuck == mtmp) u.ustuck = mtmp2; to the routine replmon() in hack.mon.c. Future versions of hack will use ustuckid instead of ustuck. Below follows a diff between my current hack.mon.c and the 1.0.2 version. >Also, in my version stairs are not created past the 27th level.... >Why, how are you supposed to get the amulet without teleporting? >Is there a bug fix for it? But this is not a bug; it is quite intentional. < /* hack.mon.c - version 1.0.2 */ --- > /* hack.mon.c - current working version */ 130a131 > /* flags.botlx = 1; /* should we show status line ? */ 193a195,199 > > /* fleeing monsters might regain courage */ > if(mtmp->mflee && mtmp->mhp == mtmp->mhpmax && !rn2(25)) > mtmp->mflee = 0; > 231a238,239 > if(mtmp->mfroz || mtmp->msleep) > return(0); 239a248,252 > #ifndef NOWORM > if(mtmp->wormno) > goto not_special; > #endif NOWORM > 283a297 > not_special: 579a594 > if(u.ustuck == mtmp) u.ustuck = mtmp2; 720c735 < if(!letter(tmp) || !rn2(3)) tmp = 0; --- > if(!letter(tmp) || (!index("mw", tmp) && !rn2(3))) tmp = 0;