more #H9392 - deafness vs music

The report mentioned whistles but I had forgotten all about them by
the time I tried to deal with musical instruments.  Plain whistles
had deaf handling but magic whistles didn't.
This commit is contained in:
PatR
2019-11-14 16:42:53 -08:00
parent aec4ce0129
commit 616e07cde9
2 changed files with 12 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 apply.c $NHDT-Date: 1573346182 2019/11/10 00:36:22 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.283 $ */
/* NetHack 3.6 apply.c $NHDT-Date: 1573778560 2019/11/15 00:42:40 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.284 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
@@ -449,7 +449,8 @@ register struct obj *obj;
return res;
}
static const char whistle_str[] = "produce a %s whistling sound.";
static const char whistle_str[] = "produce a %s whistling sound.",
alt_whistle_str[] = "produce a %s, sharp vibration.";
STATIC_OVL void
use_whistle(obj)
@@ -461,8 +462,7 @@ struct obj *obj;
You("blow bubbles through %s.", yname(obj));
} else {
if (Deaf)
You_feel("rushing air tickle your %s.",
body_part(NOSE));
You_feel("rushing air tickle your %s.", body_part(NOSE));
else
You(whistle_str, obj->cursed ? "shrill" : "high");
wake_nearby();
@@ -480,16 +480,17 @@ struct obj *obj;
if (!can_blow(&youmonst)) {
You("are incapable of using the whistle.");
} else if (obj->cursed && !rn2(2)) {
You("produce a %shigh-pitched humming noise.",
Underwater ? "very " : "");
You("produce a %shigh-%s.", Underwater ? "very " : "",
Deaf ? "frequency vibration" : "pitched humming noise");
wake_nearby();
} else {
int pet_cnt = 0, omx, omy;
/* it's magic! it works underwater too (at a higher pitch) */
You(whistle_str,
Hallucination ? "normal" : Underwater ? "strange, high-pitched"
: "strange");
You(Deaf ? alt_whistle_str : whistle_str,
Hallucination ? "normal"
: (Underwater && !Deaf) ? "strange, high-pitched"
: "strange");
for (mtmp = fmon; mtmp; mtmp = nextmon) {
nextmon = mtmp->nmon; /* trap might kill mon */
if (DEADMONSTER(mtmp))