2 * @brief プレーヤー表示に関するあれこれ (整理中)
6 * ここにこれ以上関数を引っ越してくるのは禁止。何ならここから更に分割していく
9 #include "display-player.h"
10 #include "player-personality.h"
12 #include "status-first-page.h"
13 #include "player-sex.h"
17 #include "core.h" // 暫定。後で消す
18 #include "player/permanent-resistances.h"
19 #include "player/temporary-resistances.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"
28 #include "dungeon-file.h"
29 #include "objectkind.h"
30 #include "view/display-util.h"
33 * @brief プレイヤーの種族による免疫フラグを返す
34 * @param creature_ptr プレーヤーへの参照ポインタ
35 * @param flgs フラグを保管する配列
38 * xtra1.c周りと多重実装になっているのを何とかする
40 static void player_immunity(player_type *creature_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE])
42 for (int i = 0; i < TR_FLAG_SIZE; i++)
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);
57 * @brief プレイヤーの一時的魔法効果による免疫フラグを返す
58 * @param creature_ptr プレーヤーへの参照ポインタ
59 * @param flgs フラグを保管する配列
62 * xtra1.c周りと多重実装になっているのを何とかする
64 static void tim_player_immunity(player_type *creature_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE])
66 for (int i = 0; i < TR_FLAG_SIZE; i++)
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);
83 * @brief プレイヤーの装備による免疫フラグを返す
84 * @param creature_ptr プレーヤーへの参照ポインタ
85 * @param flgs フラグを保管する配列
88 * xtra1.c周りと多重実装になっているのを何とかする
90 static void known_obj_immunity(player_type *creature_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE])
92 for (int i = 0; i < TR_FLAG_SIZE; i++)
95 for (int i = INVEN_RARM; i < INVEN_TOTAL; i++)
97 u32b o_flgs[TR_FLAG_SIZE];
99 o_ptr = &creature_ptr->inventory_list[i];
100 if (!o_ptr->k_idx) continue;
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);
112 * @brief プレイヤーの種族による弱点フラグを返す
113 * @param creature_ptr プレーヤーへの参照ポインタ
114 * @param flgs フラグを保管する配列
117 * xtra1.c周りと多重実装になっているのを何とかする
119 static void player_vuln_flags(player_type *creature_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE])
121 for (int i = 0; i < TR_FLAG_SIZE; i++)
124 if ((creature_ptr->muta3 & MUT3_VULN_ELEM) || (creature_ptr->special_defense & KATA_KOUKIJIN))
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);
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);
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 表示オプション
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)
156 byte header_color = TERM_L_DARK;
157 int header_col = col;
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)))
166 col += strlen(header) + 1;
168 /* Weapon flags need only two column */
169 int max_i = (mode & DP_WP) ? INVEN_LARM + 1 : INVEN_TOTAL;
171 for (int i = INVEN_RARM; i < max_i; i++)
173 BIT_FLAGS flgs[TR_FLAG_SIZE];
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);
182 if (have_flag(flgs, TR_ADD_L_CURSE) || have_flag(flgs, TR_ADD_H_CURSE))
184 c_put_str(TERM_L_DARK, "+", row, col);
185 header_color = TERM_WHITE;
188 if (o_ptr->curse_flags & (TRC_CURSED | TRC_HEAVY_CURSE))
190 c_put_str(TERM_WHITE, "+", row, col);
191 header_color = TERM_WHITE;
194 if (o_ptr->curse_flags & TRC_PERMA_CURSE)
196 c_put_str(TERM_WHITE, "*", row, col);
197 header_color = TERM_WHITE;
204 if (flag1 == TR_LITE_1)
206 if (HAVE_DARK_FLAG(flgs))
208 c_put_str(TERM_L_DARK, "+", row, col);
209 header_color = TERM_WHITE;
211 else if (HAVE_LITE_FLAG(flgs))
213 c_put_str(TERM_WHITE, "+", row, col);
214 header_color = TERM_WHITE;
221 if (have_flag(flgs, flag1))
223 c_put_str((byte)(vuln ? TERM_L_RED : TERM_WHITE),
224 (mode & DP_IMM) ? "*" : "+", row, col);
225 header_color = TERM_WHITE;
233 if (header_color != TERM_L_DARK)
235 c_put_str(header_color, header, row, header_col);
241 c_put_str((byte)(vuln ? TERM_RED : TERM_SLATE), ".", row, col);
242 if (have_flag(f->player_flags, flag1))
244 c_put_str((byte)(vuln ? TERM_L_RED : TERM_WHITE), "+", row, col);
245 header_color = TERM_WHITE;
248 if (have_flag(f->tim_player_flags, flag1))
250 c_put_str((byte)(vuln ? TERM_ORANGE : TERM_YELLOW), "#", row, col);
251 header_color = TERM_WHITE;
254 if (have_flag(f->tim_player_imm, flag1))
256 c_put_str(TERM_YELLOW, "*", row, col);
257 header_color = TERM_WHITE;
260 if (have_flag(f->player_imm, flag1))
262 c_put_str(TERM_WHITE, "*", row, col);
263 header_color = TERM_WHITE;
266 if (vuln) c_put_str(TERM_RED, "v", row, col + 1);
267 c_put_str(header_color, header, row, header_col);
272 * @brief プレイヤーの特性フラグ一覧表示2a /
273 * @param creature_ptr プレーヤーへの参照ポインタ
274 * Special display, part 2a
277 static void display_player_misc_info(player_type *creature_ptr)
280 put_str("名前 :", 1, 26);
281 put_str("性別 :", 3, 1);
282 put_str("種族 :", 4, 1);
283 put_str("職業 :", 5, 1);
285 put_str("Name :", 1, 26);
286 put_str("Sex :", 3, 1);
287 put_str("Race :", 4, 1);
288 put_str("Class :", 5, 1);
293 strcpy(tmp, ap_ptr->title);
300 strcat(tmp, creature_ptr->name);
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);
308 put_str("レベル:", 6, 1);
309 put_str("HP :", 7, 1);
310 put_str("MP :", 8, 1);
312 put_str("Level :", 6, 1);
313 put_str("Hits :", 7, 1);
314 put_str("Mana :", 8, 1);
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);
327 * @brief プレイヤーの特性フラグ一覧表示2b /
328 * Special display, part 2b
329 * @param creature_ptr プレーヤーへの参照ポインタ
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 '.'
342 static void display_player_stat_info(player_type *creature_ptr)
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);
353 for (int i = 0; i < A_MAX; i++)
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];
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;
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;
371 if (PRACE_IS_(creature_ptr, RACE_ENT))
377 if (creature_ptr->lev > 25) r_adj++;
378 if (creature_ptr->lev > 40) r_adj++;
379 if (creature_ptr->lev > 45) r_adj++;
382 if (creature_ptr->lev > 25) r_adj--;
383 if (creature_ptr->lev > 40) r_adj--;
384 if (creature_ptr->lev > 45) r_adj--;
390 e_adj -= cp_ptr->c_adj[i];
391 e_adj -= ap_ptr->a_adj[i];
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);
396 c_put_str(TERM_WHITE, stat_names[i], row + i + 1, stat_col + 1);
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));
404 c_put_str(TERM_BLUE, buf, row + i + 1, stat_col + 13 - strlen(buf));
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);
415 cnv_stat(creature_ptr->stat_top[i], buf);
416 c_put_str(TERM_L_GREEN, buf, row + i + 1, stat_col + 26);
418 if (creature_ptr->stat_use[i] < creature_ptr->stat_top[i])
420 cnv_stat(creature_ptr->stat_use[i], buf);
421 c_put_str(TERM_YELLOW, buf, row + i + 1, stat_col + 33);
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);
429 BIT_FLAGS flgs[TR_FLAG_SIZE];
430 for (int i = INVEN_RARM; i < INVEN_TOTAL; i++)
433 o_ptr = &creature_ptr->inventory_list[i];
434 object_flags_known(o_ptr, flgs);
435 for (int stat = 0; stat < A_MAX; stat++)
439 if (have_flag(flgs, stat))
446 if (o_ptr->pval < 10) c = '0' + o_ptr->pval;
449 if (have_flag(flgs, stat + TR_SUST_STR))
457 if (o_ptr->pval > -10) c = '0' - o_ptr->pval;
460 else if (have_flag(flgs, stat + TR_SUST_STR))
466 Term_putch(col, row + stat + 1, a, c);
472 player_flags(creature_ptr, flgs);
473 for (int stat = 0; stat < A_MAX; stat++)
478 if (creature_ptr->muta3 || creature_ptr->tsuyoshi)
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;
488 else if (stat == A_WIS || stat == A_INT)
490 if (creature_ptr->muta3 & MUT3_HYPER_INT) dummy += 4;
491 if (creature_ptr->muta3 & MUT3_MORONIC) dummy -= 4;
493 else if (stat == A_DEX)
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;
499 else if (stat == A_CON)
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;
507 else if (stat == A_CHR)
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;
526 if (dummy < 10) c = '0' + dummy;
532 if (dummy > -10) c = '0' - dummy;
537 if (have_flag(flgs, stat + TR_SUST_STR))
543 Term_putch(col, row + stat + 1, a, c);
549 * @brief プレイヤーの特性フラグ一覧表示1
550 * @param creature_ptr プレーヤーへの参照ポインタ
551 * Special display, part 1
554 static void display_player_flag_info(player_type *creature_ptr)
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);
567 display_player_equippy(creature_ptr, row - 2, col + 8, 0);
568 c_put_str(TERM_WHITE, "abcdefghijkl@", row - 1, col + 8);
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);
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);
605 display_player_equippy(creature_ptr, row - 2, col + 8, 0);
606 c_put_str(TERM_WHITE, "abcdefghijkl@", row - 1, col + 8);
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);
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);
635 display_player_equippy(creature_ptr, row - 2, col + 12, 0);
636 c_put_str(TERM_WHITE, "abcdefghijkl@", row - 1, col + 12);
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);
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);
665 * @brief プレイヤーの特性フラグ一覧表示2 /
666 * @param creature_ptr プレーヤーへの参照ポインタ
667 * Special display, part 2
670 static void display_player_other_flag_info(player_type *creature_ptr)
672 /* Extract flags and store */
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);
684 display_player_equippy(creature_ptr, row - 2, col + 12, DP_WP);
685 c_put_str(TERM_WHITE, "ab@", row - 1, col + 12);
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);
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);
750 display_player_equippy(creature_ptr, row - 2, col + 13, 0);
751 c_put_str(TERM_WHITE, "abcdefghijkl@", row - 1, col + 13);
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);
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);
798 display_player_equippy(creature_ptr, row - 2, col + 14, 0);
799 c_put_str(TERM_WHITE, "abcdefghijkl@", row - 1, col + 14);
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);
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);
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);
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);
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);
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);
845 * @brief プレイヤーの打撃能力修正を表示する
846 * @param creature_ptr プレーヤーへの参照ポインタ
847 * @param hand 武器の装備部位ID
848 * @param hand_entry 項目ID
851 static void display_player_melee_bonus(player_type *creature_ptr, int hand, int hand_entry)
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];
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;
860 show_tohit += creature_ptr->skill_thn / BTH_PLUS_ADJ;
863 sprintf(buf, "(%+d,%+d)", (int)show_tohit, (int)show_todam);
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);
870 display_player_one_line(hand_entry, buf, TERM_L_BLUE);
875 * @brief プレイヤーステータス表示の中央部分を表示するサブルーチン
876 * @param creature_ptr プレーヤーへの参照ポインタ
877 * Prints the following information on the screen.
880 static void display_player_middle(player_type *creature_ptr)
882 HIT_PROB show_tohit = creature_ptr->dis_to_h_b;
883 HIT_POINT show_todam = 0;
884 if (creature_ptr->migite)
886 display_player_melee_bonus(creature_ptr, 0, left_hander ? ENTRY_LEFT_HAND1 : ENTRY_RIGHT_HAND1);
889 if (creature_ptr->hidarite)
891 display_player_melee_bonus(creature_ptr, 1, left_hander ? ENTRY_RIGHT_HAND2 : ENTRY_LEFT_HAND2);
893 else if ((creature_ptr->pclass == CLASS_MONK) && (empty_hands(creature_ptr, TRUE) & EMPTY_HAND_RARM))
896 if (creature_ptr->special_defense & KAMAE_MASK)
898 for (i = 0; i < MAX_KAMAE; i++)
900 if ((creature_ptr->special_defense >> i) & KAMAE_GENBU) break;
904 display_player_one_line(ENTRY_POSTURE, format(_("%sの構え", "%s form"), kamae_shurui[i].desc), TERM_YELLOW);
909 display_player_one_line(ENTRY_POSTURE, _("構えなし", "none"), TERM_YELLOW);
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;
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;
920 show_tohit += (creature_ptr->weapon_exp[0][o_ptr->sval] - (WEAPON_EXP_MASTER / 2)) / 200;
922 show_tohit += creature_ptr->skill_thb / BTH_PLUS_ADJ;
924 display_player_one_line(ENTRY_SHOOT_HIT_DAM, format("(%+d,%+d)", show_tohit, show_todam), TERM_L_BLUE);
926 if (creature_ptr->inventory_list[INVEN_BOW].k_idx)
928 tmul = bow_tmul(creature_ptr->inventory_list[INVEN_BOW].sval);
929 if (creature_ptr->xtra_might) tmul++;
931 tmul = tmul * (100 + (int)(adj_str_td[creature_ptr->stat_ind[A_STR]]) - 128);
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);
937 int i = creature_ptr->pspeed - 110;
938 if (creature_ptr->action == ACTION_SEARCH) i += 10;
943 if (!creature_ptr->riding)
950 if (!creature_ptr->riding)
957 if (!creature_ptr->riding)
964 if (!creature_ptr->riding)
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;
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;
979 if (!creature_ptr->riding)
980 sprintf(buf, "(%+d%+d)", i - tmp_speed, tmp_speed);
982 sprintf(buf, _("乗馬中 (%+d%+d)", "Riding (%+d%+d)"), i - tmp_speed, tmp_speed);
991 if (!creature_ptr->riding)
992 sprintf(buf, "(%+d)", i);
994 sprintf(buf, _("乗馬中 (%+d)", "Riding (%+d)"), i);
997 display_player_one_line(ENTRY_SPEED, buf, attr);
998 display_player_one_line(ENTRY_LEVEL, format("%d", creature_ptr->lev), TERM_L_GREEN);
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);
1004 display_player_one_line(e, format("%ld", creature_ptr->exp), TERM_YELLOW);
1006 if (creature_ptr->prace != RACE_ANDROID)
1007 display_player_one_line(ENTRY_MAX_EXP, format("%ld", creature_ptr->max_exp), TERM_L_GREEN);
1009 e = (creature_ptr->prace == RACE_ANDROID) ? ENTRY_EXP_TO_ADV_ANDR : ENTRY_EXP_TO_ADV;
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);
1016 display_player_one_line(e, format("%ld", (s32b)(player_exp[creature_ptr->lev - 1] * creature_ptr->expfact / 100L)), TERM_L_GREEN);
1018 display_player_one_line(ENTRY_GOLD, format("%ld", creature_ptr->au), TERM_L_GREEN);
1021 extract_day_hour_min(creature_ptr, &day, &hour, &min);
1024 sprintf(buf, _("%d日目 %2d:%02d", "Day %d %2d:%02d"), day, hour, min);
1026 sprintf(buf, _("*****日目 %2d:%02d", "Day ***** %2d:%02d"), hour, min);
1028 display_player_one_line(ENTRY_DAY, buf, TERM_L_GREEN);
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);
1035 display_player_one_line(ENTRY_HP, format("%4d/%4d", creature_ptr->chp, creature_ptr->mhp), TERM_RED);
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);
1042 display_player_one_line(ENTRY_SP, format("%4d/%4d", creature_ptr->csp, creature_ptr->msp), TERM_RED);
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);
1052 * @brief プレイヤーのステータス表示メイン処理
1053 * Display the character on the screen (various modes)
1054 * @param creature_ptr プレーヤーへの参照ポインタ
1055 * @param mode 表示モードID
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
1067 void display_player(player_type *creature_ptr, int mode)
1069 if ((creature_ptr->muta1 || creature_ptr->muta2 || creature_ptr->muta3) && display_mutations)
1078 display_player_misc_info(creature_ptr);
1079 display_player_stat_info(creature_ptr);
1080 display_player_flag_info(creature_ptr);
1086 display_player_other_flag_info(creature_ptr);
1092 do_cmd_knowledge_mutations(creature_ptr);
1097 if ((mode != 0) && (mode != 1)) return;
1099 /* Name, Sex, Race, Class */
1101 sprintf(tmp, "%s%s%s", ap_ptr->title, ap_ptr->no == 1 ? "の" : "", creature_ptr->name);
1103 sprintf(tmp, "%s %s", ap_ptr->title, creature_ptr->name);
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);
1111 if (creature_ptr->realm1)
1113 if (creature_ptr->realm2)
1114 sprintf(tmp, "%s, %s", realm_names[creature_ptr->realm1], realm_names[creature_ptr->realm2]);
1116 strcpy(tmp, realm_names[creature_ptr->realm1]);
1117 display_player_one_line(ENTRY_REALM, tmp, TERM_L_BLUE);
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);
1123 /* Age, Height, Weight, Social */
1124 /* 身長はセンチメートルに、体重はキログラムに変更してあります */
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);
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);
1136 display_player_one_line(ENTRY_ALIGN, format("%s", your_alignment(creature_ptr)), TERM_L_BLUE);
1139 for (int i = 0; i < A_MAX; i++)
1141 if (creature_ptr->stat_cur[i] < creature_ptr->stat_max[i])
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);
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);
1158 if (creature_ptr->stat_max[i] == creature_ptr->stat_max_max[i])
1160 c_put_str(TERM_WHITE, "!", 3 + i, _(58, 58 - 2));
1164 floor_type *floor_ptr = creature_ptr->current_floor_ptr;
1167 display_player_middle(creature_ptr);
1168 display_player_various(creature_ptr);
1173 put_str(_("(キャラクターの生い立ち)", "(Character Background)"), 11, 25);
1175 for (int i = 0; i < 4; i++)
1177 put_str(creature_ptr->history[i], i + 12, 10);
1182 if (creature_ptr->is_dead)
1184 if (current_world_ptr->total_winner)
1187 sprintf(statmsg, "…あなたは勝利の後%sした。", streq(creature_ptr->died_from, "Seppuku") ? "切腹" : "引退");
1189 sprintf(statmsg, "...You %s after winning.", streq(creature_ptr->died_from, "Seppuku") ? "committed seppuku" : "retired from the adventure");
1192 else if (!floor_ptr->dun_level)
1195 sprintf(statmsg, "…あなたは%sで%sに殺された。", map_name(creature_ptr), creature_ptr->died_from);
1197 sprintf(statmsg, "...You were killed by %s in %s.", creature_ptr->died_from, map_name(creature_ptr));
1200 else if (floor_ptr->inside_quest && is_fixed_quest_idx(floor_ptr->inside_quest))
1202 /* Get the quest text */
1203 /* Bewere that INIT_ASSIGN resets the cur_num. */
1204 init_flags = INIT_NAME_ONLY;
1206 process_dungeon_file(creature_ptr, "q_info.txt", 0, 0, 0, 0);
1209 sprintf(statmsg, "…あなたは、クエスト「%s」で%sに殺された。", quest[floor_ptr->inside_quest].name, creature_ptr->died_from);
1211 sprintf(statmsg, "...You were killed by %s in the quest '%s'.", creature_ptr->died_from, quest[floor_ptr->inside_quest].name);
1217 sprintf(statmsg, "…あなたは、%sの%d階で%sに殺された。", map_name(creature_ptr), (int)floor_ptr->dun_level, creature_ptr->died_from);
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));
1223 else if (current_world_ptr->character_dungeon)
1225 if (!floor_ptr->dun_level)
1227 sprintf(statmsg, _("…あなたは現在、 %s にいる。", "...Now, you are in %s."), map_name(creature_ptr));
1229 else if (floor_ptr->inside_quest && is_fixed_quest_idx(floor_ptr->inside_quest))
1231 /* Clear the text */
1232 /* Must be done before doing INIT_SHOW_TEXT */
1233 for (int i = 0; i < 10; i++)
1235 quest_text[i][0] = '\0';
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);
1246 sprintf(statmsg, "…あなたは現在、 %s の %d 階で探索している。", map_name(creature_ptr), (int)floor_ptr->dun_level);
1248 sprintf(statmsg, "...Now, you are exploring level %d of %s.", floor_ptr->dun_level, map_name(creature_ptr));
1253 if (!*statmsg) return;
1256 roff_to_buf(statmsg, 60, temp, sizeof(temp));
1259 for (int i = 0; i < 2; i++)
1261 if (t[0] == 0) return;
1263 put_str(t, i + 5 + 12, 10);