location other than the current position.
.lp .
Wait or rest, do nothing for one turn. Precede with the \(oqm\(cq prefix
-to wait for a turn even next to a hostile monster.
+to wait for a turn even next to a hostile monster, if
+.op safe_wait
+is on.
.lp a
Apply (use) a tool (pick-axe, key, lamp...).
.lp ""
Search for secret doors and traps around you.
It usually takes several tries to find something.
Precede with the \(oqm\(cq prefix to search for a turn
-even next to a hostile monster.
+even next to a hostile monster, if
+.op safe_wait
+is on.
.lp ""
Can also be used to figure out whether there is still a monster at
an adjacent \(lqremembered, unseen monster\(rq marker.
.lp safe_pet
Prevent you from (knowingly) attacking your pets (default on).
Persistent.
+.lp safe_wait
+Prevents you from waiting or searching when next to a hostile monster
+(default on). Persistent.
.lp sanity_check
Evaluate monsters, objects, and map prior to each turn (default off).
Debug mode only.
%.lp
\item[\tb{.}]
Wait or rest, do nothing for one turn. Precede with the `{\tt m}' prefix
-to wait for a turn even next to a hostile monster.
+to wait for a turn even next to a hostile monster, if {\it safe\verb+_+wait\/}
+is on.
%.lp
\item[\tb{a}]
Apply (use) a tool (pick-axe, key, lamp \ldots).\\
Search for secret doors and traps around you.
It usually takes several tries to find something.
Precede with the `{\tt m}' prefix to wait for a turn
-even next to a hostile monster.\\
+even next to a hostile monster, if {\it safe\verb+_+wait\/}
+is on.\\
%.lp ""
Can also be used to figure out whether there is still a monster at
an adjacent ``remembered, unseen monster'' marker.
%.lp
\item[\ib{safe\verb+_+pet}]
Prevent you from (knowingly) attacking your pets (default on). Persistent.
+%.lp
+\item[\ib{safe\verb+_+wait}]
+Prevents you from waiting or searching when next to a hostile monster
+(default on). Persistent.
%+.lp
\item[\ib{sanity\verb+_+check}]
Evaluate monsters, objects, and map prior to each turn (default off).
fatal but if you're life-saved or decline to die, the game crashed
revival via undead turning of corpse carried by hero said "your <mon> corpse
comes alive" even when revived monster was undead
-prevent searching or waiting next to a hostile monster - override with 'm'
+prevent searching or waiting next to a hostile monster if boolean option
+ safe_wait is on - override with 'm'
allow random mimics to show up mimicing more furniture than just stairs
scatter exploding bag of holding contents instead of outright deleting them
male hero poly'd into nymph chooses charm vs seduce message based on being
E void NDECL(deferred_goto);
E boolean FDECL(revive_corpse, (struct obj *));
E void FDECL(revive_mon, (ANY_P *, long));
+E boolean FDECL(cmd_safety_prevention, (char *, char *, int *));
E int NDECL(donull);
E int NDECL(dowipe);
E void FDECL(legs_in_no_shape, (const char *, BOOLEAN_P));
* clairvoyance */
boolean rest_on_space; /* space means rest */
boolean safe_dog; /* give complete protection to the dog */
+ boolean safe_wait; /* prevent wait or search next to hostile */
boolean showexp; /* show experience points */
boolean showscore; /* show score */
boolean silent; /* whether the bell rings or not */
NoAlias, "display frequency when `running' or `travelling'")
NHOPTB(safe_pet, 0, opt_out, set_in_game, On, Yes, No, No, NoAlias,
&flags.safe_dog)
+ NHOPTB(safe_wait, 0, opt_out, set_in_game, On, Yes, No, No, NoAlias,
+ &flags.safe_wait)
NHOPTB(sanity_check, 0, opt_in, set_wizonly, Off, Yes, No, No, NoAlias,
&iflags.sanity_check)
NHOPTC(scores, 32, opt_in, set_in_game, No, Yes, No, No, NoAlias,
int
dosearch()
{
- if (!iflags.menu_requested && !g.multi && monster_nearby()) {
- char buf[QBUFSZ];
-
- buf[0] = '\0';
- if (iflags.cmdassist || !g.already_found_flag++)
- Sprintf(buf, " Use '%s' prefix to force another search.",
- visctrl(g.Cmd.spkeys[NHKF_REQMENU])); /* default is "m" */
- Norep("You already found a monster.%s", buf);
+ if (cmd_safety_prevention("another search",
+ "You already found a monster.",
+ &g.already_found_flag))
return 0;
- }
- g.already_found_flag = 0; /* start over */
return dosearch0(0);
}
}
}
+boolean
+cmd_safety_prevention(cmddesc, act, flagcounter)
+char *cmddesc;
+char *act;
+int *flagcounter;
+{
+ if (flags.safe_wait && !iflags.menu_requested
+ && !g.multi && monster_nearby()) {
+ char buf[QBUFSZ];
+
+ buf[0] = '\0';
+ if (iflags.cmdassist || !*flagcounter++)
+ Sprintf(buf, " Use '%s' prefix to force %s.",
+ visctrl(g.Cmd.spkeys[NHKF_REQMENU]), cmddesc);
+ Norep("%s%s", act, buf);
+ return TRUE;
+ }
+ *flagcounter = 0;
+ return FALSE;
+}
+
/* '.' command: do nothing == rest; also the
' ' command iff 'rest_on_space' option is On */
int
donull()
{
- if (!iflags.menu_requested && !g.multi && monster_nearby()) {
- char buf[QBUFSZ];
-
- buf[0] = '\0';
- if (iflags.cmdassist || !g.did_nothing_flag++)
- Sprintf(buf, " Use '%s' prefix to force a no-op (to rest).",
- visctrl(g.Cmd.spkeys[NHKF_REQMENU])); /* default is "m" */
- Norep("Are you waiting to get hit?%s", buf);
+ if (cmd_safety_prevention("a no-op (to rest)",
+ "Are you waiting to get hit?",
+ &g.did_nothing_flag))
return 0;
- }
- g.did_nothing_flag = 0; /* reset */
return 1; /* Do nothing, but let other things happen */
}