OSDN Git Service

update year to 2021
[jnethack/source.git] / src / sounds.c
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. */
4
5 /* JNetHack Copyright */
6 /* (c) Issei Numata, Naoki Hamada, Shigehiro Miyashita, 1994-2000  */
7 /* For 3.4-, Copyright (c) SHIRAKATA Kentaro, 2002-2021            */
8 /* JNetHack may be freely redistributed.  See license for details. */
9
10 #include "hack.h"
11
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));
16
17 /* this easily could be a macro, but it might overtax dumb compilers */
18 STATIC_OVL int
19 mon_in_room(mon, rmtyp)
20 struct monst *mon;
21 int rmtyp;
22 {
23     int rno = levl[mon->mx][mon->my].roomno;
24     if (rno >= ROOMOFFSET)
25         return rooms[rno - ROOMOFFSET].rtype == rmtyp;
26     return FALSE;
27 }
28
29 void
30 dosounds()
31 {
32     register struct mkroom *sroom;
33     register int hallu, vx, vy;
34 #if defined(AMIGA) && defined(AZTEC_C_WORKAROUND)
35     int xx;
36 #endif
37     struct monst *mtmp;
38
39     if (Deaf || !flags.acoustics || u.uswallow || Underwater)
40         return;
41
42     hallu = Hallucination ? 1 : 0;
43
44     if (level.flags.nfountains && !rn2(400)) {
45 #if 0 /*JP:T*/
46         static const char *const fountain_msg[4] = {
47             "bubbling water.", "water falling on coins.",
48             "the splashing of a naiad.", "a soda fountain!",
49 #else
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",
53 #endif
54         };
55         You_hear1(fountain_msg[rn2(3) + hallu]);
56     }
57     if (level.flags.nsinks && !rn2(300)) {
58 #if 0 /*JP:T*/
59         static const char *const sink_msg[3] = {
60             "a slow drip.", "a gurgling noise.", "dishes being washed!",
61 #else
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",
66 #endif
67         };
68         You_hear1(sink_msg[rn2(2) + hallu]);
69     }
70     if (level.flags.has_court && !rn2(200)) {
71 #if 0 /*JP:T*/
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!",
76 #else
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",
82 #endif
83         };
84         for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
85             if (DEADMONSTER(mtmp))
86                 continue;
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;
92
93                 if (which != 2)
94                     You_hear1(throne_msg[which]);
95                 else
96                     pline(throne_msg[2], uhis());
97                 return;
98             }
99         }
100     }
101     if (level.flags.has_swamp && !rn2(200)) {
102 #if 0 /*JP:T*/
103         static const char *const swamp_msg[3] = {
104             "hear mosquitoes!", "smell marsh gas!", /* so it's a smell...*/
105             "hear Donald Duck!",
106 #else
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",
111 #endif
112         };
113         You1(swamp_msg[rn2(2) + hallu]);
114         return;
115     }
116     if (level.flags.has_vault && !rn2(200)) {
117         if (!(sroom = search_special(VAULT))) {
118             /* strange ... */
119             level.flags.has_vault = 0;
120             return;
121         }
122         if (gd_sound())
123             switch (rn2(2) + hallu) {
124             case 1: {
125                 boolean gold_in_vault = FALSE;
126
127                 for (vx = sroom->lx; vx <= sroom->hx; vx++)
128                     for (vy = sroom->ly; vy <= sroom->hy; vy++)
129                         if (g_at(vx, 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));
135                 if (xx)
136 #else
137                 if (vault_occupied(u.urooms)
138                     != (ROOM_INDEX(sroom) + ROOMOFFSET))
139 #endif /* AZTEC_C_WORKAROUND */
140                 {
141                     if (gold_in_vault)
142 #if 0 /*JP:T*/
143                         You_hear(!hallu
144                                      ? "someone counting money."
145                                      : "the quarterback calling the play.");
146 #else
147                         You_hear(!hallu
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");
150 #endif
151                     else
152 /*JP
153                         You_hear("someone searching.");
154 */
155                         You_hear("\92N\82©\82ª\91{\8dõ\82µ\82Ä\82¢\82é\89¹\82ð\95·\82¢\82½\81D");
156                     break;
157                 }
158             }
159                 /*FALLTHRU*/
160             case 0:
161 /*JP
162                 You_hear("the footsteps of a guard on patrol.");
163 */
164                 You_hear("\8cx\94õ\88õ\82Ì\83p\83g\83\8d\81[\83\8b\82·\82é\89¹\82ð\95·\82¢\82½\81D");
165                 break;
166             case 2:
167 /*JP
168                 You_hear("Ebenezer Scrooge!");
169 */
170                 You_hear("\82±\82¿\8bT\82Ì\97¼\82³\82ñ\82Ì\90º\82ð\95·\82¢\82½\81I");
171                 break;
172             }
173         return;
174     }
175     if (level.flags.has_beehive && !rn2(200)) {
176         for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
177             if (DEADMONSTER(mtmp))
178                 continue;
179             if ((mtmp->data->mlet == S_ANT && is_flyer(mtmp->data))
180                 && mon_in_room(mtmp, BEEHIVE)) {
181                 switch (rn2(2) + hallu) {
182                 case 0:
183 /*JP
184                     You_hear("a low buzzing.");
185 */
186                     You_hear("\82Ô\81[\82ñ\82Æ\82¢\82¤\89¹\82ð\95·\82¢\82½\81D");
187                     break;
188                 case 1:
189 /*JP
190                     You_hear("an angry drone.");
191 */
192                     You_hear("\8b»\95±\82µ\82½\97Y\83o\83`\82Ì\89¹\82ð\95·\82¢\82½\81D");
193                     break;
194                 case 2:
195 #if 0 /*JP:T*/
196                     You_hear("bees in your %sbonnet!",
197                              uarmh ? "" : "(nonexistent) ");
198 #else
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Ç)");
201 #endif
202                     break;
203                 }
204                 return;
205             }
206         }
207     }
208     if (level.flags.has_morgue && !rn2(200)) {
209         for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
210             if (DEADMONSTER(mtmp))
211                 continue;
212             if ((is_undead(mtmp->data) || is_vampshifter(mtmp))
213                 && mon_in_room(mtmp, MORGUE)) {
214 #if 0 /*JP*/
215                 const char *hair = body_part(HAIR); /* hair/fur/scales */
216 #endif
217
218                 switch (rn2(2) + hallu) {
219                 case 0:
220 /*JP
221                     You("suddenly realize it is unnaturally quiet.");
222 */
223                     You("\95s\8e©\91R\82È\82­\82ç\82¢\90Ã\82©\82È\82Ì\82É\8bC\82Ã\82¢\82½\81D");
224                     break;
225                 case 1:
226 #if 0 /*JP:T*/
227                     pline_The("%s on the back of your %s %s up.", hair,
228                               body_part(NECK), vtense(hair, "stand"));
229 #else
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));
232 #endif
233                     break;
234                 case 2:
235 #if 0 /*JP:T*/
236                     pline_The("%s on your %s %s to stand up.", hair,
237                               body_part(HEAD), vtense(hair, "seem"));
238 #else
239                     pline("\82 \82È\82½\82Ì%s\82Ì%s\82Í\8bt\97§\82Á\82½\81D",
240                           body_part(HEAD), body_part(HAIR));
241 #endif
242                     break;
243                 }
244                 return;
245             }
246         }
247     }
248     if (level.flags.has_barracks && !rn2(200)) {
249         static const char *const barracks_msg[4] = {
250 #if 0 /*JP:T*/
251             "blades being honed.", "loud snoring.", "dice being thrown.",
252             "General MacArthur!",
253 #else
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",
258 #endif
259         };
260         int count = 0;
261
262         for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
263             if (DEADMONSTER(mtmp))
264                 continue;
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")
269 #endif
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]);
274                 return;
275             }
276         }
277     }
278     if (level.flags.has_zoo && !rn2(200)) {
279         static const char *const zoo_msg[3] = {
280 #if 0 /*JP:T*/
281             "a sound reminiscent of an elephant stepping on a peanut.",
282             "a sound reminiscent of a seal barking.", "Doctor Dolittle!",
283 #else
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",
287 #endif
288         };
289         for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
290             if (DEADMONSTER(mtmp))
291                 continue;
292             if ((mtmp->msleeping || is_animal(mtmp->data))
293                 && mon_in_room(mtmp, ZOO)) {
294                 You_hear1(zoo_msg[rn2(2) + hallu]);
295                 return;
296             }
297         }
298     }
299     if (level.flags.has_shop && !rn2(200)) {
300         if (!(sroom = search_special(ANY_SHOP))) {
301             /* strange... */
302             level.flags.has_shop = 0;
303             return;
304         }
305         if (tended_shop(sroom)
306             && !index(u.ushops, (int) (ROOM_INDEX(sroom) + ROOMOFFSET))) {
307             static const char *const shop_msg[3] = {
308 #if 0 /*JP:T*/
309                 "someone cursing shoplifters.",
310                 "the chime of a cash register.", "Neiman and Marcus arguing!",
311 #else
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",
315 #endif
316             };
317             You_hear1(shop_msg[rn2(2) + hallu]);
318         }
319         return;
320     }
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))
325                 continue;
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)
331                 break;
332         }
333         if (mtmp) {
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[] = {
343 #if 0 /*JP:T*/
344                 "*someone praising %s.", "*someone beseeching %s.",
345                 "#an animal carcass being offered in sacrifice.",
346                 "*a strident plea for donations.",
347 #else
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",
352 #endif
353             };
354             const char *msg;
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);
359
360             do {
361                 msg = temple_msg[rn2(SIZE(temple_msg) - 1 + hallu)];
362                 if (index(msg, '*') && speechless)
363                     continue;
364                 if (index(msg, '#') && in_sight)
365                     continue;
366                 break; /* msg is acceptable */
367             } while (++trycount < 50);
368 #if 0 /*JP*/
369             while (!letter(*msg))
370 #else
371             while (*msg == '*' || *msg == '#')
372 #endif
373                 ++msg; /* skip control flags */
374             if (index(msg, '%'))
375                 You_hear(msg, halu_gname(EPRI(mtmp)->shralign));
376             else
377                 You_hear1(msg);
378             return;
379         }
380     }
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))
385                 continue;
386             if (mtmp->data == &mons[PM_ORACLE])
387                 break;
388         }
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] = {
392 #if 0 /*JP:T*/
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 */
398 #else
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"
404 #endif
405             };
406             You_hear1(ora_msg[rn2(3) + hallu * 2]);
407         }
408         return;
409     }
410 }
411
412 static const char *const h_sounds[] = {
413 #if 0 /*JP:T*/
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"
420 #else
421     "\83s\81[\83b\82Æ\96Â\82¢\82½",
422     "\91\9b\82¬\82½\82Ä\82½",
423     "\89Ì\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¾",
427
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½",
434
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½",
441
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½",
448
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½",
455
456     "\83|\83\8d\83\8d\83\93\82Æ\96Â\82Á\82½",
457     "\82Ç\82È\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½"
462 #endif
463 };
464
465 const char *
466 growl_sound(mtmp)
467 register struct monst *mtmp;
468 {
469     const char *ret;
470
471     switch (mtmp->data->msound) {
472     case MS_MEW:
473     case MS_HISS:
474 /*JP
475         ret = "hiss";
476 */
477         ret = "\83V\81[\83b\82Æ\96Â\82¢\82½";
478         break;
479     case MS_BARK:
480     case MS_GROWL:
481 /*JP
482         ret = "growl";
483 */
484         ret = "\82Í\82°\82µ\82­\96i\82¦\82½";
485         break;
486     case MS_ROAR:
487 /*JP
488         ret = "roar";
489 */
490         ret = "\96i\82¦\82½";
491         break;
492     case MS_BUZZ:
493 /*JP
494         ret = "buzz";
495 */
496         ret = "\83u\81[\83b\82Æ\96Â\82¢\82½";
497         break;
498     case MS_SQEEK:
499 /*JP
500         ret = "squeal";
501 */
502         ret = "\83L\81[\83L\81[\96Â\82¢\82½";
503         break;
504     case MS_SQAWK:
505 /*JP
506         ret = "screech";
507 */
508         ret = "\8bà\90Ø\82è\90º\82ð\97§\82Ä\82½";
509         break;
510     case MS_NEIGH:
511 /*JP
512         ret = "neigh";
513 */
514         ret = "\82¢\82È\82È\82¢\82½";
515         break;
516     case MS_WAIL:
517 /*JP
518         ret = "wail";
519 */
520         ret = "\94ß\82µ\82­\96Â\82¢\82½";
521         break;
522     case MS_SILENT:
523 /*JP
524         ret = "commotion";
525 */
526         ret = "\8b»\95±\82µ\82½";
527         break;
528     default:
529 /*JP
530         ret = "scream";
531 */
532         ret = "\8bà\90Ø\82è\90º\82ð\82 \82°\82½";
533     }
534     return ret;
535 }
536
537 /* the sounds of a seriously abused pet, including player attacking it */
538 void
539 growl(mtmp)
540 register struct monst *mtmp;
541 {
542     register const char *growl_verb = 0;
543
544     if (mtmp->msleeping || !mtmp->mcanmove || !mtmp->data->msound)
545         return;
546
547     /* presumably nearness and soundok checks have already been made */
548     if (Hallucination)
549         growl_verb = h_sounds[rn2(SIZE(h_sounds))];
550     else
551         growl_verb = growl_sound(mtmp);
552     if (growl_verb) {
553 /*JP
554         pline("%s %s!", Monnam(mtmp), vtense((char *) 0, growl_verb));
555 */
556         pline("%s\82Í%s\81I", Monnam(mtmp), growl_verb);
557         if (context.run)
558             nomul(0);
559         wake_nearto(mtmp->mx, mtmp->my, mtmp->data->mlevel * 18);
560     }
561 }
562
563 /* the sounds of mistreated pets */
564 void
565 yelp(mtmp)
566 register struct monst *mtmp;
567 {
568     register const char *yelp_verb = 0;
569
570     if (mtmp->msleeping || !mtmp->mcanmove || !mtmp->data->msound)
571         return;
572
573     /* presumably nearness and soundok checks have already been made */
574     if (Hallucination)
575         yelp_verb = h_sounds[rn2(SIZE(h_sounds))];
576     else
577         switch (mtmp->data->msound) {
578         case MS_MEW:
579 /*JP
580             yelp_verb = (!Deaf) ? "yowl" : "arch";
581 */
582             yelp_verb = (!Deaf) ? "\94ß\82µ\82­\96Â\82¢\82½" : "\8b|\82È\82è\82É\82È\82Á\82½";
583             break;
584         case MS_BARK:
585         case MS_GROWL:
586 /*JP
587             yelp_verb = (!Deaf) ? "yelp" : "recoil";
588 */
589             yelp_verb = (!Deaf) ? "\83L\83\83\83\93\83L\83\83\83\93\96Â\82¢\82½" : "\90K\8d\9e\82Ý\82µ\82½";
590             break;
591         case MS_ROAR:
592 /*JP
593             yelp_verb = (!Deaf) ? "snarl" : "bluff";
594 */
595             yelp_verb = (!Deaf) ? "\82¤\82È\82Á\82½" : "\82â\82¹\89ä\96\9d\82µ\82½";
596             break;
597         case MS_SQEEK:
598 /*JP
599             yelp_verb = (!Deaf) ? "squeal" : "quiver";
600 */
601             yelp_verb = (!Deaf) ? "\83L\81[\83L\81[\96Â\82¢\82½" : "\90k\82¦\82½";
602             break;
603         case MS_SQAWK:
604 /*JP
605             yelp_verb = (!Deaf) ? "screak" : "thrash";
606 */
607             yelp_verb = (!Deaf) ? "\8bà\90Ø\82è\90º\82ð\97§\82Ä\82½" : "\82Ì\82½\82¤\82¿\89ñ\82Á\82½";
608             break;
609         case MS_WAIL:
610 /*JP
611             yelp_verb = (!Deaf) ? "wail" : "cringe";
612 */
613             yelp_verb = (!Deaf) ? "\94ß\82µ\82­\96Â\82¢\82½" : "\90g\82ð\82·\82­\82ß\82½";
614             break;
615         }
616     if (yelp_verb) {
617 /*JP
618         pline("%s %s!", Monnam(mtmp), vtense((char *) 0, yelp_verb));
619 */
620         pline("%s\82Í%s\81I", Monnam(mtmp), yelp_verb);
621         if (context.run)
622             nomul(0);
623         wake_nearto(mtmp->mx, mtmp->my, mtmp->data->mlevel * 12);
624     }
625 }
626
627 /* the sounds of distressed pets */
628 void
629 whimper(mtmp)
630 register struct monst *mtmp;
631 {
632     register const char *whimper_verb = 0;
633
634     if (mtmp->msleeping || !mtmp->mcanmove || !mtmp->data->msound)
635         return;
636
637     /* presumably nearness and soundok checks have already been made */
638     if (Hallucination)
639         whimper_verb = h_sounds[rn2(SIZE(h_sounds))];
640     else
641         switch (mtmp->data->msound) {
642         case MS_MEW:
643         case MS_GROWL:
644 /*JP
645             whimper_verb = "whimper";
646 */
647             whimper_verb = "\83N\83\93\83N\83\93\96Â\82¢\82½";
648             break;
649         case MS_BARK:
650 /*JP
651             whimper_verb = "whine";
652 */
653             whimper_verb = "\83N\81[\83\93\82Æ\96Â\82¢\82½";
654             break;
655         case MS_SQEEK:
656 /*JP
657             whimper_verb = "squeal";
658 */
659             whimper_verb = "\83L\81[\83L\81[\96Â\82¢\82½";
660             break;
661         }
662     if (whimper_verb) {
663 /*JP
664         pline("%s %s.", Monnam(mtmp), vtense((char *) 0, whimper_verb));
665 */
666         pline("%s\82Í%s\81D", Monnam(mtmp), whimper_verb);
667         if (context.run)
668             nomul(0);
669         wake_nearto(mtmp->mx, mtmp->my, mtmp->data->mlevel * 6);
670     }
671 }
672
673 /* pet makes "I'm hungry" noises */
674 void
675 beg(mtmp)
676 register struct monst *mtmp;
677 {
678     if (mtmp->msleeping || !mtmp->mcanmove
679         || !(carnivorous(mtmp->data) || herbivorous(mtmp->data)))
680         return;
681
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);
688 /*JP
689         verbalize("I'm hungry.");
690 */
691         verbalize("\82Í\82ç\82Ø\82±\82¾\81D");
692     }
693 }
694
695 /* return True if mon is a gecko or seems to look like one (hallucination) */
696 STATIC_OVL boolean
697 mon_is_gecko(mon)
698 struct monst *mon;
699 {
700     int glyph;
701
702     /* return True if it is actually a gecko */
703     if (mon->data == &mons[PM_GECKO])
704         return TRUE;
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])
708         return FALSE;
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);
713 }
714
715 STATIC_OVL int
716 domonnoise(mtmp)
717 register struct monst *mtmp;
718 {
719     char verbuf[BUFSZ];
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;
725
726     /* presumably nearness and sleep checks have already been made */
727     if (Deaf)
728         return 0;
729     if (is_silent(ptr))
730         return 0;
731
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)
734         msound = MS_LEADER;
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 */
742                  || Hallucination))
743         msound = MS_HUMANOID;
744     /* silliness, with slight chance to interfere with shopping */
745     else if (Hallucination && mon_is_gecko(mtmp))
746         msound = MS_SELL;
747
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
750      */
751     if (!canspotmon(mtmp))
752         map_invisible(mtmp->mx, mtmp->my);
753
754     switch (msound) {
755     case MS_ORACLE:
756         return doconsult(mtmp);
757     case MS_PRIEST:
758         priest_talk(mtmp);
759         break;
760     case MS_LEADER:
761     case MS_NEMESIS:
762     case MS_GUARDIAN:
763         quest_chat(mtmp);
764         break;
765     case MS_SELL: /* pitch, pay, total */
766         if (!Hallucination || (mtmp->isshk && !rn2(2))) {
767             shk_chat(mtmp);
768         } else {
769             /* approximation of GEICO's advertising slogan (it actually
770                concludes with "save you 15% or more on car insurance.") */
771 /*JP
772             Sprintf(verbuf, "15 minutes could save you 15 %s.",
773 */
774             Sprintf(verbuf, "15\95ª\92¸\82¯\82ê\82Î15%s\90ß\96ñ\82Å\82«\82Ü\82·\81D",
775                     currency(15L)); /* "zorkmids" */
776             verbl_msg = verbuf;
777         }
778         break;
779     case MS_VAMPIRE: {
780         /* vampire messages are varied by tameness, peacefulness, and time of
781          * night */
782         boolean isnight = night();
783         boolean kindred = (Upolyd && (u.umonnum == PM_VAMPIRE
784                                       || u.umonnum == PM_VAMPIRE_LORD));
785         boolean nightchild =
786             (Upolyd && (u.umonnum == PM_WOLF || u.umonnum == PM_WINTER_WOLF
787                         || u.umonnum == PM_WINTER_WOLF_CUB));
788 #if 0 /*JP*/
789         const char *racenoun =
790             (flags.female && urace.individual.f)
791                 ? urace.individual.f
792                 : (urace.individual.m) ? urace.individual.m : urace.noun;
793 #else
794         const char *racenoun = (flags.female) ? "\82 \82È\82½" : "\82¨\82Ü\82¦" ;
795 #endif
796
797         if (mtmp->mtame) {
798             if (kindred) {
799 #if 0 /*JP:T*/
800                 Sprintf(verbuf, "Good %s to you Master%s",
801                         isnight ? "evening" : "day",
802                         isnight ? "!" : ".  Why do we not rest?");
803 #else
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");
807 #endif
808                 verbl_msg = verbuf;
809             } else {
810 #if 0 /*JP:T*/
811                 Sprintf(verbuf, "%s%s",
812                         nightchild ? "Child of the night, " : "",
813                         midnight()
814                          ? "I can stand this craving no longer!"
815                          : isnight
816                           ? "I beg you, help me satisfy this growing craving!"
817                           : "I find myself growing a little weary.");
818 #else
819                 Sprintf(verbuf,"%s%s",
820                         nightchild ? "\96é\82Ì\8ee\82æ\81C" : "",
821                         midnight()
822                         ? "\8e\84\82Í\82±\82ê\88È\8fã\8a\89\96]\82ð\97}\82¦\82ç\82ê\82È\82¢\81I"
823                         : isnight
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");
826 #endif
827                 verbl_msg = verbuf;
828             }
829         } else if (mtmp->mpeaceful) {
830             if (kindred && isnight) {
831 #if 0 /*JP:T*/
832                 Sprintf(verbuf, "Good feeding %s!",
833                         flags.female ? "sister" : "brother");
834 #else
835                 Sprintf(verbuf, "\82æ\82¤\8cZ\92í\81I");
836 #endif
837                 verbl_msg = verbuf;
838             } else if (nightchild && isnight) {
839 /*JP
840                 Sprintf(verbuf, "How nice to hear you, child of the night!");
841 */
842                 Sprintf(verbuf, "\96é\82Ì\8ee\82æ\81C\8c³\8bC\82»\82¤\82¾\82È\81I");
843                 verbl_msg = verbuf;
844             } else
845 /*JP
846                 verbl_msg = "I only drink... potions.";
847 */
848                 verbl_msg = "\8e\84\82Í\96ò\81D\81D\82µ\82©\88ù\82Ü\82È\82¢\81D";
849         } else {
850             static const char *const vampmsg[] = {
851                 /* These first two (0 and 1) are specially handled below */
852 /*JP
853                 "I vant to suck your %s!",
854 */
855                 "\82¨\91O\82Ì%s\82ð\82æ\82±\82¹\81I",
856 /*JP
857                 "I vill come after %s without regret!",
858 */
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 */
861             };
862             int vampindex;
863
864             if (kindred)
865                 verbl_msg =
866 /*JP
867                     "This is my hunting ground that you dare to prowl!";
868 */
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 */
873 #if 0 /*JP*/
874                 Sprintf(verbuf, "%s!  Your silver sheen does not frighten me!",
875                         youmonst.data == &mons[PM_SILVER_DRAGON]
876                             ? "Fool"
877                             : "Young Fool");
878                 verbl_msg = verbuf;
879 #else
880                 verbl_msg = "\82Î\82©\82ß\81I\82¨\82Ü\82¦\82Ì\8bâ\82Ì\8bP\82«\82È\82Ç\95|\82­\82È\82¢\82¼\81I";
881 #endif
882             } else {
883                 vampindex = rn2(SIZE(vampmsg));
884                 if (vampindex == 0) {
885                     Sprintf(verbuf, vampmsg[vampindex], body_part(BLOOD));
886                     verbl_msg = verbuf;
887                 } else if (vampindex == 1) {
888                     Sprintf(verbuf, vampmsg[vampindex],
889                             Upolyd ? an(mons[u.umonnum].mname)
890                                    : an(racenoun));
891                     verbl_msg = verbuf;
892                 } else
893                     verbl_msg = vampmsg[vampindex];
894             }
895         }
896     } break;
897     case MS_WERE:
898         if (flags.moonphase == FULL_MOON && (night() ^ !rn2(13))) {
899 #if 0 /*JP:T*/
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");
903 #else
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",
905                   Monnam(mtmp),
906                   ptr == &mons[PM_HUMAN_WERERAT] ? "\8bà\90Ø\82è\90º" : "\99ô\9aK");
907 #endif
908             wake_nearto(mtmp->mx, mtmp->my, 11 * 11);
909         } else
910             pline_msg =
911 /*JP
912                 "whispers inaudibly.  All you can make out is \"moon\".";
913 */
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";
915         break;
916     case MS_BARK:
917         if (flags.moonphase == FULL_MOON && night()) {
918 /*JP
919             pline_msg = "howls.";
920 */
921             pline_msg = "\96i\82¦\82½\81D";
922         } else if (mtmp->mpeaceful) {
923             if (mtmp->mtame
924                 && (mtmp->mconf || mtmp->mflee || mtmp->mtrapped
925                     || moves > EDOG(mtmp)->hungrytime || mtmp->mtame < 5))
926 /*JP
927                 pline_msg = "whines.";
928 */
929                 pline_msg = "\83N\83\93\83N\83\93\96Â\82¢\82½\81D";
930             else if (mtmp->mtame && EDOG(mtmp)->hungrytime > moves + 1000)
931 /*JP
932                 pline_msg = "yips.";
933 */
934                 pline_msg = "\83L\83\83\83\93\83L\83\83\83\93\96Â\82¢\82½\81D";
935             else {
936                 if (mtmp->data
937                     != &mons[PM_DINGO]) /* dingos do not actually bark */
938 /*JP
939                     pline_msg = "barks.";
940 */
941                     pline_msg = "\83\8f\83\93\83\8f\83\93\96i\82¦\82½\81D";
942             }
943         } else {
944 /*JP
945             pline_msg = "growls.";
946 */
947             pline_msg = "\82¤\82È\82Á\82½\81D";
948         }
949         break;
950     case MS_MEW:
951         if (mtmp->mtame) {
952             if (mtmp->mconf || mtmp->mflee || mtmp->mtrapped
953                 || mtmp->mtame < 5)
954 /*JP
955                 pline_msg = "yowls.";
956 */
957                 pline_msg = "\94ß\82µ\82­\96Â\82¢\82½\81D";
958             else if (moves > EDOG(mtmp)->hungrytime)
959 /*JP
960                 pline_msg = "meows.";
961 */
962                 pline_msg = "\83j\83\83\81[\83\93\82Æ\96Â\82¢\82½\81D";
963             else if (EDOG(mtmp)->hungrytime > moves + 1000)
964 /*JP
965                 pline_msg = "purrs.";
966 */
967                 pline_msg = "\83S\83\8d\83S\83\8d\82Æ\96Â\82¢\82½\81D";
968             else
969 /*JP
970                 pline_msg = "mews.";
971 */
972                 pline_msg = "\83j\83\83\81[\83j\83\83\81[\96Â\82¢\82½\81D";
973             break;
974         }
975         /*FALLTHRU*/
976     case MS_GROWL:
977 /*JP
978         pline_msg = mtmp->mpeaceful ? "snarls." : "growls!";
979 */
980         pline_msg = mtmp->mpeaceful ? "\82¤\82È\82Á\82½\81D" : "\8c\83\82µ\82­\82¤\82È\82Á\82½\81I";
981         break;
982     case MS_ROAR:
983 /*JP
984         pline_msg = mtmp->mpeaceful ? "snarls." : "roars!";
985 */
986         pline_msg = mtmp->mpeaceful ? "\82¤\82È\82Á\82½\81D" : "\82Æ\82Ä\82à\8c\83\82µ\82­\96i\82¦\82½\81I";
987         break;
988     case MS_SQEEK:
989 /*JP
990         pline_msg = "squeaks.";
991 */
992         pline_msg = "\83L\81[\83L\81[\96Â\82¢\82½\81D";
993         break;
994     case MS_SQAWK:
995         if (ptr == &mons[PM_RAVEN] && !mtmp->mpeaceful)
996 /*JP
997             verbl_msg = "Nevermore!";
998 */
999             verbl_msg = "\81u\82à\82¤\93ñ\93x\82Æ\81I\81v";
1000         else
1001 /*JP
1002             pline_msg = "squawks.";
1003 */
1004             pline_msg = "\83L\81[\83L\81[\96Â\82¢\82½\81D";
1005         break;
1006     case MS_HISS:
1007         if (!mtmp->mpeaceful)
1008 /*JP
1009             pline_msg = "hisses!";
1010 */
1011             pline_msg = "\83V\81[\83b\82Æ\96Â\82¢\82½\81I";
1012         else
1013             return 0; /* no sound */
1014         break;
1015     case MS_BUZZ:
1016 /*JP
1017         pline_msg = mtmp->mpeaceful ? "drones." : "buzzes angrily.";
1018 */
1019         pline_msg = mtmp->mpeaceful ? "\82Ô\81[\82ñ\82Æ\96Â\82Á\82½\81D" : "\82Ô\82ñ\82Ô\82ñ\96Â\82Á\82½\81D";
1020         break;
1021     case MS_GRUNT:
1022 /*JP
1023         pline_msg = "grunts.";
1024 */
1025         pline_msg = "\82Ô\81[\82Ô\81[\96Â\82¢\82½\81D";
1026         break;
1027     case MS_NEIGH:
1028         if (mtmp->mtame < 5)
1029 /*JP
1030             pline_msg = "neighs.";
1031 */
1032             pline_msg = "\82¢\82È\82È\82¢\82½\81D";
1033         else if (moves > EDOG(mtmp)->hungrytime)
1034 /*JP
1035             pline_msg = "whinnies.";
1036 */
1037             pline_msg = "\83q\83q\81[\83\93\82Æ\96Â\82¢\82½\81D";
1038         else
1039 /*JP
1040             pline_msg = "whickers.";
1041 */
1042             pline_msg = "\83q\83q\83q\81[\83\93\82Æ\96Â\82¢\82½\81D";
1043         break;
1044     case MS_WAIL:
1045 /*JP
1046         pline_msg = "wails mournfully.";
1047 */
1048         pline_msg = "\94ß\82µ\82°\82É\96Â\82¢\82½\81D";
1049         break;
1050     case MS_GURGLE:
1051 /*JP
1052         pline_msg = "gurgles.";
1053 */
1054         pline_msg = "\82²\82ë\82²\82ë\8dA\82ð\96Â\82ç\82µ\82½\81D";
1055         break;
1056     case MS_BURBLE:
1057 /*JP
1058         pline_msg = "burbles.";
1059 */
1060         pline_msg = "\82Ø\82¿\82á\82­\82¿\82á\82µ\82á\82×\82Á\82½\81D";
1061         break;
1062     case MS_SHRIEK:
1063 /*JP
1064         pline_msg = "shrieks.";
1065 */
1066         pline_msg = "\8bà\90Ø\82è\90º\82ð\82 \82°\82½\81D";
1067         aggravate();
1068         break;
1069     case MS_IMITATE:
1070 /*JP
1071         pline_msg = "imitates you.";
1072 */
1073         pline_msg = "\82 \82È\82½\82Ì\90^\8e\97\82ð\82µ\82½\81D";
1074         break;
1075     case MS_BONES:
1076 /*JP
1077         pline("%s rattles noisily.", Monnam(mtmp));
1078 */
1079         pline("%s\82Í\83P\83^\83P\83^\82Æ\8fÎ\82¢\82¾\82µ\82½\81D",Monnam(mtmp));
1080 /*JP
1081         You("freeze for a moment.");
1082 */
1083         You("\88ê\8fu\93\80\82è\82Â\82¢\82½\81D");
1084         nomul(-2);
1085 /*JP
1086         multi_reason = "scared by rattling";
1087 */
1088         multi_reason = "\8d\9c\82Ì\83J\83^\83J\83^\8c¾\82¤\89¹\82É\82¨\82Ñ\82¦\82½\8c\84\82É";
1089         nomovemsg = 0;
1090         break;
1091     case MS_LAUGH: {
1092         static const char *const laugh_msg[4] = {
1093 /*JP
1094             "giggles.", "chuckles.", "snickers.", "laughs.",
1095 */
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",
1097         };
1098         pline_msg = laugh_msg[rn2(4)];
1099     } break;
1100     case MS_MUMBLE:
1101 /*JP
1102         pline_msg = "mumbles incomprehensibly.";
1103 */
1104         pline_msg = "\95s\89Â\89ð\82È\8c¾\97t\82ð\82Â\82Ô\82â\82¢\82½\81D";
1105         break;
1106     case MS_DJINNI:
1107         if (mtmp->mtame) {
1108 /*JP
1109             verbl_msg = "Sorry, I'm all out of wishes.";
1110 */
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])
1114 /*JP
1115                 pline_msg = "gurgles.";
1116 */
1117                 pline_msg = "\83S\83{\83S\83{\83S\83{\83S\83{\81D";
1118             else
1119 /*JP
1120                 verbl_msg = "I'm free!";
1121 */
1122                 verbl_msg = "\82â\82Á\82Æ\8e©\97R\82É\82È\82Á\82½\81I";
1123         } else {
1124             if (ptr != &mons[PM_PRISONER])
1125 /*JP
1126                 verbl_msg = "This will teach you not to disturb me!";
1127 */
1128                 verbl_msg = "\82\82á\82Ü\82ð\82µ\82È\82¢\82Å\82­\82ê\81I";
1129 #if 0
1130             else
1131                 verbl_msg = "??????????";
1132 #endif
1133         }
1134         break;
1135     case MS_BOAST: /* giants */
1136         if (!mtmp->mpeaceful) {
1137             switch (rn2(4)) {
1138             case 0:
1139 #if 0 /*JP:T*/
1140                 pline("%s boasts about %s gem collection.", Monnam(mtmp),
1141                       mhis(mtmp));
1142 #else
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));
1144 #endif
1145                 break;
1146             case 1:
1147 /*JP
1148                 pline_msg = "complains about a diet of mutton.";
1149 */
1150                 pline_msg = "\96\88\93ú\97r\82Î\82©\82è\90H\82×\82Ä\82¢\82é\8e\96\82ð\8bð\92s\82Á\82½\81D";
1151                 break;
1152             default:
1153 /*JP
1154                 pline_msg = "shouts \"Fee Fie Foe Foo!\" and guffaws.";
1155 */
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);
1158                 break;
1159             }
1160             break;
1161         }
1162         /*FALLTHRU*/
1163     case MS_HUMANOID:
1164         if (!mtmp->mpeaceful) {
1165             if (In_endgame(&u.uz) && is_mplayer(ptr))
1166                 mplayer_talk(mtmp);
1167             else
1168 /*JP
1169                 pline_msg = "threatens you.";
1170 */
1171                 pline_msg = "\82 \82È\82½\82ð\88Ð\8ad\82µ\82½\81D";
1172             break;
1173         }
1174         /* Generic peaceful humanoid behaviour. */
1175         if (mtmp->mflee)
1176 /*JP
1177             pline_msg = "wants nothing to do with you.";
1178 */
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)
1181 /*JP
1182             pline_msg = "moans.";
1183 */
1184             pline_msg = "\82¤\82ß\82«\90º\82ð\82 \82°\82½\81D";
1185         else if (mtmp->mconf || mtmp->mstun)
1186 /*JP
1187             verbl_msg = !rn2(3) ? "Huh?" : rn2(2) ? "What?" : "Eh?";
1188 */
1189             verbl_msg = !rn2(3) ? "\82Ö\81H" : rn2(2) ? "\89½\81H" : "\82¦\81H";
1190         else if (!mtmp->mcansee)
1191 /*JP
1192             verbl_msg = "I can't see!";
1193 */
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);
1197
1198             if (t)
1199                 t->tseen = 1;
1200 /*JP
1201             verbl_msg = "I'm trapped!";
1202 */
1203             verbl_msg = "ã©\82É\82Í\82Ü\82Á\82Ä\82µ\82Ü\82Á\82½\81I";
1204         } else if (mtmp->mhp < mtmp->mhpmax / 2)
1205 /*JP
1206             pline_msg = "asks for a potion of healing.";
1207 */
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)
1211 /*JP
1212             verbl_msg = "I'm hungry.";
1213 */
1214             verbl_msg = "\95 \82ª\8c¸\82Á\82½\82È\81D";
1215         /* Specific monsters' interests */
1216         else if (is_elf(ptr))
1217 /*JP
1218             pline_msg = "curses orcs.";
1219 */
1220             pline_msg = "\83I\81[\83N\82ð\8eô\82Á\82½\81D";
1221         else if (is_dwarf(ptr))
1222 /*JP
1223             pline_msg = "talks about mining.";
1224 */
1225             pline_msg = "\8dÌ\8c@\82É\82Â\82¢\82Ä\98b\82µ\82½\81D";
1226         else if (likes_magic(ptr))
1227 /*JP
1228             pline_msg = "talks about spellcraft.";
1229 */
1230             pline_msg = "\96\82\8fp\82Ì\92b\98B\82É\82Â\82¢\82Ä\98b\82µ\82½\81D";
1231         else if (ptr->mlet == S_CENTAUR)
1232 /*JP
1233             pline_msg = "discusses hunting.";
1234 */
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 */
1246 #if 0 /*JP:T*/
1247             verbl_msg = (gnomeplan == 1) ? "Phase one, collect underpants."
1248                                          : "Phase three, profit!";
1249 #else
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";
1252 #endif
1253         else
1254             switch (monsndx(ptr)) {
1255             case PM_HOBBIT:
1256                 pline_msg =
1257                     (mtmp->mhpmax - mtmp->mhp >= 10)
1258 /*JP
1259                         ? "complains about unpleasant dungeon conditions."
1260 */
1261                         ? "\95s\96ù\89õ\82È\96À\8b{\82Ì\8fó\91Ô\82É\82Â\82¢\82Ä\95s\96\9e\82ð\8fq\82×\82½\81D"
1262 /*JP
1263                         : "asks you about the One Ring.";
1264 */
1265                         : "\81u\88ê\82Â\82Ì\8ew\97Ö\81v\82É\82Â\82¢\82Ä\90q\82Ë\82½\81D";
1266                 break;
1267             case PM_ARCHEOLOGIST:
1268                 pline_msg =
1269 /*JP
1270                 "describes a recent article in \"Spelunker Today\" magazine.";
1271 */
1272                 "\81u\93ú\8a§\93´\8cA\81v\82Ì\8dÅ\90V\82Ì\8bL\8e\96\82ð\8e·\95M\82µ\82Ä\82¢\82é\81D";
1273                 break;
1274             case PM_TOURIST:
1275 /*JP
1276                 verbl_msg = "Aloha.";
1277 */
1278                 verbl_msg = "\83A\83\8d\81[\83n\81D";
1279                 break;
1280             default:
1281 /*JP
1282                 pline_msg = "discusses dungeon exploration.";
1283 */
1284                 pline_msg = "\96À\8b{\92T\8c\9f\82É\82Â\82¢\82Ä\8bc\98_\82µ\82½\81D";
1285                 break;
1286             }
1287         break;
1288     case MS_SEDUCE: {
1289         int swval;
1290
1291         if (SYSOPT_SEDUCE) {
1292             if (ptr->mlet != S_NYMPH
1293                 && could_seduce(mtmp, &youmonst, (struct attack *) 0) == 1) {
1294                 (void) doseduce(mtmp);
1295                 break;
1296             }
1297             swval = ((poly_gender() != (int) mtmp->female) ? rn2(3) : 0);
1298         } else
1299             swval = ((poly_gender() == 0) ? rn2(3) : 0);
1300         switch (swval) {
1301         case 2:
1302 #if 0 /*JP*/
1303             verbl_msg = "Hello, sailor.";
1304 #else
1305             switch (poly_gender()) {
1306               case 0:
1307                 verbl_msg = "\82±\82ñ\82É\82¿\82Í\81D\82 \82ç\82¢\82¢\92j\82Ë\81D";
1308                 break;
1309               case 1:
1310                 verbl_msg = "\82±\82ñ\82É\82¿\82Í\81C\82¨\8fì\82³\82ñ\81D";
1311                 break;
1312               default:
1313                 verbl_msg = "\82±\82ñ\82É\82¿\82Í\81D";
1314                 break;
1315             }
1316 #endif
1317             break;
1318         case 1:
1319 /*JP
1320             pline_msg = "comes on to you.";
1321 */
1322             pline_msg = "\82 \82È\82½\82Ì\82Ù\82¤\82Ö\82â\82Á\82Ä\82«\82½\81D";
1323             break;
1324         default:
1325 /*JP
1326             pline_msg = "cajoles you.";
1327 */
1328             pline_msg = "\82 \82È\82½\82ð\82¨\82¾\82Ä\82½\81D";
1329         }
1330     } break;
1331     case MS_ARREST:
1332         if (mtmp->mpeaceful)
1333 #if 0 /*JP:T*/
1334             verbalize("Just the facts, %s.", flags.female ? "Ma'am" : "Sir");
1335 #else
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ß");
1337 #endif
1338         else {
1339             static const char *const arrest_msg[3] = {
1340 #if 0 /*JP:T*/
1341                 "Anything you say can be used against you.",
1342                 "You're under arrest!", "Stop in the name of the Law!",
1343 #else
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",
1347 #endif
1348             };
1349             verbl_msg = arrest_msg[rn2(3)];
1350         }
1351         break;
1352     case MS_BRIBE:
1353         if (mtmp->mpeaceful && !mtmp->mtame) {
1354             (void) demon_talk(mtmp);
1355             break;
1356         }
1357     /* fall through */
1358     case MS_CUSS:
1359         if (!mtmp->mpeaceful)
1360             cuss(mtmp);
1361         else if (is_lminion(mtmp))
1362 /*JP
1363             verbl_msg = "It's not too late.";
1364 */
1365             verbl_msg = "\82Ü\82¾\92x\82­\82Í\82È\82¢\81D";
1366         else
1367 /*JP
1368             verbl_msg = "We're all doomed.";
1369 */
1370             verbl_msg = "\82Ý\82ñ\82È\82à\82¤\82¨\82µ\82Ü\82¢\82¾\81D";
1371         break;
1372     case MS_SPELL:
1373         /* deliberately vague, since it's not actually casting any spell */
1374 /*JP
1375         pline_msg = "seems to mutter a cantrip.";
1376 */
1377         pline_msg = "\82Ô\82Â\82Ô\82Â\82Æ\82Â\82Ô\82â\82¢\82Ä\82¢\82é\81D";
1378         break;
1379     case MS_NURSE:
1380 /*JP
1381         verbl_msg_mcan = "I hate this job!";
1382 */
1383         verbl_msg_mcan = "\82±\82ñ\82È\8ed\8e\96\8c\99\82¢\81I";
1384         if (uwep && (uwep->oclass == WEAPON_CLASS || is_weptool(uwep)))
1385 /*JP
1386             verbl_msg = "Put that weapon away before you hurt someone!";
1387 */
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)
1391 /*JP
1392                             ? "Doc, I can't help you unless you cooperate."
1393 */
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"
1395 /*JP
1396                             : "Please undress so I can examine you.";
1397 */
1398                             : "\95\9e\82ð\92E\82¢\82Å\82­\82¾\82³\82¢\81D\82 \82È\82½\82ð\90f\8e@\82µ\82Ü\82·\82í\81D";
1399         else if (uarmu)
1400 /*JP
1401             verbl_msg = "Take off your shirt, please.";
1402 */
1403             verbl_msg = "\83V\83\83\83c\82ð\92E\82¢\82Å\82­\82¾\82³\82¢\81D";
1404         else
1405 /*JP
1406             verbl_msg = "Relax, this won't hurt a bit.";
1407 */
1408             verbl_msg = "\82¨\82¿\82Â\82¢\82Ä\81D\82¿\82Á\82Æ\82à\92É\82­\82È\82¢\82í\82æ\81D";
1409         break;
1410     case MS_GUARD:
1411         if (money_cnt(invent))
1412 /*JP
1413             verbl_msg = "Please drop that gold and follow me.";
1414 */
1415             verbl_msg = "\8bà\82ð\92u\82¢\82Ä\82Â\82¢\82Ä\82«\82Ä\82­\82¾\82³\82¢\81D";
1416         else
1417 /*JP
1418             verbl_msg = "Please follow me.";
1419 */
1420             verbl_msg = "\82Â\82¢\82Ä\82«\82Ä\82­\82¾\82³\82¢\81D";
1421         break;
1422     case MS_SOLDIER: {
1423         static const char
1424             *const soldier_foe_msg[3] =
1425                 {
1426 #if 0 /*JP:T*/
1427                   "Resistance is useless!", "You're dog meat!", "Surrender!",
1428 #else
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",
1432 #endif
1433                 },
1434                    *const soldier_pax_msg[3] = {
1435 #if 0 /*JP:T*/
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!",
1439 #else
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",
1443 #endif
1444                    };
1445         verbl_msg = mtmp->mpeaceful ? soldier_pax_msg[rn2(3)]
1446                                     : soldier_foe_msg[rn2(3)];
1447         break;
1448     }
1449     case MS_RIDER: {
1450         const char *tribtitle;
1451         struct obj *book = 0;
1452         boolean ms_Death = (ptr == &mons[PM_DEATH]);
1453
1454         /* 3.6 tribute */
1455         if (ms_Death && !context.tribute.Deathnotice
1456             && (book = u_have_novel()) != 0) {
1457             if ((tribtitle = noveltitle(&book->novelidx)) != 0) {
1458 /*JP
1459                 Sprintf(verbuf, "Ah, so you have a copy of /%s/.", tribtitle);
1460 */
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"))
1465 /*JP
1466                     Strcat(verbuf, "  I may have been misquoted there.");
1467 */
1468                     Strcat(verbuf, "  \82±\82±\82Å\82Í\88ø\97p\82ª\8aÔ\88á\82Á\82Ä\82¢\82é\82©\82à\82µ\82ê\82È\82¢\81D");
1469                 verbl_msg = verbuf;
1470             }
1471             context.tribute.Deathnotice = 1;
1472         } else if (ms_Death && rn2(3) && Death_quote(verbuf, sizeof verbuf)) {
1473             verbl_msg = verbuf;
1474         /* end of tribute addition */
1475
1476         } else if (ms_Death && !rn2(10)) {
1477 /*JP
1478             pline_msg = "is busy reading a copy of Sandman #8.";
1479 */
1480             pline_msg = "\81u\83T\83\93\83h\83}\83\93\81v\82Ì8\8aª\82ð\93Ç\82Þ\82Ì\82É\96Z\82µ\82¢\81D";
1481         } else
1482 /*JP
1483             verbl_msg = "Who do you think you are, War?";
1484 */
1485             verbl_msg = "\83E\83H\81[\82æ\81C\8e©\95ª\82ª\89½\8eÒ\82©\8dl\82¦\82½\82±\82Æ\82ª\82 \82é\82©\81H";
1486         break;
1487     } /* case MS_RIDER */
1488     } /* switch */
1489
1490     if (pline_msg) {
1491 /*JP
1492         pline("%s %s", Monnam(mtmp), pline_msg);
1493 */
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 */
1503             char tmpbuf[BUFSZ];
1504
1505             pline1(ucase(strcpy(tmpbuf, verbl_msg)));
1506         } else {
1507             verbalize1(verbl_msg);
1508         }
1509 #else
1510         verbalize1(verbl_msg);
1511 #endif
1512     }
1513     return 1;
1514 }
1515
1516 /* #chat command */
1517 int
1518 dotalk()
1519 {
1520     int result;
1521
1522     result = dochat();
1523     return result;
1524 }
1525
1526 STATIC_OVL int
1527 dochat()
1528 {
1529     struct monst *mtmp;
1530     int tx, ty;
1531     struct obj *otmp;
1532
1533     if (is_silent(youmonst.data)) {
1534 /*JP
1535         pline("As %s, you cannot speak.", an(youmonst.data->mname));
1536 */
1537         pline("\82 \82È\82½\82Í%s\82È\82Ì\82Å\81C\98b\82·\82±\82Æ\82ª\82Å\82«\82È\82¢\81D", youmonst.data->mname);
1538         return 0;
1539     }
1540     if (Strangled) {
1541 /*JP
1542         You_cant("speak.  You're choking!");
1543 */
1544         You("\98b\82¹\82È\82¢\81D\82 \82È\82½\82Í\8eñ\82ð\8di\82ß\82ç\82ê\82Ä\82¢\82é\81I");
1545         return 0;
1546     }
1547     if (u.uswallow) {
1548 /*JP
1549         pline("They won't hear you out there.");
1550 */
1551         You("\8aO\82Ö\8cü\82Á\82Ä\98b\82ð\82µ\82½\82ª\81C\92N\82à\95·\82«\82¢\82ê\82È\82©\82Á\82½\81D");
1552         return 0;
1553     }
1554     if (Underwater) {
1555 /*JP
1556         Your("speech is unintelligible underwater.");
1557 */
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");
1559         return 0;
1560     }
1561     if (Deaf) {
1562 /*JP
1563         pline("How can you hold a conversation when you cannot hear?");
1564 */
1565         pline("\95·\82­\82±\82Æ\82ª\82Å\82«\82È\82¢\82Ì\82É\82Ç\82¤\82â\82Á\82Ä\89ï\98b\82·\82é\82Ì\81H");
1566         return 0;
1567     }
1568
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.
1576         */
1577         price_quote(otmp);
1578         return 1;
1579     }
1580
1581 /*JP
1582     if (!getdir("Talk to whom? (in what direction)")) {
1583 */
1584     if (!getdir("\92N\82Æ\98b\82µ\82Ü\82·\82©\81H[\95û\8cü\82ð\93ü\82ê\82Ä\82Ë]")) {
1585         /* decided not to chat */
1586         return 0;
1587     }
1588
1589     if (u.usteed && u.dz > 0) {
1590         if (!u.usteed->mcanmove || u.usteed->msleeping) {
1591 /*JP
1592             pline("%s seems not to notice you.", Monnam(u.usteed));
1593 */
1594             pline("%s\82Í\82 \82È\82½\82É\8bC\82ª\82Â\82¢\82Ä\82¢\82È\82¢\82æ\82¤\82¾\81D", Monnam(u.usteed));
1595             return 1;
1596         } else
1597             return domonnoise(u.usteed);
1598     }
1599
1600     if (u.dz) {
1601 /*JP
1602         pline("They won't hear you %s there.", u.dz < 0 ? "up" : "down");
1603 */
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É");
1605         return 0;
1606     }
1607
1608     if (u.dx == 0 && u.dy == 0) {
1609         /*
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,
1613          * etc...  --KAA
1614         if (u.umonnum == PM_ETTIN) {
1615             You("discover that your other head makes boring conversation.");
1616             return 1;
1617         }
1618          */
1619 /*JP
1620         pline("Talking to yourself is a bad habit for a dungeoneer.");
1621 */
1622         pline("\88ê\90l\8c¾\82Í\96À\8b{\92T\8c\9f\8eÒ\82Ì\88«\82¢\95È\82¾\81D");
1623         return 0;
1624     }
1625
1626     tx = u.ux + u.dx;
1627     ty = u.uy + u.dy;
1628
1629     if (!isok(tx, ty))
1630         return 0;
1631
1632     mtmp = m_at(tx, ty);
1633
1634     if ((!mtmp || mtmp->mundetected)
1635         && (otmp = vobj_at(tx, ty)) != 0 && otmp->otyp == STATUE) {
1636         /* Talking to a statue */
1637         if (!Blind) {
1638 #if 0 /*JP:T*/
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");
1642 #else
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");
1645 #endif
1646         }
1647         return 0;
1648     }
1649
1650     if (!mtmp || mtmp->mundetected || M_AP_TYPE(mtmp) == M_AP_FURNITURE
1651         || M_AP_TYPE(mtmp) == M_AP_OBJECT)
1652         return 0;
1653
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))
1659 /*JP
1660             pline("%s seems not to notice you.", Monnam(mtmp));
1661 */
1662             pline("%s\82Í\82 \82È\82½\82É\8bC\82ª\82Â\82¢\82Ä\82¢\82È\82¢\82æ\82¤\82¾\81D", Monnam(mtmp));
1663         return 0;
1664     }
1665
1666     /* if this monster is waiting for something, prod it into action */
1667     mtmp->mstrategy &= ~STRAT_WAITMASK;
1668
1669     if (mtmp->mtame && mtmp->meating) {
1670         if (!canspotmon(mtmp))
1671             map_invisible(mtmp->mx, mtmp->my);
1672 /*JP
1673         pline("%s is eating noisily.", Monnam(mtmp));
1674 */
1675         pline("%s\82Í\83o\83\8a\83o\83\8a\82Æ\95¨\82ð\90H\82×\82Ä\82¢\82é\81D", Monnam(mtmp));
1676         return 0;
1677     }
1678
1679     return domonnoise(mtmp);
1680 }
1681
1682 #ifdef USER_SOUNDS
1683
1684 extern void FDECL(play_usersound, (const char *, int));
1685
1686 typedef struct audio_mapping_rec {
1687     struct nhregex *regex;
1688     char *filename;
1689     int volume;
1690     struct audio_mapping_rec *next;
1691 } audio_mapping;
1692
1693 static audio_mapping *soundmap = 0;
1694
1695 char *sounddir = ".";
1696
1697 /* adds a sound file mapping, returns 0 on failure, 1 on success */
1698 int
1699 add_sound_mapping(mapping)
1700 const char *mapping;
1701 {
1702     char text[256];
1703     char filename[256];
1704     char filespec[256];
1705     int volume;
1706
1707     if (sscanf(mapping, "MESG \"%255[^\"]\"%*[\t ]\"%255[^\"]\" %d", text,
1708                filename, &volume) == 3) {
1709         audio_mapping *new_map;
1710
1711         if (strlen(sounddir) + strlen(filename) > 254) {
1712             raw_print("sound file name too long");
1713             return 0;
1714         }
1715         Sprintf(filespec, "%s/%s", sounddir, filename);
1716
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;
1723
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);
1728                 free(new_map);
1729                 return 0;
1730             } else {
1731                 soundmap = new_map;
1732             }
1733         } else {
1734             Sprintf(text, "cannot read %.243s", filespec);
1735             raw_print(text);
1736             return 0;
1737         }
1738     } else {
1739         raw_print("syntax error in SOUND");
1740         return 0;
1741     }
1742
1743     return 1;
1744 }
1745
1746 void
1747 play_sound_for_message(msg)
1748 const char *msg;
1749 {
1750     audio_mapping *cursor = soundmap;
1751
1752     while (cursor) {
1753         if (regex_match(msg, cursor->regex)) {
1754             play_usersound(cursor->filename, cursor->volume);
1755         }
1756         cursor = cursor->next;
1757     }
1758 }
1759
1760 #endif /* USER_SOUNDS */
1761
1762 /*sounds.c*/