Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!husc6!yale!sshefter From: sshefter@yale.UUCP Newsgroups: net.sources.games Subject: hack mods (5 of 6) Message-ID: <2636@yale-celed.yale.UUCP> Date: Mon, 30-Mar-87 15:57:25 EST Article-I.D.: yale-cel.2636 Posted: Mon Mar 30 15:57:25 1987 Date-Received: Wed, 1-Apr-87 00:47:17 EST References: <2633@yale-celed.yale.UUCP> Reply-To: sshefter@yale-celed.UUCP (Bret A. Shefter) Distribution: world Organization: Yale University Computer Science Dept, New Haven CT Lines: 227 From yale!husc6!rutgers!sri-spam!sri-unix!hplabs!sdcrdcf!ucla-cs!srt Wed Nov 5 12:41:03 EST 1986 As wet weather approaches, expect scorpions to leave the damp confines of the dungeon and migrate south, being replaced by the rapacious and deadly common dungeon spider. Considered even more dangerous than scorpions, the dungeon spider leaves behind it a trail of webs that can entangle the unwary adventurer and lead to his early demise. These webs are especially dangerous in the corridors where they cannot be seen in the dim light. ----- Webs are implemented as traps, and appear as '"', so modify the 'data' file appropriately. Manually modify def.objects.h in hack.c replacing code near 146 /* not attacking an animal, so we try to move */ if(u.utrap) { register struct trap *ttmp; ttmp = t_at(u.ux,u.uy); if(ttmp->ttyp == PIT) { pline("You are still in a pit."); u.utrap--; #ifdef SPIDERS } else if (ttmp->ttyp == WEB) { pline("You are entangled in a web."); u.utrap--; /* Remove web when destroyed. */ if (!u.utrap) { deltrap(ttmp); } #endif SPIDERS } else { pline("You are caught in a beartrap."); if((u.dx && u.dy) || !rn2(5)) u.utrap--; } return; } in hack.mhitu.c 255a256,258 > #ifdef SPIDERS > poisoned("spider's sting",mdat->mname); > #else SPIDERS 256a260 > #endif SPIDERS in hack.mklev.c 678a679,681 > #ifdef SPIDERS > kind = rn2(TRAPNUM - nopierc - nomimic - 1); > #else SPIDERS 680a684 > #endif SPIDERS in hack.mon.c 258a259,267 > #ifdef SPIDERS > { > /* You can hide under webs. */ > register struct trap *ttmp; > ttmp = t_at(mtmp->mx,mtmp->my); > if (mtmp->mhide && ttmp && ttmp->ttyp == WEB && rn2(10)) > return(0); > } > #endif SPIDERS 436a446,457 > #ifdef SPIDERS > /* Spiders leave web behind. */ > if (msym == 's') { > extern struct trap *maketrap(); > register struct trap *ttmp; > if (!(ttmp = t_at(omx,omy)) && > levl[omx][omy].typ >= CORR) { > ttmp = maketrap(omx,omy,WEB); > ttmp->tseen = 1; > } > } > #endif SPIDERS 921a943,946 > #ifdef SPIDERS > /* You can hide under webs. */ > register struct trap *ttmp; > ttmp = t_at(mtmp->mx,mtmp->my); 922a948,953 > && (!mtmp->mhide || > (!o_at(mtmp->mx,mtmp->my) && > (!ttmp || ttmp->ttyp != WEB))) > && cansee(mtmp->mx, mtmp->my)); > #else SPIDERS > return((!mtmp->minvis || See_invisible) 924a956 > #endif SPIDERS in hack.monst.c 48a49,51 > #ifdef SPIDERS > { "spider", 's',5,15,3,1,4,0 }, > #else SPIDERS 49a53 > #endif SPIDERS in hack.pri.c 352c352,355 < else if((ttmp = t_at(x,y)) && ttmp->tseen) tmp = '^'; --- > #ifdef SPIDERS > else if((ttmp = t_at(x,y)) && ttmp->ttyp == WEB) tmp = '"'; > #endif SPIDERS > else if(ttmp && ttmp->tseen) tmp = '^'; in hack.trap.c replacing near top of file: char *traps[] = { " bear trap", "n arrow trap", " dart trap", " trapdoor", " teleportation trap", " pit", " sleeping gas trap", #ifdef NEWTRAPS " magic trap", " squeaky board", " piercer", #ifdef SPIDERS " mimic", " web" #else SPIDERS " mimic" #endif SPIDERS #else NEWTRAPS " piercer", #ifdef SPIDERS " mimic", " web" #else SPIDERS " mimic" #endif SPIDERS #endif NEWTRAPS }; 160a172,196 > #ifdef SPIDERS > > case WEB: > > /* Our luckless adventurer has stepped into a web. */ > > pline("You've stumbled into a spider web!"); > > /* Time stuck in the web depends on your strength. */ > > if (u.ustr == 3) u.utrap = rn1(6,6); > else if (u.ustr < 6) u.utrap = rn1(6,4); > else if (u.ustr < 9) u.utrap = rn1(4,4); > else if (u.ustr < 12) u.utrap = rn1(4,2); > else if (u.ustr < 15) u.utrap = rn1(2,2); > else if (u.ustr < 18) u.utrap = rnd(2); > else if (u.ustr < 69) u.utrap = 1; > else { > u.utrap = 0; > pline("You tear through the trap!"); > deltrap(trap); > } > break; > #endif SPIDERS > 271a308,316 > #ifdef SPIDERS > case WEB: > /* Monster in a web. */ > if(mtmp->data->mlet != 's') { > pline("%s is caught in a web!", Monnam(mtmp)); > mtmp->mtrapped = 1; > } > break; > #endif SPIDERS in def.trap.h 28,29d27 < #define PIERC 9 < #define MIMIC 10 /* used only in mklev.c */ 31a30,36 > #define PIERC 9 > #define MIMIC 10 /* used only in mklev.c */ > > #ifdef SPIDERS > #define WEB 11 > #define TRAPNUM 12 > #else SPIDERS 33a39,40 > #endif SPIDERS > 37a45,49 > > #ifdef SPIDERS > #define WEB 9 > #define TRAPNUM 10 > #else SPIDERS 38a51 > #endif SPIDERS 42,46d54 < #ifdef SPIDERS < < #define WEB 20 /* should be > TRAPNUM */ < < #endif SPIDERS Scott R. Turner ARPA: (now) srt@UCLA-LOCUS.ARPA (soon) srt@LOCUS.UCLA.EDU UUCP: ...!{cepu,ihnp4,trwspp,ucbvax}!ucla-cs!srt DRAGNET: ...!{channing,streisand,joe-friday}!srt@dragnet-relay.arpa