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:
PatR
2017-10-19 23:08:46 -07:00
parent da9c3f0ed4
commit 4fad1ba3cc
5 changed files with 37 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 spell.c $NHDT-Date: 1450584420 2015/12/20 04:07:00 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.75 $ */
/* NetHack 3.6 spell.c $NHDT-Date: 1508479722 2017/10/20 06:08:42 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.84 $ */
/* Copyright (c) M. Stephenson 1988 */
/* NetHack may be freely redistributed. See license for details. */
@@ -644,6 +644,9 @@ rejectcasting()
if (Stunned) {
You("are too impaired to cast a spell.");
return TRUE;
} else if (!can_chant(&youmonst)) {
You("are unable to chant the incantation.");
return TRUE;
} else if (!freehand()) {
/* Note: !freehand() occurs when weapon and shield (or two-handed
* weapon) are welded to hands, so "arms" probably doesn't need