features entry was split across two lines
recovery of strength lost due to weakness from hunger was vulnerable to abuse
monsters hit by scroll of earth boulder did not get angry
+hero could "pronounce the words on the scroll" when blind (if its label is
+ known) even while being strangled at the time
+hero could cast spells while poly'd into a form which can't speak (or grunt,&c)
+ or while being strangled
Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository
-/* NetHack 3.6 extern.h $NHDT-Date: 1505170345 2017/09/11 22:52:25 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.604 $ */
+/* NetHack 3.6 extern.h $NHDT-Date: 1508479720 2017/10/20 06:08:40 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.618 $ */
/* Copyright (c) Steve Creps, 1988. */
/* NetHack may be freely redistributed. See license for details. */
E boolean FDECL(mon_hates_silver, (struct monst *));
E boolean FDECL(passes_bars, (struct permonst *));
E boolean FDECL(can_blow, (struct monst *));
+E boolean FDECL(can_chant, (struct monst *));
E boolean FDECL(can_be_strangled, (struct monst *));
E boolean FDECL(can_track, (struct permonst *));
E boolean FDECL(breakarm, (struct permonst *));
-/* NetHack 3.6 mondata.c $NHDT-Date: 1492733172 2017/04/21 00:06:12 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.62 $ */
+/* NetHack 3.6 mondata.c $NHDT-Date: 1508479720 2017/10/20 06:08:40 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.63 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
/* returns True if monster can blow (whistle, etc) */
boolean
can_blow(mtmp)
-register struct monst *mtmp;
+struct monst *mtmp;
{
if ((is_silent(mtmp->data) || mtmp->data->msound == MS_BUZZ)
&& (breathless(mtmp->data) || verysmall(mtmp->data)
return TRUE;
}
+/* for casting spells and reading scrolls while blind */
+boolean
+can_chant(mtmp)
+struct monst *mtmp;
+{
+ if ((mtmp == &youmonst && Strangled)
+ || is_silent(mtmp->data) || !has_head(mtmp->data)
+ || mtmp->data->msound == MS_BUZZ || mtmp->data->msound == MS_BURBLE)
+ return FALSE;
+ return TRUE;
+}
+
/* True if mon is vulnerable to strangulation */
boolean
can_be_strangled(mon)
-/* 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. */
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;
: 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) {
}
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
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.");
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)) {
-/* 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. */
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