OSDN Git Service

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