diff -pruN slashem-0.0.7E7F1-official-release/dat/opthelp slashem-0.0.7E7F1-deathexplore/dat/opthelp --- slashem-0.0.7E7F1-official-release/dat/opthelp 2005-07-02 09:24:44.000000000 +0200 +++ slashem-0.0.7E7F1-deathexplore/dat/opthelp 2005-11-03 17:52:30.000000000 +0100 @@ -63,6 +63,9 @@ news print any news from game admi Boolean option if MFLOPPY was set at compile time: checkspace check free disk space before writing files to disk [TRUE] +Boolean option if DEATH_EXPLORE was set at compile time: +death_explore prompt for changing to explore mode when you die [FALSE] + Boolean option if EXP_ON_BOTL was set at compile time: showexp display your accumulated experience points [FALSE] diff -pruN slashem-0.0.7E7F1-official-release/doc/Guidebook.mn slashem-0.0.7E7F1-deathexplore/doc/Guidebook.mn --- slashem-0.0.7E7F1-official-release/doc/Guidebook.mn 2005-07-02 09:24:44.000000000 +0200 +++ slashem-0.0.7E7F1-deathexplore/doc/Guidebook.mn 2005-11-03 17:52:30.000000000 +0100 @@ -1822,6 +1822,8 @@ new players if it detects some anticipat .lp "confirm " Have user confirm attacks on pets, shopkeepers, and other peaceable creatures (default on). +.lp death_explore +Prompt for changing to explore mode when your character dies. .lp DECgraphics Use a predefined selection of characters from the DEC VT-xxx/DEC Rainbow/ANSI line-drawing character set to display the dungeon/effects/traps diff -pruN slashem-0.0.7E7F1-official-release/include/flag.h slashem-0.0.7E7F1-deathexplore/include/flag.h --- slashem-0.0.7E7F1-official-release/include/flag.h 2005-07-02 09:24:44.000000000 +0200 +++ slashem-0.0.7E7F1-deathexplore/include/flag.h 2005-11-03 17:52:32.000000000 +0100 @@ -239,6 +239,9 @@ struct instance_flags { boolean lan_mail; /* mail is initialized */ boolean lan_mail_fetched; /* mail is awaiting display */ #endif +#ifdef DEATH_EXPLORE + boolean death_expl; /* prompt for explore mode at death */ +#endif /* * Window capability support. */ diff -pruN slashem-0.0.7E7F1-official-release/src/cmd.c slashem-0.0.7E7F1-deathexplore/src/cmd.c --- slashem-0.0.7E7F1-official-release/src/cmd.c 2005-07-02 09:24:44.000000000 +0200 +++ slashem-0.0.7E7F1-deathexplore/src/cmd.c 2005-11-03 17:52:33.000000000 +0100 @@ -160,7 +160,7 @@ STATIC_PTR int NDECL(wiz_show_display); STATIC_DCL int NDECL(wiz_port_debug); # endif # endif -STATIC_PTR int NDECL(enter_explore_mode); +int NDECL(enter_explore_mode); /* deathexplore patch */ STATIC_PTR int NDECL(doattributes); STATIC_PTR int NDECL(doconduct); /**/ STATIC_PTR boolean NDECL(minimal_enlightenment); @@ -524,7 +524,7 @@ domonability() return 0; } -STATIC_PTR int +int /* deathexplore patch */ enter_explore_mode() { if(!discover && !wizard) { diff -pruN slashem-0.0.7E7F1-official-release/src/end.c slashem-0.0.7E7F1-deathexplore/src/end.c --- slashem-0.0.7E7F1-official-release/src/end.c 2005-07-02 09:24:44.000000000 +0200 +++ slashem-0.0.7E7F1-deathexplore/src/end.c 2005-11-03 18:04:33.000000000 +0100 @@ -10,7 +10,9 @@ #include #endif #include "dlb.h" - +#ifdef DEATH_EXPLORE +extern int NDECL(enter_explore_mode); +#endif /* these probably ought to be generated by makedefs, like LAST_GEM */ #define FIRST_GEM DILITHIUM_CRYSTAL #define FIRST_AMULET AMULET_OF_ESP @@ -371,7 +373,7 @@ disclose(how,taken) int how; boolean taken; { - char c = 0, defquery; + char c = 0, defquery; char qbuf[QBUFSZ]; boolean ask; boolean hallu=FALSE; @@ -562,6 +564,9 @@ done(how) int how; { boolean taken; +#ifdef DEATH_EXPLORE + boolean goexplore = FALSE; +#endif char kilbuf[BUFSZ], pbuf[BUFSZ]; winid endwin = WIN_ERR; boolean bones_ok, have_windows = iflags.window_inited; @@ -640,6 +645,7 @@ int how; return; } } + bones_ok = (how < GENOCIDED) && can_make_bones(); /* dthexpl patch */ if (( #ifdef WIZARD wizard || @@ -655,14 +661,33 @@ int how; return; } +#ifdef DEATH_EXPLORE + else if (iflags.death_expl && how <= GENOCIDED && !bones_ok && +#ifdef WIZARD + !wizard && +#endif + !discover) { + if(yn("Continue in explore mode?") == 'y') { + enter_explore_mode(); + if (discover) goexplore = TRUE; + } + } +#endif + /* * The game is now over... */ die: +#ifdef DEATH_EXPLORE + if (!goexplore) { +#endif program_state.gameover = 1; /* in case of a subsequent panic(), there's no point trying to save */ program_state.something_worth_saving = 0; +#ifdef DEATH_EXPLORE + } /* if (!goexplore) */ +#endif /* render vision subsystem inoperative */ iflags.vision_inited = 0; /* might have been killed while using a disposable item, so make sure @@ -677,6 +702,9 @@ die: pline("Do not pass go. Do not collect 200 %s.", currency(200L)); if (have_windows) wait_synch(); /* flush screen output */ +#ifdef DEATH_EXPLORE + if (!goexplore) { +#endif #ifndef NO_SIGNAL (void) signal(SIGINT, (SIG_RET_TYPE) done_intr); # if defined(UNIX) || defined(VMS) || defined (__EMX__) @@ -690,7 +718,7 @@ die: fade_to_black(); #endif - bones_ok = (how < GENOCIDED) && can_make_bones(); + /* bones_ok = (how < GENOCIDED) && can_make_bones(); moved up */ if (how == TURNED_SLIME) u.ugrave_arise = PM_GREEN_SLIME; @@ -723,6 +751,9 @@ die: make_grave(u.ux, u.uy, pbuf); } } +#ifdef DEATH_EXPLORE + } /* if (!goexplore) */ +#endif if (how == TURNED_SLIME) killer_format = NO_KILLER_PREFIX; if (how == QUIT) { killer_format = NO_KILLER_PREFIX; @@ -742,7 +773,9 @@ die: paygd(); clearpriests(); } else taken = FALSE; /* lint; assert( !bones_ok ); */ - +#ifdef DEATH_EXPLORE + if (!goexplore) { +#endif clearlocks(); if (have_windows) display_nhwindow(WIN_MESSAGE, FALSE); @@ -751,6 +784,9 @@ die: disclose(how, taken); /* finish_paybill should be called after disclosure but before bones */ if (bones_ok && taken) finish_paybill(); +#ifdef DEATH_EXPLORE + } /* if (!goexplore) */ +#endif /* calculate score, before creating bones [container gold] */ { @@ -776,6 +812,25 @@ die: if (deepest > 20) u.urexp += 1000L * (long)((deepest > 30) ? 10 : deepest - 20); if (how == ASCENDED) u.urexp *= 2L; +#ifdef DEATH_EXPLORE + if (goexplore) { + discover = FALSE; /* a kludge to fool the topten function.. */ + topten(how); + /* undo some things that were done for score calculation */ + /* this branch is not entered when you ascend, escape or quit */ + discover = TRUE; + umoney -= hidden_gold(); + u.urexp -= tmp; + u.urexp -= 50L * (long)(deepest - 1); + /* now do what is done when you refuse to die in explore mode */ + if (u.uhpmax <= 0) u.uhpmax = u.ulevel * 8; + savelife(how); + killer = 0; + killer_format = 0; + vision_reset(); + return; + } +#endif } if (bones_ok) { diff -pruN slashem-0.0.7E7F1-official-release/src/options.c slashem-0.0.7E7F1-deathexplore/src/options.c --- slashem-0.0.7E7F1-official-release/src/options.c 2005-07-02 09:24:44.000000000 +0200 +++ slashem-0.0.7E7F1-deathexplore/src/options.c 2005-11-03 17:52:33.000000000 +0100 @@ -81,6 +81,9 @@ static struct Bool_Opt {"color", &iflags.wc_color, FALSE, SET_IN_GAME}, /*WC*/ # endif {"confirm",&flags.confirm, TRUE, SET_IN_GAME}, +#ifdef DEATH_EXPLORE + {"death_explore", &iflags.death_expl, FALSE, SET_IN_GAME}, +#endif #if defined(TERMLIB) && !defined(MAC_GRAPHICS_ENV) {"DECgraphics", &iflags.DECgraphics, FALSE, SET_IN_GAME}, #else