address #H5590 - paranoid_confirm vs lycanthropy
Polymorph control gives the player a chance to accept or reject a form change due to lycanthropy, but if it occurs during combat or movement the player might type 'y' before realizing that the prompt is pending. Provide a paranoid_confirmation setting for 'Were-change' to allow a player to require "yes" instead of 'y' for that. The existing setting 'wand' is renamed to 'wand-break' and now requires at least two letters in the config file options instead of just 1. The spelling of its synonym is changed from 'breakwand' to 'break-wand'; it can be shorted to as few as 2 letters (same as before) but if more than 5 are present, the new dash is required. Both 'wand-break' and 'Were-change' are placed before 'pray' in the 'O' menu for paranoid_confirmation so that all the "yes" vs 'y' settings are grouped together. Bonus fixes: Reverting from were-critter form to human (due to timeout) did not give a player with polymorph control the option of remaining in creature form; now it does. The 'O' command's menu would not show "wand" (now "wand-break") in the current value of paranoid_confirmation. (A post 3.6.0 issue, so no fixes entry included.) The revised Guidebook.mn has been tested; Guidebook.tex has not.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 options.c $NHDT-Date: 1505084668 2017/09/10 23:04:28 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.301 $ */
|
||||
/* NetHack 3.6 options.c $NHDT-Date: 1505214875 2017/09/12 11:14:35 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.302 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1229,7 +1229,10 @@ STATIC_VAR const struct paranoia_opts {
|
||||
takes precedence and "all" isn't present in the interactive menu,
|
||||
and "d"ie vs "d"eath, synonyms for each other so doesn't matter;
|
||||
(also "p"ray vs "P"aranoia, "pray" takes precedence since "Paranoia"
|
||||
is just a synonym for "Confirm") */
|
||||
is just a synonym for "Confirm"); "b"ones vs "br"eak-wand, the
|
||||
latter requires at least two letters; "wand"-break vs "Were"-change,
|
||||
both require at least two letters during config processing and use
|
||||
case-senstivity for 'O's interactive menu */
|
||||
{ PARANOID_CONFIRM, "Confirm", 1, "Paranoia", 2,
|
||||
"for \"yes\" confirmations, require \"no\" to reject" },
|
||||
{ PARANOID_QUIT, "quit", 1, "explore", 1,
|
||||
@@ -1240,12 +1243,14 @@ STATIC_VAR const struct paranoia_opts {
|
||||
"yes vs y to save bones data when dying in debug mode" },
|
||||
{ PARANOID_HIT, "attack", 1, "hit", 1,
|
||||
"yes vs y to attack a peaceful monster" },
|
||||
{ PARANOID_BREAKWAND, "wand-break", 2, "break-wand", 2,
|
||||
"yes vs y to break a wand via (a)pply" },
|
||||
{ PARANOID_WERECHANGE, "Were-change", 2, (const char *) 0, 0,
|
||||
"yes vs y to change form when lycanthropy is controllable" },
|
||||
{ PARANOID_PRAY, "pray", 1, 0, 0,
|
||||
"y to pray (supersedes old \"prayconfirm\" option)" },
|
||||
{ PARANOID_REMOVE, "Remove", 1, "Takeoff", 1,
|
||||
"always pick from inventory for Remove and Takeoff" },
|
||||
{ PARANOID_BREAKWAND, "wand", 1, "breakwand", 2,
|
||||
"yes vs y to break a wand" },
|
||||
/* for config file parsing; interactive menu skips these */
|
||||
{ 0, "none", 4, 0, 0, 0 }, /* require full word match */
|
||||
{ ~0, "all", 3, 0, 0, 0 }, /* ditto */
|
||||
@@ -2712,7 +2717,8 @@ boolean tinitial, tfrom_file;
|
||||
if (i == SIZE(paranoia)) {
|
||||
/* didn't match anything, so arg is bad;
|
||||
any flags already set will stay set */
|
||||
config_error_add("Unknown %s parameter '%s'", fullname, op);
|
||||
config_error_add("Unknown %s parameter '%s'",
|
||||
fullname, op);
|
||||
return FALSE;
|
||||
}
|
||||
/* move on to next token */
|
||||
@@ -5210,20 +5216,9 @@ char *buf;
|
||||
char tmpbuf[QBUFSZ];
|
||||
|
||||
tmpbuf[0] = '\0';
|
||||
if (ParanoidConfirm)
|
||||
Strcat(tmpbuf, " Confirm");
|
||||
if (ParanoidQuit)
|
||||
Strcat(tmpbuf, " quit");
|
||||
if (ParanoidDie)
|
||||
Strcat(tmpbuf, " die");
|
||||
if (ParanoidBones)
|
||||
Strcat(tmpbuf, " bones");
|
||||
if (ParanoidHit)
|
||||
Strcat(tmpbuf, " attack");
|
||||
if (ParanoidPray)
|
||||
Strcat(tmpbuf, " pray");
|
||||
if (ParanoidRemove)
|
||||
Strcat(tmpbuf, " Remove");
|
||||
for (i = 0; paranoia[i].flagmask != 0; ++i)
|
||||
if (flags.paranoia_bits & paranoia[i].flagmask)
|
||||
Sprintf(eos(tmpbuf), " %s", paranoia[i].argname);
|
||||
Strcpy(buf, tmpbuf[0] ? &tmpbuf[1] : "none");
|
||||
} else if (!strcmp(optname, "pettype")) {
|
||||
Sprintf(buf, "%s", (preferred_pet == 'c') ? "cat"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 timeout.c $NHDT-Date: 1496619133 2017/06/04 23:32:13 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.71 $ */
|
||||
/* NetHack 3.6 timeout.c $NHDT-Date: 1505214876 2017/09/12 11:14:36 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.75 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -363,6 +363,8 @@ nh_timeout()
|
||||
if (u.mtimedone && !--u.mtimedone) {
|
||||
if (Unchanging)
|
||||
u.mtimedone = rnd(100 * youmonst.data->mlevel + 1);
|
||||
else if (is_were(youmonst.data))
|
||||
you_unwere(FALSE); /* if polycontrl, asks whether to rehumanize */
|
||||
else
|
||||
rehumanize();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 were.c $NHDT-Date: 1432512763 2015/05/25 00:12:43 $ $NHDT-Branch: master $:$NHDT-Revision: 1.18 $ */
|
||||
/* NetHack 3.6 were.c $NHDT-Date: 1505214877 2017/09/12 11:14:37 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.21 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -183,7 +183,7 @@ you_were()
|
||||
/* `+4' => skip "were" prefix to get name of beast */
|
||||
Sprintf(qbuf, "Do you want to change into %s?",
|
||||
an(mons[u.ulycn].mname + 4));
|
||||
if (yn(qbuf) == 'n')
|
||||
if (!paranoid_query(ParanoidWerechange, qbuf))
|
||||
return;
|
||||
}
|
||||
(void) polymon(u.ulycn);
|
||||
@@ -200,8 +200,11 @@ boolean purify;
|
||||
set_ulycn(NON_PM); /* cure lycanthropy */
|
||||
}
|
||||
if (!Unchanging && is_were(youmonst.data)
|
||||
&& (!controllable_poly || yn("Remain in beast form?") == 'n'))
|
||||
&& (!controllable_poly
|
||||
|| !paranoid_query(ParanoidWerechange, "Remain in beast form?")))
|
||||
rehumanize();
|
||||
else if (is_were(youmonst.data) && !u.mtimedone)
|
||||
u.mtimedone = rn1(200, 200); /* 40% of initial were change */
|
||||
}
|
||||
|
||||
/* lycanthropy is being caught or cured, but no shape change is involved */
|
||||
|
||||
Reference in New Issue
Block a user