fix issue #1458 - inappropriate verbal messages

Issue reported by chappg:  succubi could produce "it's on the house"
(quoted verbal message) when hero is deaf.  The mail daemon could
produce a variety of verbal message when hero is deaf.

The succubus/incubus one is easy to fix.  The mail daemon ones are
untested and a couple haven't been given non-verbal alternatives.

Fixes #1458
This commit is contained in:
PatR
2025-11-09 12:58:19 -08:00
parent 0524ff482b
commit 9b1bb1150e
3 changed files with 39 additions and 17 deletions

View File

@@ -1,4 +1,4 @@
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1574 $ $NHDT-Date: 1762727599 2025/11/09 14:33:19 $
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1575 $ $NHDT-Date: 1762750699 2025/11/09 20:58:19 $
General Fixes and Modified Features
-----------------------------------
@@ -1530,6 +1530,8 @@ hallucination can display objects on the map that have a description (for
trigger a crash
some food and paper items do no damage when bashing
improved messages for oilskin sacks protecting from water damage
some messages by amorous demons and mail daemon were delivered as verbal ones
even when the hero is deaf
Fixes to 3.7.0-x General Problems Exposed Via git Repository

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 mail.c $NHDT-Date: 1596498174 2020/08/03 23:42:54 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.47 $ */
/* NetHack 3.7 mail.c $NHDT-Date: 1762750699 2025/11/09 20:58:19 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.77 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Pasi Kallinen, 2018. */
/* NetHack may be freely redistributed. See license for details. */
@@ -333,18 +333,21 @@ md_rush(struct monst *md,
if (fx == tx && fy == ty)
break;
SetVoice(md, 0, 80, 0);
if ((mon = m_at(fx, fy)) != 0) /* save monster at this position */
verbalize1(md_exclamations());
else if (u_at(fx, fy))
verbalize("Excuse me.");
mon = m_at(fx, fy); /* save monster at this position */
if (!Deaf) {
SetVoice(md, 0, 80, 0);
if (mon)
verbalize1(md_exclamations());
else if (u_at(fx, fy))
verbalize("Excuse me.");
}
if (mon)
remove_monster(fx, fy);
place_monster(md, fx, fy); /* put md down */
newsym(fx, fy); /* see it */
flush_screen(0); /* make sure md shows up */
nh_delay_output(); /* wait a little bit */
nh_delay_output(); /* wait a little bit */
/* Remove md from the dungeon. Restore original mon, if necessary. */
remove_monster(fx, fy);
@@ -365,8 +368,12 @@ md_rush(struct monst *md,
remove_monster(fx, fy);
place_monster(md, fx, fy); /* display md with text below */
newsym(fx, fy);
SetVoice(md, 0, 80, 0);
verbalize("This place's too crowded. I'm outta here.");
if (!Deaf) {
SetVoice(md, 0, 80, 0);
verbalize("This place's too crowded. I'm outta here.");
} else {
pline1(Never_mind);
}
remove_monster(fx, fy);
if ((mon->mx != fx) || (mon->my != fy)) /* put mon back */
@@ -406,8 +413,12 @@ newmail(struct mail_info *info)
goto go_back;
message_seen = TRUE;
SetVoice(md, 0, 80, 0);
verbalize("%s, %s! %s.", Hello(md), svp.plname, info->display_txt);
if (!Deaf) {
SetVoice(md, 0, 80, 0);
verbalize("%s, %s! %s.", Hello(md), svp.plname, info->display_txt);
} else {
pline("Message: %s.", info->display_txt);
}
if (info->message_typ) {
struct obj *obj = mksobj(SCR_MAIL, FALSE, FALSE);
@@ -418,8 +429,13 @@ newmail(struct mail_info *info)
new_omailcmd(obj, info->response_cmd);
if (!m_next2u(md)) {
SetVoice(md, 0, 80, 0);
verbalize("Catch!");
if (!Deaf) {
SetVoice(md, 0, 80, 0);
verbalize("Catch!");
} else {
/* don't bother with nonverbal alternative ... */
;
}
}
display_nhwindow(WIN_MESSAGE, FALSE);
obj = hold_another_object(obj, "Oops!", (const char *) 0,

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 mhitu.c $NHDT-Date: 1740534854 2025/02/25 17:54:14 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.327 $ */
/* NetHack 3.7 mhitu.c $NHDT-Date: 1762750699 2025/11/09 20:58:19 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.334 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
@@ -2264,8 +2264,12 @@ doseduce(struct monst *mon)
if (cost > umoney)
cost = umoney;
if (!cost) {
SetVoice(mon, 0, 80, 0);
verbalize("It's on the house!");
if (!Deaf) {
SetVoice(mon, 0, 80, 0);
verbalize("It's on the house!");
} else {
pline("No charge.");
}
} else {
pline_mon(mon, "%s takes %ld %s for services rendered!",
noit_Monnam(mon), cost, currency(cost));