diff -Prub nethack-3.4.3/include/config.h nethack-3.4.3-bradspit/include/config.h --- nethack-3.4.3/include/config.h 2003-12-08 01:39:13.000000000 +0200 +++ nethack-3.4.3-bradspit/include/config.h 2004-01-16 18:54:02.000000000 +0200 @@ -350,6 +350,10 @@ /*#define GOLDOBJ */ /* Gold is kept on obj chains - Helge Hafting */ /*#define AUTOPICKUP_EXCEPTIONS */ /* exceptions to autopickup */ +#define BRADS_PIT /* oh that lucky pit that is Brad's */ +#ifdef BRADS_PIT +# define BRADS_TEXT "Brad's" +#endif /* End of Section 5 */ diff -Prub nethack-3.4.3/include/decl.h nethack-3.4.3-bradspit/include/decl.h --- nethack-3.4.3/include/decl.h 2003-12-08 01:39:13.000000000 +0200 +++ nethack-3.4.3-bradspit/include/decl.h 2004-01-16 18:54:02.000000000 +0200 @@ -212,6 +212,12 @@ E NEARDATA long moves, monstermoves; E NEARDATA long wailmsg; +#ifdef BRADS_PIT +E NEARDATA struct brds_pt { + int created; + int found; +} brads_pit; +#endif E NEARDATA boolean in_mklev; E NEARDATA boolean stoned; diff -Prub nethack-3.4.3/src/decl.c nethack-3.4.3-bradspit/src/decl.c --- nethack-3.4.3/src/decl.c 2003-12-08 01:39:13.000000000 +0200 +++ nethack-3.4.3-bradspit/src/decl.c 2004-01-16 18:54:02.000000000 +0200 @@ -188,6 +188,9 @@ NEARDATA long moves = 1L, monstermoves = 1L; /* These diverge when player is Fast */ NEARDATA long wailmsg = 0L; +#ifdef BRADS_PIT +NEARDATA struct brds_pt brads_pit = { FALSE, FALSE }; +#endif /* objects that are moving to another dungeon level */ NEARDATA struct obj *migrating_objs = (struct obj *)0; diff -Prub nethack-3.4.3/src/engrave.c nethack-3.4.3-bradspit/src/engrave.c --- nethack-3.4.3/src/engrave.c 2003-12-08 01:39:13.000000000 +0200 +++ nethack-3.4.3-bradspit/src/engrave.c 2004-01-16 18:54:02.000000000 +0200 @@ -219,7 +219,7 @@ return((struct engr *) 0); } -#ifdef ELBERETH +#if defined(ELBERETH) || defined(BRADS_PIT) /* Decide whether a particular string is engraved at a specified * location; a case-insensitive substring match used. * Ignore headstones, in case the player names herself "Elbereth". diff -Prub nethack-3.4.3/src/restore.c nethack-3.4.3-bradspit/src/restore.c --- nethack-3.4.3/src/restore.c 2003-12-08 01:39:13.000000000 +0200 +++ nethack-3.4.3-bradspit/src/restore.c 2004-01-16 18:54:02.000000000 +0200 @@ -428,6 +428,9 @@ mread(fd, (genericptr_t) &quest_status, sizeof(struct q_score)); mread(fd, (genericptr_t) spl_book, sizeof(struct spell) * (MAXSPELL + 1)); +#ifdef BRADS_PIT + mread(fd, (genericptr_t) &brads_pit, sizeof brads_pit); +#endif restore_artifacts(fd); restore_oracles(fd); if (u.ustuck) diff -Prub nethack-3.4.3/src/save.c nethack-3.4.3-bradspit/src/save.c --- nethack-3.4.3/src/save.c 2003-12-08 01:39:13.000000000 +0200 +++ nethack-3.4.3-bradspit/src/save.c 2004-01-16 18:54:02.000000000 +0200 @@ -305,6 +305,9 @@ bwrite(fd, (genericptr_t) &quest_status, sizeof(struct q_score)); bwrite(fd, (genericptr_t) spl_book, sizeof(struct spell) * (MAXSPELL + 1)); +#ifdef BRADS_PIT + bwrite(fd, (genericptr_t) &brads_pit, sizeof brads_pit); +#endif save_artifacts(fd); save_oracles(fd, mode); if(ustuck_id) diff -Prub nethack-3.4.3/src/trap.c nethack-3.4.3-bradspit/src/trap.c --- nethack-3.4.3/src/trap.c 2003-12-08 01:39:13.000000000 +0200 +++ nethack-3.4.3-bradspit/src/trap.c 2004-01-16 18:54:02.000000000 +0200 @@ -303,6 +303,15 @@ level.flags.is_cavernous_lev ? CORR : DOOR; unearth_objs(x, y); +#ifdef BRADS_PIT + if ((typ == PIT)&&(!brads_pit.created)) { + lev = &levl[x][y]; + if ((IS_ROOM(lev->typ))&&(!In_sokoban(&u.uz))&&(rnd(10)ttyp == HOLE) ttmp->tseen = 1; /* You can't hide a hole */ @@ -590,6 +599,9 @@ boolean already_seen = trap->tseen; boolean webmsgok = (!(trflags & NOWEBMSG)); boolean forcebungle = (trflags & FORCEBUNGLE); +#ifdef BRADS_PIT + struct engr *ep; +#endif nomul(0); @@ -933,6 +945,22 @@ ballfall(); placebc(); } +#ifdef BRADS_PIT + if ((ep=engr_at(u.ux,u.uy))&&(strstri(ep->engr_txt,BRADS_TEXT) != 0)) { + if ((ep->engr_time==0)&&(ep->engr_type==ENGRAVE)) { + if (!brads_pit.found) { + pline("Oh look! It's Brad's Pit!"); + brads_pit.found=TRUE; + change_luck(1); + } + } else { + if (!brads_pit.found) { + brads_pit.found=TRUE; + pline("Pity. You might have got lucky."); + } + } + } +#endif selftouch("Falling, you"); vision_full_recalc = 1; /* vision limits change */ exercise(A_STR, FALSE);