OSDN Git Service

finalize changelog
[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       
492     /* pets eating mimic corpses mimic while eating, so this comes first */
493     if (mtmp->meating)
494 /*JP
495         Strcat(info, ", eating");
496 */
497         Strcat(info, ", \90H\8e\96\92\86");
498     /* a stethoscope exposes mimic before getting here so this
499        won't be relevant for it, but wand of probing doesn't */
500     if (mtmp->m_ap_type)
501 #if 0 /*JP*/
502         Sprintf(eos(info), ", mimicking %s",
503                 (mtmp->m_ap_type == M_AP_FURNITURE)
504                     ? an(defsyms[mtmp->mappearance].explanation)
505                     : (mtmp->m_ap_type == M_AP_OBJECT)
506                           ? ((mtmp->mappearance == GOLD_PIECE)
507                                  ? "gold"
508                                  : an(simple_typename(mtmp->mappearance)))
509                           : (mtmp->m_ap_type == M_AP_MONSTER)
510                                 ? an(mons[mtmp->mappearance].mname)
511                                 : something); /* impossible... */
512 #else
513         Sprintf(eos(info), ", %s\82Ì\82Ü\82Ë\82ð\82µ\82Ä\82¢\82é",
514                 (mtmp->m_ap_type == M_AP_FURNITURE)
515                     ? an(defsyms[mtmp->mappearance].explanation)
516                     : (mtmp->m_ap_type == M_AP_OBJECT)
517                           ? ((mtmp->mappearance == GOLD_PIECE)
518                                  ? "\8bà\89Ý"
519                                  : an(simple_typename(mtmp->mappearance)))
520                           : (mtmp->m_ap_type == M_AP_MONSTER)
521                                 ? an(mons[mtmp->mappearance].mname)
522                                 : something); /* impossible... */
523 #endif
524     if (mtmp->mcan)
525 /*JP
526         Strcat(info, ", cancelled");
527 */
528         Strcat(info, ", \96³\97Í");
529     if (mtmp->mconf)
530 /*JP
531         Strcat(info, ", confused");
532 */
533         Strcat(info, ", \8d¬\97\90\8fó\91Ô");
534     if (mtmp->mblinded || !mtmp->mcansee)
535 /*JP
536         Strcat(info, ", blind");
537 */
538         Strcat(info, ", \96Ó\96Ú");
539     if (mtmp->mstun)
540 /*JP
541         Strcat(info, ", stunned");
542 */
543         Strcat(info, ", \82­\82ç\82­\82ç\8fó\91Ô");
544     if (mtmp->msleeping)
545 /*JP
546         Strcat(info, ", asleep");
547 */
548         Strcat(info, ", \90\87\96°\8fó\91Ô");
549 #if 0 /* unfortunately mfrozen covers temporary sleep and being busy \
550          (donning armor, for instance) as well as paralysis */
551         else if (mtmp->mfrozen)   Strcat(info, ", paralyzed");
552 #else
553     else if (mtmp->mfrozen || !mtmp->mcanmove)
554 /*JP
555         Strcat(info, ", can't move");
556 */
557         Strcat(info, ", \93®\82¯\82È\82¢");
558 #endif
559     /* [arbitrary reason why it isn't moving] */
560     else if (mtmp->mstrategy & STRAT_WAITMASK)
561 /*JP
562         Strcat(info, ", meditating");
563 */
564         Strcat(info, ", \96»\91z\92\86");
565     if (mtmp->mflee)
566 /*JP
567         Strcat(info, ", scared");
568 */
569         Strcat(info, ", \8b¯\82¦\82Ä\82¢\82é");
570     if (mtmp->mtrapped)
571 /*JP
572         Strcat(info, ", trapped");
573 */
574         Strcat(info, ", ã©\82É\82©\82©\82Á\82Ä\82¢\82é");
575     if (mtmp->mspeed)
576 #if 0 /*JP:T*/
577         Strcat(info, mtmp->mspeed == MFAST ? ", fast" : mtmp->mspeed == MSLOW
578                                                             ? ", slow"
579                                                             : ", ???? speed");
580 #else
581         Strcat(info, mtmp->mspeed == MFAST ? ", \91f\91\81\82¢" : mtmp->mspeed == MSLOW
582                                                             ? ", \92x\82¢"
583                                                             : ", \91¬\93x\95s\96¾");
584 #endif
585     if (mtmp->mundetected)
586 /*JP
587         Strcat(info, ", concealed");
588 */
589         Strcat(info, ", \89B\82ê\82Ä\82¢\82é");
590     if (mtmp->minvis)
591 /*JP
592         Strcat(info, ", invisible");
593 */
594         Strcat(info, ", \95s\89Â\8e\8b");
595     if (mtmp == u.ustuck)
596 #if 0 /*JP:T*/
597         Strcat(info, sticks(youmonst.data)
598                          ? ", held by you"
599                          : !u.uswallow ? ", holding you"
600                                        : attacktype_fordmg(u.ustuck->data,
601                                                            AT_ENGL, AD_DGST)
602                                              ? ", digesting you"
603                                              : is_animal(u.ustuck->data)
604                                                    ? ", swallowing you"
605                                                    : ", engulfing you");
606 #else
607       Strcat(info,  sticks(youmonst.data)
608                          ? ", \82 \82È\82½\82ª\92Í\82Ü\82¦\82Ä\82¢\82é"
609                          : !u.uswallow ? ", \92Í\82Ü\82¦\82Ä\82¢\82é"
610                                        : attacktype_fordmg(u.ustuck->data,
611                                                            AT_ENGL, AD_DGST)
612                                              ? ", \8fÁ\89»\82µ\82Ä\82¢\82é"
613                                              : is_animal(u.ustuck->data)
614                                                    ? ", \88ù\82Ý\8d\9e\82ñ\82Å\82¢\82é"
615                                                    : ", \8aª\82«\8d\9e\82ñ\82Å\82¢\82é");
616 #endif
617     if (mtmp == u.usteed)
618 /*JP
619         Strcat(info, ", carrying you");
620 */
621         Strcat(info, ", \82 \82È\82½\82ð\8fæ\82¹\82Ä\82¢\82é");
622
623     /* avoid "Status of the invisible newt ..., invisible" */
624     /* and unlike a normal mon_nam, use "saddled" even if it has a name */
625     Strcpy(monnambuf, x_monnam(mtmp, ARTICLE_THE, (char *) 0,
626                                (SUPPRESS_IT | SUPPRESS_INVISIBLE), FALSE));
627
628 /*JP
629     pline("Status of %s (%s):  Level %d  HP %d(%d)  AC %d%s.", monnambuf,
630 */
631     pline("%s\82Ì\8fó\91Ô (%s)\81F Level %d  HP %d(%d)  AC %d%s", monnambuf,
632           align_str(alignment), mtmp->m_lev, mtmp->mhp, mtmp->mhpmax,
633           find_mac(mtmp), info);
634 }
635
636 void
637 ustatusline()
638 {
639     char info[BUFSZ];
640
641     info[0] = '\0';
642     if (Sick) {
643 #if 0 /*JP*/
644         Strcat(info, ", dying from");
645         if (u.usick_type & SICK_VOMITABLE)
646             Strcat(info, " food poisoning");
647         if (u.usick_type & SICK_NONVOMITABLE) {
648             if (u.usick_type & SICK_VOMITABLE)
649                 Strcat(info, " and");
650             Strcat(info, " illness");
651         }
652 #else
653         Strcat(info, ", ");
654         if (u.usick_type & SICK_VOMITABLE)
655             Strcat(info, "\90H\92\86\93Å");
656         if (u.usick_type & SICK_NONVOMITABLE) {
657             if (u.usick_type & SICK_VOMITABLE)
658                 Strcat(info, "\82Æ");
659             Strcat(info, "\95a\8bC");
660         }
661         Strcat(info, "\82Å\8e\80\82É\82Â\82Â\82 \82é");
662 #endif
663     }
664     if (Stoned)
665 /*JP
666         Strcat(info, ", solidifying");
667 */
668         Strcat(info, ", \90Î\89»\82µ\82Â\82Â\82 \82é");
669     if (Slimed)
670 /*JP
671         Strcat(info, ", becoming slimy");
672 */
673         Strcat(info, ", \83X\83\89\83C\83\80\82É\82È\82è\82Â\82Â\82 \82é");
674     if (Strangled)
675 /*JP
676         Strcat(info, ", being strangled");
677 */
678         Strcat(info, ", \8eñ\82ð\8di\82ß\82ç\82ê\82Ä\82¢\82é");
679     if (Vomiting)
680 #if 0 /*JP*/
681         Strcat(info, ", nauseated"); /* !"nauseous" */
682 #else
683         Strcat(info, ", \93f\82«\8bC\82ª\82·\82é");
684 #endif
685     if (Confusion)
686 /*JP
687         Strcat(info, ", confused");
688 */
689         Strcat(info, ", \8d¬\97\90\8fó\91Ô");
690     if (Blind) {
691 #if 0 /*JP*/
692         Strcat(info, ", blind");
693         if (u.ucreamed) {
694             if ((long) u.ucreamed < Blinded || Blindfolded
695                 || !haseyes(youmonst.data))
696                 Strcat(info, ", cover");
697             Strcat(info, "ed by sticky goop");
698         } /* note: "goop" == "glop"; variation is intentional */
699 #else
700         Strcat(info, ", ");
701         if (u.ucreamed) {
702             Strcat(info, "\82Ë\82Î\82Ë\82Î\82×\82Æ\82Â\82­\82à\82Ì\82Å");
703             if ((long)u.ucreamed < Blinded || Blindfolded
704                 || !haseyes(youmonst.data))
705               Strcat(info, "\95¢\82í\82ê\82Ä");
706         }
707         Strcat(info, "\96Ó\96Ú\8fó\91Ô");
708 #endif
709     }
710     if (Stunned)
711 /*JP
712         Strcat(info, ", stunned");
713 */
714         Strcat(info, ", \82­\82ç\82­\82ç\8fó\91Ô");
715     if (!u.usteed && Wounded_legs) {
716         const char *what = body_part(LEG);
717         if ((Wounded_legs & BOTH_SIDES) == BOTH_SIDES)
718             what = makeplural(what);
719 /*JP
720         Sprintf(eos(info), ", injured %s", what);
721 */
722         Sprintf(eos(info), ", %s\82É\82¯\82ª\82ð\82µ\82Ä\82¢\82é", what);
723     }
724     if (Glib)
725 /*JP
726         Sprintf(eos(info), ", slippery %s", makeplural(body_part(HAND)));
727 */
728         Sprintf(eos(info), ", %s\82ª\82Ê\82é\82Ê\82é", makeplural(body_part(HAND)));
729     if (u.utrap)
730 /*JP
731         Strcat(info, ", trapped");
732 */
733         Strcat(info, ", ã©\82É\82©\82©\82Á\82Ä\82¢\82é");
734     if (Fast)
735 /*JP
736         Strcat(info, Very_fast ? ", very fast" : ", fast");
737 */
738         Strcat(info, Very_fast ? ", \82Æ\82Ä\82à\91f\91\81\82¢" : ", \91f\91\81\82¢");
739     if (u.uundetected)
740 /*JP
741         Strcat(info, ", concealed");
742 */
743         Strcat(info, ", \89B\82ê\82Ä\82¢\82é");
744     if (Invis)
745 /*JP
746         Strcat(info, ", invisible");
747 */
748         Strcat(info, ", \95s\89Â\8e\8b");
749     if (u.ustuck) {
750 #if 0 /*JP*/
751         if (sticks(youmonst.data))
752             Strcat(info, ", holding ");
753         else
754             Strcat(info, ", held by ");
755         Strcat(info, mon_nam(u.ustuck));
756 #else
757         Strcat(info, ", ");
758         Strcat(info, mon_nam(u.ustuck));
759         if (sticks(youmonst.data))
760             Strcat(info, "\82ð\92Í\82Ü\82¦\82Ä\82¢\82é");
761         else
762             Strcat(info, "\82É\92Í\82Ü\82¦\82ç\82ê\82Ä\82¢\82é");
763 #endif
764     }
765
766 /*JP
767     pline("Status of %s (%s%s):  Level %d  HP %d(%d)  AC %d%s.", plname,
768 */
769     pline("%s\82Ì\8fó\91Ô (%s %s)\81F Level %d  HP %d(%d)  AC %d%s", plname,
770           (u.ualign.record >= 20)
771 /*JP
772               ? "piously "
773 */
774               ? "\8chåi" 
775               : (u.ualign.record > 13)
776 /*JP
777                     ? "devoutly "
778 */
779                     ? "\90M\90S\90[\82¢" 
780                     : (u.ualign.record > 8)
781 /*JP
782                           ? "fervently "
783 */
784                           ? "\94M\97ó" 
785                           : (u.ualign.record > 3)
786 /*JP
787                                 ? "stridently "
788 */
789                                 ? "\90º\82Ì\82©\82ñ\8d\82\82¢" 
790                                 : (u.ualign.record == 3)
791                                       ? ""
792                                       : (u.ualign.record >= 1)
793 /*JP
794                                             ? "haltingly "
795 */
796                                             ? "\97L\96¼\96³\8eÀ" 
797                                             : (u.ualign.record == 0)
798 /*JP
799                                                   ? "nominally "
800 */
801                                                   ? "\96À\98f" 
802 /*JP
803                                                   : "insufficiently ",
804 */
805                                                   : "\95s\93K\93\96",
806           align_str(u.ualign.type),
807           Upolyd ? mons[u.umonnum].mlevel : u.ulevel, Upolyd ? u.mh : u.uhp,
808           Upolyd ? u.mhmax : u.uhpmax, u.uac, info);
809 }
810
811 void
812 self_invis_message()
813 {
814 #if 0 /*JP:T*/
815     pline("%s %s.",
816           Hallucination ? "Far out, man!  You" : "Gee!  All of a sudden, you",
817           See_invisible ? "can see right through yourself"
818                         : "can't see yourself");
819 #else
820     pline("%s\82 \82È\82½\82Í%s\81D",
821           Hallucination ? "\83\8f\81[\83I\81I" : "\82°\81I\93Ë\91R",
822           See_invisible ? "\8e©\95ª\8e©\90g\82ª\82¿\82á\82ñ\82Æ\8c©\82¦\82È\82­\82È\82Á\82½"
823                         : "\8e©\95ª\8e©\90g\82ª\8c©\82¦\82È\82­\82È\82Á\82½");
824 #endif
825 }
826
827 void
828 pudding_merge_message(otmp, otmp2)
829 struct obj *otmp;
830 struct obj *otmp2;
831 {
832     boolean visible =
833         cansee(otmp->ox, otmp->oy) || cansee(otmp2->ox, otmp2->oy);
834     boolean onfloor = otmp->where == OBJ_FLOOR || otmp2->where == OBJ_FLOOR;
835     boolean inpack = carried(otmp) || carried(otmp2);
836
837     /* the player will know something happened inside his own inventory */
838     if ((!Blind && visible) || inpack) {
839         if (Hallucination) {
840             if (onfloor) {
841 /*JP
842                 You_see("parts of the floor melting!");
843 */
844                 You_see("\8f°\82Ì\88ê\95\94\82ª\97n\82¯\82Ä\82¢\82é\82Ì\82ð\8c©\82½\81I");
845             } else if (inpack) {
846 /*JP
847                 Your("pack reaches out and grabs something!");
848 */
849                 Your("\82©\82Î\82ñ\82ª\8eè\82ð\90L\82Î\82µ\82Ä\89½\82©\82ð\82Â\82©\82ñ\82¾\81I");
850             }
851             /* even though we can see where they should be,
852              * they'll be out of our view (minvent or container)
853              * so don't actually show anything */
854         } else if (onfloor || inpack) {
855 #if 0 /*JP*/
856             pline("The %s coalesce%s.", makeplural(obj_typename(otmp->otyp)),
857                   inpack ? " inside your pack" : "");
858 #else
859             pline("%s\82ª%s\8d\87\91Ì\82µ\82½\81D", obj_typename(otmp->otyp),
860                   inpack ? "\82 \82È\82½\82Ì\82©\82Î\82ñ\82Ì\92\86\82Å" : "");
861 #endif
862         }
863     } else {
864 /*JP
865         You_hear("a faint sloshing sound.");
866 */
867         You_hear("\82©\82·\82©\82È\83o\83V\83\83\83o\83V\83\83\82Æ\82¢\82¤\89¹\82ð\95·\82¢\82½\81D");
868     }
869 }
870
871 /*pline.c*/