Article View: net.games.hack
Article #1402Re: A facilitating bug
From: Don Kneller%Langridge
Date: Sun, 16 Mar 1986 09:05
Date: Sun, 16 Mar 1986 09:05
89 lines
3595 bytes
3595 bytes
In article <394@tilt.FUN> kyrimis@tilt.UUCP (Kriton ) writes:
>In article <786@ucsfcgl.UUCP> kneller@ucsfcgl.UUCP (Don Kneller) writes:
>>It has occurred to me several times that killer bees just aren't
>>as much problem with HACK 1.03 as with version 1.01. In 1.03 you can
>>run away when you're in trouble. The bees follow you (sometimes), but
>>they don't hit. Previously, they'd follow you (closely) *and* hit.
>>
>>This bug fix restores the potency of killer bees (and other multiple-move
>>monsters).
>
>Unfortunately, the posted patch makes agile monsters such as B's
>and A's ignore Elbereth (and possibly scare monster scrolls ),
>which is not quite right. As I'm not familiar with the workings
Oops, I goofed. I managed to forget to update a second local variable
that determines whether the monster should be scared. Here is a reworked
version of the fix.
*** hack.mon.old Sun Mar 16 00:52:19 1986
--- hack.mon.c Sun Mar 16 00:42:23 1986
***************
*** 152,158
register struct monst *mtmp;
{
register struct permonst *mdat;
! register tmp, nearby, scared;
if(mtmp->cham && !rn2(6))
(void) newcham(mtmp, &mons[dlevel+14+rn2(CMNUM-14-dlevel)]);
--- 152,158 -----
register struct monst *mtmp;
{
register struct permonst *mdat;
! register tmp, nearby, scared, onscary;
if(mtmp->cham && !rn2(6))
(void) newcham(mtmp, &mons[dlevel+14+rn2(CMNUM-14-dlevel)]);
***************
*** 199,206
mtmp->mflee = 0;
nearby = (dist(mtmp->mx, mtmp->my) < 3);
! scared = (nearby && (sengr_at("Elbereth", u.ux, u.uy) ||
! sobj_at(SCR_SCARE_MONSTER, u.ux, u.uy)));
if(scared && !mtmp->mflee) {
mtmp->mflee = 1;
mtmp->mfleetim = (rn2(7) ? rnd(10) : rnd(100));
--- 199,207 -----
mtmp->mflee = 0;
nearby = (dist(mtmp->mx, mtmp->my) < 3);
! onscary = (sengr_at("Elbereth", u.ux, u.uy) ||
! sobj_at(SCR_SCARE_MONSTER, u.ux, u.uy));
! scared = (nearby && onscary);
if(scared && !mtmp->mflee) {
mtmp->mflee = 1;
mtmp->mfleetim = (rn2(7) ? rnd(10) : rnd(100));
***************
*** 218,223
tmp = m_move(mtmp,0); /* 2: monster died moving */
if(tmp == 2 || (tmp && mdat->mmove <= 12))
return(tmp == 2);
}
if(!index("Ea", mdat->mlet) && nearby &&
--- 219,233 -----
tmp = m_move(mtmp,0); /* 2: monster died moving */
if(tmp == 2 || (tmp && mdat->mmove <= 12))
return(tmp == 2);
+ /* The following lines restore the ability of multiple-move
+ * monsters to hit you after having caught up. - dgk
+ */
+ nearby = (dist(mtmp->mx, mtmp->my) < 3);
+ scared = (nearby && onscary);
+ if(scared && !mtmp->mflee) {
+ mtmp->mflee = 1;
+ mtmp->mfleetim = (rn2(7) ? rnd(10) : rnd(100));
+ }
}
if(!index("Ea", mdat->mlet) && nearby &&
--
Don Kneller
UUCP: ...ucbvax!ucsfcgl!kneller
ARPA: kneller@ucsf-cgl.ARPA
BITNET: kneller@ucsfcgl.BITNET
Technical Details
Message-ID:
<789@ucsfcgl.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!ucbvax!ucsfcgl!knellerReferences:
<786@ucsfcgl.UUCP> <394@tilt.FUN>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ucsfcgl.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!ucbvax!ucsfcgl!kneller From: kneller@ucsfcgl.UUCP (Don Kneller%Langridge) Newsgroups: net.games.hack Subject: Re: A facilitating bug Message-ID: <789@ucsfcgl.UUCP> Date: Sun, 16-Mar-86 04:05:34 EST Article-I.D.: ucsfcgl.789 Posted: Sun Mar 16 04:05:34 1986 Date-Received: Tue, 18-Mar-86 01:41:29 EST References: <786@ucsfcgl.UUCP> <394@tilt.FUN> Reply-To: kneller@ucsfcgl.UUCP (Don Kneller) Organization: UCSF Computer Graphics Lab Lines: 89 Summary: Oops