fix #H3994 - cursed genocide is inconsistent
After reading a cursed scroll of genocide, explicitly choosing "none" when asked to pick what type of monster to wipe out, you get "sent in some <rndmonst>". But picking nothing (or something invalid) 5 times gave "that's enough tries" without sending in random monsters. Make the time-to-give-up behavior be the same as the don't-want-to behavior. Also, treat picking ESC the same as "none", like blessed genocide does.
This commit is contained in:
29
src/read.c
29
src/read.c
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 read.c $NHDT-Date: 1448862378 2015/11/30 05:46:18 $ $NHDT-Branch: master $:$NHDT-Revision: 1.125 $ */
|
/* NetHack 3.6 read.c $NHDT-Date: 1449645144 2015/12/09 07:12:24 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.126 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -2111,6 +2111,10 @@ int how;
|
|||||||
} else {
|
} else {
|
||||||
for (i = 0;; i++) {
|
for (i = 0;; i++) {
|
||||||
if (i >= 5) {
|
if (i >= 5) {
|
||||||
|
/* cursed effect => no free pass (unless rndmonst() fails) */
|
||||||
|
if (!(how & REALLY) && (ptr = rndmonst()) != 0)
|
||||||
|
break;
|
||||||
|
|
||||||
pline1(thats_enough_tries);
|
pline1(thats_enough_tries);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2118,16 +2122,13 @@ int how;
|
|||||||
buf);
|
buf);
|
||||||
(void) mungspaces(buf);
|
(void) mungspaces(buf);
|
||||||
/* choosing "none" preserves genocideless conduct */
|
/* choosing "none" preserves genocideless conduct */
|
||||||
if (!strcmpi(buf, "none") || !strcmpi(buf, "nothing")) {
|
if (*buf == '\033' || !strcmpi(buf, "none")
|
||||||
|
|| !strcmpi(buf, "nothing")) {
|
||||||
/* ... but no free pass if cursed */
|
/* ... but no free pass if cursed */
|
||||||
if (!(how & REALLY)) {
|
if (!(how & REALLY) && (ptr = rndmonst()) != 0)
|
||||||
ptr = rndmonst();
|
|
||||||
if (!ptr)
|
|
||||||
return; /* no message, like normal case */
|
|
||||||
mndx = monsndx(ptr);
|
|
||||||
break; /* remaining checks don't apply */
|
break; /* remaining checks don't apply */
|
||||||
} else
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mndx = name_to_mon(buf);
|
mndx = name_to_mon(buf);
|
||||||
@@ -2151,11 +2152,12 @@ int how;
|
|||||||
|
|
||||||
if (!(ptr->geno & G_GENO)) {
|
if (!(ptr->geno & G_GENO)) {
|
||||||
if (!Deaf) {
|
if (!Deaf) {
|
||||||
/* fixme: unconditional "caverns" will be silly in some
|
/* FIXME: unconditional "caverns" will be silly in some
|
||||||
* circumstances */
|
* circumstances. Who's speaking? Divine pronouncements
|
||||||
|
* aren't supposed to be hampered by deafness....
|
||||||
|
*/
|
||||||
if (flags.verbose)
|
if (flags.verbose)
|
||||||
pline(
|
pline("A thunderous voice booms through the caverns:");
|
||||||
"A thunderous voice booms through the caverns:");
|
|
||||||
verbalize("No, mortal! That will not be done.");
|
verbalize("No, mortal! That will not be done.");
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
@@ -2165,6 +2167,7 @@ int how;
|
|||||||
killplayer++;
|
killplayer++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
mndx = monsndx(ptr); /* needed for the 'no free pass' cases */
|
||||||
}
|
}
|
||||||
|
|
||||||
which = "all ";
|
which = "all ";
|
||||||
|
|||||||
Reference in New Issue
Block a user