1 #include "view/display-self-info.h"
2 #include "io/input-key-acceptor.h"
3 #include "player-info/alignment.h"
4 #include "player-info/avatar.h"
5 #include "player-info/self-info-util.h"
6 #include "player/player-race.h"
7 #include "player/player-status-table.h"
8 #include "system/player-type-definition.h"
9 #include "term/screen-processor.h"
12 void display_life_rating(player_type *creature_ptr, self_info_type *self_ptr)
14 creature_ptr->knowledge |= KNOW_STAT | KNOW_HPRATE;
15 strcpy(self_ptr->plev_buf, "");
17 = (int)(((long)creature_ptr->player_hp[PY_MAX_LEVEL - 1] * 200L) / (2 * creature_ptr->hitdie + ((PY_MAX_LEVEL - 1 + 3) * (creature_ptr->hitdie + 1))));
18 sprintf(self_ptr->plev_buf, _("現在の体力ランク : %d/100", "Your current Life Rating is %d/100."), percent);
19 strcpy(self_ptr->buf[0], self_ptr->plev_buf);
20 self_ptr->info[self_ptr->line++] = self_ptr->buf[0];
21 self_ptr->info[self_ptr->line++] = "";
24 void display_max_base_status(player_type *creature_ptr, self_info_type *self_ptr)
26 self_ptr->info[self_ptr->line++] = _("能力の最大値", "Limits of maximum stats");
27 for (int v_nr = 0; v_nr < A_MAX; v_nr++) {
29 sprintf(stat_desc, "%s 18/%d", stat_names[v_nr], creature_ptr->stat_max_max[v_nr] - 18);
30 strcpy(self_ptr->s_string[v_nr], stat_desc);
31 self_ptr->info[self_ptr->line++] = self_ptr->s_string[v_nr];
35 void display_virtue(player_type *creature_ptr, self_info_type *self_ptr)
37 self_ptr->info[self_ptr->line++] = "";
38 std::string alg = PlayerAlignment(creature_ptr).get_alignment_description(true);
39 sprintf(self_ptr->plev_buf, _("現在の属性 : %s", "Your alignment : %s"), alg.c_str());
40 strcpy(self_ptr->buf[1], self_ptr->plev_buf);
41 self_ptr->info[self_ptr->line++] = self_ptr->buf[1];
42 for (int v_nr = 0; v_nr < 8; v_nr++) {
43 GAME_TEXT vir_name[20];
45 int tester = creature_ptr->virtues[v_nr];
46 strcpy(vir_name, virtue[(creature_ptr->vir_types[v_nr]) - 1]);
47 sprintf(vir_desc, _("おっと。%sの情報なし。", "Oops. No info about %s."), vir_name);
49 sprintf(vir_desc, _("[%s]の対極 (%d)", "You are the polar opposite of %s (%d)."), vir_name, tester);
50 else if (tester < -80)
51 sprintf(vir_desc, _("[%s]の大敵 (%d)", "You are an arch-enemy of %s (%d)."), vir_name, tester);
52 else if (tester < -60)
53 sprintf(vir_desc, _("[%s]の強敵 (%d)", "You are a bitter enemy of %s (%d)."), vir_name, tester);
54 else if (tester < -40)
55 sprintf(vir_desc, _("[%s]の敵 (%d)", "You are an enemy of %s (%d)."), vir_name, tester);
56 else if (tester < -20)
57 sprintf(vir_desc, _("[%s]の罪者 (%d)", "You have sinned against %s (%d)."), vir_name, tester);
59 sprintf(vir_desc, _("[%s]の迷道者 (%d)", "You have strayed from the path of %s (%d)."), vir_name, tester);
61 sprintf(vir_desc, _("[%s]の中立者 (%d)", "You are neutral to %s (%d)."), vir_name, tester);
63 sprintf(vir_desc, _("[%s]の小徳者 (%d)", "You are somewhat virtuous in %s (%d)."), vir_name, tester);
65 sprintf(vir_desc, _("[%s]の中徳者 (%d)", "You are virtuous in %s (%d)."), vir_name, tester);
67 sprintf(vir_desc, _("[%s]の高徳者 (%d)", "You are very virtuous in %s (%d)."), vir_name, tester);
69 sprintf(vir_desc, _("[%s]の覇者 (%d)", "You are a champion of %s (%d)."), vir_name, tester);
70 else if (tester < 100)
71 sprintf(vir_desc, _("[%s]の偉大な覇者 (%d)", "You are a great champion of %s (%d)."), vir_name, tester);
73 sprintf(vir_desc, _("[%s]の具現者 (%d)", "You are the living embodiment of %s (%d)."), vir_name, tester);
75 strcpy(self_ptr->v_string[v_nr], vir_desc);
76 self_ptr->info[self_ptr->line++] = self_ptr->v_string[v_nr];
80 void display_mimic_race_ability(player_type *creature_ptr, self_info_type *self_ptr)
82 switch (creature_ptr->mimic_form) {
84 case MIMIC_DEMON_LORD:
85 sprintf(self_ptr->plev_buf, _("あなたは %d ダメージの地獄か火炎のブレスを吐くことができる。(%d MP)", "You can breathe nether, dam. %d (cost %d)."),
86 3 * creature_ptr->lev, 10 + creature_ptr->lev / 3);
88 self_ptr->info[self_ptr->line++] = self_ptr->plev_buf;
91 if (creature_ptr->lev <= 1)
94 sprintf(self_ptr->plev_buf, _("あなたは敵から %d-%d HP の生命力を吸収できる。(%d MP)", "You can steal life from a foe, dam. %d-%d (cost %d)."),
95 creature_ptr->lev + MAX(1, creature_ptr->lev / 10), creature_ptr->lev + creature_ptr->lev * MAX(1, creature_ptr->lev / 10),
96 1 + (creature_ptr->lev / 3));
97 self_ptr->info[self_ptr->line++] = self_ptr->plev_buf;
102 void display_self_info(self_info_type *self_ptr)
105 for (int k = 1; k < 24; k++)
108 prt(_(" あなたの状態:", " Your Attributes:"), 1, 15);
110 for (int j = 0; j < self_ptr->line; j++) {
111 prt(self_ptr->info[j], k++, 15);
113 /* Every 20 entries (lines 2 to 21), start over */
114 if ((k != 22) || (j + 1 >= self_ptr->line))
117 prt(_("-- 続く --", "-- more --"), k, 15);
123 prt(_("[何かキーを押すとゲームに戻ります]", "[Press any key to continue]"), k, 13);