OSDN Git Service

[Refactor] #39962 files.c/h から display-player.c/h を分離 / Separated display-player...
[hengband/hengband.git] / src / view / display-player.c
1 /*!
2  * @brief プレーヤー表示に関するあれこれ (整理中)
3  * @date 2020/02/25
4  * @author Hourier
5  * @details
6  * ここにこれ以上関数を引っ越してくるのは禁止。何ならここから更に分割していく
7  */
8
9 #include "display-player.h"
10 #include "player-personality.h"
11 #include "term.h"
12 #include "status-first-page.h"
13 #include "player-sex.h"
14 #include "patron.h"
15 #include "world.h"
16 #include "quest.h"
17 #include "core.h" // 暫定。後で消す
18 #include "player/permanent-resistances.h"
19 #include "player/temporary-resistances.h"
20 #include "files.h"
21 #include "mutation.h"
22 #include "view-mainwindow.h" // 暫定。後で消す
23 #include "player-skill.h"
24 #include "player-effects.h"
25 #include "realm-song.h"
26 #include "object-hook.h"
27 #include "shoot.h"
28 #include "dungeon-file.h"
29 #include "objectkind.h"
30 #include "view/display-util.h"
31
32 /*!
33  * @brief プレイヤーの種族による免疫フラグを返す
34  * @param creature_ptr プレーヤーへの参照ポインタ
35  * @param flgs フラグを保管する配列
36  * @return なし
37  * @todo
38  * xtra1.c周りと多重実装になっているのを何とかする
39  */
40 static void player_immunity(player_type *creature_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE])
41 {
42         for (int i = 0; i < TR_FLAG_SIZE; i++)
43                 flgs[i] = 0L;
44
45         if (PRACE_IS_(creature_ptr, RACE_SPECTRE))
46                 add_flag(flgs, TR_RES_NETHER);
47         if (creature_ptr->mimic_form == MIMIC_VAMPIRE || PRACE_IS_(creature_ptr, RACE_VAMPIRE))
48                 add_flag(flgs, TR_RES_DARK);
49         if (creature_ptr->mimic_form == MIMIC_DEMON_LORD)
50                 add_flag(flgs, TR_RES_FIRE);
51         else if (PRACE_IS_(creature_ptr, RACE_YEEK) && creature_ptr->lev > 19)
52                 add_flag(flgs, TR_RES_ACID);
53 }
54
55
56 /*!
57  * @brief プレイヤーの一時的魔法効果による免疫フラグを返す
58  * @param creature_ptr プレーヤーへの参照ポインタ
59  * @param flgs フラグを保管する配列
60  * @return なし
61  * @todo
62  * xtra1.c周りと多重実装になっているのを何とかする
63  */
64 static void tim_player_immunity(player_type *creature_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE])
65 {
66         for (int i = 0; i < TR_FLAG_SIZE; i++)
67                 flgs[i] = 0L;
68
69         if (creature_ptr->special_defense & DEFENSE_ACID)
70                 add_flag(flgs, TR_RES_ACID);
71         if (creature_ptr->special_defense & DEFENSE_ELEC)
72                 add_flag(flgs, TR_RES_ELEC);
73         if (creature_ptr->special_defense & DEFENSE_FIRE)
74                 add_flag(flgs, TR_RES_FIRE);
75         if (creature_ptr->special_defense & DEFENSE_COLD)
76                 add_flag(flgs, TR_RES_COLD);
77         if (creature_ptr->wraith_form)
78                 add_flag(flgs, TR_RES_DARK);
79 }
80
81
82 /*!
83  * @brief プレイヤーの装備による免疫フラグを返す
84  * @param creature_ptr プレーヤーへの参照ポインタ
85  * @param flgs フラグを保管する配列
86  * @return なし
87  * @todo
88  * xtra1.c周りと多重実装になっているのを何とかする
89  */
90 static void known_obj_immunity(player_type *creature_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE])
91 {
92         for (int i = 0; i < TR_FLAG_SIZE; i++)
93                 flgs[i] = 0L;
94
95         for (int i = INVEN_RARM; i < INVEN_TOTAL; i++)
96         {
97                 u32b o_flgs[TR_FLAG_SIZE];
98                 object_type *o_ptr;
99                 o_ptr = &creature_ptr->inventory_list[i];
100                 if (!o_ptr->k_idx) continue;
101
102                 object_flags_known(o_ptr, o_flgs);
103                 if (have_flag(o_flgs, TR_IM_ACID)) add_flag(flgs, TR_RES_ACID);
104                 if (have_flag(o_flgs, TR_IM_ELEC)) add_flag(flgs, TR_RES_ELEC);
105                 if (have_flag(o_flgs, TR_IM_FIRE)) add_flag(flgs, TR_RES_FIRE);
106                 if (have_flag(o_flgs, TR_IM_COLD)) add_flag(flgs, TR_RES_COLD);
107         }
108 }
109
110
111 /*!
112  * @brief プレイヤーの種族による弱点フラグを返す
113  * @param creature_ptr プレーヤーへの参照ポインタ
114  * @param flgs フラグを保管する配列
115  * @return なし
116  * @todo
117  * xtra1.c周りと多重実装になっているのを何とかする
118  */
119 static void player_vuln_flags(player_type *creature_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE])
120 {
121         for (int i = 0; i < TR_FLAG_SIZE; i++)
122                 flgs[i] = 0L;
123
124         if ((creature_ptr->muta3 & MUT3_VULN_ELEM) || (creature_ptr->special_defense & KATA_KOUKIJIN))
125         {
126                 add_flag(flgs, TR_RES_ACID);
127                 add_flag(flgs, TR_RES_ELEC);
128                 add_flag(flgs, TR_RES_FIRE);
129                 add_flag(flgs, TR_RES_COLD);
130         }
131
132         if (PRACE_IS_(creature_ptr, RACE_ANDROID))
133                 add_flag(flgs, TR_RES_ELEC);
134         if (PRACE_IS_(creature_ptr, RACE_ENT))
135                 add_flag(flgs, TR_RES_FIRE);
136         if (PRACE_IS_(creature_ptr, RACE_VAMPIRE) || PRACE_IS_(creature_ptr, RACE_S_FAIRY) ||
137                 (creature_ptr->mimic_form == MIMIC_VAMPIRE))
138                 add_flag(flgs, TR_RES_LITE);
139 }
140
141
142 /*!
143  * @brief プレイヤーの特性フラグ一種を表示するサブルーチン /
144  * Helper function, see below
145  * @param creature_ptr プレーヤーへの参照ポインタ
146  * @param row コンソール表示位置の左上行
147  * @param col コンソール表示位置の左上列
148  * @param header コンソール上で表示する特性名
149  * @param flag1 参照する特性ID
150  * @param f プレイヤーの特性情報構造体
151  * @param mode 表示オプション
152  * @return なし
153  */
154 static void display_flag_aux(player_type *creature_ptr, TERM_LEN row, TERM_LEN col, concptr header, int flag1, all_player_flags *f, u16b mode)
155 {
156         byte header_color = TERM_L_DARK;
157         int header_col = col;
158
159         bool vuln = FALSE;
160         if (have_flag(f->player_vuln, flag1) &&
161                 !(have_flag(f->known_obj_imm, flag1) ||
162                         have_flag(f->player_imm, flag1) ||
163                         have_flag(f->tim_player_imm, flag1)))
164                 vuln = TRUE;
165
166         col += strlen(header) + 1;
167
168         /* Weapon flags need only two column */
169         int max_i = (mode & DP_WP) ? INVEN_LARM + 1 : INVEN_TOTAL;
170
171         for (int i = INVEN_RARM; i < max_i; i++)
172         {
173                 BIT_FLAGS flgs[TR_FLAG_SIZE];
174                 object_type *o_ptr;
175                 o_ptr = &creature_ptr->inventory_list[i];
176                 object_flags_known(o_ptr, flgs);
177                 if (!(mode & DP_IMM))
178                         c_put_str((byte)(vuln ? TERM_RED : TERM_SLATE), ".", row, col);
179
180                 if (mode & DP_CURSE)
181                 {
182                         if (have_flag(flgs, TR_ADD_L_CURSE) || have_flag(flgs, TR_ADD_H_CURSE))
183                         {
184                                 c_put_str(TERM_L_DARK, "+", row, col);
185                                 header_color = TERM_WHITE;
186                         }
187
188                         if (o_ptr->curse_flags & (TRC_CURSED | TRC_HEAVY_CURSE))
189                         {
190                                 c_put_str(TERM_WHITE, "+", row, col);
191                                 header_color = TERM_WHITE;
192                         }
193
194                         if (o_ptr->curse_flags & TRC_PERMA_CURSE)
195                         {
196                                 c_put_str(TERM_WHITE, "*", row, col);
197                                 header_color = TERM_WHITE;
198                         }
199
200                         col++;
201                         continue;
202                 }
203
204                 if (flag1 == TR_LITE_1)
205                 {
206                         if (HAVE_DARK_FLAG(flgs))
207                         {
208                                 c_put_str(TERM_L_DARK, "+", row, col);
209                                 header_color = TERM_WHITE;
210                         }
211                         else if (HAVE_LITE_FLAG(flgs))
212                         {
213                                 c_put_str(TERM_WHITE, "+", row, col);
214                                 header_color = TERM_WHITE;
215                         }
216
217                         col++;
218                         continue;
219                 }
220
221                 if (have_flag(flgs, flag1))
222                 {
223                         c_put_str((byte)(vuln ? TERM_L_RED : TERM_WHITE),
224                                 (mode & DP_IMM) ? "*" : "+", row, col);
225                         header_color = TERM_WHITE;
226                 }
227
228                 col++;
229         }
230
231         if (mode & DP_IMM)
232         {
233                 if (header_color != TERM_L_DARK)
234                 {
235                         c_put_str(header_color, header, row, header_col);
236                 }
237
238                 return;
239         }
240
241         c_put_str((byte)(vuln ? TERM_RED : TERM_SLATE), ".", row, col);
242         if (have_flag(f->player_flags, flag1))
243         {
244                 c_put_str((byte)(vuln ? TERM_L_RED : TERM_WHITE), "+", row, col);
245                 header_color = TERM_WHITE;
246         }
247
248         if (have_flag(f->tim_player_flags, flag1))
249         {
250                 c_put_str((byte)(vuln ? TERM_ORANGE : TERM_YELLOW), "#", row, col);
251                 header_color = TERM_WHITE;
252         }
253
254         if (have_flag(f->tim_player_imm, flag1))
255         {
256                 c_put_str(TERM_YELLOW, "*", row, col);
257                 header_color = TERM_WHITE;
258         }
259
260         if (have_flag(f->player_imm, flag1))
261         {
262                 c_put_str(TERM_WHITE, "*", row, col);
263                 header_color = TERM_WHITE;
264         }
265
266         if (vuln) c_put_str(TERM_RED, "v", row, col + 1);
267         c_put_str(header_color, header, row, header_col);
268 }
269
270
271 /*!
272  * @brief プレイヤーの特性フラグ一覧表示2a /
273  * @param creature_ptr プレーヤーへの参照ポインタ
274  * Special display, part 2a
275  * @return なし
276  */
277 static void display_player_misc_info(player_type *creature_ptr)
278 {
279 #ifdef JP
280         put_str("名前  :", 1, 26);
281         put_str("性別  :", 3, 1);
282         put_str("種族  :", 4, 1);
283         put_str("職業  :", 5, 1);
284 #else
285         put_str("Name  :", 1, 26);
286         put_str("Sex   :", 3, 1);
287         put_str("Race  :", 4, 1);
288         put_str("Class :", 5, 1);
289 #endif
290
291         char    buf[80];
292         char    tmp[80];
293         strcpy(tmp, ap_ptr->title);
294 #ifdef JP
295         if (ap_ptr->no == 1)
296                 strcat(tmp, "の");
297 #else
298         strcat(tmp, " ");
299 #endif
300         strcat(tmp, creature_ptr->name);
301
302         c_put_str(TERM_L_BLUE, tmp, 1, 34);
303         c_put_str(TERM_L_BLUE, sp_ptr->title, 3, 9);
304         c_put_str(TERM_L_BLUE, (creature_ptr->mimic_form ? mimic_info[creature_ptr->mimic_form].title : rp_ptr->title), 4, 9);
305         c_put_str(TERM_L_BLUE, cp_ptr->title, 5, 9);
306
307 #ifdef JP
308         put_str("レベル:", 6, 1);
309         put_str("HP  :", 7, 1);
310         put_str("MP  :", 8, 1);
311 #else
312         put_str("Level :", 6, 1);
313         put_str("Hits  :", 7, 1);
314         put_str("Mana  :", 8, 1);
315 #endif
316
317         (void)sprintf(buf, "%d", (int)creature_ptr->lev);
318         c_put_str(TERM_L_BLUE, buf, 6, 9);
319         (void)sprintf(buf, "%d/%d", (int)creature_ptr->chp, (int)creature_ptr->mhp);
320         c_put_str(TERM_L_BLUE, buf, 7, 9);
321         (void)sprintf(buf, "%d/%d", (int)creature_ptr->csp, (int)creature_ptr->msp);
322         c_put_str(TERM_L_BLUE, buf, 8, 9);
323 }
324
325
326 /*!
327  * @brief プレイヤーの特性フラグ一覧表示2b /
328  * Special display, part 2b
329  * @param creature_ptr プレーヤーへの参照ポインタ
330  * @return なし
331  * @details
332  * <pre>
333  * How to print out the modifications and sustains.
334  * Positive mods with no sustain will be light green.
335  * Positive mods with a sustain will be dark green.
336  * Sustains (with no modification) will be a dark green 's'.
337  * Negative mods (from a curse) will be red.
338  * Huge mods (>9), like from MICoMorgoth, will be a '*'
339  * No mod, no sustain, will be a slate '.'
340  * </pre>
341  */
342 static void display_player_stat_info(player_type *creature_ptr)
343 {
344         int stat_col = 22;
345         int row = 3;
346         c_put_str(TERM_WHITE, _("能力", "Stat"), row, stat_col + 1);
347         c_put_str(TERM_BLUE, _("  基本", "  Base"), row, stat_col + 7);
348         c_put_str(TERM_L_BLUE, _(" 種 職 性 装 ", "RacClaPerMod"), row, stat_col + 13);
349         c_put_str(TERM_L_GREEN, _("合計", "Actual"), row, stat_col + 28);
350         c_put_str(TERM_YELLOW, _("現在", "Current"), row, stat_col + 35);
351
352         char buf[80];
353         for (int i = 0; i < A_MAX; i++)
354         {
355                 int r_adj;
356                 if (creature_ptr->mimic_form) r_adj = mimic_info[creature_ptr->mimic_form].r_adj[i];
357                 else r_adj = rp_ptr->r_adj[i];
358
359                 int e_adj = 0;
360
361                 if ((creature_ptr->stat_max[i] > 18) && (creature_ptr->stat_top[i] > 18))
362                         e_adj = (creature_ptr->stat_top[i] - creature_ptr->stat_max[i]) / 10;
363                 if ((creature_ptr->stat_max[i] <= 18) && (creature_ptr->stat_top[i] <= 18))
364                         e_adj = creature_ptr->stat_top[i] - creature_ptr->stat_max[i];
365                 if ((creature_ptr->stat_max[i] <= 18) && (creature_ptr->stat_top[i] > 18))
366                         e_adj = (creature_ptr->stat_top[i] - 18) / 10 - creature_ptr->stat_max[i] + 18;
367
368                 if ((creature_ptr->stat_max[i] > 18) && (creature_ptr->stat_top[i] <= 18))
369                         e_adj = creature_ptr->stat_top[i] - (creature_ptr->stat_max[i] - 19) / 10 - 19;
370
371                 if (PRACE_IS_(creature_ptr, RACE_ENT))
372                 {
373                         switch (i)
374                         {
375                         case A_STR:
376                         case A_CON:
377                                 if (creature_ptr->lev > 25) r_adj++;
378                                 if (creature_ptr->lev > 40) r_adj++;
379                                 if (creature_ptr->lev > 45) r_adj++;
380                                 break;
381                         case A_DEX:
382                                 if (creature_ptr->lev > 25) r_adj--;
383                                 if (creature_ptr->lev > 40) r_adj--;
384                                 if (creature_ptr->lev > 45) r_adj--;
385                                 break;
386                         }
387                 }
388
389                 e_adj -= r_adj;
390                 e_adj -= cp_ptr->c_adj[i];
391                 e_adj -= ap_ptr->a_adj[i];
392
393                 if (creature_ptr->stat_cur[i] < creature_ptr->stat_max[i])
394                         c_put_str(TERM_WHITE, stat_names_reduced[i], row + i + 1, stat_col + 1);
395                 else
396                         c_put_str(TERM_WHITE, stat_names[i], row + i + 1, stat_col + 1);
397
398                 /* Internal "natural" max value.  Maxes at 18/100 */
399                 /* This is useful to see if you are maxed out */
400                 cnv_stat(creature_ptr->stat_max[i], buf);
401                 if (creature_ptr->stat_max[i] == creature_ptr->stat_max_max[i])
402                         c_put_str(TERM_WHITE, "!", row + i + 1, _(stat_col + 6, stat_col + 4));
403
404                 c_put_str(TERM_BLUE, buf, row + i + 1, stat_col + 13 - strlen(buf));
405
406                 (void)sprintf(buf, "%3d", r_adj);
407                 c_put_str(TERM_L_BLUE, buf, row + i + 1, stat_col + 13);
408                 (void)sprintf(buf, "%3d", (int)cp_ptr->c_adj[i]);
409                 c_put_str(TERM_L_BLUE, buf, row + i + 1, stat_col + 16);
410                 (void)sprintf(buf, "%3d", (int)ap_ptr->a_adj[i]);
411                 c_put_str(TERM_L_BLUE, buf, row + i + 1, stat_col + 19);
412                 (void)sprintf(buf, "%3d", (int)e_adj);
413                 c_put_str(TERM_L_BLUE, buf, row + i + 1, stat_col + 22);
414
415                 cnv_stat(creature_ptr->stat_top[i], buf);
416                 c_put_str(TERM_L_GREEN, buf, row + i + 1, stat_col + 26);
417
418                 if (creature_ptr->stat_use[i] < creature_ptr->stat_top[i])
419                 {
420                         cnv_stat(creature_ptr->stat_use[i], buf);
421                         c_put_str(TERM_YELLOW, buf, row + i + 1, stat_col + 33);
422                 }
423         }
424
425         int col = stat_col + 41;
426         c_put_str(TERM_WHITE, "abcdefghijkl@", row, col);
427         c_put_str(TERM_L_GREEN, _("能力修正", "Modification"), row - 1, col);
428
429         BIT_FLAGS flgs[TR_FLAG_SIZE];
430         for (int i = INVEN_RARM; i < INVEN_TOTAL; i++)
431         {
432                 object_type *o_ptr;
433                 o_ptr = &creature_ptr->inventory_list[i];
434                 object_flags_known(o_ptr, flgs);
435                 for (int stat = 0; stat < A_MAX; stat++)
436                 {
437                         byte a = TERM_SLATE;
438                         char c = '.';
439                         if (have_flag(flgs, stat))
440                         {
441                                 c = '*';
442
443                                 if (o_ptr->pval > 0)
444                                 {
445                                         a = TERM_L_GREEN;
446                                         if (o_ptr->pval < 10) c = '0' + o_ptr->pval;
447                                 }
448
449                                 if (have_flag(flgs, stat + TR_SUST_STR))
450                                 {
451                                         a = TERM_GREEN;
452                                 }
453
454                                 if (o_ptr->pval < 0)
455                                 {
456                                         a = TERM_RED;
457                                         if (o_ptr->pval > -10) c = '0' - o_ptr->pval;
458                                 }
459                         }
460                         else if (have_flag(flgs, stat + TR_SUST_STR))
461                         {
462                                 a = TERM_GREEN;
463                                 c = 's';
464                         }
465
466                         Term_putch(col, row + stat + 1, a, c);
467                 }
468
469                 col++;
470         }
471
472         player_flags(creature_ptr, flgs);
473         for (int stat = 0; stat < A_MAX; stat++)
474         {
475                 byte a = TERM_SLATE;
476                 char c = '.';
477
478                 if (creature_ptr->muta3 || creature_ptr->tsuyoshi)
479                 {
480                         int dummy = 0;
481
482                         if (stat == A_STR)
483                         {
484                                 if (creature_ptr->muta3 & MUT3_HYPER_STR) dummy += 4;
485                                 if (creature_ptr->muta3 & MUT3_PUNY) dummy -= 4;
486                                 if (creature_ptr->tsuyoshi) dummy += 4;
487                         }
488                         else if (stat == A_WIS || stat == A_INT)
489                         {
490                                 if (creature_ptr->muta3 & MUT3_HYPER_INT) dummy += 4;
491                                 if (creature_ptr->muta3 & MUT3_MORONIC) dummy -= 4;
492                         }
493                         else if (stat == A_DEX)
494                         {
495                                 if (creature_ptr->muta3 & MUT3_IRON_SKIN) dummy -= 1;
496                                 if (creature_ptr->muta3 & MUT3_LIMBER) dummy += 3;
497                                 if (creature_ptr->muta3 & MUT3_ARTHRITIS) dummy -= 3;
498                         }
499                         else if (stat == A_CON)
500                         {
501                                 if (creature_ptr->muta3 & MUT3_RESILIENT) dummy += 4;
502                                 if (creature_ptr->muta3 & MUT3_XTRA_FAT) dummy += 2;
503                                 if (creature_ptr->muta3 & MUT3_ALBINO) dummy -= 4;
504                                 if (creature_ptr->muta3 & MUT3_FLESH_ROT) dummy -= 2;
505                                 if (creature_ptr->tsuyoshi) dummy += 4;
506                         }
507                         else if (stat == A_CHR)
508                         {
509                                 if (creature_ptr->muta3 & MUT3_SILLY_VOI) dummy -= 4;
510                                 if (creature_ptr->muta3 & MUT3_BLANK_FAC) dummy -= 1;
511                                 if (creature_ptr->muta3 & MUT3_FLESH_ROT) dummy -= 1;
512                                 if (creature_ptr->muta3 & MUT3_SCALES) dummy -= 1;
513                                 if (creature_ptr->muta3 & MUT3_WART_SKIN) dummy -= 2;
514                                 if (creature_ptr->muta3 & MUT3_ILL_NORM) dummy = 0;
515                         }
516
517                         if (dummy != 0)
518                         {
519                                 c = '*';
520                                 if (dummy > 0)
521                                 {
522                                         /* Good */
523                                         a = TERM_L_GREEN;
524
525                                         /* Label boost */
526                                         if (dummy < 10) c = '0' + dummy;
527                                 }
528
529                                 if (dummy < 0)
530                                 {
531                                         a = TERM_RED;
532                                         if (dummy > -10) c = '0' - dummy;
533                                 }
534                         }
535                 }
536
537                 if (have_flag(flgs, stat + TR_SUST_STR))
538                 {
539                         a = TERM_GREEN;
540                         c = 's';
541                 }
542
543                 Term_putch(col, row + stat + 1, a, c);
544         }
545 }
546
547
548 /*!
549  * @brief プレイヤーの特性フラグ一覧表示1
550  * @param creature_ptr プレーヤーへの参照ポインタ
551  * Special display, part 1
552  * @return なし
553  */
554 static void display_player_flag_info(player_type *creature_ptr)
555 {
556         all_player_flags f;
557         player_flags(creature_ptr, f.player_flags);
558         tim_player_flags(creature_ptr, f.tim_player_flags);
559         player_immunity(creature_ptr, f.player_imm);
560         tim_player_immunity(creature_ptr, f.tim_player_imm);
561         known_obj_immunity(creature_ptr, f.known_obj_imm);
562         player_vuln_flags(creature_ptr, f.player_vuln);
563
564         /*** Set 1 ***/
565         TERM_LEN row = 12;
566         TERM_LEN col = 1;
567         display_player_equippy(creature_ptr, row - 2, col + 8, 0);
568         c_put_str(TERM_WHITE, "abcdefghijkl@", row - 1, col + 8);
569
570 #ifdef JP
571         display_flag_aux(creature_ptr, row + 0, col, "耐酸  :", TR_RES_ACID, &f, 0);
572         display_flag_aux(creature_ptr, row + 0, col, "耐酸  :", TR_IM_ACID, &f, DP_IMM);
573         display_flag_aux(creature_ptr, row + 1, col, "耐電撃:", TR_RES_ELEC, &f, 0);
574         display_flag_aux(creature_ptr, row + 1, col, "耐電撃:", TR_IM_ELEC, &f, DP_IMM);
575         display_flag_aux(creature_ptr, row + 2, col, "耐火炎:", TR_RES_FIRE, &f, 0);
576         display_flag_aux(creature_ptr, row + 2, col, "耐火炎:", TR_IM_FIRE, &f, DP_IMM);
577         display_flag_aux(creature_ptr, row + 3, col, "耐冷気:", TR_RES_COLD, &f, 0);
578         display_flag_aux(creature_ptr, row + 3, col, "耐冷気:", TR_IM_COLD, &f, DP_IMM);
579         display_flag_aux(creature_ptr, row + 4, col, "耐毒  :", TR_RES_POIS, &f, 0);
580         display_flag_aux(creature_ptr, row + 5, col, "耐閃光:", TR_RES_LITE, &f, 0);
581         display_flag_aux(creature_ptr, row + 6, col, "耐暗黒:", TR_RES_DARK, &f, 0);
582         display_flag_aux(creature_ptr, row + 7, col, "耐破片:", TR_RES_SHARDS, &f, 0);
583         display_flag_aux(creature_ptr, row + 8, col, "耐盲目:", TR_RES_BLIND, &f, 0);
584         display_flag_aux(creature_ptr, row + 9, col, "耐混乱:", TR_RES_CONF, &f, 0);
585 #else
586         display_flag_aux(creature_ptr, row + 0, col, "Acid  :", TR_RES_ACID, &f, 0);
587         display_flag_aux(creature_ptr, row + 0, col, "Acid  :", TR_IM_ACID, &f, DP_IMM);
588         display_flag_aux(creature_ptr, row + 1, col, "Elec  :", TR_RES_ELEC, &f, 0);
589         display_flag_aux(creature_ptr, row + 1, col, "Elec  :", TR_IM_ELEC, &f, DP_IMM);
590         display_flag_aux(creature_ptr, row + 2, col, "Fire  :", TR_RES_FIRE, &f, 0);
591         display_flag_aux(creature_ptr, row + 2, col, "Fire  :", TR_IM_FIRE, &f, DP_IMM);
592         display_flag_aux(creature_ptr, row + 3, col, "Cold  :", TR_RES_COLD, &f, 0);
593         display_flag_aux(creature_ptr, row + 3, col, "Cold  :", TR_IM_COLD, &f, DP_IMM);
594         display_flag_aux(creature_ptr, row + 4, col, "Poison:", TR_RES_POIS, &f, 0);
595         display_flag_aux(creature_ptr, row + 5, col, "Light :", TR_RES_LITE, &f, 0);
596         display_flag_aux(creature_ptr, row + 6, col, "Dark  :", TR_RES_DARK, &f, 0);
597         display_flag_aux(creature_ptr, row + 7, col, "Shard :", TR_RES_SHARDS, &f, 0);
598         display_flag_aux(creature_ptr, row + 8, col, "Blind :", TR_RES_BLIND, &f, 0);
599         display_flag_aux(creature_ptr, row + 9, col, "Conf  :", TR_RES_CONF, &f, 0);
600 #endif
601
602         /*** Set 2 ***/
603         row = 12;
604         col = 26;
605         display_player_equippy(creature_ptr, row - 2, col + 8, 0);
606         c_put_str(TERM_WHITE, "abcdefghijkl@", row - 1, col + 8);
607
608 #ifdef JP
609         display_flag_aux(creature_ptr, row + 0, col, "耐轟音:", TR_RES_SOUND, &f, 0);
610         display_flag_aux(creature_ptr, row + 1, col, "耐地獄:", TR_RES_NETHER, &f, 0);
611         display_flag_aux(creature_ptr, row + 2, col, "耐因混:", TR_RES_NEXUS, &f, 0);
612         display_flag_aux(creature_ptr, row + 3, col, "耐カオ:", TR_RES_CHAOS, &f, 0);
613         display_flag_aux(creature_ptr, row + 4, col, "耐劣化:", TR_RES_DISEN, &f, 0);
614         display_flag_aux(creature_ptr, row + 5, col, "耐恐怖:", TR_RES_FEAR, &f, 0);
615         display_flag_aux(creature_ptr, row + 6, col, "反射  :", TR_REFLECT, &f, 0);
616         display_flag_aux(creature_ptr, row + 7, col, "火炎オ:", TR_SH_FIRE, &f, 0);
617         display_flag_aux(creature_ptr, row + 8, col, "電気オ:", TR_SH_ELEC, &f, 0);
618         display_flag_aux(creature_ptr, row + 9, col, "冷気オ:", TR_SH_COLD, &f, 0);
619 #else
620         display_flag_aux(creature_ptr, row + 0, col, "Sound :", TR_RES_SOUND, &f, 0);
621         display_flag_aux(creature_ptr, row + 1, col, "Nether:", TR_RES_NETHER, &f, 0);
622         display_flag_aux(creature_ptr, row + 2, col, "Nexus :", TR_RES_NEXUS, &f, 0);
623         display_flag_aux(creature_ptr, row + 3, col, "Chaos :", TR_RES_CHAOS, &f, 0);
624         display_flag_aux(creature_ptr, row + 4, col, "Disnch:", TR_RES_DISEN, &f, 0);
625         display_flag_aux(creature_ptr, row + 5, col, "Fear  :", TR_RES_FEAR, &f, 0);
626         display_flag_aux(creature_ptr, row + 6, col, "Reflct:", TR_REFLECT, &f, 0);
627         display_flag_aux(creature_ptr, row + 7, col, "AuFire:", TR_SH_FIRE, &f, 0);
628         display_flag_aux(creature_ptr, row + 8, col, "AuElec:", TR_SH_ELEC, &f, 0);
629         display_flag_aux(creature_ptr, row + 9, col, "AuCold:", TR_SH_COLD, &f, 0);
630 #endif
631
632         /*** Set 3 ***/
633         row = 12;
634         col = 51;
635         display_player_equippy(creature_ptr, row - 2, col + 12, 0);
636         c_put_str(TERM_WHITE, "abcdefghijkl@", row - 1, col + 12);
637
638 #ifdef JP
639         display_flag_aux(creature_ptr, row + 0, col, "加速      :", TR_SPEED, &f, 0);
640         display_flag_aux(creature_ptr, row + 1, col, "耐麻痺    :", TR_FREE_ACT, &f, 0);
641         display_flag_aux(creature_ptr, row + 2, col, "透明体視認:", TR_SEE_INVIS, &f, 0);
642         display_flag_aux(creature_ptr, row + 3, col, "経験値保持:", TR_HOLD_EXP, &f, 0);
643         display_flag_aux(creature_ptr, row + 4, col, "警告      :", TR_WARNING, &f, 0);
644         display_flag_aux(creature_ptr, row + 5, col, "遅消化    :", TR_SLOW_DIGEST, &f, 0);
645         display_flag_aux(creature_ptr, row + 6, col, "急回復    :", TR_REGEN, &f, 0);
646         display_flag_aux(creature_ptr, row + 7, col, "浮遊      :", TR_LEVITATION, &f, 0);
647         display_flag_aux(creature_ptr, row + 8, col, "永遠光源  :", TR_LITE_1, &f, 0);
648         display_flag_aux(creature_ptr, row + 9, col, "呪い      :", 0, &f, DP_CURSE);
649 #else
650         display_flag_aux(creature_ptr, row + 0, col, "Speed     :", TR_SPEED, &f, 0);
651         display_flag_aux(creature_ptr, row + 1, col, "FreeAction:", TR_FREE_ACT, &f, 0);
652         display_flag_aux(creature_ptr, row + 2, col, "SeeInvisi.:", TR_SEE_INVIS, &f, 0);
653         display_flag_aux(creature_ptr, row + 3, col, "Hold Exp  :", TR_HOLD_EXP, &f, 0);
654         display_flag_aux(creature_ptr, row + 4, col, "Warning   :", TR_WARNING, &f, 0);
655         display_flag_aux(creature_ptr, row + 5, col, "SlowDigest:", TR_SLOW_DIGEST, &f, 0);
656         display_flag_aux(creature_ptr, row + 6, col, "Regene.   :", TR_REGEN, &f, 0);
657         display_flag_aux(creature_ptr, row + 7, col, "Levitation:", TR_LEVITATION, &f, 0);
658         display_flag_aux(creature_ptr, row + 8, col, "Perm Lite :", TR_LITE_1, &f, 0);
659         display_flag_aux(creature_ptr, row + 9, col, "Cursed    :", 0, &f, DP_CURSE);
660 #endif
661 }
662
663
664 /*!
665  * @brief プレイヤーの特性フラグ一覧表示2 /
666  * @param creature_ptr プレーヤーへの参照ポインタ
667  * Special display, part 2
668  * @return なし
669  */
670 static void display_player_other_flag_info(player_type *creature_ptr)
671 {
672         /* Extract flags and store */
673         all_player_flags f;
674         player_flags(creature_ptr, f.player_flags);
675         tim_player_flags(creature_ptr, f.tim_player_flags);
676         player_immunity(creature_ptr, f.player_imm);
677         tim_player_immunity(creature_ptr, f.tim_player_imm);
678         known_obj_immunity(creature_ptr, f.known_obj_imm);
679         player_vuln_flags(creature_ptr, f.player_vuln);
680
681         /*** Set 1 ***/
682         TERM_LEN row = 3;
683         TERM_LEN col = 1;
684         display_player_equippy(creature_ptr, row - 2, col + 12, DP_WP);
685         c_put_str(TERM_WHITE, "ab@", row - 1, col + 12);
686
687 #ifdef JP
688         display_flag_aux(creature_ptr, row + 0, col, "邪悪 倍打 :", TR_SLAY_EVIL, &f, DP_WP);
689         display_flag_aux(creature_ptr, row + 0, col, "邪悪 倍打 :", TR_KILL_EVIL, &f, (DP_WP | DP_IMM));
690         display_flag_aux(creature_ptr, row + 1, col, "不死 倍打 :", TR_SLAY_UNDEAD, &f, DP_WP);
691         display_flag_aux(creature_ptr, row + 1, col, "不死 倍打 :", TR_KILL_UNDEAD, &f, (DP_WP | DP_IMM));
692         display_flag_aux(creature_ptr, row + 2, col, "悪魔 倍打 :", TR_SLAY_DEMON, &f, DP_WP);
693         display_flag_aux(creature_ptr, row + 2, col, "悪魔 倍打 :", TR_KILL_DEMON, &f, (DP_WP | DP_IMM));
694         display_flag_aux(creature_ptr, row + 3, col, "龍 倍打   :", TR_SLAY_DRAGON, &f, DP_WP);
695         display_flag_aux(creature_ptr, row + 3, col, "龍 倍打   :", TR_KILL_DRAGON, &f, (DP_WP | DP_IMM));
696         display_flag_aux(creature_ptr, row + 4, col, "人間 倍打 :", TR_SLAY_HUMAN, &f, DP_WP);
697         display_flag_aux(creature_ptr, row + 4, col, "人間 倍打 :", TR_KILL_HUMAN, &f, (DP_WP | DP_IMM));
698         display_flag_aux(creature_ptr, row + 5, col, "動物 倍打 :", TR_SLAY_ANIMAL, &f, DP_WP);
699         display_flag_aux(creature_ptr, row + 5, col, "動物 倍打 :", TR_KILL_ANIMAL, &f, (DP_WP | DP_IMM));
700         display_flag_aux(creature_ptr, row + 6, col, "オーク倍打:", TR_SLAY_ORC, &f, DP_WP);
701         display_flag_aux(creature_ptr, row + 6, col, "オーク倍打:", TR_KILL_ORC, &f, (DP_WP | DP_IMM));
702         display_flag_aux(creature_ptr, row + 7, col, "トロル倍打:", TR_SLAY_TROLL, &f, DP_WP);
703         display_flag_aux(creature_ptr, row + 7, col, "トロル倍打:", TR_KILL_TROLL, &f, (DP_WP | DP_IMM));
704         display_flag_aux(creature_ptr, row + 8, col, "巨人 倍打 :", TR_SLAY_GIANT, &f, DP_WP);
705         display_flag_aux(creature_ptr, row + 8, col, "巨人 倍打 :", TR_KILL_GIANT, &f, (DP_WP | DP_IMM));
706         display_flag_aux(creature_ptr, row + 9, col, "溶解      :", TR_BRAND_ACID, &f, DP_WP);
707         display_flag_aux(creature_ptr, row + 10, col, "電撃      :", TR_BRAND_ELEC, &f, DP_WP);
708         display_flag_aux(creature_ptr, row + 11, col, "焼棄      :", TR_BRAND_FIRE, &f, DP_WP);
709         display_flag_aux(creature_ptr, row + 12, col, "凍結      :", TR_BRAND_COLD, &f, DP_WP);
710         display_flag_aux(creature_ptr, row + 13, col, "毒殺      :", TR_BRAND_POIS, &f, DP_WP);
711         display_flag_aux(creature_ptr, row + 14, col, "切れ味    :", TR_VORPAL, &f, DP_WP);
712         display_flag_aux(creature_ptr, row + 15, col, "地震      :", TR_IMPACT, &f, DP_WP);
713         display_flag_aux(creature_ptr, row + 16, col, "吸血      :", TR_VAMPIRIC, &f, DP_WP);
714         display_flag_aux(creature_ptr, row + 17, col, "カオス効果:", TR_CHAOTIC, &f, DP_WP);
715         display_flag_aux(creature_ptr, row + 18, col, "理力      :", TR_FORCE_WEAPON, &f, DP_WP);
716 #else
717         display_flag_aux(creature_ptr, row + 0, col, "Slay Evil :", TR_SLAY_EVIL, &f, DP_WP);
718         display_flag_aux(creature_ptr, row + 0, col, "Slay Evil :", TR_KILL_EVIL, &f, (DP_WP | DP_IMM));
719         display_flag_aux(creature_ptr, row + 1, col, "Slay Und. :", TR_SLAY_UNDEAD, &f, DP_WP);
720         display_flag_aux(creature_ptr, row + 1, col, "Slay Und. :", TR_KILL_UNDEAD, &f, (DP_WP | DP_IMM));
721         display_flag_aux(creature_ptr, row + 2, col, "Slay Demon:", TR_SLAY_DEMON, &f, DP_WP);
722         display_flag_aux(creature_ptr, row + 2, col, "Slay Demon:", TR_KILL_DEMON, &f, (DP_WP | DP_IMM));
723         display_flag_aux(creature_ptr, row + 3, col, "Slay Drag.:", TR_SLAY_DRAGON, &f, DP_WP);
724         display_flag_aux(creature_ptr, row + 3, col, "Slay Drag.:", TR_KILL_DRAGON, &f, (DP_WP | DP_IMM));
725         display_flag_aux(creature_ptr, row + 4, col, "Slay Human:", TR_SLAY_HUMAN, &f, DP_WP);
726         display_flag_aux(creature_ptr, row + 4, col, "Slay Human:", TR_KILL_HUMAN, &f, (DP_WP | DP_IMM));
727         display_flag_aux(creature_ptr, row + 5, col, "Slay Anim.:", TR_SLAY_ANIMAL, &f, DP_WP);
728         display_flag_aux(creature_ptr, row + 5, col, "Slay Anim.:", TR_KILL_ANIMAL, &f, (DP_WP | DP_IMM));
729         display_flag_aux(creature_ptr, row + 6, col, "Slay Orc  :", TR_SLAY_ORC, &f, DP_WP);
730         display_flag_aux(creature_ptr, row + 6, col, "Slay Orc  :", TR_KILL_ORC, &f, (DP_WP | DP_IMM));
731         display_flag_aux(creature_ptr, row + 7, col, "Slay Troll:", TR_SLAY_TROLL, &f, DP_WP);
732         display_flag_aux(creature_ptr, row + 7, col, "Slay Troll:", TR_KILL_TROLL, &f, (DP_WP | DP_IMM));
733         display_flag_aux(creature_ptr, row + 8, col, "Slay Giant:", TR_SLAY_GIANT, &f, DP_WP);
734         display_flag_aux(creature_ptr, row + 8, col, "Slay Giant:", TR_KILL_GIANT, &f, (DP_WP | DP_IMM));
735         display_flag_aux(creature_ptr, row + 9, col, "Acid Brand:", TR_BRAND_ACID, &f, DP_WP);
736         display_flag_aux(creature_ptr, row + 10, col, "Elec Brand:", TR_BRAND_ELEC, &f, DP_WP);
737         display_flag_aux(creature_ptr, row + 11, col, "Fire Brand:", TR_BRAND_FIRE, &f, DP_WP);
738         display_flag_aux(creature_ptr, row + 12, col, "Cold Brand:", TR_BRAND_COLD, &f, DP_WP);
739         display_flag_aux(creature_ptr, row + 13, col, "Poison Brd:", TR_BRAND_POIS, &f, DP_WP);
740         display_flag_aux(creature_ptr, row + 14, col, "Sharpness :", TR_VORPAL, &f, DP_WP);
741         display_flag_aux(creature_ptr, row + 15, col, "Quake     :", TR_IMPACT, &f, DP_WP);
742         display_flag_aux(creature_ptr, row + 16, col, "Vampiric  :", TR_VAMPIRIC, &f, DP_WP);
743         display_flag_aux(creature_ptr, row + 17, col, "Chaotic   :", TR_CHAOTIC, &f, DP_WP);
744         display_flag_aux(creature_ptr, row + 18, col, "Force Wep.:", TR_FORCE_WEAPON, &f, DP_WP);
745 #endif
746
747         /*** Set 2 ***/
748         row = 3;
749         col = col + 12 + 7;
750         display_player_equippy(creature_ptr, row - 2, col + 13, 0);
751         c_put_str(TERM_WHITE, "abcdefghijkl@", row - 1, col + 13);
752
753 #ifdef JP
754         display_flag_aux(creature_ptr, row + 0, col, "テレパシー :", TR_TELEPATHY, &f, 0);
755         display_flag_aux(creature_ptr, row + 1, col, "邪悪ESP    :", TR_ESP_EVIL, &f, 0);
756         display_flag_aux(creature_ptr, row + 2, col, "無生物ESP  :", TR_ESP_NONLIVING, &f, 0);
757         display_flag_aux(creature_ptr, row + 3, col, "善良ESP    :", TR_ESP_GOOD, &f, 0);
758         display_flag_aux(creature_ptr, row + 4, col, "不死ESP    :", TR_ESP_UNDEAD, &f, 0);
759         display_flag_aux(creature_ptr, row + 5, col, "悪魔ESP    :", TR_ESP_DEMON, &f, 0);
760         display_flag_aux(creature_ptr, row + 6, col, "龍ESP      :", TR_ESP_DRAGON, &f, 0);
761         display_flag_aux(creature_ptr, row + 7, col, "人間ESP    :", TR_ESP_HUMAN, &f, 0);
762         display_flag_aux(creature_ptr, row + 8, col, "動物ESP    :", TR_ESP_ANIMAL, &f, 0);
763         display_flag_aux(creature_ptr, row + 9, col, "オークESP  :", TR_ESP_ORC, &f, 0);
764         display_flag_aux(creature_ptr, row + 10, col, "トロルESP  :", TR_ESP_TROLL, &f, 0);
765         display_flag_aux(creature_ptr, row + 11, col, "巨人ESP    :", TR_ESP_GIANT, &f, 0);
766         display_flag_aux(creature_ptr, row + 12, col, "ユニークESP:", TR_ESP_UNIQUE, &f, 0);
767         display_flag_aux(creature_ptr, row + 13, col, "腕力維持   :", TR_SUST_STR, &f, 0);
768         display_flag_aux(creature_ptr, row + 14, col, "知力維持   :", TR_SUST_INT, &f, 0);
769         display_flag_aux(creature_ptr, row + 15, col, "賢さ維持   :", TR_SUST_WIS, &f, 0);
770         display_flag_aux(creature_ptr, row + 16, col, "器用維持   :", TR_SUST_DEX, &f, 0);
771         display_flag_aux(creature_ptr, row + 17, col, "耐久維持   :", TR_SUST_CON, &f, 0);
772         display_flag_aux(creature_ptr, row + 18, col, "魅力維持   :", TR_SUST_CHR, &f, 0);
773 #else
774         display_flag_aux(creature_ptr, row + 0, col, "Telepathy  :", TR_TELEPATHY, &f, 0);
775         display_flag_aux(creature_ptr, row + 1, col, "ESP Evil   :", TR_ESP_EVIL, &f, 0);
776         display_flag_aux(creature_ptr, row + 2, col, "ESP Noliv. :", TR_ESP_NONLIVING, &f, 0);
777         display_flag_aux(creature_ptr, row + 3, col, "ESP Good   :", TR_ESP_GOOD, &f, 0);
778         display_flag_aux(creature_ptr, row + 4, col, "ESP Undead :", TR_ESP_UNDEAD, &f, 0);
779         display_flag_aux(creature_ptr, row + 5, col, "ESP Demon  :", TR_ESP_DEMON, &f, 0);
780         display_flag_aux(creature_ptr, row + 6, col, "ESP Dragon :", TR_ESP_DRAGON, &f, 0);
781         display_flag_aux(creature_ptr, row + 7, col, "ESP Human  :", TR_ESP_HUMAN, &f, 0);
782         display_flag_aux(creature_ptr, row + 8, col, "ESP Animal :", TR_ESP_ANIMAL, &f, 0);
783         display_flag_aux(creature_ptr, row + 9, col, "ESP Orc    :", TR_ESP_ORC, &f, 0);
784         display_flag_aux(creature_ptr, row + 10, col, "ESP Troll  :", TR_ESP_TROLL, &f, 0);
785         display_flag_aux(creature_ptr, row + 11, col, "ESP Giant  :", TR_ESP_GIANT, &f, 0);
786         display_flag_aux(creature_ptr, row + 12, col, "ESP Unique :", TR_ESP_UNIQUE, &f, 0);
787         display_flag_aux(creature_ptr, row + 13, col, "Sust Str   :", TR_SUST_STR, &f, 0);
788         display_flag_aux(creature_ptr, row + 14, col, "Sust Int   :", TR_SUST_INT, &f, 0);
789         display_flag_aux(creature_ptr, row + 15, col, "Sust Wis   :", TR_SUST_WIS, &f, 0);
790         display_flag_aux(creature_ptr, row + 16, col, "Sust Dex   :", TR_SUST_DEX, &f, 0);
791         display_flag_aux(creature_ptr, row + 17, col, "Sust Con   :", TR_SUST_CON, &f, 0);
792         display_flag_aux(creature_ptr, row + 18, col, "Sust Chr   :", TR_SUST_CHR, &f, 0);
793 #endif
794
795         /*** Set 3 ***/
796         row = 3;
797         col = col + 12 + 17;
798         display_player_equippy(creature_ptr, row - 2, col + 14, 0);
799         c_put_str(TERM_WHITE, "abcdefghijkl@", row - 1, col + 14);
800
801 #ifdef JP
802         display_flag_aux(creature_ptr, row + 0, col, "追加攻撃    :", TR_BLOWS, &f, 0);
803         display_flag_aux(creature_ptr, row + 1, col, "採掘        :", TR_TUNNEL, &f, 0);
804         display_flag_aux(creature_ptr, row + 2, col, "赤外線視力  :", TR_INFRA, &f, 0);
805         display_flag_aux(creature_ptr, row + 3, col, "魔法道具支配:", TR_MAGIC_MASTERY, &f, 0);
806         display_flag_aux(creature_ptr, row + 4, col, "隠密        :", TR_STEALTH, &f, 0);
807         display_flag_aux(creature_ptr, row + 5, col, "探索        :", TR_SEARCH, &f, 0);
808
809         display_flag_aux(creature_ptr, row + 7, col, "乗馬        :", TR_RIDING, &f, 0);
810         display_flag_aux(creature_ptr, row + 8, col, "投擲        :", TR_THROW, &f, 0);
811         display_flag_aux(creature_ptr, row + 9, col, "祝福        :", TR_BLESSED, &f, 0);
812         display_flag_aux(creature_ptr, row + 10, col, "反テレポート:", TR_NO_TELE, &f, 0);
813         display_flag_aux(creature_ptr, row + 11, col, "反魔法      :", TR_NO_MAGIC, &f, 0);
814         display_flag_aux(creature_ptr, row + 12, col, "消費魔力減少:", TR_DEC_MANA, &f, 0);
815
816         display_flag_aux(creature_ptr, row + 14, col, "経験値減少  :", TR_DRAIN_EXP, &f, 0);
817         display_flag_aux(creature_ptr, row + 15, col, "乱テレポート:", TR_TELEPORT, &f, 0);
818         display_flag_aux(creature_ptr, row + 16, col, "反感        :", TR_AGGRAVATE, &f, 0);
819         display_flag_aux(creature_ptr, row + 17, col, "太古の怨念  :", TR_TY_CURSE, &f, 0);
820 #else
821         display_flag_aux(creature_ptr, row + 0, col, "Add Blows   :", TR_BLOWS, &f, 0);
822         display_flag_aux(creature_ptr, row + 1, col, "Add Tunnel  :", TR_TUNNEL, &f, 0);
823         display_flag_aux(creature_ptr, row + 2, col, "Add Infra   :", TR_INFRA, &f, 0);
824         display_flag_aux(creature_ptr, row + 3, col, "Add Device  :", TR_MAGIC_MASTERY, &f, 0);
825         display_flag_aux(creature_ptr, row + 4, col, "Add Stealth :", TR_STEALTH, &f, 0);
826         display_flag_aux(creature_ptr, row + 5, col, "Add Search  :", TR_SEARCH, &f, 0);
827
828         display_flag_aux(creature_ptr, row + 7, col, "Riding      :", TR_RIDING, &f, 0);
829         display_flag_aux(creature_ptr, row + 8, col, "Throw       :", TR_THROW, &f, 0);
830         display_flag_aux(creature_ptr, row + 9, col, "Blessed     :", TR_BLESSED, &f, 0);
831         display_flag_aux(creature_ptr, row + 10, col, "No Teleport :", TR_NO_TELE, &f, 0);
832         display_flag_aux(creature_ptr, row + 11, col, "Anti Magic  :", TR_NO_MAGIC, &f, 0);
833         display_flag_aux(creature_ptr, row + 12, col, "Econom. Mana:", TR_DEC_MANA, &f, 0);
834
835         display_flag_aux(creature_ptr, row + 14, col, "Drain Exp   :", TR_DRAIN_EXP, &f, 0);
836         display_flag_aux(creature_ptr, row + 15, col, "Rnd.Teleport:", TR_TELEPORT, &f, 0);
837         display_flag_aux(creature_ptr, row + 16, col, "Aggravate   :", TR_AGGRAVATE, &f, 0);
838         display_flag_aux(creature_ptr, row + 17, col, "TY Curse    :", TR_TY_CURSE, &f, 0);
839 #endif
840
841 }
842
843
844 /*!
845  * @brief プレイヤーの打撃能力修正を表示する
846  * @param creature_ptr プレーヤーへの参照ポインタ
847  * @param hand 武器の装備部位ID
848  * @param hand_entry 項目ID
849  * @return なし
850  */
851 static void display_player_melee_bonus(player_type *creature_ptr, int hand, int hand_entry)
852 {
853         HIT_PROB show_tohit = creature_ptr->dis_to_h[hand];
854         HIT_POINT show_todam = creature_ptr->dis_to_d[hand];
855         object_type *o_ptr = &creature_ptr->inventory_list[INVEN_RARM + hand];
856
857         if (object_is_known(o_ptr)) show_tohit += o_ptr->to_h;
858         if (object_is_known(o_ptr)) show_todam += o_ptr->to_d;
859
860         show_tohit += creature_ptr->skill_thn / BTH_PLUS_ADJ;
861
862         char buf[160];
863         sprintf(buf, "(%+d,%+d)", (int)show_tohit, (int)show_todam);
864
865         if (!has_melee_weapon(creature_ptr, INVEN_RARM) && !has_melee_weapon(creature_ptr, INVEN_LARM))
866                 display_player_one_line(ENTRY_BARE_HAND, buf, TERM_L_BLUE);
867         else if (creature_ptr->ryoute)
868                 display_player_one_line(ENTRY_TWO_HANDS, buf, TERM_L_BLUE);
869         else
870                 display_player_one_line(hand_entry, buf, TERM_L_BLUE);
871 }
872
873
874 /*!
875  * @brief プレイヤーステータス表示の中央部分を表示するサブルーチン
876  * @param creature_ptr プレーヤーへの参照ポインタ
877  * Prints the following information on the screen.
878  * @return なし
879  */
880 static void display_player_middle(player_type *creature_ptr)
881 {
882         HIT_PROB show_tohit = creature_ptr->dis_to_h_b;
883         HIT_POINT show_todam = 0;
884         if (creature_ptr->migite)
885         {
886                 display_player_melee_bonus(creature_ptr, 0, left_hander ? ENTRY_LEFT_HAND1 : ENTRY_RIGHT_HAND1);
887         }
888
889         if (creature_ptr->hidarite)
890         {
891                 display_player_melee_bonus(creature_ptr, 1, left_hander ? ENTRY_RIGHT_HAND2 : ENTRY_LEFT_HAND2);
892         }
893         else if ((creature_ptr->pclass == CLASS_MONK) && (empty_hands(creature_ptr, TRUE) & EMPTY_HAND_RARM))
894         {
895                 int i;
896                 if (creature_ptr->special_defense & KAMAE_MASK)
897                 {
898                         for (i = 0; i < MAX_KAMAE; i++)
899                         {
900                                 if ((creature_ptr->special_defense >> i) & KAMAE_GENBU) break;
901                         }
902                         if (i < MAX_KAMAE)
903                         {
904                                 display_player_one_line(ENTRY_POSTURE, format(_("%sの構え", "%s form"), kamae_shurui[i].desc), TERM_YELLOW);
905                         }
906                 }
907                 else
908                 {
909                         display_player_one_line(ENTRY_POSTURE, _("構えなし", "none"), TERM_YELLOW);
910                 }
911         }
912
913         object_type *o_ptr = &creature_ptr->inventory_list[INVEN_BOW];
914         if (object_is_known(o_ptr)) show_tohit += o_ptr->to_h;
915         if (object_is_known(o_ptr)) show_todam += o_ptr->to_d;
916
917         if ((o_ptr->sval == SV_LIGHT_XBOW) || (o_ptr->sval == SV_HEAVY_XBOW))
918                 show_tohit += creature_ptr->weapon_exp[0][o_ptr->sval] / 400;
919         else
920                 show_tohit += (creature_ptr->weapon_exp[0][o_ptr->sval] - (WEAPON_EXP_MASTER / 2)) / 200;
921
922         show_tohit += creature_ptr->skill_thb / BTH_PLUS_ADJ;
923
924         display_player_one_line(ENTRY_SHOOT_HIT_DAM, format("(%+d,%+d)", show_tohit, show_todam), TERM_L_BLUE);
925         int tmul = 0;
926         if (creature_ptr->inventory_list[INVEN_BOW].k_idx)
927         {
928                 tmul = bow_tmul(creature_ptr->inventory_list[INVEN_BOW].sval);
929                 if (creature_ptr->xtra_might) tmul++;
930
931                 tmul = tmul * (100 + (int)(adj_str_td[creature_ptr->stat_ind[A_STR]]) - 128);
932         }
933
934         display_player_one_line(ENTRY_SHOOT_POWER, format("x%d.%02d", tmul / 100, tmul % 100), TERM_L_BLUE);
935         display_player_one_line(ENTRY_BASE_AC, format("[%d,%+d]", creature_ptr->dis_ac, creature_ptr->dis_to_a), TERM_L_BLUE);
936
937         int i = creature_ptr->pspeed - 110;
938         if (creature_ptr->action == ACTION_SEARCH) i += 10;
939
940         TERM_COLOR attr;
941         if (i > 0)
942         {
943                 if (!creature_ptr->riding)
944                         attr = TERM_L_GREEN;
945                 else
946                         attr = TERM_GREEN;
947         }
948         else if (i == 0)
949         {
950                 if (!creature_ptr->riding)
951                         attr = TERM_L_BLUE;
952                 else
953                         attr = TERM_GREEN;
954         }
955         else
956         {
957                 if (!creature_ptr->riding)
958                         attr = TERM_L_UMBER;
959                 else
960                         attr = TERM_RED;
961         }
962
963         int tmp_speed = 0;
964         if (!creature_ptr->riding)
965         {
966                 if (IS_FAST(creature_ptr)) tmp_speed += 10;
967                 if (creature_ptr->slow) tmp_speed -= 10;
968                 if (creature_ptr->lightspeed) tmp_speed = 99;
969         }
970         else
971         {
972                 if (MON_FAST(&creature_ptr->current_floor_ptr->m_list[creature_ptr->riding])) tmp_speed += 10;
973                 if (MON_SLOW(&creature_ptr->current_floor_ptr->m_list[creature_ptr->riding])) tmp_speed -= 10;
974         }
975
976         char buf[160];
977         if (tmp_speed)
978         {
979                 if (!creature_ptr->riding)
980                         sprintf(buf, "(%+d%+d)", i - tmp_speed, tmp_speed);
981                 else
982                         sprintf(buf, _("乗馬中 (%+d%+d)", "Riding (%+d%+d)"), i - tmp_speed, tmp_speed);
983
984                 if (tmp_speed > 0)
985                         attr = TERM_YELLOW;
986                 else
987                         attr = TERM_VIOLET;
988         }
989         else
990         {
991                 if (!creature_ptr->riding)
992                         sprintf(buf, "(%+d)", i);
993                 else
994                         sprintf(buf, _("乗馬中 (%+d)", "Riding (%+d)"), i);
995         }
996
997         display_player_one_line(ENTRY_SPEED, buf, attr);
998         display_player_one_line(ENTRY_LEVEL, format("%d", creature_ptr->lev), TERM_L_GREEN);
999
1000         int e = (creature_ptr->prace == RACE_ANDROID) ? ENTRY_EXP_ANDR : ENTRY_CUR_EXP;
1001         if (creature_ptr->exp >= creature_ptr->max_exp)
1002                 display_player_one_line(e, format("%ld", creature_ptr->exp), TERM_L_GREEN);
1003         else
1004                 display_player_one_line(e, format("%ld", creature_ptr->exp), TERM_YELLOW);
1005
1006         if (creature_ptr->prace != RACE_ANDROID)
1007                 display_player_one_line(ENTRY_MAX_EXP, format("%ld", creature_ptr->max_exp), TERM_L_GREEN);
1008
1009         e = (creature_ptr->prace == RACE_ANDROID) ? ENTRY_EXP_TO_ADV_ANDR : ENTRY_EXP_TO_ADV;
1010
1011         if (creature_ptr->lev >= PY_MAX_LEVEL)
1012                 display_player_one_line(e, "*****", TERM_L_GREEN);
1013         else if (creature_ptr->prace == RACE_ANDROID)
1014                 display_player_one_line(e, format("%ld", (s32b)(player_exp_a[creature_ptr->lev - 1] * creature_ptr->expfact / 100L)), TERM_L_GREEN);
1015         else
1016                 display_player_one_line(e, format("%ld", (s32b)(player_exp[creature_ptr->lev - 1] * creature_ptr->expfact / 100L)), TERM_L_GREEN);
1017
1018         display_player_one_line(ENTRY_GOLD, format("%ld", creature_ptr->au), TERM_L_GREEN);
1019
1020         int day, hour, min;
1021         extract_day_hour_min(creature_ptr, &day, &hour, &min);
1022
1023         if (day < MAX_DAYS)
1024                 sprintf(buf, _("%d日目 %2d:%02d", "Day %d %2d:%02d"), day, hour, min);
1025         else
1026                 sprintf(buf, _("*****日目 %2d:%02d", "Day ***** %2d:%02d"), hour, min);
1027
1028         display_player_one_line(ENTRY_DAY, buf, TERM_L_GREEN);
1029
1030         if (creature_ptr->chp >= creature_ptr->mhp)
1031                 display_player_one_line(ENTRY_HP, format("%4d/%4d", creature_ptr->chp, creature_ptr->mhp), TERM_L_GREEN);
1032         else if (creature_ptr->chp > (creature_ptr->mhp * hitpoint_warn) / 10)
1033                 display_player_one_line(ENTRY_HP, format("%4d/%4d", creature_ptr->chp, creature_ptr->mhp), TERM_YELLOW);
1034         else
1035                 display_player_one_line(ENTRY_HP, format("%4d/%4d", creature_ptr->chp, creature_ptr->mhp), TERM_RED);
1036
1037         if (creature_ptr->csp >= creature_ptr->msp)
1038                 display_player_one_line(ENTRY_SP, format("%4d/%4d", creature_ptr->csp, creature_ptr->msp), TERM_L_GREEN);
1039         else if (creature_ptr->csp > (creature_ptr->msp * mana_warn) / 10)
1040                 display_player_one_line(ENTRY_SP, format("%4d/%4d", creature_ptr->csp, creature_ptr->msp), TERM_YELLOW);
1041         else
1042                 display_player_one_line(ENTRY_SP, format("%4d/%4d", creature_ptr->csp, creature_ptr->msp), TERM_RED);
1043
1044         u32b play_hour = current_world_ptr->play_time / (60 * 60);
1045         u32b play_min = (current_world_ptr->play_time / 60) % 60;
1046         u32b play_sec = current_world_ptr->play_time % 60;
1047         display_player_one_line(ENTRY_PLAY_TIME, format("%.2lu:%.2lu:%.2lu", play_hour, play_min, play_sec), TERM_L_GREEN);
1048 }
1049
1050
1051 /*!
1052  * @brief プレイヤーのステータス表示メイン処理
1053  * Display the character on the screen (various modes)
1054  * @param creature_ptr プレーヤーへの参照ポインタ
1055  * @param mode 表示モードID
1056  * @return なし
1057  * @details
1058  * <pre>
1059  * The top one and bottom two lines are left blank.
1060  * Mode 0 = standard display with skills
1061  * Mode 1 = standard display with history
1062  * Mode 2 = summary of various things
1063  * Mode 3 = summary of various things (part 2)
1064  * Mode 4 = mutations
1065  * </pre>
1066  */
1067 void display_player(player_type *creature_ptr, int mode)
1068 {
1069         if ((creature_ptr->muta1 || creature_ptr->muta2 || creature_ptr->muta3) && display_mutations)
1070                 mode = (mode % 5);
1071         else
1072                 mode = (mode % 4);
1073
1074         clear_from(0);
1075
1076         if (mode == 2)
1077         {
1078                 display_player_misc_info(creature_ptr);
1079                 display_player_stat_info(creature_ptr);
1080                 display_player_flag_info(creature_ptr);
1081                 return;
1082         }
1083
1084         if (mode == 3)
1085         {
1086                 display_player_other_flag_info(creature_ptr);
1087                 return;
1088         }
1089
1090         if (mode == 4)
1091         {
1092                 do_cmd_knowledge_mutations(creature_ptr);
1093                 return;
1094         }
1095
1096         char tmp[64];
1097         if ((mode != 0) && (mode != 1)) return;
1098
1099         /* Name, Sex, Race, Class */
1100 #ifdef JP
1101         sprintf(tmp, "%s%s%s", ap_ptr->title, ap_ptr->no == 1 ? "の" : "", creature_ptr->name);
1102 #else
1103         sprintf(tmp, "%s %s", ap_ptr->title, creature_ptr->name);
1104 #endif
1105
1106         display_player_one_line(ENTRY_NAME, tmp, TERM_L_BLUE);
1107         display_player_one_line(ENTRY_SEX, sp_ptr->title, TERM_L_BLUE);
1108         display_player_one_line(ENTRY_RACE, (creature_ptr->mimic_form ? mimic_info[creature_ptr->mimic_form].title : rp_ptr->title), TERM_L_BLUE);
1109         display_player_one_line(ENTRY_CLASS, cp_ptr->title, TERM_L_BLUE);
1110
1111         if (creature_ptr->realm1)
1112         {
1113                 if (creature_ptr->realm2)
1114                         sprintf(tmp, "%s, %s", realm_names[creature_ptr->realm1], realm_names[creature_ptr->realm2]);
1115                 else
1116                         strcpy(tmp, realm_names[creature_ptr->realm1]);
1117                 display_player_one_line(ENTRY_REALM, tmp, TERM_L_BLUE);
1118         }
1119
1120         if ((creature_ptr->pclass == CLASS_CHAOS_WARRIOR) || (creature_ptr->muta2 & MUT2_CHAOS_GIFT))
1121                 display_player_one_line(ENTRY_PATRON, chaos_patrons[creature_ptr->chaos_patron], TERM_L_BLUE);
1122
1123         /* Age, Height, Weight, Social */
1124         /* 身長はセンチメートルに、体重はキログラムに変更してあります */
1125 #ifdef JP
1126         display_player_one_line(ENTRY_AGE, format("%d才", (int)creature_ptr->age), TERM_L_BLUE);
1127         display_player_one_line(ENTRY_HEIGHT, format("%dcm", (int)((creature_ptr->ht * 254) / 100)), TERM_L_BLUE);
1128         display_player_one_line(ENTRY_WEIGHT, format("%dkg", (int)((creature_ptr->wt * 4536) / 10000)), TERM_L_BLUE);
1129         display_player_one_line(ENTRY_SOCIAL, format("%d  ", (int)creature_ptr->sc), TERM_L_BLUE);
1130 #else
1131         display_player_one_line(ENTRY_AGE, format("%d", (int)creature_ptr->age), TERM_L_BLUE);
1132         display_player_one_line(ENTRY_HEIGHT, format("%d", (int)creature_ptr->ht), TERM_L_BLUE);
1133         display_player_one_line(ENTRY_WEIGHT, format("%d", (int)creature_ptr->wt), TERM_L_BLUE);
1134         display_player_one_line(ENTRY_SOCIAL, format("%d", (int)creature_ptr->sc), TERM_L_BLUE);
1135 #endif
1136         display_player_one_line(ENTRY_ALIGN, format("%s", your_alignment(creature_ptr)), TERM_L_BLUE);
1137
1138         char buf[80];
1139         for (int i = 0; i < A_MAX; i++)
1140         {
1141                 if (creature_ptr->stat_cur[i] < creature_ptr->stat_max[i])
1142                 {
1143                         put_str(stat_names_reduced[i], 3 + i, 53);
1144                         int value = creature_ptr->stat_use[i];
1145                         cnv_stat(value, buf);
1146                         c_put_str(TERM_YELLOW, buf, 3 + i, 60);
1147                         value = creature_ptr->stat_top[i];
1148                         cnv_stat(value, buf);
1149                         c_put_str(TERM_L_GREEN, buf, 3 + i, 67);
1150                 }
1151                 else
1152                 {
1153                         put_str(stat_names[i], 3 + i, 53);
1154                         cnv_stat(creature_ptr->stat_use[i], buf);
1155                         c_put_str(TERM_L_GREEN, buf, 3 + i, 60);
1156                 }
1157
1158                 if (creature_ptr->stat_max[i] == creature_ptr->stat_max_max[i])
1159                 {
1160                         c_put_str(TERM_WHITE, "!", 3 + i, _(58, 58 - 2));
1161                 }
1162         }
1163
1164         floor_type *floor_ptr = creature_ptr->current_floor_ptr;
1165         if (mode == 0)
1166         {
1167                 display_player_middle(creature_ptr);
1168                 display_player_various(creature_ptr);
1169                 return;
1170         }
1171
1172         char statmsg[1000];
1173         put_str(_("(キャラクターの生い立ち)", "(Character Background)"), 11, 25);
1174
1175         for (int i = 0; i < 4; i++)
1176         {
1177                 put_str(creature_ptr->history[i], i + 12, 10);
1178         }
1179
1180         *statmsg = '\0';
1181
1182         if (creature_ptr->is_dead)
1183         {
1184                 if (current_world_ptr->total_winner)
1185                 {
1186 #ifdef JP
1187                         sprintf(statmsg, "…あなたは勝利の後%sした。", streq(creature_ptr->died_from, "Seppuku") ? "切腹" : "引退");
1188 #else
1189                         sprintf(statmsg, "...You %s after winning.", streq(creature_ptr->died_from, "Seppuku") ? "committed seppuku" : "retired from the adventure");
1190 #endif
1191                 }
1192                 else if (!floor_ptr->dun_level)
1193                 {
1194 #ifdef JP
1195                         sprintf(statmsg, "…あなたは%sで%sに殺された。", map_name(creature_ptr), creature_ptr->died_from);
1196 #else
1197                         sprintf(statmsg, "...You were killed by %s in %s.", creature_ptr->died_from, map_name(creature_ptr));
1198 #endif
1199                 }
1200                 else if (floor_ptr->inside_quest && is_fixed_quest_idx(floor_ptr->inside_quest))
1201                 {
1202                         /* Get the quest text */
1203                         /* Bewere that INIT_ASSIGN resets the cur_num. */
1204                         init_flags = INIT_NAME_ONLY;
1205
1206                         process_dungeon_file(creature_ptr, "q_info.txt", 0, 0, 0, 0);
1207
1208 #ifdef JP
1209                         sprintf(statmsg, "…あなたは、クエスト「%s」で%sに殺された。", quest[floor_ptr->inside_quest].name, creature_ptr->died_from);
1210 #else
1211                         sprintf(statmsg, "...You were killed by %s in the quest '%s'.", creature_ptr->died_from, quest[floor_ptr->inside_quest].name);
1212 #endif
1213                 }
1214                 else
1215                 {
1216 #ifdef JP
1217                         sprintf(statmsg, "…あなたは、%sの%d階で%sに殺された。", map_name(creature_ptr), (int)floor_ptr->dun_level, creature_ptr->died_from);
1218 #else
1219                         sprintf(statmsg, "...You were killed by %s on level %d of %s.", creature_ptr->died_from, floor_ptr->dun_level, map_name(creature_ptr));
1220 #endif
1221                 }
1222         }
1223         else if (current_world_ptr->character_dungeon)
1224         {
1225                 if (!floor_ptr->dun_level)
1226                 {
1227                         sprintf(statmsg, _("…あなたは現在、 %s にいる。", "...Now, you are in %s."), map_name(creature_ptr));
1228                 }
1229                 else if (floor_ptr->inside_quest && is_fixed_quest_idx(floor_ptr->inside_quest))
1230                 {
1231                         /* Clear the text */
1232                         /* Must be done before doing INIT_SHOW_TEXT */
1233                         for (int i = 0; i < 10; i++)
1234                         {
1235                                 quest_text[i][0] = '\0';
1236                         }
1237
1238                         quest_text_line = 0;
1239                         init_flags = INIT_NAME_ONLY;
1240                         process_dungeon_file(creature_ptr, "q_info.txt", 0, 0, 0, 0);
1241                         sprintf(statmsg, _("…あなたは現在、 クエスト「%s」を遂行中だ。", "...Now, you are in the quest '%s'."), quest[floor_ptr->inside_quest].name);
1242                 }
1243                 else
1244                 {
1245 #ifdef JP
1246                         sprintf(statmsg, "…あなたは現在、 %s の %d 階で探索している。", map_name(creature_ptr), (int)floor_ptr->dun_level);
1247 #else
1248                         sprintf(statmsg, "...Now, you are exploring level %d of %s.", floor_ptr->dun_level, map_name(creature_ptr));
1249 #endif
1250                 }
1251         }
1252
1253         if (!*statmsg) return;
1254
1255         char temp[64 * 2];
1256         roff_to_buf(statmsg, 60, temp, sizeof(temp));
1257         char  *t;
1258         t = temp;
1259         for (int i = 0; i < 2; i++)
1260         {
1261                 if (t[0] == 0) return;
1262
1263                 put_str(t, i + 5 + 12, 10);
1264                 t += strlen(t) + 1;
1265         }
1266 }