OSDN Git Service

fix spacing
[jnethack/source.git] / src / pline.c
1 /* NetHack 3.6  pline.c $NHDT-Date: 1432512770 2015/05/25 00:12:50 $  $NHDT-Branch: master $:$NHDT-Revision: 1.42 $ */
2 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
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-2016            */
8 /* JNetHack may be freely redistributed.  See license for details. */
9
10 #define NEED_VARARGS /* Uses ... */ /* comment line for pre-compiled headers \
11                                        */
12 #include "hack.h"
13
14 static boolean no_repeat = FALSE;
15 static char prevmsg[BUFSZ];
16
17 static char *FDECL(You_buf, (int));
18
19 /*VARARGS1*/
20 /* Note that these declarations rely on knowledge of the internals
21  * of the variable argument handling stuff in "tradstdc.h"
22  */
23
24 #if defined(USE_STDARG) || defined(USE_VARARGS)
25 static void FDECL(vpline, (const char *, va_list));
26
27 void pline
28 VA_DECL(const char *, line)
29 {
30     VA_START(line);
31     VA_INIT(line, char *);
32     vpline(line, VA_ARGS);
33     VA_END();
34 }
35
36 # ifdef USE_STDARG
37 static void
38 vpline(const char *line, va_list the_args)
39 # else
40 static void
41 vpline(line, the_args)
42 const char *line;
43 va_list the_args;
44 # endif
45
46 #else /* USE_STDARG | USE_VARARG */
47
48 # define vpline pline
49
50 void pline
51 VA_DECL(const char *, line)
52 #endif /* USE_STDARG | USE_VARARG */
53 {       /* start of vpline() or of nested block in USE_OLDARG's pline() */
54     char pbuf[3 * BUFSZ];
55     int ln;
56     xchar msgtyp;
57     /* Do NOT use VA_START and VA_END in here... see above */
58
59     if (!line || !*line)
60         return;
61 #ifdef HANGUPHANDLING
62     if (program_state.done_hup)
63         return;
64 #endif
65     if (program_state.wizkit_wishing)
66         return;
67
68     if (index(line, '%')) {
69         Vsprintf(pbuf, line, VA_ARGS);
70         line = pbuf;
71     }
72     if ((ln = (int) strlen(line)) > BUFSZ - 1) {
73         if (line != pbuf)                          /* no '%' was present */
74             (void) strncpy(pbuf, line, BUFSZ - 1); /* caveat: unterminated */
75         /* truncate, preserving the final 3 characters:
76            "___ extremely long text" -> "___ extremely l...ext"
77            (this may be suboptimal if overflow is less than 3) */
78         (void) strncpy(pbuf + BUFSZ - 1 - 6, "...", 3);
79         /* avoid strncpy; buffers could overlap if excess is small */
80         pbuf[BUFSZ - 1 - 3] = line[ln - 3];
81         pbuf[BUFSZ - 1 - 2] = line[ln - 2];
82         pbuf[BUFSZ - 1 - 1] = line[ln - 1];
83         pbuf[BUFSZ - 1] = '\0';
84         line = pbuf;
85     }
86     if (!iflags.window_inited) {
87         raw_print(line);
88         iflags.last_msg = PLNMSG_UNKNOWN;
89         return;
90     }
91 #ifndef MAC
92     if (no_repeat && !strcmp(line, toplines))
93         return;
94 #endif /* MAC */
95     if (vision_full_recalc)
96         vision_recalc(0);
97     if (u.ux)
98         flush_screen(1); /* %% */
99     msgtyp = msgtype_type(line);
100     if (msgtyp == MSGTYP_NOSHOW) return;
101     if (msgtyp == MSGTYP_NOREP && !strcmp(line, prevmsg)) return;
102     putstr(WIN_MESSAGE, 0, line);
103     /* this gets cleared after every pline message */
104     iflags.last_msg = PLNMSG_UNKNOWN;
105     strncpy(prevmsg, line, BUFSZ);
106     if (msgtyp == MSGTYP_STOP) display_nhwindow(WIN_MESSAGE, TRUE); /* --more-- */
107
108 #if !(defined(USE_STDARG) || defined(USE_VARARGS))
109     /* provide closing brace for the nested block
110        which immediately follows USE_OLDARGS's VA_DECL() */
111     VA_END();
112 #endif
113 }
114
115 /*VARARGS1*/
116 void Norep
117 VA_DECL(const char *, line)
118 {
119     VA_START(line);
120     VA_INIT(line, const char *);
121     no_repeat = TRUE;
122     vpline(line, VA_ARGS);
123     no_repeat = FALSE;
124     VA_END();
125     return;
126 }
127
128 /* work buffer for You(), &c and verbalize() */
129 static char *you_buf = 0;
130 static int you_buf_siz = 0;
131
132 static char *
133 You_buf(siz)
134 int siz;
135 {
136     if (siz > you_buf_siz) {
137         if (you_buf)
138             free((genericptr_t) you_buf);
139         you_buf_siz = siz + 10;
140         you_buf = (char *) alloc((unsigned) you_buf_siz);
141     }
142     return you_buf;
143 }
144
145 void
146 free_youbuf()
147 {
148     if (you_buf)
149         free((genericptr_t) you_buf), you_buf = (char *) 0;
150     you_buf_siz = 0;
151 }
152
153 /* `prefix' must be a string literal, not a pointer */
154 #define YouPrefix(pointer, prefix, text) \
155     Strcpy((pointer = You_buf((int) (strlen(text) + sizeof prefix))), prefix)
156
157 #define YouMessage(pointer, prefix, text) \
158     strcat((YouPrefix(pointer, prefix, text), pointer), text)
159
160 /*VARARGS1*/
161 void You
162 VA_DECL(const char *, line)
163 {
164     char *tmp;
165     VA_START(line);
166     VA_INIT(line, const char *);
167 /*JP
168     vpline(YouMessage(tmp, "You ", line), VA_ARGS);
169 */
170     vpline(YouMessage(tmp, "\82 \82È\82½\82Í", line), VA_ARGS);
171     VA_END();
172 }
173
174 /*VARARGS1*/
175 void Your
176 VA_DECL(const char *, line)
177 {
178     char *tmp;
179     VA_START(line);
180     VA_INIT(line, const char *);
181 /*JP
182     vpline(YouMessage(tmp, "Your ", line), VA_ARGS);
183 */
184     vpline(YouMessage(tmp, "\82 \82È\82½\82Ì", line), VA_ARGS);
185     VA_END();
186 }
187
188 /*VARARGS1*/
189 void You_feel
190 VA_DECL(const char *, line)
191 {
192     char *tmp;
193     VA_START(line);
194     VA_INIT(line, const char *);
195     if (Unaware)
196 /*JP
197         YouPrefix(tmp, "You dream that you feel ", line);
198 */
199         YouPrefix(tmp, "\82 \82È\82½\82Í\96²\82Ì\92\86\82Å", line);
200     else
201 /*JP
202         YouPrefix(tmp, "You feel ", line);
203 */
204         YouPrefix(tmp, "\82 \82È\82½\82Í", line);
205     vpline(strcat(tmp, line), VA_ARGS);
206     VA_END();
207 }
208
209 /*VARARGS1*/
210 void You_cant
211 VA_DECL(const char *, line)
212 {
213     char *tmp;
214     VA_START(line);
215     VA_INIT(line, const char *);
216 /*JP
217     vpline(YouMessage(tmp, "You can't ", line), VA_ARGS);
218 */
219     vpline(YouMessage(tmp, "\82 \82È\82½\82Í", line), VA_ARGS);
220     VA_END();
221 }
222
223 /*VARARGS1*/
224 void pline_The
225 VA_DECL(const char *, line)
226 {
227     char *tmp;
228     VA_START(line);
229     VA_INIT(line, const char *);
230 /*JP
231     vpline(YouMessage(tmp, "The ", line), VA_ARGS);
232 */
233     vpline(YouMessage(tmp, "", line), VA_ARGS);
234     VA_END();
235 }
236
237 /*VARARGS1*/
238 void There
239 VA_DECL(const char *, line)
240 {
241     char *tmp;
242     VA_START(line);
243     VA_INIT(line, const char *);
244 /*JP
245     vpline(YouMessage(tmp, "There ", line), VA_ARGS);
246 */
247     vpline(YouMessage(tmp, "", line), VA_ARGS);
248     VA_END();
249 }
250
251 /*VARARGS1*/
252 void You_hear
253 VA_DECL(const char *, line)
254 {
255     char *tmp;
256 #if 1 /*JP*/
257         char *adj;
258         char *p;
259 #endif
260
261     if (Deaf || !flags.acoustics)
262         return;
263     VA_START(line);
264     VA_INIT(line, const char *);
265 #if 0 /*JP*/
266     if (Underwater)
267         YouPrefix(tmp, "You barely hear ", line);
268     else if (Unaware)
269         YouPrefix(tmp, "You dream that you hear ", line);
270     else
271         YouPrefix(tmp, "You hear ", line);
272     vpline(strcat(tmp, line), VA_ARGS);
273 #else
274     if (Underwater)
275         adj = "\82©\82·\82©\82É";
276     else if (Unaware)
277         adj = "\96²\82Ì\92\86\82Å";
278     else
279         adj = "";
280     tmp = You_buf(strlen(adj) + strlen(line) + sizeof("\82 \82È\82½\82Í   "));
281
282     p = (char *)strstr(line, "\95·\82±") ;
283     if (p == NULL)
284         Strcpy(tmp, "\82 \82È\82½\82Í");
285     else
286         Strcpy(tmp, "");
287     if (p != NULL || (p = (char *)strstr(line, "\95·\82¢")) != NULL){
288         strncat(tmp, line, (p - line));
289         strcat(tmp, adj);
290         strcat(tmp, p);
291     } else {
292         Strcat(tmp, line);
293     }
294     vpline(tmp, VA_ARGS);
295 #endif
296     VA_END();
297 }
298
299 /*VARARGS1*/
300 void You_see
301 VA_DECL(const char *, line)
302 {
303     char *tmp;
304
305     VA_START(line);
306     VA_INIT(line, const char *);
307     if (Unaware)
308 /*JP
309         YouPrefix(tmp, "You dream that you see ", line);
310 */
311         YouPrefix(tmp, "\82 \82È\82½\82Í\96²\82Ì\92\86\82Å", line);
312 #if 0 /*JP*//*\82±\82±\82Í\8cÄ\82Ñ\8fo\82µ\8c³\82Å\8f\88\97\9d\82·\82é?*/
313     else if (Blind) /* caller should have caught this... */
314         YouPrefix(tmp, "You sense ", line);
315 #endif
316     else
317 /*JP
318         YouPrefix(tmp, "You see ", line);
319 */
320         YouPrefix(tmp, "\82 \82È\82½\82Í", line);
321     vpline(strcat(tmp, line), VA_ARGS);
322     VA_END();
323 }
324
325 /* Print a message inside double-quotes.
326  * The caller is responsible for checking deafness.
327  * Gods can speak directly to you in spite of deafness.
328  */
329 /*VARARGS1*/
330 void verbalize
331 VA_DECL(const char *, line)
332 {
333     char *tmp;
334
335     VA_START(line);
336     VA_INIT(line, const char *);
337 #if 0 /*JP*/
338     tmp = You_buf((int) strlen(line) + sizeof "\"\"");
339     Strcpy(tmp, "\"");
340     Strcat(tmp, line);
341     Strcat(tmp, "\"");
342 #else
343     tmp = You_buf((int) strlen(line) + sizeof "\81u\81v");
344     Strcpy(tmp, "\81u");
345     Strcat(tmp, line);
346     Strcat(tmp, "\81v");
347 #endif
348     vpline(tmp, VA_ARGS);
349     VA_END();
350 }
351
352 /*VARARGS1*/
353 /* Note that these declarations rely on knowledge of the internals
354  * of the variable argument handling stuff in "tradstdc.h"
355  */
356
357 #if defined(USE_STDARG) || defined(USE_VARARGS)
358 static void FDECL(vraw_printf, (const char *, va_list));
359
360 void raw_printf
361 VA_DECL(const char *, line)
362 {
363     VA_START(line);
364     VA_INIT(line, char *);
365     vraw_printf(line, VA_ARGS);
366     VA_END();
367 }
368
369 # ifdef USE_STDARG
370 static void
371 vraw_printf(const char *line, va_list the_args)
372 # else
373 static void
374 vraw_printf(line, the_args)
375 const char *line;
376 va_list the_args;
377 # endif
378
379 #else /* USE_STDARG | USE_VARARG */
380
381 void raw_printf
382 VA_DECL(const char *, line)
383 #endif
384 {
385     char pbuf[3 * BUFSZ];
386     int ln;
387     /* Do NOT use VA_START and VA_END in here... see above */
388
389     if (index(line, '%')) {
390         Vsprintf(pbuf, line, VA_ARGS);
391         line = pbuf;
392     }
393     if ((ln = (int) strlen(line)) > BUFSZ - 1) {
394         if (line != pbuf)
395             line = strncpy(pbuf, line, BUFSZ - 1);
396         /* unlike pline, we don't futz around to keep last few chars */
397         pbuf[BUFSZ - 1] = '\0'; /* terminate strncpy or truncate vsprintf */
398     }
399     raw_print(line);
400 #if !(defined(USE_STDARG) || defined(USE_VARARGS))
401     VA_END(); /* (see vpline) */
402 #endif
403 }
404
405 /*VARARGS1*/
406 void impossible
407 VA_DECL(const char *, s)
408 {
409     char pbuf[2 * BUFSZ];
410     VA_START(s);
411     VA_INIT(s, const char *);
412     if (program_state.in_impossible)
413         panic("impossible called impossible");
414
415     program_state.in_impossible = 1;
416     Vsprintf(pbuf, s, VA_ARGS);
417     pbuf[BUFSZ - 1] = '\0'; /* sanity */
418     paniclog("impossible", pbuf);
419     pline("%s", pbuf);
420 /*JP
421     pline("Program in disorder - perhaps you'd better #quit.");
422 */
423     pline("\83v\83\8d\83O\83\89\83\80\82É\8fá\8aQ\94­\90¶ - #quit\82µ\82½\82Ù\82¤\82ª\82æ\82³\82»\82¤\82¾\81D");
424     program_state.in_impossible = 0;
425     VA_END();
426 }
427
428 const char *
429 align_str(alignment)
430 aligntyp alignment;
431 {
432     switch ((int) alignment) {
433     case A_CHAOTIC:
434 /*JP
435         return "chaotic";
436 */
437         return "\8d¬\93×";
438     case A_NEUTRAL:
439 /*JP
440         return "neutral";
441 */
442         return "\92\86\97§";
443     case A_LAWFUL:
444 /*JP
445         return "lawful";
446 */
447         return "\92\81\8f\98";
448     case A_NONE:
449 /*JP
450         return "unaligned";
451 */
452         return "\96³\90S";
453     }
454 /*JP
455     return "unknown";
456 */
457     return "\95s\96¾";
458 }
459
460 void
461 mstatusline(mtmp)
462 register struct monst *mtmp;
463 {
464     aligntyp alignment = mon_aligntyp(mtmp);
465     char info[BUFSZ], monnambuf[BUFSZ];
466
467     info[0] = 0;
468     if (mtmp->mtame) {
469 /*JP
470         Strcat(info, ", tame");
471 */
472         Strcat(info, ", \8e\94\82¢\82È\82ç\82³\82ê\82Ä\82¢\82é");
473         if (wizard) {
474             Sprintf(eos(info), " (%d", mtmp->mtame);
475             if (!mtmp->isminion)
476                 Sprintf(eos(info), "; hungry %ld; apport %d",
477                         EDOG(mtmp)->hungrytime, EDOG(mtmp)->apport);
478             Strcat(info, ")");
479         }
480     } else if (mtmp->mpeaceful)
481 /*JP
482         Strcat(info, ", peaceful");
483 */
484         Strcat(info, ", \97F\8dD\93I");
485     if (mtmp->cham >= LOW_PM && mtmp->data != &mons[mtmp->cham])
486         /* don't reveal the innate form (chameleon, vampire, &c),
487            just expose the fact that this current form isn't it */
488 /*JP
489         Strcat(info, ", shapechanger");
490 */
491         Strcat(info, ", \95Ï\89»");
492       
493     /* pets eating mimic corpses mimic while eating, so this comes first */
494     if (mtmp->meating)
495 /*JP
496         Strcat(info, ", eating");
497 */
498         Strcat(info, ", \90H\8e\96\92\86");
499     /* a stethoscope exposes mimic before getting here so this
500        won't be relevant for it, but wand of probing doesn't */
501     if (mtmp->m_ap_type)
502 #if 0 /*JP*/
503         Sprintf(eos(info), ", mimicking %s",
504                 (mtmp->m_ap_type == M_AP_FURNITURE)
505                     ? an(defsyms[mtmp->mappearance].explanation)
506                     : (mtmp->m_ap_type == M_AP_OBJECT)
507                           ? ((mtmp->mappearance == GOLD_PIECE)
508                                  ? "gold"
509                                  : an(simple_typename(mtmp->mappearance)))
510                           : (mtmp->m_ap_type == M_AP_MONSTER)
511                                 ? an(mons[mtmp->mappearance].mname)
512                                 : something); /* impossible... */
513 #else
514         Sprintf(eos(info), ", %s\82Ì\82Ü\82Ë\82ð\82µ\82Ä\82¢\82é",
515                 (mtmp->m_ap_type == M_AP_FURNITURE)
516                     ? an(defsyms[mtmp->mappearance].explanation)
517                     : (mtmp->m_ap_type == M_AP_OBJECT)
518                           ? ((mtmp->mappearance == GOLD_PIECE)
519                                  ? "\8bà\89Ý"
520                                  : an(simple_typename(mtmp->mappearance)))
521                           : (mtmp->m_ap_type == M_AP_MONSTER)
522                                 ? an(mons[mtmp->mappearance].mname)
523                                 : something); /* impossible... */
524 #endif
525     if (mtmp->mcan)
526 /*JP
527         Strcat(info, ", cancelled");
528 */
529         Strcat(info, ", \96³\97Í");
530     if (mtmp->mconf)
531 /*JP
532         Strcat(info, ", confused");
533 */
534         Strcat(info, ", \8d¬\97\90\8fó\91Ô");
535     if (mtmp->mblinded || !mtmp->mcansee)
536 /*JP
537         Strcat(info, ", blind");
538 */
539         Strcat(info, ", \96Ó\96Ú");
540     if (mtmp->mstun)
541 /*JP
542         Strcat(info, ", stunned");
543 */
544         Strcat(info, ", \82­\82ç\82­\82ç\8fó\91Ô");
545     if (mtmp->msleeping)
546 /*JP
547         Strcat(info, ", asleep");
548 */
549         Strcat(info, ", \90\87\96°\8fó\91Ô");
550 #if 0 /* unfortunately mfrozen covers temporary sleep and being busy \
551          (donning armor, for instance) as well as paralysis */
552         else if (mtmp->mfrozen)   Strcat(info, ", paralyzed");
553 #else
554     else if (mtmp->mfrozen || !mtmp->mcanmove)
555 /*JP
556         Strcat(info, ", can't move");
557 */
558         Strcat(info, ", \93®\82¯\82È\82¢");
559 #endif
560     /* [arbitrary reason why it isn't moving] */
561     else if (mtmp->mstrategy & STRAT_WAITMASK)
562 /*JP
563         Strcat(info, ", meditating");
564 */
565         Strcat(info, ", \96»\91z\92\86");
566     if (mtmp->mflee)
567 /*JP
568         Strcat(info, ", scared");
569 */
570         Strcat(info, ", \8b¯\82¦\82Ä\82¢\82é");
571     if (mtmp->mtrapped)
572 /*JP
573         Strcat(info, ", trapped");
574 */
575         Strcat(info, ", ã©\82É\82©\82©\82Á\82Ä\82¢\82é");
576     if (mtmp->mspeed)
577 #if 0 /*JP:T*/
578         Strcat(info, mtmp->mspeed == MFAST ? ", fast" : mtmp->mspeed == MSLOW
579                                                             ? ", slow"
580                                                             : ", ???? speed");
581 #else
582         Strcat(info, mtmp->mspeed == MFAST ? ", \91f\91\81\82¢" : mtmp->mspeed == MSLOW
583                                                             ? ", \92x\82¢"
584                                                             : ", \91¬\93x\95s\96¾");
585 #endif
586     if (mtmp->mundetected)
587 /*JP
588         Strcat(info, ", concealed");
589 */
590         Strcat(info, ", \89B\82ê\82Ä\82¢\82é");
591     if (mtmp->minvis)
592 /*JP
593         Strcat(info, ", invisible");
594 */
595         Strcat(info, ", \95s\89Â\8e\8b");
596     if (mtmp == u.ustuck)
597 #if 0 /*JP:T*/
598         Strcat(info, sticks(youmonst.data)
599                          ? ", held by you"
600                          : !u.uswallow ? ", holding you"
601                                        : attacktype_fordmg(u.ustuck->data,
602                                                            AT_ENGL, AD_DGST)
603                                              ? ", digesting you"
604                                              : is_animal(u.ustuck->data)
605                                                    ? ", swallowing you"
606                                                    : ", engulfing you");
607 #else
608       Strcat(info,  sticks(youmonst.data)
609                          ? ", \82 \82È\82½\82ª\92Í\82Ü\82¦\82Ä\82¢\82é"
610                          : !u.uswallow ? ", \92Í\82Ü\82¦\82Ä\82¢\82é"
611                                        : attacktype_fordmg(u.ustuck->data,
612                                                            AT_ENGL, AD_DGST)
613                                              ? ", \8fÁ\89»\82µ\82Ä\82¢\82é"
614                                              : is_animal(u.ustuck->data)
615                                                    ? ", \88ù\82Ý\8d\9e\82ñ\82Å\82¢\82é"
616                                                    : ", \8aª\82«\8d\9e\82ñ\82Å\82¢\82é");
617 #endif
618     if (mtmp == u.usteed)
619 /*JP
620         Strcat(info, ", carrying you");
621 */
622         Strcat(info, ", \82 \82È\82½\82ð\8fæ\82¹\82Ä\82¢\82é");
623
624     /* avoid "Status of the invisible newt ..., invisible" */
625     /* and unlike a normal mon_nam, use "saddled" even if it has a name */
626     Strcpy(monnambuf, x_monnam(mtmp, ARTICLE_THE, (char *) 0,
627                                (SUPPRESS_IT | SUPPRESS_INVISIBLE), FALSE));
628
629 /*JP
630     pline("Status of %s (%s):  Level %d  HP %d(%d)  AC %d%s.", monnambuf,
631 */
632     pline("%s\82Ì\8fó\91Ô (%s)\81F Level %d  HP %d(%d)  AC %d%s", monnambuf,
633           align_str(alignment), mtmp->m_lev, mtmp->mhp, mtmp->mhpmax,
634           find_mac(mtmp), info);
635 }
636
637 void
638 ustatusline()
639 {
640     char info[BUFSZ];
641
642     info[0] = '\0';
643     if (Sick) {
644 #if 0 /*JP*/
645         Strcat(info, ", dying from");
646         if (u.usick_type & SICK_VOMITABLE)
647             Strcat(info, " food poisoning");
648         if (u.usick_type & SICK_NONVOMITABLE) {
649             if (u.usick_type & SICK_VOMITABLE)
650                 Strcat(info, " and");
651             Strcat(info, " illness");
652         }
653 #else
654         Strcat(info, ", ");
655         if (u.usick_type & SICK_VOMITABLE)
656             Strcat(info, "\90H\92\86\93Å");
657         if (u.usick_type & SICK_NONVOMITABLE) {
658             if (u.usick_type & SICK_VOMITABLE)
659                 Strcat(info, "\82Æ");
660             Strcat(info, "\95a\8bC");
661         }
662         Strcat(info, "\82Å\8e\80\82É\82Â\82Â\82 \82é");
663 #endif
664     }
665     if (Stoned)
666 /*JP
667         Strcat(info, ", solidifying");
668 */
669         Strcat(info, ", \90Î\89»\82µ\82Â\82Â\82 \82é");
670     if (Slimed)
671 /*JP
672         Strcat(info, ", becoming slimy");
673 */
674         Strcat(info, ", \83X\83\89\83C\83\80\82É\82È\82è\82Â\82Â\82 \82é");
675     if (Strangled)
676 /*JP
677         Strcat(info, ", being strangled");
678 */
679         Strcat(info, ", \8eñ\82ð\8di\82ß\82ç\82ê\82Ä\82¢\82é");
680     if (Vomiting)
681 #if 0 /*JP*/
682         Strcat(info, ", nauseated"); /* !"nauseous" */
683 #else
684         Strcat(info, ", \93f\82«\8bC\82ª\82·\82é");
685 #endif
686     if (Confusion)
687 /*JP
688         Strcat(info, ", confused");
689 */
690         Strcat(info, ", \8d¬\97\90\8fó\91Ô");
691     if (Blind) {
692 #if 0 /*JP*/
693         Strcat(info, ", blind");
694         if (u.ucreamed) {
695             if ((long) u.ucreamed < Blinded || Blindfolded
696                 || !haseyes(youmonst.data))
697                 Strcat(info, ", cover");
698             Strcat(info, "ed by sticky goop");
699         } /* note: "goop" == "glop"; variation is intentional */
700 #else
701         Strcat(info, ", ");
702         if (u.ucreamed) {
703             Strcat(info, "\82Ë\82Î\82Ë\82Î\82×\82Æ\82Â\82­\82à\82Ì\82Å");
704             if ((long)u.ucreamed < Blinded || Blindfolded
705                 || !haseyes(youmonst.data))
706               Strcat(info, "\95¢\82í\82ê\82Ä");
707         }
708         Strcat(info, "\96Ó\96Ú\8fó\91Ô");
709 #endif
710     }
711     if (Stunned)
712 /*JP
713         Strcat(info, ", stunned");
714 */
715         Strcat(info, ", \82­\82ç\82­\82ç\8fó\91Ô");
716     if (!u.usteed && Wounded_legs) {
717         const char *what = body_part(LEG);
718         if ((Wounded_legs & BOTH_SIDES) == BOTH_SIDES)
719             what = makeplural(what);
720 /*JP
721         Sprintf(eos(info), ", injured %s", what);
722 */
723         Sprintf(eos(info), ", %s\82É\82¯\82ª\82ð\82µ\82Ä\82¢\82é", what);
724     }
725     if (Glib)
726 /*JP
727         Sprintf(eos(info), ", slippery %s", makeplural(body_part(HAND)));
728 */
729         Sprintf(eos(info), ", %s\82ª\82Ê\82é\82Ê\82é", makeplural(body_part(HAND)));
730     if (u.utrap)
731 /*JP
732         Strcat(info, ", trapped");
733 */
734         Strcat(info, ", ã©\82É\82©\82©\82Á\82Ä\82¢\82é");
735     if (Fast)
736 /*JP
737         Strcat(info, Very_fast ? ", very fast" : ", fast");
738 */
739         Strcat(info, Very_fast ? ", \82Æ\82Ä\82à\91f\91\81\82¢" : ", \91f\91\81\82¢");
740     if (u.uundetected)
741 /*JP
742         Strcat(info, ", concealed");
743 */
744         Strcat(info, ", \89B\82ê\82Ä\82¢\82é");
745     if (Invis)
746 /*JP
747         Strcat(info, ", invisible");
748 */
749         Strcat(info, ", \95s\89Â\8e\8b");
750     if (u.ustuck) {
751 #if 0 /*JP*/
752         if (sticks(youmonst.data))
753             Strcat(info, ", holding ");
754         else
755             Strcat(info, ", held by ");
756         Strcat(info, mon_nam(u.ustuck));
757 #else
758         Strcat(info, ", ");
759         Strcat(info, mon_nam(u.ustuck));
760         if (sticks(youmonst.data))
761             Strcat(info, "\82ð\92Í\82Ü\82¦\82Ä\82¢\82é");
762         else
763             Strcat(info, "\82É\92Í\82Ü\82¦\82ç\82ê\82Ä\82¢\82é");
764 #endif
765     }
766
767 /*JP
768     pline("Status of %s (%s%s):  Level %d  HP %d(%d)  AC %d%s.", plname,
769 */
770     pline("%s\82Ì\8fó\91Ô (%s %s)\81F Level %d  HP %d(%d)  AC %d%s", plname,
771           (u.ualign.record >= 20)
772 /*JP
773               ? "piously "
774 */
775               ? "\8chåi" 
776               : (u.ualign.record > 13)
777 /*JP
778                     ? "devoutly "
779 */
780                     ? "\90M\90S\90[\82¢" 
781                     : (u.ualign.record > 8)
782 /*JP
783                           ? "fervently "
784 */
785                           ? "\94M\97ó" 
786                           : (u.ualign.record > 3)
787 /*JP
788                                 ? "stridently "
789 */
790                                 ? "\90º\82Ì\82©\82ñ\8d\82\82¢" 
791                                 : (u.ualign.record == 3)
792                                       ? ""
793                                       : (u.ualign.record >= 1)
794 /*JP
795                                             ? "haltingly "
796 */
797                                             ? "\97L\96¼\96³\8eÀ" 
798                                             : (u.ualign.record == 0)
799 /*JP
800                                                   ? "nominally "
801 */
802                                                   ? "\96À\98f" 
803 /*JP
804                                                   : "insufficiently ",
805 */
806                                                   : "\95s\93K\93\96",
807           align_str(u.ualign.type),
808           Upolyd ? mons[u.umonnum].mlevel : u.ulevel, Upolyd ? u.mh : u.uhp,
809           Upolyd ? u.mhmax : u.uhpmax, u.uac, info);
810 }
811
812 void
813 self_invis_message()
814 {
815 #if 0 /*JP:T*/
816     pline("%s %s.",
817           Hallucination ? "Far out, man!  You" : "Gee!  All of a sudden, you",
818           See_invisible ? "can see right through yourself"
819                         : "can't see yourself");
820 #else
821     pline("%s\82 \82È\82½\82Í%s\81D",
822           Hallucination ? "\83\8f\81[\83I\81I" : "\82°\81I\93Ë\91R",
823           See_invisible ? "\8e©\95ª\8e©\90g\82ª\82¿\82á\82ñ\82Æ\8c©\82¦\82È\82­\82È\82Á\82½"
824                         : "\8e©\95ª\8e©\90g\82ª\8c©\82¦\82È\82­\82È\82Á\82½");
825 #endif
826 }
827
828 void
829 pudding_merge_message(otmp, otmp2)
830 struct obj *otmp;
831 struct obj *otmp2;
832 {
833     boolean visible =
834         cansee(otmp->ox, otmp->oy) || cansee(otmp2->ox, otmp2->oy);
835     boolean onfloor = otmp->where == OBJ_FLOOR || otmp2->where == OBJ_FLOOR;
836     boolean inpack = carried(otmp) || carried(otmp2);
837
838     /* the player will know something happened inside his own inventory */
839     if ((!Blind && visible) || inpack) {
840         if (Hallucination) {
841             if (onfloor) {
842 /*JP
843                 You_see("parts of the floor melting!");
844 */
845                 You_see("\8f°\82Ì\88ê\95\94\82ª\97n\82¯\82Ä\82¢\82é\82Ì\82ð\8c©\82½\81I");
846             } else if (inpack) {
847 /*JP
848                 Your("pack reaches out and grabs something!");
849 */
850                 Your("\82©\82Î\82ñ\82ª\8eè\82ð\90L\82Î\82µ\82Ä\89½\82©\82ð\82Â\82©\82ñ\82¾\81I");
851             }
852             /* even though we can see where they should be,
853              * they'll be out of our view (minvent or container)
854              * so don't actually show anything */
855         } else if (onfloor || inpack) {
856 #if 0 /*JP*/
857             pline("The %s coalesce%s.", makeplural(obj_typename(otmp->otyp)),
858                   inpack ? " inside your pack" : "");
859 #else
860             pline("%s\82ª%s\8d\87\91Ì\82µ\82½\81D", obj_typename(otmp->otyp),
861                   inpack ? "\82 \82È\82½\82Ì\82©\82Î\82ñ\82Ì\92\86\82Å" : "");
862 #endif
863         }
864     } else {
865 /*JP
866         You_hear("a faint sloshing sound.");
867 */
868         You_hear("\82©\82·\82©\82È\83o\83V\83\83\83o\83V\83\83\82Æ\82¢\82¤\89¹\82ð\95·\82¢\82½\81D");
869     }
870 }
871
872 /*pline.c*/