-/* NetHack 3.6 sounds.c $NHDT-Date: 1452992329 2016/01/17 00:58:49 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.78 $ */
+/* NetHack 3.6 sounds.c $NHDT-Date: 1570844005 2019/10/12 01:33:25 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.83 $ */
/* Copyright (c) 1989 Janet Walz, Mike Threepoint */
/* NetHack may be freely redistributed. See license for details. */
/* JNetHack Copyright */
/* (c) Issei Numata, Naoki Hamada, Shigehiro Miyashita, 1994-2000 */
-/* For 3.4-, Copyright (c) SHIRAKATA Kentaro, 2002-2018 */
+/* For 3.4-, Copyright (c) SHIRAKATA Kentaro, 2002-2022 */
/* JNetHack may be freely redistributed. See license for details. */
#include "hack.h"
hallu = Hallucination ? 1 : 0;
if (level.flags.nfountains && !rn2(400)) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
static const char *const fountain_msg[4] = {
"bubbling water.", "water falling on coins.",
"the splashing of a naiad.", "a soda fountain!",
You_hear1(fountain_msg[rn2(3) + hallu]);
}
if (level.flags.nsinks && !rn2(300)) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
static const char *const sink_msg[3] = {
"a slow drip.", "a gurgling noise.", "dishes being washed!",
#else
You_hear1(sink_msg[rn2(2) + hallu]);
}
if (level.flags.has_court && !rn2(200)) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
static const char *const throne_msg[4] = {
"the tones of courtly conversation.",
"a sceptre pounded in judgment.",
}
}
if (level.flags.has_swamp && !rn2(200)) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
static const char *const swamp_msg[3] = {
"hear mosquitoes!", "smell marsh gas!", /* so it's a smell...*/
"hear Donald Duck!",
#endif /* AZTEC_C_WORKAROUND */
{
if (gold_in_vault)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
You_hear(!hallu
? "someone counting money."
: "the quarterback calling the play.");
/*JP
You_hear("a low buzzing.");
*/
- You_hear("\82Ô\81[\82ñ\82Æ\82¢\82¤\89¹\82ð\95·\82¢\82½\81D");
+ You_hear("\82Ô\81[\82ñ\82Æ\82¢\82¤\89¹\82ð\95·\82¢\82½\81D");
break;
case 1:
/*JP
You_hear("an angry drone.");
*/
- You_hear("\8b»\95±\82µ\82½\97Y\83o\83`\82Ì\89¹\82ð\95·\82¢\82½\81D");
+ You_hear("\8b»\95±\82µ\82½\97Y\83o\83`\82Ì\89¹\82ð\95·\82¢\82½\81D");
break;
case 2:
-#if 0 /*JP*/
+#if 0 /*JP:T*/
You_hear("bees in your %sbonnet!",
uarmh ? "" : "(nonexistent) ");
#else
- You_hear("\83n\83`\82ª\82 \82È\82½\82Ì\96X\8eq%s\82Ì\92\86\82É\82¢\82é\89¹\82ð\95·\82¢\82½\81I",
- uarmh ? "" : "(\94í\82Á\82Ä\82È\82¢\82¯\82Ç)");
+ You_hear("\83n\83`\82ª\82 \82È\82½\82Ì\96X\8eq%s\82Ì\92\86\82É\82¢\82é\89¹\82ð\95·\82¢\82½\81I",
+ uarmh ? "" : "(\94í\82Á\82Ä\82È\82¢\82¯\82Ç)");
#endif
break;
}
continue;
if ((is_undead(mtmp->data) || is_vampshifter(mtmp))
&& mon_in_room(mtmp, MORGUE)) {
+#if 0 /*JP*/
const char *hair = body_part(HAIR); /* hair/fur/scales */
+#endif
switch (rn2(2) + hallu) {
case 0:
You("\95s\8e©\91R\82È\82\82ç\82¢\90Ã\82©\82È\82Ì\82É\8bC\82Ã\82¢\82½\81D");
break;
case 1:
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline_The("%s on the back of your %s %s up.", hair,
body_part(NECK), vtense(hair, "stand"));
#else
#endif
break;
case 2:
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline_The("%s on your %s %s to stand up.", hair,
body_part(HEAD), vtense(hair, "seem"));
#else
}
if (level.flags.has_barracks && !rn2(200)) {
static const char *const barracks_msg[4] = {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
"blades being honed.", "loud snoring.", "dice being thrown.",
"General MacArthur!",
#else
}
if (level.flags.has_zoo && !rn2(200)) {
static const char *const zoo_msg[3] = {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
"a sound reminiscent of an elephant stepping on a peanut.",
"a sound reminiscent of a seal barking.", "Doctor Dolittle!",
#else
if (tended_shop(sroom)
&& !index(u.ushops, (int) (ROOM_INDEX(sroom) + ROOMOFFSET))) {
static const char *const shop_msg[3] = {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
"someone cursing shoplifters.",
"the chime of a cash register.", "Neiman and Marcus arguing!",
#else
care if telepathy or extended detection reveals that the
priest is not currently standing on the altar; he's mobile). */
static const char *const temple_msg[] = {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
"*someone praising %s.", "*someone beseeching %s.",
"#an animal carcass being offered in sacrifice.",
"*a strident plea for donations.",
continue;
break; /* msg is acceptable */
} while (++trycount < 50);
+#if 0 /*JP*/
while (!letter(*msg))
+#else
+ while (*msg == '*' || *msg == '#')
+#endif
++msg; /* skip control flags */
if (index(msg, '%'))
You_hear(msg, halu_gname(EPRI(mtmp)->shralign));
/* and don't produce silly effects when she's clearly visible */
if (mtmp && (hallu || !canseemon(mtmp))) {
static const char *const ora_msg[5] = {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
"a strange wind.", /* Jupiter at Dodona */
"convulsive ravings.", /* Apollo at Delphi */
"snoring snakes.", /* AEsculapius at Epidaurus */
}
static const char *const h_sounds[] = {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
"beep", "boing", "sing", "belche", "creak", "cough",
"rattle", "ululate", "pop", "jingle", "sniffle", "tinkle",
"eep", "clatter", "hum", "sizzle", "twitter", "wheeze",
/*JP
ret = "hiss";
*/
- ret = "\83V\81[\83b\82Æ\96Â\82¢\82½";
+ ret = "\83V\81[\83b\82Æ\96Â\82¢\82½";
break;
case MS_BARK:
case MS_GROWL:
/*JP
ret = "growl";
*/
- ret = "\82Í\82°\82µ\82\96i\82¦\82½";
+ ret = "\82Í\82°\82µ\82\96i\82¦\82½";
break;
case MS_ROAR:
/*JP
ret = "roar";
*/
- ret = "\96i\82¦\82½";
+ ret = "\96i\82¦\82½";
break;
case MS_BUZZ:
/*JP
ret = "buzz";
*/
- ret = "\83u\81[\83b\82Æ\96Â\82¢\82½";
+ ret = "\83u\81[\83b\82Æ\96Â\82¢\82½";
break;
case MS_SQEEK:
/*JP
ret = "squeal";
*/
- ret = "\83L\81[\83L\81[\96Â\82¢\82½";
+ ret = "\83L\81[\83L\81[\96Â\82¢\82½";
break;
case MS_SQAWK:
/*JP
ret = "screech";
*/
- ret = "\8bà\90Ø\82è\90º\82ð\97§\82Ä\82½";
+ ret = "\8bà\90Ø\82è\90º\82ð\97§\82Ä\82½";
break;
case MS_NEIGH:
/*JP
ret = "neigh";
*/
- ret = "\82¢\82È\82È\82¢\82½";
+ ret = "\82¢\82È\82È\82¢\82½";
break;
case MS_WAIL:
/*JP
ret = "wail";
*/
- ret = "\94ß\82µ\82\96Â\82¢\82½";
+ ret = "\94ß\82µ\82\96Â\82¢\82½";
break;
case MS_SILENT:
/*JP
ret = "commotion";
*/
- ret = "\8b»\95±\82µ\82½";
+ ret = "\8b»\95±\82µ\82½";
break;
default:
/*JP
ret = "scream";
*/
- ret = "\8bà\90Ø\82è\90º\82ð\82 \82°\82½";
+ ret = "\8bà\90Ø\82è\90º\82ð\82 \82°\82½";
}
return ret;
}
/*JP
yelp_verb = (!Deaf) ? "yowl" : "arch";
*/
- yelp_verb = (!Deaf) ? "\94ß\82µ\82\96Â\82¢\82½" : "arch";
+ yelp_verb = (!Deaf) ? "\94ß\82µ\82\96Â\82¢\82½" : "\8b|\82È\82è\82É\82È\82Á\82½";
break;
case MS_BARK:
case MS_GROWL:
*verbl_msg = 0, /* verbalize() */
*verbl_msg_mcan = 0; /* verbalize() if cancelled */
struct permonst *ptr = mtmp->data;
- int msound = ptr->msound;
+ int msound = ptr->msound, gnomeplan = 0;
/* presumably nearness and sleep checks have already been made */
if (Deaf)
msound = mons[genus(monsndx(ptr), 1)].msound;
/* some normally non-speaking types can/will speak if hero is similar */
else if (msound == MS_ORC /* note: MS_ORC is same as MS_GRUNT */
- && (same_race(ptr, youmonst.data) /* current form, */
- || same_race(ptr, &mons[Race_switch]))) /* unpoly'd form */
+ && ((same_race(ptr, youmonst.data) /* current form, */
+ || same_race(ptr, &mons[Race_switch])) /* unpoly'd form */
+ || Hallucination))
msound = MS_HUMANOID;
/* silliness, with slight chance to interfere with shopping */
else if (Hallucination && mon_is_gecko(mtmp))
if (mtmp->mtame) {
if (kindred) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(verbuf, "Good %s to you Master%s",
isnight ? "evening" : "day",
isnight ? "!" : ". Why do we not rest?");
#else
Sprintf(verbuf, "\82²\8eå\90l\97l\81C%s%s",
isnight ? "\82±\82ñ\82Î\82ñ\82Í" : "\82±\82ñ\82É\82¿\82Í",
- isnight ? "!" : "\81D\82¨\8bx\82Ý\82É\82È\82è\82Ü\82¹\82ñ\82©\81H");
+ isnight ? "\81I" : "\81D\82¨\8bx\82Ý\82É\82È\82è\82Ü\82¹\82ñ\82©\81H");
#endif
verbl_msg = verbuf;
} else {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(verbuf, "%s%s",
nightchild ? "Child of the night, " : "",
midnight()
}
} else if (mtmp->mpeaceful) {
if (kindred && isnight) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(verbuf, "Good feeding %s!",
flags.female ? "sister" : "brother");
#else
*/
verbl_msg = "\8e\84\82Í\96ò\81D\81D\82µ\82©\88ù\82Ü\82È\82¢\81D";
} else {
- int vampindex;
static const char *const vampmsg[] = {
/* These first two (0 and 1) are specially handled below */
/*JP
"\91¶\95ª\82É%s\82ð\92Ç\8c\82\82³\82¹\82Ä\82à\82ç\82¨\82¤\81I",
/* other famous vampire quotes can follow here if desired */
};
+ int vampindex;
+
if (kindred)
verbl_msg =
/*JP
|| youmonst.data == &mons[PM_BABY_SILVER_DRAGON]) {
/* Silver dragons are silver in color, not made of silver */
#if 0 /*JP*/
- Sprintf(verbuf, "%s! Your silver sheen does not frighten me!",
+ Sprintf(verbuf, "%s! Your silver sheen does not frighten me!",
youmonst.data == &mons[PM_SILVER_DRAGON]
? "Fool"
: "Young Fool");
} break;
case MS_WERE:
if (flags.moonphase == FULL_MOON && (night() ^ !rn2(13))) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s throws back %s head and lets out a blood curdling %s!",
Monnam(mtmp), mhis(mtmp),
ptr == &mons[PM_HUMAN_WERERAT] ? "shriek" : "howl");
/*JP
verbl_msg = "I'm free!";
*/
- verbl_msg = "\82â\82Á\82Æ\8e©\97R\82É\82È\82Á\82½\81I";
+ verbl_msg = "\82â\82Á\82Æ\8e©\97R\82É\82È\82Á\82½\81I";
} else {
if (ptr != &mons[PM_PRISONER])
/*JP
if (!mtmp->mpeaceful) {
switch (rn2(4)) {
case 0:
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("%s boasts about %s gem collection.", Monnam(mtmp),
mhis(mtmp));
#else
pline_msg = "discusses hunting.";
*/
pline_msg = "\97Â\82É\82Â\82¢\82Ä\8bc\98_\82µ\82½\81D";
+ else if (is_gnome(ptr) && Hallucination && (gnomeplan = rn2(4)) % 2)
+ /* skipped for rn2(4) result of 0 or 2;
+ gag from an early episode of South Park called "Gnomes";
+ initially, Tweek (introduced in that episode) is the only
+ one aware of the tiny gnomes after spotting them sneaking
+ about; they are embarked upon a three-step business plan;
+ a diagram of the plan shows:
+ Phase 1 Phase 2 Phase 3
+ Collect underpants ? Profit
+ and they never verbalize step 2 so we don't either */
+#if 0 /*JP:T*/
+ verbl_msg = (gnomeplan == 1) ? "Phase one, collect underpants."
+ : "Phase three, profit!";
+#else
+ verbl_msg = (gnomeplan == 1) ? "\82»\82Ì\82P\81C\83p\83\93\83c\82ð\8fW\82ß\82é\81D"
+ : "\82»\82Ì\82R\81C\8eû\89v\89»\81I";
+#endif
else
switch (monsndx(ptr)) {
case PM_HOBBIT:
} break;
case MS_ARREST:
if (mtmp->mpeaceful)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
verbalize("Just the facts, %s.", flags.female ? "Ma'am" : "Sir");
#else
verbalize("\8e\96\8eÀ\82¾\82¯\82ª\92m\82è\82½\82¢\82ñ\82Å\82·\82æ\81C%s\81D", flags.female ? "\89\9c\82³\82ñ" : "\92U\93ß");
#endif
else {
static const char *const arrest_msg[3] = {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
"Anything you say can be used against you.",
"You're under arrest!", "Stop in the name of the Law!",
#else
static const char
*const soldier_foe_msg[3] =
{
-#if 0 /*JP*/
+#if 0 /*JP:T*/
"Resistance is useless!", "You're dog meat!", "Surrender!",
#else
"\92ï\8dR\82µ\82Ä\82à\96³\91Ê\82¾\81I",
#endif
},
*const soldier_pax_msg[3] = {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
"What lousy pay we're getting here!",
"The food's not fit for Orcs!",
"My feet hurt, I've been on them all day!",
&& (otmp = vobj_at(tx, ty)) != 0 && otmp->otyp == STATUE) {
/* Talking to a statue */
if (!Blind) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline_The("%s seems not to notice you.",
/* if hallucinating, you can't tell it's a statue */
Hallucination ? rndmonnam((char *) 0) : "statue");
return 0;
}
- if (!mtmp || mtmp->mundetected || mtmp->m_ap_type == M_AP_FURNITURE
- || mtmp->m_ap_type == M_AP_OBJECT)
+ if (!mtmp || mtmp->mundetected || M_AP_TYPE(mtmp) == M_AP_FURNITURE
+ || M_AP_TYPE(mtmp) == M_AP_OBJECT)
return 0;
/* sleeping monsters won't talk, except priests (who wake up) */