fix #H6285 - speaking vs strangulation
Reading a scroll while blind is permitted if you know its label, but message is "as you pronounce the words, the scroll vanishes" unless you are poly'd into a form which can't make sounds, in which case you "cogitate" rather than "pronouce". Switch to the cogitate variant if you are suffering from strangulation. Casting spells didn't even have the distinction; you could cast them without regard to speech capability. Check for that. Unlike with scrolls, now you can't cast if you can't speak (or grunt or bark or whatever) instead of having a variant description of the action, so this is a bigger change.
This commit is contained in:
21
src/read.c
21
src/read.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 read.c $NHDT-Date: 1467718299 2016/07/05 11:31:39 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.140 $ */
|
||||
/* NetHack 3.6 read.c $NHDT-Date: 1508479721 2017/10/20 06:08:41 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.148 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -192,6 +192,7 @@ doread()
|
||||
return 1;
|
||||
} else if (scroll->otyp == T_SHIRT || scroll->otyp == ALCHEMY_SMOCK) {
|
||||
char buf[BUFSZ];
|
||||
|
||||
if (Blind) {
|
||||
You_cant("feel any Braille writing.");
|
||||
return 0;
|
||||
@@ -237,10 +238,13 @@ doread()
|
||||
: card_msgs[scroll->o_id % (SIZE(card_msgs) - 1)]);
|
||||
}
|
||||
/* Make a credit card number */
|
||||
pline("\"%d0%d %d%d1 0%d%d0\"", ((scroll->o_id % 89) + 10),
|
||||
(scroll->o_id % 4), (((scroll->o_id * 499) % 899999) + 100000),
|
||||
(scroll->o_id % 10), (!(scroll->o_id % 3)),
|
||||
((scroll->o_id * 7) % 10));
|
||||
pline("\"%d0%d %ld%d1 0%d%d0\"",
|
||||
(((int) scroll->o_id % 89) + 10),
|
||||
((int) scroll->o_id % 4),
|
||||
((((long) scroll->o_id * 499L) % 899999L) + 100000L),
|
||||
((int) scroll->o_id % 10),
|
||||
(!((int) scroll->o_id % 3)),
|
||||
(((int) scroll->o_id * 7) % 10));
|
||||
u.uconduct.literate++;
|
||||
return 1;
|
||||
} else if (scroll->otyp == CAN_OF_GREASE) {
|
||||
@@ -339,6 +343,8 @@ doread()
|
||||
}
|
||||
scroll->in_use = TRUE; /* scroll, not spellbook, now being read */
|
||||
if (scroll->otyp != SCR_BLANK_PAPER) {
|
||||
boolean silently = !can_chant(&youmonst);
|
||||
|
||||
/* a few scroll feedback messages describe something happening
|
||||
to the scroll itself, so avoid "it disappears" for those */
|
||||
nodisappear = (scroll->otyp == SCR_FIRE
|
||||
@@ -348,7 +354,7 @@ doread()
|
||||
pline(nodisappear
|
||||
? "You %s the formula on the scroll."
|
||||
: "As you %s the formula on it, the scroll disappears.",
|
||||
is_silent(youmonst.data) ? "cogitate" : "pronounce");
|
||||
silently ? "cogitate" : "pronounce");
|
||||
else
|
||||
pline(nodisappear ? "You read the scroll."
|
||||
: "As you read the scroll, it disappears.");
|
||||
@@ -357,8 +363,7 @@ doread()
|
||||
pline("Being so trippy, you screw up...");
|
||||
else
|
||||
pline("Being confused, you %s the magic words...",
|
||||
is_silent(youmonst.data) ? "misunderstand"
|
||||
: "mispronounce");
|
||||
silently ? "misunderstand" : "mispronounce");
|
||||
}
|
||||
}
|
||||
if (!seffects(scroll)) {
|
||||
|
||||
Reference in New Issue
Block a user