1 /* NetHack 3.6 sounds.c $NHDT-Date: 1570844005 2019/10/12 01:33:25 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.83 $ */
2 /* Copyright (c) 1989 Janet Walz, Mike Threepoint */
3 /* NetHack may be freely redistributed. See license for details. */
5 /* JNetHack Copyright */
6 /* (c) Issei Numata, Naoki Hamada, Shigehiro Miyashita, 1994-2000 */
7 /* For 3.4-, Copyright (c) SHIRAKATA Kentaro, 2002-2022 */
8 /* JNetHack may be freely redistributed. See license for details. */
12 STATIC_DCL boolean FDECL(mon_is_gecko, (struct monst *));
13 STATIC_DCL int FDECL(domonnoise, (struct monst *));
14 STATIC_DCL int NDECL(dochat);
15 STATIC_DCL int FDECL(mon_in_room, (struct monst *, int));
17 /* this easily could be a macro, but it might overtax dumb compilers */
19 mon_in_room(mon, rmtyp)
23 int rno = levl[mon->mx][mon->my].roomno;
24 if (rno >= ROOMOFFSET)
25 return rooms[rno - ROOMOFFSET].rtype == rmtyp;
32 register struct mkroom *sroom;
33 register int hallu, vx, vy;
34 #if defined(AMIGA) && defined(AZTEC_C_WORKAROUND)
39 if (Deaf || !flags.acoustics || u.uswallow || Underwater)
42 hallu = Hallucination ? 1 : 0;
44 if (level.flags.nfountains && !rn2(400)) {
46 static const char *const fountain_msg[4] = {
47 "bubbling water.", "water falling on coins.",
48 "the splashing of a naiad.", "a soda fountain!",
50 static const char *const fountain_msg[4] = {
51 "
\83S
\83{
\83S
\83{
\82Æ
\82¢
\82¤
\89¹
\82ð
\95·
\82¢
\82½
\81D", "
\83s
\83`
\83\83\83s
\83`
\83\83\82Æ
\82¢
\82¤
\89¹
\82ð
\95·
\82¢
\82½
\81D",
52 "
\83o
\83V
\83\83\83o
\83V
\83\83\82Æ
\82¢
\82¤
\89¹
\82ð
\95·
\82¢
\82½
\81D", "
\92Y
\8e_
\88ù
\97¿
\82Ì
\83V
\83\85\81[
\82Æ
\82¢
\82¤
\89¹
\82ð
\95·
\82¢
\82½
\81I",
55 You_hear1(fountain_msg[rn2(3) + hallu]);
57 if (level.flags.nsinks && !rn2(300)) {
59 static const char *const sink_msg[3] = {
60 "a slow drip.", "a gurgling noise.", "dishes being washed!",
62 static const char *const sink_msg[3] = {
63 "
\90\85\82ª
\82Û
\82½
\82Û
\82½
\82Æ
\97\8e\82¿
\82é
\89¹
\82ð
\95·
\82¢
\82½
\81D",
64 "
\82ª
\82ç
\82ª
\82ç
\82Æ
\82¢
\82¤
\89¹
\82ð
\95·
\82¢
\82½
\81D",
65 "
\8eM
\82ð
\90ô
\82¤
\89¹
\82ð
\95·
\82¢
\82½
\81I",
68 You_hear1(sink_msg[rn2(2) + hallu]);
70 if (level.flags.has_court && !rn2(200)) {
72 static const char *const throne_msg[4] = {
73 "the tones of courtly conversation.",
74 "a sceptre pounded in judgment.",
75 "Someone shouts \"Off with %s head!\"", "Queen Beruthiel's cats!",
77 static const char *const throne_msg[4] = {
78 "
\8fã
\95i
\82È
\98b
\82µ
\90º
\82ð
\95·
\82¢
\82½
\81D",
79 "
\8dÙ
\94»
\82Åâ
\94\82ð
\93Ë
\82
\89¹
\82ð
\95·
\82¢
\82½
\81D",
80 "
\82¾
\82ê
\82©
\82ª
\81u
\82»
\82Ì
\82à
\82Ì
\82Ì
\8eñ
\82ð
\82Í
\82Ë
\82æ
\81I
\81v
\82Æ
\8b©
\82Ô
\90º
\82ð
\95·
\82¢
\82½
\81D",
81 "
\83x
\83\8b\83V
\83G
\83\8b\89¤
\94Ü
\82Ì
\94L
\82Ì
\90º
\82ð
\95·
\82¢
\82½
\81I",
84 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
85 if (DEADMONSTER(mtmp))
87 if ((mtmp->msleeping || is_lord(mtmp->data)
88 || is_prince(mtmp->data)) && !is_animal(mtmp->data)
89 && mon_in_room(mtmp, COURT)) {
90 /* finding one is enough, at least for now */
91 int which = rn2(3) + hallu;
94 You_hear1(throne_msg[which]);
96 pline(throne_msg[2], uhis());
101 if (level.flags.has_swamp && !rn2(200)) {
103 static const char *const swamp_msg[3] = {
104 "hear mosquitoes!", "smell marsh gas!", /* so it's a smell...*/
107 static const char *const swamp_msg[3] = {
108 "
\89á
\82Ì
\89H
\89¹
\82ð
\95·
\82¢
\82½
\81D",
109 "
\95\85\82Á
\82½
\93õ
\82¢
\82ª
\82µ
\82½
\81I", /* so it's a smell...*/
110 "
\83h
\83i
\83\8b\83h
\83_
\83b
\83N
\82Ì
\90º
\82ð
\95·
\82¢
\82½
\81I",
113 You1(swamp_msg[rn2(2) + hallu]);
116 if (level.flags.has_vault && !rn2(200)) {
117 if (!(sroom = search_special(VAULT))) {
119 level.flags.has_vault = 0;
123 switch (rn2(2) + hallu) {
125 boolean gold_in_vault = FALSE;
127 for (vx = sroom->lx; vx <= sroom->hx; vx++)
128 for (vy = sroom->ly; vy <= sroom->hy; vy++)
130 gold_in_vault = TRUE;
131 #if defined(AMIGA) && defined(AZTEC_C_WORKAROUND)
132 /* Bug in aztec assembler here. Workaround below */
133 xx = ROOM_INDEX(sroom) + ROOMOFFSET;
134 xx = (xx != vault_occupied(u.urooms));
137 if (vault_occupied(u.urooms)
138 != (ROOM_INDEX(sroom) + ROOMOFFSET))
139 #endif /* AZTEC_C_WORKAROUND */
144 ? "someone counting money."
145 : "the quarterback calling the play.");
148 ? "
\92N
\82©
\82ª
\82¨
\8bà
\82ð
\90\94\82¦
\82Ä
\82¢
\82é
\89¹
\82ð
\95·
\82¢
\82½
\81D"
149 : "
\83N
\83H
\81[
\83^
\83o
\83b
\83N
\82ª
\8ew
\8e¦
\82ð
\82·
\82é
\90º
\82ð
\95·
\82¢
\82½
\81D");
153 You_hear("someone searching.");
155 You_hear("
\92N
\82©
\82ª
\91{
\8dõ
\82µ
\82Ä
\82¢
\82é
\89¹
\82ð
\95·
\82¢
\82½
\81D");
162 You_hear("the footsteps of a guard on patrol.");
164 You_hear("
\8cx
\94õ
\88õ
\82Ì
\83p
\83g
\83\8d\81[
\83\8b\82·
\82é
\89¹
\82ð
\95·
\82¢
\82½
\81D");
168 You_hear("Ebenezer Scrooge!");
170 You_hear("
\82±
\82¿
\8bT
\82Ì
\97¼
\82³
\82ñ
\82Ì
\90º
\82ð
\95·
\82¢
\82½
\81I");
175 if (level.flags.has_beehive && !rn2(200)) {
176 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
177 if (DEADMONSTER(mtmp))
179 if ((mtmp->data->mlet == S_ANT && is_flyer(mtmp->data))
180 && mon_in_room(mtmp, BEEHIVE)) {
181 switch (rn2(2) + hallu) {
184 You_hear("a low buzzing.");
186 You_hear("
\82Ô
\81[
\82ñ
\82Æ
\82¢
\82¤
\89¹
\82ð
\95·
\82¢
\82½
\81D");
190 You_hear("an angry drone.");
192 You_hear("
\8b»
\95±
\82µ
\82½
\97Y
\83o
\83`
\82Ì
\89¹
\82ð
\95·
\82¢
\82½
\81D");
196 You_hear("bees in your %sbonnet!",
197 uarmh ? "" : "(nonexistent) ");
199 You_hear("
\83n
\83`
\82ª
\82 \82È
\82½
\82Ì
\96X
\8eq%s
\82Ì
\92\86\82É
\82¢
\82é
\89¹
\82ð
\95·
\82¢
\82½
\81I",
200 uarmh ? "" : "(
\94í
\82Á
\82Ä
\82È
\82¢
\82¯
\82Ç)");
208 if (level.flags.has_morgue && !rn2(200)) {
209 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
210 if (DEADMONSTER(mtmp))
212 if ((is_undead(mtmp->data) || is_vampshifter(mtmp))
213 && mon_in_room(mtmp, MORGUE)) {
215 const char *hair = body_part(HAIR); /* hair/fur/scales */
218 switch (rn2(2) + hallu) {
221 You("suddenly realize it is unnaturally quiet.");
223 You("
\95s
\8e©
\91R
\82È
\82
\82ç
\82¢
\90Ã
\82©
\82È
\82Ì
\82É
\8bC
\82Ã
\82¢
\82½
\81D");
227 pline_The("%s on the back of your %s %s up.", hair,
228 body_part(NECK), vtense(hair, "stand"));
230 pline("
\82 \82È
\82½
\82Ì%s
\82Ì
\82¤
\82µ
\82ë
\82Ì%s
\82ª
\8bt
\97§
\82Á
\82½
\81D",
231 body_part(NECK), body_part(HAIR));
236 pline_The("%s on your %s %s to stand up.", hair,
237 body_part(HEAD), vtense(hair, "seem"));
239 pline("
\82 \82È
\82½
\82Ì%s
\82Ì%s
\82Í
\8bt
\97§
\82Á
\82½
\81D",
240 body_part(HEAD), body_part(HAIR));
248 if (level.flags.has_barracks && !rn2(200)) {
249 static const char *const barracks_msg[4] = {
251 "blades being honed.", "loud snoring.", "dice being thrown.",
252 "General MacArthur!",
254 "
\90n
\95¨
\82ð
\8c¤
\82®
\89¹
\82ð
\95·
\82¢
\82½
\81D",
255 "
\91å
\82«
\82È
\82¢
\82Ñ
\82«
\82ð
\95·
\82¢
\82½
\81D",
256 "
\83_
\83C
\83X
\82ª
\90U
\82ç
\82ê
\82é
\89¹
\82ð
\95·
\82¢
\82½
\81D",
257 "
\83}
\83b
\83J
\81[
\83T
\81[
\8f«
\8cR
\82Ì
\90º
\82ð
\95·
\82¢
\82½
\81I",
262 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
263 if (DEADMONSTER(mtmp))
265 if (is_mercenary(mtmp->data)
266 #if 0 /* don't bother excluding these */
267 && !strstri(mtmp->data->mname, "watch")
268 && !strstri(mtmp->data->mname, "guard")
270 && mon_in_room(mtmp, BARRACKS)
271 /* sleeping implies not-yet-disturbed (usually) */
272 && (mtmp->msleeping || ++count > 5)) {
273 You_hear1(barracks_msg[rn2(3) + hallu]);
278 if (level.flags.has_zoo && !rn2(200)) {
279 static const char *const zoo_msg[3] = {
281 "a sound reminiscent of an elephant stepping on a peanut.",
282 "a sound reminiscent of a seal barking.", "Doctor Dolittle!",
284 "
\8fÛ
\82ª
\83s
\81[
\83i
\83b
\83c
\82Ì
\8fã
\82Å
\97x
\82é
\82æ
\82¤
\82È
\89¹
\82ð
\95·
\82¢
\82½
\81D",
285 "
\83A
\83V
\83J
\82ª
\96i
\82¦
\82é
\82æ
\82¤
\82È
\89¹
\82ð
\95·
\82¢
\82½
\81D",
286 "
\83h
\83\8a\83g
\83\8b\90æ
\90¶
\82Ì
\90º
\82ð
\95·
\82¢
\82½
\81I",
289 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
290 if (DEADMONSTER(mtmp))
292 if ((mtmp->msleeping || is_animal(mtmp->data))
293 && mon_in_room(mtmp, ZOO)) {
294 You_hear1(zoo_msg[rn2(2) + hallu]);
299 if (level.flags.has_shop && !rn2(200)) {
300 if (!(sroom = search_special(ANY_SHOP))) {
302 level.flags.has_shop = 0;
305 if (tended_shop(sroom)
306 && !index(u.ushops, (int) (ROOM_INDEX(sroom) + ROOMOFFSET))) {
307 static const char *const shop_msg[3] = {
309 "someone cursing shoplifters.",
310 "the chime of a cash register.", "Neiman and Marcus arguing!",
312 "
\92N
\82©
\82ª
\93D
\96_
\82ð
\82Ì
\82Ì
\82µ
\82é
\90º
\82ð
\95·
\82¢
\82½
\81D",
313 "
\83\8c\83W
\82Ì
\83`
\81[
\83\93\82Æ
\82¢
\82¤
\89¹
\82ð
\95·
\82¢
\82½
\81D",
314 "
\83C
\83g
\81[
\82Æ
\83\88\81[
\83J
\83h
\81[
\82Ì
\8bc
\98_
\82ð
\95·
\82¢
\82½
\81I",
317 You_hear1(shop_msg[rn2(2) + hallu]);
321 if (level.flags.has_temple && !rn2(200)
322 && !(Is_astralevel(&u.uz) || Is_sanctum(&u.uz))) {
323 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
324 if (DEADMONSTER(mtmp))
326 if (mtmp->ispriest && inhistemple(mtmp)
327 /* priest must be active */
328 && mtmp->mcanmove && !mtmp->msleeping
329 /* hero must be outside this temple */
330 && temple_occupied(u.urooms) != EPRI(mtmp)->shroom)
334 /* Generic temple messages; no attempt to match topic or tone
335 to the pantheon involved, let alone to the specific deity.
336 These are assumed to be coming from the attending priest;
337 asterisk means that the priest must be capable of speech;
338 pound sign (octathorpe,&c--don't go there) means that the
339 priest and the altar must not be directly visible (we don't
340 care if telepathy or extended detection reveals that the
341 priest is not currently standing on the altar; he's mobile). */
342 static const char *const temple_msg[] = {
344 "*someone praising %s.", "*someone beseeching %s.",
345 "#an animal carcass being offered in sacrifice.",
346 "*a strident plea for donations.",
348 "*
\92N
\82©
\82ª%s
\82ð
\8e^
\94ü
\82µ
\82Ä
\82¢
\82é
\82Ì
\82ð
\95·
\82¢
\82½
\81D",
349 "*
\92N
\82©
\82ª%s
\82ð
\94M
\96]
\82µ
\82Ä
\82¢
\82é
\82Ì
\82ð
\95·
\82¢
\82½
\81D",
350 "#
\93®
\95¨
\82Ì
\8e\80\91Ì
\82ð
\90¶
\82¯æÑ
\82É
\95ù
\82°
\82é
\90º
\82ð
\95·
\82¢
\82½
\81D",
351 "*
\8e·
\9dX
\82É
\8añ
\95t
\82ð
\97v
\8b\81\82µ
\82Ä
\82¢
\82é
\82Ì
\82ð
\95·
\82¢
\82½
\81D",
355 int trycount = 0, ax = EPRI(mtmp)->shrpos.x,
356 ay = EPRI(mtmp)->shrpos.y;
357 boolean speechless = (mtmp->data->msound <= MS_ANIMAL),
358 in_sight = canseemon(mtmp) || cansee(ax, ay);
361 msg = temple_msg[rn2(SIZE(temple_msg) - 1 + hallu)];
362 if (index(msg, '*') && speechless)
364 if (index(msg, '#') && in_sight)
366 break; /* msg is acceptable */
367 } while (++trycount < 50);
369 while (!letter(*msg))
371 while (*msg == '*' || *msg == '#')
373 ++msg; /* skip control flags */
375 You_hear(msg, halu_gname(EPRI(mtmp)->shralign));
381 if (Is_oracle_level(&u.uz) && !rn2(400)) {
382 /* make sure the Oracle is still here */
383 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
384 if (DEADMONSTER(mtmp))
386 if (mtmp->data == &mons[PM_ORACLE])
389 /* and don't produce silly effects when she's clearly visible */
390 if (mtmp && (hallu || !canseemon(mtmp))) {
391 static const char *const ora_msg[5] = {
393 "a strange wind.", /* Jupiter at Dodona */
394 "convulsive ravings.", /* Apollo at Delphi */
395 "snoring snakes.", /* AEsculapius at Epidaurus */
396 "someone say \"No more woodchucks!\"",
397 "a loud ZOT!" /* both rec.humor.oracle */
399 "
\8aï
\96
\82È
\95\97\82Ì
\89¹
\82ð
\95·
\82¢
\82½
\81D",
400 "
\94¼
\8b¶
\97\90\82Ì
\90º
\82ð
\95·
\82¢
\82½
\81D",
401 "
\8eÖ
\82Ì
\82¢
\82Ñ
\82«
\82ð
\95·
\82¢
\82½
\81D",
402 "
\92N
\82©
\82ª
\81u
\82à
\82¤
\83E
\83b
\83h
\83`
\83\83\83b
\83N
\82Í
\82¢
\82ç
\82È
\82¢
\81I
\81v
\82Æ
\8c¾
\82Á
\82Ä
\82¢
\82é
\90º
\82ð
\95·
\82¢
\82½
\81D",
403 "
\91å
\82«
\82È
\82y
\82n
\82s
\82ð
\95·
\82¢
\82½
\81I"
406 You_hear1(ora_msg[rn2(3) + hallu * 2]);
412 static const char *const h_sounds[] = {
414 "beep", "boing", "sing", "belche", "creak", "cough",
415 "rattle", "ululate", "pop", "jingle", "sniffle", "tinkle",
416 "eep", "clatter", "hum", "sizzle", "twitter", "wheeze",
417 "rustle", "honk", "lisp", "yodel", "coo", "burp",
418 "moo", "boom", "murmur", "oink", "quack", "rumble",
419 "twang", "bellow", "toot", "gargle", "hoot", "warble"
421 "
\83s
\81[
\83b
\82Æ
\96Â
\82¢
\82½",
422 "
\91\9b\82¬
\82½
\82Ä
\82½",
424 "
\82°
\82Á
\82Õ
\82ð
\82µ
\82½",
425 "
\83L
\81[
\83L
\81[
\82Æ
\96Â
\82¢
\82½",
426 "
\82¹
\82«
\8d\9e\82ñ
\82¾",
428 "
\83J
\83^
\83J
\83^
\96Â
\82Á
\82½",
429 "
\83E
\83H
\83\93\83E
\83H
\83\93\96Â
\82¢
\82½",
430 "
\83|
\83\93\82Æ
\96Â
\82Á
\82½",
431 "
\83`
\83\83\83\8a\83\93\82Æ
\96Â
\82Á
\82½",
432 "
\83N
\83\93\83N
\83\93\96Â
\82¢
\82½",
433 "
\83`
\83\8a\83\93\83`
\83\8a\83\93\82Æ
\96Â
\82Á
\82½",
435 "
\83C
\81[
\83b
\82Æ
\96Â
\82¢
\82½",
436 "
\83J
\83`
\83\83\83J
\83`
\83\83\89¹
\82ð
\97§
\82Ä
\82½",
437 "
\83n
\83~
\83\93\83O
\82µ
\82½",
438 "
\83W
\83\85\81[
\83b
\82Æ
\89¹
\82ð
\97§
\82Ä
\82½",
439 "
\83s
\83\88\83s
\83\88\96Â
\82¢
\82½",
440 "
\83[
\83C
\83[
\83C
\91§
\82ð
\82µ
\82½",
442 "
\83J
\83T
\83J
\83T
\89¹
\82ð
\97§
\82Ä
\82½",
443 "
\8cx
\93J
\82ð
\96Â
\82ç
\82µ
\82½",
444 "
\90ã
\91«
\82ç
\82¸
\82É
\82µ
\82á
\82×
\82Á
\82½",
445 "
\83\88\81[
\83f
\83\8b\82ð
\89Ì
\82Á
\82½",
446 "
\83N
\81[
\83N
\81[
\96Â
\82¢
\82½",
447 "
\82°
\82Á
\82Õ
\82ð
\82µ
\82½",
449 "
\83\82\81[
\82Æ
\96Â
\82¢
\82½",
450 "
\94\9a\94
\89¹
\82ð
\8b¿
\82©
\82¹
\82½",
451 "
\83u
\83c
\83u
\83c
\82Â
\82Ô
\82â
\82¢
\82½",
452 "
\83u
\81[
\83u
\81[
\96Â
\82¢
\82½",
453 "
\83N
\83\8f\83b
\83N
\83\8f\83b
\82Æ
\96Â
\82¢
\82½",
454 "
\83S
\83\8d\83S
\83\8d\96Â
\82Á
\82½",
456 "
\83|
\83\8d\83\8d\83\93\82Æ
\96Â
\82Á
\82½",
458 "
\83\89\83b
\83p
\82Ì
\89¹
\82ð
\96Â
\82ç
\82µ
\82½",
459 "
\83K
\83\89\83K
\83\89\90º
\82ð
\8fo
\82µ
\82½",
460 "
\83z
\81[
\83z
\81[
\96Â
\82¢
\82½",
461 "
\82³
\82¦
\82¸
\82Á
\82½"
467 register struct monst *mtmp;
471 switch (mtmp->data->msound) {
477 ret = "
\83V
\81[
\83b
\82Æ
\96Â
\82¢
\82½";
484 ret = "
\82Í
\82°
\82µ
\82
\96i
\82¦
\82½";
490 ret = "
\96i
\82¦
\82½";
496 ret = "
\83u
\81[
\83b
\82Æ
\96Â
\82¢
\82½";
502 ret = "
\83L
\81[
\83L
\81[
\96Â
\82¢
\82½";
508 ret = "
\8bà
\90Ø
\82è
\90º
\82ð
\97§
\82Ä
\82½";
514 ret = "
\82¢
\82È
\82È
\82¢
\82½";
520 ret = "
\94ß
\82µ
\82
\96Â
\82¢
\82½";
526 ret = "
\8b»
\95±
\82µ
\82½";
532 ret = "
\8bà
\90Ø
\82è
\90º
\82ð
\82 \82°
\82½";
537 /* the sounds of a seriously abused pet, including player attacking it */
540 register struct monst *mtmp;
542 register const char *growl_verb = 0;
544 if (mtmp->msleeping || !mtmp->mcanmove || !mtmp->data->msound)
547 /* presumably nearness and soundok checks have already been made */
549 growl_verb = h_sounds[rn2(SIZE(h_sounds))];
551 growl_verb = growl_sound(mtmp);
554 pline("%s %s!", Monnam(mtmp), vtense((char *) 0, growl_verb));
556 pline("%s
\82Í%s
\81I", Monnam(mtmp), growl_verb);
559 wake_nearto(mtmp->mx, mtmp->my, mtmp->data->mlevel * 18);
563 /* the sounds of mistreated pets */
566 register struct monst *mtmp;
568 register const char *yelp_verb = 0;
570 if (mtmp->msleeping || !mtmp->mcanmove || !mtmp->data->msound)
573 /* presumably nearness and soundok checks have already been made */
575 yelp_verb = h_sounds[rn2(SIZE(h_sounds))];
577 switch (mtmp->data->msound) {
580 yelp_verb = (!Deaf) ? "yowl" : "arch";
582 yelp_verb = (!Deaf) ? "
\94ß
\82µ
\82
\96Â
\82¢
\82½" : "
\8b|
\82È
\82è
\82É
\82È
\82Á
\82½";
587 yelp_verb = (!Deaf) ? "yelp" : "recoil";
589 yelp_verb = (!Deaf) ? "
\83L
\83\83\83\93\83L
\83\83\83\93\96Â
\82¢
\82½" : "
\90K
\8d\9e\82Ý
\82µ
\82½";
593 yelp_verb = (!Deaf) ? "snarl" : "bluff";
595 yelp_verb = (!Deaf) ? "
\82¤
\82È
\82Á
\82½" : "
\82â
\82¹
\89ä
\96\9d\82µ
\82½";
599 yelp_verb = (!Deaf) ? "squeal" : "quiver";
601 yelp_verb = (!Deaf) ? "
\83L
\81[
\83L
\81[
\96Â
\82¢
\82½" : "
\90k
\82¦
\82½";
605 yelp_verb = (!Deaf) ? "screak" : "thrash";
607 yelp_verb = (!Deaf) ? "
\8bà
\90Ø
\82è
\90º
\82ð
\97§
\82Ä
\82½" : "
\82Ì
\82½
\82¤
\82¿
\89ñ
\82Á
\82½";
611 yelp_verb = (!Deaf) ? "wail" : "cringe";
613 yelp_verb = (!Deaf) ? "
\94ß
\82µ
\82
\96Â
\82¢
\82½" : "
\90g
\82ð
\82·
\82
\82ß
\82½";
618 pline("%s %s!", Monnam(mtmp), vtense((char *) 0, yelp_verb));
620 pline("%s
\82Í%s
\81I", Monnam(mtmp), yelp_verb);
623 wake_nearto(mtmp->mx, mtmp->my, mtmp->data->mlevel * 12);
627 /* the sounds of distressed pets */
630 register struct monst *mtmp;
632 register const char *whimper_verb = 0;
634 if (mtmp->msleeping || !mtmp->mcanmove || !mtmp->data->msound)
637 /* presumably nearness and soundok checks have already been made */
639 whimper_verb = h_sounds[rn2(SIZE(h_sounds))];
641 switch (mtmp->data->msound) {
645 whimper_verb = "whimper";
647 whimper_verb = "
\83N
\83\93\83N
\83\93\96Â
\82¢
\82½";
651 whimper_verb = "whine";
653 whimper_verb = "
\83N
\81[
\83\93\82Æ
\96Â
\82¢
\82½";
657 whimper_verb = "squeal";
659 whimper_verb = "
\83L
\81[
\83L
\81[
\96Â
\82¢
\82½";
664 pline("%s %s.", Monnam(mtmp), vtense((char *) 0, whimper_verb));
666 pline("%s
\82Í%s
\81D", Monnam(mtmp), whimper_verb);
669 wake_nearto(mtmp->mx, mtmp->my, mtmp->data->mlevel * 6);
673 /* pet makes "I'm hungry" noises */
676 register struct monst *mtmp;
678 if (mtmp->msleeping || !mtmp->mcanmove
679 || !(carnivorous(mtmp->data) || herbivorous(mtmp->data)))
682 /* presumably nearness and soundok checks have already been made */
683 if (!is_silent(mtmp->data) && mtmp->data->msound <= MS_ANIMAL)
684 (void) domonnoise(mtmp);
685 else if (mtmp->data->msound >= MS_HUMANOID) {
686 if (!canspotmon(mtmp))
687 map_invisible(mtmp->mx, mtmp->my);
689 verbalize("I'm hungry.");
691 verbalize("
\82Í
\82ç
\82Ø
\82±
\82¾
\81D");
695 /* return True if mon is a gecko or seems to look like one (hallucination) */
702 /* return True if it is actually a gecko */
703 if (mon->data == &mons[PM_GECKO])
705 /* return False if it is a long worm; we might be chatting to its tail
706 (not strictly needed; long worms are MS_SILENT so won't get here) */
707 if (mon->data == &mons[PM_LONG_WORM])
709 /* result depends upon whether map spot shows a gecko, which will
710 be due to hallucination or to mimickery since mon isn't one */
711 glyph = glyph_at(mon->mx, mon->my);
712 return (boolean) (glyph_to_mon(glyph) == PM_GECKO);
717 register struct monst *mtmp;
720 register const char *pline_msg = 0, /* Monnam(mtmp) will be prepended */
721 *verbl_msg = 0, /* verbalize() */
722 *verbl_msg_mcan = 0; /* verbalize() if cancelled */
723 struct permonst *ptr = mtmp->data;
724 int msound = ptr->msound, gnomeplan = 0;
726 /* presumably nearness and sleep checks have already been made */
732 /* leader might be poly'd; if he can still speak, give leader speech */
733 if (mtmp->m_id == quest_status.leader_m_id && msound > MS_ANIMAL)
735 /* make sure it's your role's quest guardian; adjust if not */
736 else if (msound == MS_GUARDIAN && ptr != &mons[urole.guardnum])
737 msound = mons[genus(monsndx(ptr), 1)].msound;
738 /* some normally non-speaking types can/will speak if hero is similar */
739 else if (msound == MS_ORC /* note: MS_ORC is same as MS_GRUNT */
740 && ((same_race(ptr, youmonst.data) /* current form, */
741 || same_race(ptr, &mons[Race_switch])) /* unpoly'd form */
743 msound = MS_HUMANOID;
744 /* silliness, with slight chance to interfere with shopping */
745 else if (Hallucination && mon_is_gecko(mtmp))
748 /* be sure to do this before talking; the monster might teleport away, in
749 * which case we want to check its pre-teleport position
751 if (!canspotmon(mtmp))
752 map_invisible(mtmp->mx, mtmp->my);
756 return doconsult(mtmp);
765 case MS_SELL: /* pitch, pay, total */
766 if (!Hallucination || (mtmp->isshk && !rn2(2))) {
769 /* approximation of GEICO's advertising slogan (it actually
770 concludes with "save you 15% or more on car insurance.") */
772 Sprintf(verbuf, "15 minutes could save you 15 %s.",
774 Sprintf(verbuf, "15
\95ª
\92¸
\82¯
\82ê
\82Î15%s
\90ß
\96ñ
\82Å
\82«
\82Ü
\82·
\81D",
775 currency(15L)); /* "zorkmids" */
780 /* vampire messages are varied by tameness, peacefulness, and time of
782 boolean isnight = night();
783 boolean kindred = (Upolyd && (u.umonnum == PM_VAMPIRE
784 || u.umonnum == PM_VAMPIRE_LORD));
786 (Upolyd && (u.umonnum == PM_WOLF || u.umonnum == PM_WINTER_WOLF
787 || u.umonnum == PM_WINTER_WOLF_CUB));
789 const char *racenoun =
790 (flags.female && urace.individual.f)
792 : (urace.individual.m) ? urace.individual.m : urace.noun;
794 const char *racenoun = (flags.female) ? "
\82 \82È
\82½" : "
\82¨
\82Ü
\82¦" ;
800 Sprintf(verbuf, "Good %s to you Master%s",
801 isnight ? "evening" : "day",
802 isnight ? "!" : ". Why do we not rest?");
804 Sprintf(verbuf, "
\82²
\8eå
\90l
\97l
\81C%s%s",
805 isnight ? "
\82±
\82ñ
\82Î
\82ñ
\82Í" : "
\82±
\82ñ
\82É
\82¿
\82Í",
806 isnight ? "
\81I" : "
\81D
\82¨
\8bx
\82Ý
\82É
\82È
\82è
\82Ü
\82¹
\82ñ
\82©
\81H");
811 Sprintf(verbuf, "%s%s",
812 nightchild ? "Child of the night, " : "",
814 ? "I can stand this craving no longer!"
816 ? "I beg you, help me satisfy this growing craving!"
817 : "I find myself growing a little weary.");
819 Sprintf(verbuf,"%s%s",
820 nightchild ? "
\96é
\82Ì
\8ee
\82æ
\81C" : "",
822 ? "
\8e\84\82Í
\82±
\82ê
\88È
\8fã
\8a\89\96]
\82ð
\97}
\82¦
\82ç
\82ê
\82È
\82¢
\81I"
824 ? "
\82Ó
\82
\82ê
\82 \82ª
\82é
\8a\89\96]
\82ð
\96\9e\82½
\82·
\82Ì
\82ð
\8f\95\82¯
\82Ä
\82
\82ê
\82È
\82¢
\82©
\81H
\97\8a\82Þ
\81I"
825 : "
\8e\84\82Í
\8f
\81X
\94æ
\82ê
\82½
\82æ
\82¤
\82¾
\81D");
829 } else if (mtmp->mpeaceful) {
830 if (kindred && isnight) {
832 Sprintf(verbuf, "Good feeding %s!",
833 flags.female ? "sister" : "brother");
835 Sprintf(verbuf, "
\82æ
\82¤
\8cZ
\92í
\81I");
838 } else if (nightchild && isnight) {
840 Sprintf(verbuf, "How nice to hear you, child of the night!");
842 Sprintf(verbuf, "
\96é
\82Ì
\8ee
\82æ
\81C
\8c³
\8bC
\82»
\82¤
\82¾
\82È
\81I");
846 verbl_msg = "I only drink... potions.";
848 verbl_msg = "
\8e\84\82Í
\96ò
\81D
\81D
\82µ
\82©
\88ù
\82Ü
\82È
\82¢
\81D";
850 static const char *const vampmsg[] = {
851 /* These first two (0 and 1) are specially handled below */
853 "I vant to suck your %s!",
855 "
\82¨
\91O
\82Ì%s
\82ð
\82æ
\82±
\82¹
\81I",
857 "I vill come after %s without regret!",
859 "
\91¶
\95ª
\82É%s
\82ð
\92Ç
\8c\82\82³
\82¹
\82Ä
\82à
\82ç
\82¨
\82¤
\81I",
860 /* other famous vampire quotes can follow here if desired */
867 "This is my hunting ground that you dare to prowl!";
869 "
\82¨
\82Ü
\82¦
\82ª
\82¤
\82ë
\82Â
\82¢
\82Ä
\82¢
\82é
\82±
\82Ì
\82 \82½
\82è
\82Í
\8e\84\82Ì
\8eë
\8fê
\82¾
\81I";
870 else if (youmonst.data == &mons[PM_SILVER_DRAGON]
871 || youmonst.data == &mons[PM_BABY_SILVER_DRAGON]) {
872 /* Silver dragons are silver in color, not made of silver */
874 Sprintf(verbuf, "%s! Your silver sheen does not frighten me!",
875 youmonst.data == &mons[PM_SILVER_DRAGON]
880 verbl_msg = "
\82Î
\82©
\82ß
\81I
\82¨
\82Ü
\82¦
\82Ì
\8bâ
\82Ì
\8bP
\82«
\82È
\82Ç
\95|
\82
\82È
\82¢
\82¼
\81I";
883 vampindex = rn2(SIZE(vampmsg));
884 if (vampindex == 0) {
885 Sprintf(verbuf, vampmsg[vampindex], body_part(BLOOD));
887 } else if (vampindex == 1) {
888 Sprintf(verbuf, vampmsg[vampindex],
889 Upolyd ? an(mons[u.umonnum].mname)
893 verbl_msg = vampmsg[vampindex];
898 if (flags.moonphase == FULL_MOON && (night() ^ !rn2(13))) {
900 pline("%s throws back %s head and lets out a blood curdling %s!",
901 Monnam(mtmp), mhis(mtmp),
902 ptr == &mons[PM_HUMAN_WERERAT] ? "shriek" : "howl");
904 pline("%s
\82Í
\93ª
\82ð
\82Ì
\82¯
\82¼
\82ç
\82µ
\94w
\8bØ
\82ª
\93\80\82é
\82æ
\82¤
\82È%s
\82ð
\82 \82°
\82½
\81I",
906 ptr == &mons[PM_HUMAN_WERERAT] ? "
\8bà
\90Ø
\82è
\90º" : "
\99ô
\9aK");
908 wake_nearto(mtmp->mx, mtmp->my, 11 * 11);
912 "whispers inaudibly. All you can make out is \"moon\".";
914 "
\95·
\82«
\82Æ
\82ê
\82È
\82¢
\82æ
\82¤
\82È
\90º
\82Å
\82³
\82³
\82â
\82¢
\82½
\81D
\82©
\82ë
\82¤
\82¶
\82Ä
\81w
\8c\8e\81x
\82Æ
\82¢
\82¤
\8c¾
\97t
\82¾
\82¯
\82ª
\95·
\82«
\82Æ
\82ê
\82½
\81D";
917 if (flags.moonphase == FULL_MOON && night()) {
919 pline_msg = "howls.";
921 pline_msg = "
\96i
\82¦
\82½
\81D";
922 } else if (mtmp->mpeaceful) {
924 && (mtmp->mconf || mtmp->mflee || mtmp->mtrapped
925 || moves > EDOG(mtmp)->hungrytime || mtmp->mtame < 5))
927 pline_msg = "whines.";
929 pline_msg = "
\83N
\83\93\83N
\83\93\96Â
\82¢
\82½
\81D";
930 else if (mtmp->mtame && EDOG(mtmp)->hungrytime > moves + 1000)
934 pline_msg = "
\83L
\83\83\83\93\83L
\83\83\83\93\96Â
\82¢
\82½
\81D";
937 != &mons[PM_DINGO]) /* dingos do not actually bark */
939 pline_msg = "barks.";
941 pline_msg = "
\83\8f\83\93\83\8f\83\93\96i
\82¦
\82½
\81D";
945 pline_msg = "growls.";
947 pline_msg = "
\82¤
\82È
\82Á
\82½
\81D";
952 if (mtmp->mconf || mtmp->mflee || mtmp->mtrapped
955 pline_msg = "yowls.";
957 pline_msg = "
\94ß
\82µ
\82
\96Â
\82¢
\82½
\81D";
958 else if (moves > EDOG(mtmp)->hungrytime)
960 pline_msg = "meows.";
962 pline_msg = "
\83j
\83\83\81[
\83\93\82Æ
\96Â
\82¢
\82½
\81D";
963 else if (EDOG(mtmp)->hungrytime > moves + 1000)
965 pline_msg = "purrs.";
967 pline_msg = "
\83S
\83\8d\83S
\83\8d\82Æ
\96Â
\82¢
\82½
\81D";
972 pline_msg = "
\83j
\83\83\81[
\83j
\83\83\81[
\96Â
\82¢
\82½
\81D";
978 pline_msg = mtmp->mpeaceful ? "snarls." : "growls!";
980 pline_msg = mtmp->mpeaceful ? "
\82¤
\82È
\82Á
\82½
\81D" : "
\8c\83\82µ
\82
\82¤
\82È
\82Á
\82½
\81I";
984 pline_msg = mtmp->mpeaceful ? "snarls." : "roars!";
986 pline_msg = mtmp->mpeaceful ? "
\82¤
\82È
\82Á
\82½
\81D" : "
\82Æ
\82Ä
\82à
\8c\83\82µ
\82
\96i
\82¦
\82½
\81I";
990 pline_msg = "squeaks.";
992 pline_msg = "
\83L
\81[
\83L
\81[
\96Â
\82¢
\82½
\81D";
995 if (ptr == &mons[PM_RAVEN] && !mtmp->mpeaceful)
997 verbl_msg = "Nevermore!";
999 verbl_msg = "
\81u
\82à
\82¤
\93ñ
\93x
\82Æ
\81I
\81v";
1002 pline_msg = "squawks.";
1004 pline_msg = "
\83L
\81[
\83L
\81[
\96Â
\82¢
\82½
\81D";
1007 if (!mtmp->mpeaceful)
1009 pline_msg = "hisses!";
1011 pline_msg = "
\83V
\81[
\83b
\82Æ
\96Â
\82¢
\82½
\81I";
1013 return 0; /* no sound */
1017 pline_msg = mtmp->mpeaceful ? "drones." : "buzzes angrily.";
1019 pline_msg = mtmp->mpeaceful ? "
\82Ô
\81[
\82ñ
\82Æ
\96Â
\82Á
\82½
\81D" : "
\82Ô
\82ñ
\82Ô
\82ñ
\96Â
\82Á
\82½
\81D";
1023 pline_msg = "grunts.";
1025 pline_msg = "
\82Ô
\81[
\82Ô
\81[
\96Â
\82¢
\82½
\81D";
1028 if (mtmp->mtame < 5)
1030 pline_msg = "neighs.";
1032 pline_msg = "
\82¢
\82È
\82È
\82¢
\82½
\81D";
1033 else if (moves > EDOG(mtmp)->hungrytime)
1035 pline_msg = "whinnies.";
1037 pline_msg = "
\83q
\83q
\81[
\83\93\82Æ
\96Â
\82¢
\82½
\81D";
1040 pline_msg = "whickers.";
1042 pline_msg = "
\83q
\83q
\83q
\81[
\83\93\82Æ
\96Â
\82¢
\82½
\81D";
1046 pline_msg = "wails mournfully.";
1048 pline_msg = "
\94ß
\82µ
\82°
\82É
\96Â
\82¢
\82½
\81D";
1052 pline_msg = "gurgles.";
1054 pline_msg = "
\82²
\82ë
\82²
\82ë
\8dA
\82ð
\96Â
\82ç
\82µ
\82½
\81D";
1058 pline_msg = "burbles.";
1060 pline_msg = "
\82Ø
\82¿
\82á
\82
\82¿
\82á
\82µ
\82á
\82×
\82Á
\82½
\81D";
1064 pline_msg = "shrieks.";
1066 pline_msg = "
\8bà
\90Ø
\82è
\90º
\82ð
\82 \82°
\82½
\81D";
1071 pline_msg = "imitates you.";
1073 pline_msg = "
\82 \82È
\82½
\82Ì
\90^
\8e\97\82ð
\82µ
\82½
\81D";
1077 pline("%s rattles noisily.", Monnam(mtmp));
1079 pline("%s
\82Í
\83P
\83^
\83P
\83^
\82Æ
\8fÎ
\82¢
\82¾
\82µ
\82½
\81D",Monnam(mtmp));
1081 You("freeze for a moment.");
1083 You("
\88ê
\8fu
\93\80\82è
\82Â
\82¢
\82½
\81D");
1086 multi_reason = "scared by rattling";
1088 multi_reason = "
\8d\9c\82Ì
\83J
\83^
\83J
\83^
\8c¾
\82¤
\89¹
\82É
\82¨
\82Ñ
\82¦
\82½
\8c\84\82É";
1092 static const char *const laugh_msg[4] = {
1094 "giggles.", "chuckles.", "snickers.", "laughs.",
1096 "
\82
\82·
\82
\82·
\8fÎ
\82Á
\82½
\81D", "
\82
\82·
\82Á
\82Æ
\8fÎ
\82Á
\82½
\81D", "
\82Î
\82©
\82É
\82µ
\82½
\82æ
\82¤
\82É
\8fÎ
\82Á
\82½
\81D", "
\8fÎ
\82Á
\82½
\81D",
1098 pline_msg = laugh_msg[rn2(4)];
1102 pline_msg = "mumbles incomprehensibly.";
1104 pline_msg = "
\95s
\89Â
\89ð
\82È
\8c¾
\97t
\82ð
\82Â
\82Ô
\82â
\82¢
\82½
\81D";
1109 verbl_msg = "Sorry, I'm all out of wishes.";
1111 verbl_msg = "
\8e\84\82ð
\8f\95\82¯
\82Ä
\82
\82ê
\82½
\82±
\82Æ
\82ð
\8a´
\8eÓ
\82·
\82é
\81I";
1112 } else if (mtmp->mpeaceful) {
1113 if (ptr == &mons[PM_WATER_DEMON])
1115 pline_msg = "gurgles.";
1117 pline_msg = "
\83S
\83{
\83S
\83{
\83S
\83{
\83S
\83{
\81D";
1120 verbl_msg = "I'm free!";
1122 verbl_msg = "
\82â
\82Á
\82Æ
\8e©
\97R
\82É
\82È
\82Á
\82½
\81I";
1124 if (ptr != &mons[PM_PRISONER])
1126 verbl_msg = "This will teach you not to disturb me!";
1128 verbl_msg = "
\82¶
\82á
\82Ü
\82ð
\82µ
\82È
\82¢
\82Å
\82
\82ê
\81I";
1131 verbl_msg = "??????????";
1135 case MS_BOAST: /* giants */
1136 if (!mtmp->mpeaceful) {
1140 pline("%s boasts about %s gem collection.", Monnam(mtmp),
1143 pline("%s
\82Í
\8e©
\95ª
\82Ì
\95ó
\90Î
\82Ì
\83R
\83\8c\83N
\83V
\83\87\83\93\82ð
\8e©
\96\9d\82µ
\82½
\81D", Monnam(mtmp));
1148 pline_msg = "complains about a diet of mutton.";
1150 pline_msg = "
\96\88\93ú
\97r
\82Î
\82©
\82è
\90H
\82×
\82Ä
\82¢
\82é
\8e\96\82ð
\8bð
\92s
\82Á
\82½
\81D";
1154 pline_msg = "shouts \"Fee Fie Foe Foo!\" and guffaws.";
1156 pline_msg = "
\81w
\82í
\82Á
\82Í
\82Á
\82Í
\82Á
\82Í
\81I
\81x
\82Æ
\82Î
\82©
\8fÎ
\82¢
\82µ
\82½
\81D";
1157 wake_nearto(mtmp->mx, mtmp->my, 7 * 7);
1164 if (!mtmp->mpeaceful) {
1165 if (In_endgame(&u.uz) && is_mplayer(ptr))
1169 pline_msg = "threatens you.";
1171 pline_msg = "
\82 \82È
\82½
\82ð
\88Ð
\8ad
\82µ
\82½
\81D";
1174 /* Generic peaceful humanoid behaviour. */
1177 pline_msg = "wants nothing to do with you.";
1179 pline_msg = "
\82 \82È
\82½
\82Æ
\8aÖ
\82í
\82è
\82½
\82
\82È
\82¢
\82æ
\82¤
\82¾
\81D";
1180 else if (mtmp->mhp < mtmp->mhpmax / 4)
1182 pline_msg = "moans.";
1184 pline_msg = "
\82¤
\82ß
\82«
\90º
\82ð
\82 \82°
\82½
\81D";
1185 else if (mtmp->mconf || mtmp->mstun)
1187 verbl_msg = !rn2(3) ? "Huh?" : rn2(2) ? "What?" : "Eh?";
1189 verbl_msg = !rn2(3) ? "
\82Ö
\81H" : rn2(2) ? "
\89½
\81H" : "
\82¦
\81H";
1190 else if (!mtmp->mcansee)
1192 verbl_msg = "I can't see!";
1194 verbl_msg = "
\89½
\82à
\8c©
\82¦
\82È
\82¢
\81I";
1195 else if (mtmp->mtrapped) {
1196 struct trap *t = t_at(mtmp->mx, mtmp->my);
1201 verbl_msg = "I'm trapped!";
1203 verbl_msg = "ã©
\82É
\82Í
\82Ü
\82Á
\82Ä
\82µ
\82Ü
\82Á
\82½
\81I";
1204 } else if (mtmp->mhp < mtmp->mhpmax / 2)
1206 pline_msg = "asks for a potion of healing.";
1208 pline_msg = "
\89ñ
\95\9c\82Ì
\96ò
\82ð
\8e\9d\82Á
\82Ä
\82È
\82¢
\82©
\90q
\82Ë
\82½
\81D";
1209 else if (mtmp->mtame && !mtmp->isminion
1210 && moves > EDOG(mtmp)->hungrytime)
1212 verbl_msg = "I'm hungry.";
1214 verbl_msg = "
\95 \82ª
\8c¸
\82Á
\82½
\82È
\81D";
1215 /* Specific monsters' interests */
1216 else if (is_elf(ptr))
1218 pline_msg = "curses orcs.";
1220 pline_msg = "
\83I
\81[
\83N
\82ð
\8eô
\82Á
\82½
\81D";
1221 else if (is_dwarf(ptr))
1223 pline_msg = "talks about mining.";
1225 pline_msg = "
\8dÌ
\8c@
\82É
\82Â
\82¢
\82Ä
\98b
\82µ
\82½
\81D";
1226 else if (likes_magic(ptr))
1228 pline_msg = "talks about spellcraft.";
1230 pline_msg = "
\96\82\8fp
\82Ì
\92b
\98B
\82É
\82Â
\82¢
\82Ä
\98b
\82µ
\82½
\81D";
1231 else if (ptr->mlet == S_CENTAUR)
1233 pline_msg = "discusses hunting.";
1235 pline_msg = "
\97Â
\82É
\82Â
\82¢
\82Ä
\8bc
\98_
\82µ
\82½
\81D";
1236 else if (is_gnome(ptr) && Hallucination && (gnomeplan = rn2(4)) % 2)
1237 /* skipped for rn2(4) result of 0 or 2;
1238 gag from an early episode of South Park called "Gnomes";
1239 initially, Tweek (introduced in that episode) is the only
1240 one aware of the tiny gnomes after spotting them sneaking
1241 about; they are embarked upon a three-step business plan;
1242 a diagram of the plan shows:
1243 Phase 1 Phase 2 Phase 3
1244 Collect underpants ? Profit
1245 and they never verbalize step 2 so we don't either */
1247 verbl_msg = (gnomeplan == 1) ? "Phase one, collect underpants."
1248 : "Phase three, profit!";
1250 verbl_msg = (gnomeplan == 1) ? "
\82»
\82Ì
\82P
\81C
\83p
\83\93\83c
\82ð
\8fW
\82ß
\82é
\81D"
1251 : "
\82»
\82Ì
\82R
\81C
\8eû
\89v
\89»
\81I";
1254 switch (monsndx(ptr)) {
1257 (mtmp->mhpmax - mtmp->mhp >= 10)
1259 ? "complains about unpleasant dungeon conditions."
1261 ? "
\95s
\96ù
\89õ
\82È
\96À
\8b{
\82Ì
\8fó
\91Ô
\82É
\82Â
\82¢
\82Ä
\95s
\96\9e\82ð
\8fq
\82×
\82½
\81D"
1263 : "asks you about the One Ring.";
1265 : "
\81u
\88ê
\82Â
\82Ì
\8ew
\97Ö
\81v
\82É
\82Â
\82¢
\82Ä
\90q
\82Ë
\82½
\81D";
1267 case PM_ARCHEOLOGIST:
1270 "describes a recent article in \"Spelunker Today\" magazine.";
1272 "
\81u
\93ú
\8a§
\93´
\8cA
\81v
\82Ì
\8dÅ
\90V
\82Ì
\8bL
\8e\96\82ð
\8e·
\95M
\82µ
\82Ä
\82¢
\82é
\81D";
1276 verbl_msg = "Aloha.";
1278 verbl_msg = "
\83A
\83\8d\81[
\83n
\81D";
1282 pline_msg = "discusses dungeon exploration.";
1284 pline_msg = "
\96À
\8b{
\92T
\8c\9f\82É
\82Â
\82¢
\82Ä
\8bc
\98_
\82µ
\82½
\81D";
1291 if (SYSOPT_SEDUCE) {
1292 if (ptr->mlet != S_NYMPH
1293 && could_seduce(mtmp, &youmonst, (struct attack *) 0) == 1) {
1294 (void) doseduce(mtmp);
1297 swval = ((poly_gender() != (int) mtmp->female) ? rn2(3) : 0);
1299 swval = ((poly_gender() == 0) ? rn2(3) : 0);
1303 verbl_msg = "Hello, sailor.";
1305 switch (poly_gender()) {
1307 verbl_msg = "
\82±
\82ñ
\82É
\82¿
\82Í
\81D
\82 \82ç
\82¢
\82¢
\92j
\82Ë
\81D";
1310 verbl_msg = "
\82±
\82ñ
\82É
\82¿
\82Í
\81C
\82¨
\8fì
\82³
\82ñ
\81D";
1313 verbl_msg = "
\82±
\82ñ
\82É
\82¿
\82Í
\81D";
1320 pline_msg = "comes on to you.";
1322 pline_msg = "
\82 \82È
\82½
\82Ì
\82Ù
\82¤
\82Ö
\82â
\82Á
\82Ä
\82«
\82½
\81D";
1326 pline_msg = "cajoles you.";
1328 pline_msg = "
\82 \82È
\82½
\82ð
\82¨
\82¾
\82Ä
\82½
\81D";
1332 if (mtmp->mpeaceful)
1334 verbalize("Just the facts, %s.", flags.female ? "Ma'am" : "Sir");
1336 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ß");
1339 static const char *const arrest_msg[3] = {
1341 "Anything you say can be used against you.",
1342 "You're under arrest!", "Stop in the name of the Law!",
1344 "
\82¨
\82Ü
\82¦
\82Ì
\8c¾
\82¤
\82±
\82Æ
\82Í
\82¨
\82Ü
\82¦
\82É
\82Æ
\82Á
\82Ä
\95s
\97\98\82È
\8fØ
\8b\92\82Æ
\82È
\82é
\82±
\82Æ
\82ª
\82 \82é
\81I",
1345 "
\82¨
\82Ü
\82¦
\82ð
\91ß
\95ß
\82·
\82é
\81I",
1346 "
\96@
\82Ì
\96¼
\82Ì
\82à
\82Æ
\92¼
\82¿
\82É
\92\86\8e~
\82¹
\82æ
\81I",
1349 verbl_msg = arrest_msg[rn2(3)];
1353 if (mtmp->mpeaceful && !mtmp->mtame) {
1354 (void) demon_talk(mtmp);
1359 if (!mtmp->mpeaceful)
1361 else if (is_lminion(mtmp))
1363 verbl_msg = "It's not too late.";
1365 verbl_msg = "
\82Ü
\82¾
\92x
\82
\82Í
\82È
\82¢
\81D";
1368 verbl_msg = "We're all doomed.";
1370 verbl_msg = "
\82Ý
\82ñ
\82È
\82à
\82¤
\82¨
\82µ
\82Ü
\82¢
\82¾
\81D";
1373 /* deliberately vague, since it's not actually casting any spell */
1375 pline_msg = "seems to mutter a cantrip.";
1377 pline_msg = "
\82Ô
\82Â
\82Ô
\82Â
\82Æ
\82Â
\82Ô
\82â
\82¢
\82Ä
\82¢
\82é
\81D";
1381 verbl_msg_mcan = "I hate this job!";
1383 verbl_msg_mcan = "
\82±
\82ñ
\82È
\8ed
\8e\96\8c\99\82¢
\81I";
1384 if (uwep && (uwep->oclass == WEAPON_CLASS || is_weptool(uwep)))
1386 verbl_msg = "Put that weapon away before you hurt someone!";
1388 verbl_msg = "
\95\90\8aí
\82ð
\82¨
\82³
\82ß
\82È
\82³
\82¢
\81I
\82»
\82ê
\82Í
\90l
\82ð
\8f\9d\82Â
\82¯
\82é
\82à
\82Ì
\82æ
\81I";
1389 else if (uarmc || uarm || uarmh || uarms || uarmg || uarmf)
1390 verbl_msg = Role_if(PM_HEALER)
1392 ? "Doc, I can't help you unless you cooperate."
1394 ? "
\90æ
\90¶
\81C
\82 \82È
\82½
\82Ì
\8b¦
\97Í
\82È
\82µ
\82Å
\82Í
\82Ç
\82¤
\82µ
\82æ
\82¤
\82à
\82 \82è
\82Ü
\82¹
\82ñ
\82í
\81D"
1396 : "Please undress so I can examine you.";
1398 : "
\95\9e\82ð
\92E
\82¢
\82Å
\82
\82¾
\82³
\82¢
\81D
\82 \82È
\82½
\82ð
\90f
\8e@
\82µ
\82Ü
\82·
\82í
\81D";
1401 verbl_msg = "Take off your shirt, please.";
1403 verbl_msg = "
\83V
\83\83\83c
\82ð
\92E
\82¢
\82Å
\82
\82¾
\82³
\82¢
\81D";
1406 verbl_msg = "Relax, this won't hurt a bit.";
1408 verbl_msg = "
\82¨
\82¿
\82Â
\82¢
\82Ä
\81D
\82¿
\82Á
\82Æ
\82à
\92É
\82
\82È
\82¢
\82í
\82æ
\81D";
1411 if (money_cnt(invent))
1413 verbl_msg = "Please drop that gold and follow me.";
1415 verbl_msg = "
\8bà
\82ð
\92u
\82¢
\82Ä
\82Â
\82¢
\82Ä
\82«
\82Ä
\82
\82¾
\82³
\82¢
\81D";
1418 verbl_msg = "Please follow me.";
1420 verbl_msg = "
\82Â
\82¢
\82Ä
\82«
\82Ä
\82
\82¾
\82³
\82¢
\81D";
1424 *const soldier_foe_msg[3] =
1427 "Resistance is useless!", "You're dog meat!", "Surrender!",
1429 "
\92ï
\8dR
\82µ
\82Ä
\82à
\96³
\91Ê
\82¾
\81I",
1430 "
\8c¢
\82É
\8bò
\82í
\82ê
\82¿
\82Ü
\82¦
\81I",
1431 "
\8d~
\95\9a\82µ
\82ë
\81I",
1434 *const soldier_pax_msg[3] = {
1436 "What lousy pay we're getting here!",
1437 "The food's not fit for Orcs!",
1438 "My feet hurt, I've been on them all day!",
1440 "
\82È
\82ñ
\82Ä
\8bà
\95¥
\82¢
\82ª
\88«
\82¢
\82ñ
\82¾
\81I",
1441 "
\82È
\82ñ
\82¾
\82¢
\81H
\83I
\81[
\83N
\82Å
\82à
\8bò
\82¦
\82Ë
\82¥
\82º
\81I",
1442 "
\91«
\82ð
\89ö
\89ä
\82µ
\82½
\81C
\82¸
\82Á
\82Æ
\82±
\82Ì
\92²
\8eq
\82¾
\81I",
1445 verbl_msg = mtmp->mpeaceful ? soldier_pax_msg[rn2(3)]
1446 : soldier_foe_msg[rn2(3)];
1450 const char *tribtitle;
1451 struct obj *book = 0;
1452 boolean ms_Death = (ptr == &mons[PM_DEATH]);
1455 if (ms_Death && !context.tribute.Deathnotice
1456 && (book = u_have_novel()) != 0) {
1457 if ((tribtitle = noveltitle(&book->novelidx)) != 0) {
1459 Sprintf(verbuf, "Ah, so you have a copy of /%s/.", tribtitle);
1461 Sprintf(verbuf, "
\82 \82 \81A/%s/
\82ð
\8e\9d\82Á
\82Ä
\82¢
\82é
\82Ì
\82©
\81D", tribtitle);
1462 /* no Death featured in these two, so exclude them */
1463 if (strcmpi(tribtitle, "Snuff")
1464 && strcmpi(tribtitle, "The Wee Free Men"))
1466 Strcat(verbuf, " I may have been misquoted there.");
1468 Strcat(verbuf, "
\82±
\82±
\82Å
\82Í
\88ø
\97p
\82ª
\8aÔ
\88á
\82Á
\82Ä
\82¢
\82é
\82©
\82à
\82µ
\82ê
\82È
\82¢
\81D");
1471 context.tribute.Deathnotice = 1;
1472 } else if (ms_Death && rn2(3) && Death_quote(verbuf, sizeof verbuf)) {
1474 /* end of tribute addition */
1476 } else if (ms_Death && !rn2(10)) {
1478 pline_msg = "is busy reading a copy of Sandman #8.";
1480 pline_msg = "
\81u
\83T
\83\93\83h
\83}
\83\93\81v
\82Ì8
\8aª
\82ð
\93Ç
\82Þ
\82Ì
\82É
\96Z
\82µ
\82¢
\81D";
1483 verbl_msg = "Who do you think you are, War?";
1485 verbl_msg = "
\83E
\83H
\81[
\82æ
\81C
\8e©
\95ª
\82ª
\89½
\8eÒ
\82©
\8dl
\82¦
\82½
\82±
\82Æ
\82ª
\82 \82é
\82©
\81H";
1487 } /* case MS_RIDER */
1492 pline("%s %s", Monnam(mtmp), pline_msg);
1494 pline("%s
\82Í%s", Monnam(mtmp), pline_msg);
1495 } else if (mtmp->mcan && verbl_msg_mcan) {
1496 verbalize1(verbl_msg_mcan);
1497 } else if (verbl_msg) {
1498 #if 0 /*JP*//*
\83f
\83X
\82ð
\93Á
\95Ê
\88µ
\82¢
\82µ
\82È
\82¢*/
1499 /* more 3.6 tribute */
1500 if (ptr == &mons[PM_DEATH]) {
1501 /* Death talks in CAPITAL LETTERS
1502 and without quotation marks */
1505 pline1(ucase(strcpy(tmpbuf, verbl_msg)));
1507 verbalize1(verbl_msg);
1510 verbalize1(verbl_msg);
1533 if (is_silent(youmonst.data)) {
1535 pline("As %s, you cannot speak.", an(youmonst.data->mname));
1537 pline("
\82 \82È
\82½
\82Í%s
\82È
\82Ì
\82Å
\81C
\98b
\82·
\82±
\82Æ
\82ª
\82Å
\82«
\82È
\82¢
\81D", youmonst.data->mname);
1542 You_cant("speak. You're choking!");
1544 You("
\98b
\82¹
\82È
\82¢
\81D
\82 \82È
\82½
\82Í
\8eñ
\82ð
\8di
\82ß
\82ç
\82ê
\82Ä
\82¢
\82é
\81I");
1549 pline("They won't hear you out there.");
1551 You("
\8aO
\82Ö
\8cü
\82Á
\82Ä
\98b
\82ð
\82µ
\82½
\82ª
\81C
\92N
\82à
\95·
\82«
\82¢
\82ê
\82È
\82©
\82Á
\82½
\81D");
1556 Your("speech is unintelligible underwater.");
1558 pline("
\90\85\96Ê
\89º
\82Å
\82Í
\81C
\82 \82È
\82½
\82Ì
\98b
\82Í
\82ë
\82
\82É
\97\9d\89ð
\82³
\82ê
\82È
\82¢
\81D");
1563 pline("How can you hold a conversation when you cannot hear?");
1565 pline("
\95·
\82
\82±
\82Æ
\82ª
\82Å
\82«
\82È
\82¢
\82Ì
\82É
\82Ç
\82¤
\82â
\82Á
\82Ä
\89ï
\98b
\82·
\82é
\82Ì
\81H");
1569 if (!Blind && (otmp = shop_object(u.ux, u.uy)) != (struct obj *) 0) {
1570 /* standing on something in a shop and chatting causes the shopkeeper
1571 to describe the price(s). This can inhibit other chatting inside
1572 a shop, but that shouldn't matter much. shop_object() returns an
1573 object iff inside a shop and the shopkeeper is present and willing
1574 (not angry) and able (not asleep) to speak and the position
1575 contains any objects other than just gold.
1582 if (!getdir("Talk to whom? (in what direction)")) {
1584 if (!getdir("
\92N
\82Æ
\98b
\82µ
\82Ü
\82·
\82©
\81H[
\95û
\8cü
\82ð
\93ü
\82ê
\82Ä
\82Ë]")) {
1585 /* decided not to chat */
1589 if (u.usteed && u.dz > 0) {
1590 if (!u.usteed->mcanmove || u.usteed->msleeping) {
1592 pline("%s seems not to notice you.", Monnam(u.usteed));
1594 pline("%s
\82Í
\82 \82È
\82½
\82É
\8bC
\82ª
\82Â
\82¢
\82Ä
\82¢
\82È
\82¢
\82æ
\82¤
\82¾
\81D", Monnam(u.usteed));
1597 return domonnoise(u.usteed);
1602 pline("They won't hear you %s there.", u.dz < 0 ? "up" : "down");
1604 pline("%s
\8cü
\82©
\82Á
\82Ä
\98b
\82ð
\82µ
\82Ä
\82à
\88Ó
\96¡
\82ª
\82È
\82¢
\81D", u.dz < 0 ? "
\8fã
\82É" : "
\89º
\82É");
1608 if (u.dx == 0 && u.dy == 0) {
1610 * Let's not include this.
1611 * It raises all sorts of questions: can you wear
1612 * 2 helmets, 2 amulets, 3 pairs of gloves or 6 rings as a marilith,
1614 if (u.umonnum == PM_ETTIN) {
1615 You("discover that your other head makes boring conversation.");
1620 pline("Talking to yourself is a bad habit for a dungeoneer.");
1622 pline("
\88ê
\90l
\8c¾
\82Í
\96À
\8b{
\92T
\8c\9f\8eÒ
\82Ì
\88«
\82¢
\95È
\82¾
\81D");
1632 mtmp = m_at(tx, ty);
1634 if ((!mtmp || mtmp->mundetected)
1635 && (otmp = vobj_at(tx, ty)) != 0 && otmp->otyp == STATUE) {
1636 /* Talking to a statue */
1639 pline_The("%s seems not to notice you.",
1640 /* if hallucinating, you can't tell it's a statue */
1641 Hallucination ? rndmonnam((char *) 0) : "statue");
1643 pline_The("%s
\82Í
\82 \82È
\82½
\82É
\8bC
\82ª
\82Â
\82¢
\82Ä
\82¢
\82È
\82¢
\82æ
\82¤
\82¾
\81D",
1644 Hallucination ? rndmonnam((char *) 0) : "
\90Î
\91\9c");
1650 if (!mtmp || mtmp->mundetected || M_AP_TYPE(mtmp) == M_AP_FURNITURE
1651 || M_AP_TYPE(mtmp) == M_AP_OBJECT)
1654 /* sleeping monsters won't talk, except priests (who wake up) */
1655 if ((!mtmp->mcanmove || mtmp->msleeping) && !mtmp->ispriest) {
1656 /* If it is unseen, the player can't tell the difference between
1657 not noticing him and just not existing, so skip the message. */
1658 if (canspotmon(mtmp))
1660 pline("%s seems not to notice you.", Monnam(mtmp));
1662 pline("%s
\82Í
\82 \82È
\82½
\82É
\8bC
\82ª
\82Â
\82¢
\82Ä
\82¢
\82È
\82¢
\82æ
\82¤
\82¾
\81D", Monnam(mtmp));
1666 /* if this monster is waiting for something, prod it into action */
1667 mtmp->mstrategy &= ~STRAT_WAITMASK;
1669 if (mtmp->mtame && mtmp->meating) {
1670 if (!canspotmon(mtmp))
1671 map_invisible(mtmp->mx, mtmp->my);
1673 pline("%s is eating noisily.", Monnam(mtmp));
1675 pline("%s
\82Í
\83o
\83\8a\83o
\83\8a\82Æ
\95¨
\82ð
\90H
\82×
\82Ä
\82¢
\82é
\81D", Monnam(mtmp));
1679 return domonnoise(mtmp);
1684 extern void FDECL(play_usersound, (const char *, int));
1686 typedef struct audio_mapping_rec {
1687 struct nhregex *regex;
1690 struct audio_mapping_rec *next;
1693 static audio_mapping *soundmap = 0;
1695 char *sounddir = ".";
1697 /* adds a sound file mapping, returns 0 on failure, 1 on success */
1699 add_sound_mapping(mapping)
1700 const char *mapping;
1707 if (sscanf(mapping, "MESG \"%255[^\"]\"%*[\t ]\"%255[^\"]\" %d", text,
1708 filename, &volume) == 3) {
1709 audio_mapping *new_map;
1711 if (strlen(sounddir) + strlen(filename) > 254) {
1712 raw_print("sound file name too long");
1715 Sprintf(filespec, "%s/%s", sounddir, filename);
1717 if (can_read_file(filespec)) {
1718 new_map = (audio_mapping *) alloc(sizeof(audio_mapping));
1719 new_map->regex = regex_init();
1720 new_map->filename = dupstr(filespec);
1721 new_map->volume = volume;
1722 new_map->next = soundmap;
1724 if (!regex_compile(text, new_map->regex)) {
1725 raw_print(regex_error_desc(new_map->regex));
1726 regex_free(new_map->regex);
1727 free(new_map->filename);
1734 Sprintf(text, "cannot read %.243s", filespec);
1739 raw_print("syntax error in SOUND");
1747 play_sound_for_message(msg)
1750 audio_mapping *cursor = soundmap;
1753 if (regex_match(msg, cursor->regex)) {
1754 play_usersound(cursor->filename, cursor->volume);
1756 cursor = cursor->next;
1760 #endif /* USER_SOUNDS */