diff -pruN slashem-0.0.7E7F1-official-release/dat/opthelp slashem-0.0.7E7F1-paranoid/dat/opthelp --- slashem-0.0.7E7F1-official-release/dat/opthelp 2005-07-02 09:24:44.000000000 +0200 +++ slashem-0.0.7E7F1-paranoid/dat/opthelp 2005-10-27 22:38:15.000000000 +0200 @@ -63,6 +63,15 @@ 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 PARANOID was set at compile time: +paranoid_hit ask for explicit 'yes' when hitting peacefuls [FALSE] + +Boolean option if PARANOID was set at compile time: +paranoid_quit ask for explicit 'yes' when quitting [FALSE] + +Boolean option if PARANOID was set at compile time: +paranoid_remove always show menu with the T and R commands [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-paranoid/doc/Guidebook.mn --- slashem-0.0.7E7F1-official-release/doc/Guidebook.mn 2005-07-02 09:24:44.000000000 +0200 +++ slashem-0.0.7E7F1-paranoid/doc/Guidebook.mn 2005-10-27 22:38:15.000000000 +0200 @@ -2139,6 +2139,15 @@ Specify the order to list object types i The value of this option should be a string containing the symbols for the various object types. Any omitted types are filled in at the end from the previous order. +.lp paranoid_hit +If true, asks you to type the word ``yes'' when hitting any peaceful +monster, not just the letter ``y''. +.lp paranoid_quit +If true, asks you to type the word ``yes'' when quitting or entering +Explore mode, not just the letter ``y''. +.lp paranoid_remove +If true, always show menu with the R and T commands even when there is +only one item to remove or take off. .lp perm_invent If true, always display your current inventory in a window. This only makes sense for windowing system interfaces that implement this feature. diff -pruN slashem-0.0.7E7F1-official-release/doc/Guidebook.tex slashem-0.0.7E7F1-paranoid/doc/Guidebook.tex --- slashem-0.0.7E7F1-official-release/doc/Guidebook.tex 2005-07-02 09:24:44.000000000 +0200 +++ slashem-0.0.7E7F1-paranoid/doc/Guidebook.tex 2005-10-27 22:43:38.000000000 +0200 @@ -2925,6 +2925,21 @@ symbols for the various object types. A at the end from the previous order. %.lp +\item[\ib{paranoid\_hit}] +If true, asks you to type the word ``yes'' when hitting any peaceful +monster, not just the letter ``y''. +%.lp + +\item[\ib{paranoid\_quit}] +If true, asks you to type the word ``yes'' when quitting or entering +Explore mode, not just the letter ``y''. +%.lp + +\item[\ib{paranoid\_remove}] +If true, always show menu with the R and T commands even when there is +only one item to remove or take off. +%.lp + \item[\ib{perm\_invent}] If true, always display your current inventory in a window. This only makes sense for windowing system interfaces that implement this feature. diff -pruN slashem-0.0.7E7F1-official-release/include/flag.h slashem-0.0.7E7F1-paranoid/include/flag.h --- slashem-0.0.7E7F1-official-release/include/flag.h 2005-07-02 09:24:44.000000000 +0200 +++ slashem-0.0.7E7F1-paranoid/include/flag.h 2005-10-27 22:38:20.000000000 +0200 @@ -239,6 +239,11 @@ struct instance_flags { boolean lan_mail; /* mail is initialized */ boolean lan_mail_fetched; /* mail is awaiting display */ #endif +#ifdef PARANOID + boolean paranoid_hit; /* Ask for 'yes' when hitting peacefuls */ + boolean paranoid_quit; /* Ask for 'yes' when quitting */ + boolean paranoid_remove; /* Always show menu for 'T' and 'R' */ +#endif /* * Window capability support. */ diff -pruN slashem-0.0.7E7F1-official-release/src/cmd.c slashem-0.0.7E7F1-paranoid/src/cmd.c --- slashem-0.0.7E7F1-official-release/src/cmd.c 2005-07-02 09:24:44.000000000 +0200 +++ slashem-0.0.7E7F1-paranoid/src/cmd.c 2005-10-27 22:38:20.000000000 +0200 @@ -527,9 +527,26 @@ domonability() STATIC_PTR int enter_explore_mode() { +#ifdef PARANOID + char buf[BUFSZ]; + int really_xplor = FALSE; +#endif if(!discover && !wizard) { pline("Beware! From explore mode there will be no return to normal game."); +#ifdef PARANOID + if (iflags.paranoid_quit) { + getlin ("Do you want to enter explore mode? [yes/no]?",buf); + (void) lcase (buf); + if (!(strcmp (buf, "yes"))) really_xplor = TRUE; + } else { + if (yn("Do you want to enter explore mode?") == 'y') { + really_xplor = TRUE; + } + } + if (really_xplor) { +#else if (yn("Do you want to enter explore mode?") == 'y') { +#endif clear_nhwindow(WIN_MESSAGE); You("are now in non-scoring explore mode."); discover = TRUE; diff -pruN slashem-0.0.7E7F1-official-release/src/do_wear.c slashem-0.0.7E7F1-paranoid/src/do_wear.c --- slashem-0.0.7E7F1-official-release/src/do_wear.c 2005-07-02 09:24:44.000000000 +0200 +++ slashem-0.0.7E7F1-paranoid/src/do_wear.c 2005-10-27 22:38:20.000000000 +0200 @@ -1235,7 +1235,11 @@ dotakeoff() " Use 'R' command to remove accessories." : ""); return 0; } - if (armorpieces > 1) + if (armorpieces > 1 +#ifdef PARANOID + || iflags.paranoid_remove +#endif + ) otmp = getobj(clothes, "take off"); if (otmp == 0) return(0); if (!(otmp->owornmask & W_ARMOR)) { @@ -1285,7 +1289,11 @@ doremring() " Use 'T' command to take off armor." : ""); return(0); } - if (Accessories != 1) otmp = getobj(accessories, "remove"); + if (Accessories != 1 +#ifdef PARANOID + || iflags.paranoid_remove +#endif + ) otmp = getobj(accessories, "remove"); if(!otmp) return(0); if(!(otmp->owornmask & (W_RING | W_AMUL | W_TOOL))) { You("are not wearing that."); diff -pruN slashem-0.0.7E7F1-official-release/src/end.c slashem-0.0.7E7F1-paranoid/src/end.c --- slashem-0.0.7E7F1-official-release/src/end.c 2005-07-02 09:24:44.000000000 +0200 +++ slashem-0.0.7E7F1-paranoid/src/end.c 2005-10-27 22:40:14.000000000 +0200 @@ -114,7 +114,21 @@ extern const char * const killed_by_pref int done2() { +#ifdef PARANOID + char buf[BUFSZ]; + int really_quit = FALSE; + + if (iflags.paranoid_quit) { + getlin ("Really quit [yes/no]?",buf); + (void) lcase (buf); + if (!(strcmp (buf, "yes"))) really_quit = TRUE; + } else { + if(yn("Really quit?") == 'y') really_quit = TRUE; + } + if (!really_quit) { +#else /* PARANOID */ if(yn("Really quit?") == 'n') { +#endif /* PARANOID */ #ifndef NO_SIGNAL (void) signal(SIGINT, (SIG_RET_TYPE) done1); #endif @@ -561,6 +575,10 @@ void done(how) int how; { +#if defined(WIZARD) && defined(PARANOID) + char paranoid_buf[BUFSZ]; + int really_bon = TRUE; +#endif boolean taken; char kilbuf[BUFSZ], pbuf[BUFSZ]; winid endwin = WIN_ERR; @@ -781,8 +799,18 @@ die: if (bones_ok) { #ifdef WIZARD /* KMH -- We need the "Save bones?" prompt for testing! */ +# ifdef PARANOID + if(wizard) { + getlin("Save WIZARD MODE bones? [no/yes]", paranoid_buf); + (void) lcase (paranoid_buf); + if (strcmp (paranoid_buf, "yes")) + really_bon = FALSE; + } + if(really_bon) +# else if (!wizard || yn("Save bones?") == 'y') -#endif +#endif /* PARANOID */ +#endif /* WIZARD */ savebones(corpse); /* corpse may be invalid pointer now so ensure that it isn't used again */ diff -pruN slashem-0.0.7E7F1-official-release/src/options.c slashem-0.0.7E7F1-paranoid/src/options.c --- slashem-0.0.7E7F1-official-release/src/options.c 2005-07-02 09:24:44.000000000 +0200 +++ slashem-0.0.7E7F1-paranoid/src/options.c 2005-10-27 22:38:20.000000000 +0200 @@ -175,6 +175,11 @@ static struct Bool_Opt #else {"page_wait", (boolean *)0, FALSE, SET_IN_FILE}, #endif +#ifdef PARANOID + {"paranoid_hit", &iflags.paranoid_hit, FALSE, SET_IN_GAME}, + {"paranoid_quit", &iflags.paranoid_quit, FALSE, SET_IN_GAME}, + {"paranoid_remove", &iflags.paranoid_remove, FALSE, SET_IN_GAME}, +#endif {"perm_invent", &flags.perm_invent, FALSE, SET_IN_GAME}, {"pickup_thrown", &flags.pickup_thrown, TRUE, SET_IN_GAME}, {"popup_dialog", &iflags.wc_popup_dialog, FALSE, SET_IN_GAME}, /*WC*/ diff -pruN slashem-0.0.7E7F1-official-release/src/uhitm.c slashem-0.0.7E7F1-paranoid/src/uhitm.c --- slashem-0.0.7E7F1-official-release/src/uhitm.c 2005-07-02 09:24:44.000000000 +0200 +++ slashem-0.0.7E7F1-paranoid/src/uhitm.c 2005-10-27 22:42:15.000000000 +0200 @@ -124,6 +124,9 @@ boolean barehanded; { int retval; char qbuf[QBUFSZ]; +#ifdef PARANOID + char buf[BUFSZ]; +#endif if (barehanded || !u.twoweap || !uswapwep) retval = HIT_UWEP; @@ -230,18 +233,33 @@ boolean barehanded; return retval; } if (canspotmon(mtmp)) { +#ifdef PARANOID + Sprintf(qbuf, "Really attack %s? [no/yes]", + mon_nam(mtmp)); + if (iflags.paranoid_hit) { + getlin (qbuf, buf); + (void) lcase (buf); + if (strcmp (buf, "yes")) { + flags.move = 0; + return(TRUE); + } + } else { +#endif Sprintf(qbuf, "Really attack %s?", mon_nam(mtmp)); if (yn(qbuf) != 'y') { - /* Stormbringer is not tricked so easily */ - if (!barehanded && u.twoweap && uswapwep && - uswapwep->oartifact == ART_STORMBRINGER) { - override_confirmation = HIT_USWAPWEP; - /* Lose primary attack */ - return HIT_USWAPWEP; - } - flags.move = 0; - return 0; + /* Stormbringer is not tricked so easily */ + if (!barehanded && u.twoweap && uswapwep && + uswapwep->oartifact == ART_STORMBRINGER) { + override_confirmation = HIT_USWAPWEP; + /* Lose primary attack */ + return HIT_USWAPWEP; + } + flags.move = 0; + return 0; } +#ifdef PARANOID + } +#endif } }