7 #include "knowledge/knowledge-experiences.h"
8 #include "core/show-file.h"
9 #include "flavor/object-flavor.h"
10 #include "game-option/cheat-options.h"
11 #include "game-option/text-display-options.h"
12 #include "io-dump/dump-util.h"
13 #include "object/object-kind.h"
14 #include "player/player-class.h"
15 #include "player/player-skill.h"
16 #include "player/player-status.h"
17 #include "realm/realm-names-table.h"
18 #include "spell/spells-execution.h"
19 #include "spell/technic-info-table.h"
20 #include "sv-definition/sv-bow-types.h"
21 #include "system/player-type-definition.h"
22 #include "util/angband-files.h"
27 void do_cmd_knowledge_weapon_exp(player_type *creature_ptr)
30 GAME_TEXT file_name[FILE_NAME_SIZE];
31 if (!open_temporary_file(&fff, file_name))
34 for (int i = 0; i < 5; i++) {
35 for (int num = 0; num < 64; num++) {
37 for (KIND_OBJECT_IDX j = 0; j < max_k_idx; j++) {
38 object_kind *k_ptr = &k_info[j];
40 if ((k_ptr->tval != TV_SWORD - i) || (k_ptr->sval != num))
42 if ((k_ptr->tval == TV_BOW) && (k_ptr->sval == SV_CRIMSON || k_ptr->sval == SV_HARP))
45 SUB_EXP weapon_exp = creature_ptr->weapon_exp[4 - i][num];
46 SUB_EXP weapon_max = s_info[creature_ptr->pclass].w_max[4 - i][num];
48 fprintf(fff, "%-25s ", tmp);
49 if (show_actual_value)
50 fprintf(fff, "%4d/%4d ", MIN(weapon_exp, weapon_max), weapon_max);
51 if (weapon_exp >= weapon_max)
55 fprintf(fff, "%s", exp_level_str[weapon_exp_level(weapon_exp)]);
57 fprintf(fff, " %d", weapon_exp);
65 (void)show_file(creature_ptr, TRUE, file_name, _("武器の経験値", "Weapon Proficiency"), 0, 0);
70 * @brief 魔法の経験値を表示するコマンドのメインルーチン
73 void do_cmd_knowledge_spell_exp(player_type *creature_ptr)
76 GAME_TEXT file_name[FILE_NAME_SIZE];
77 if (!open_temporary_file(&fff, file_name))
80 if (creature_ptr->realm1 != REALM_NONE) {
81 fprintf(fff, _("%sの魔法書\n", "%s Spellbook\n"), realm_names[creature_ptr->realm1]);
82 for (SPELL_IDX i = 0; i < 32; i++) {
83 const magic_type *s_ptr;
84 if (!is_magic(creature_ptr->realm1)) {
85 s_ptr = &technic_info[creature_ptr->realm1 - MIN_TECHNIC][i];
87 s_ptr = &mp_ptr->info[creature_ptr->realm1 - 1][i];
90 if (s_ptr->slevel >= 99)
92 SUB_EXP spell_exp = creature_ptr->spell_exp[i];
93 int exp_level = spell_exp_level(spell_exp);
94 fprintf(fff, "%-25s ", exe_spell(creature_ptr, creature_ptr->realm1, i, SPELL_NAME));
95 if (creature_ptr->realm1 == REALM_HISSATSU) {
96 if (show_actual_value)
97 fprintf(fff, "----/---- ");
101 if (show_actual_value)
102 fprintf(fff, "%4d/%4d ", MIN(spell_exp, SPELL_EXP_MASTER), SPELL_EXP_MASTER);
103 if (exp_level >= EXP_LEVEL_MASTER)
107 fprintf(fff, "%s", exp_level_str[exp_level]);
111 fprintf(fff, " %d", spell_exp);
116 if (creature_ptr->realm2 != REALM_NONE) {
117 fprintf(fff, _("%sの魔法書\n", "\n%s Spellbook\n"), realm_names[creature_ptr->realm2]);
118 for (SPELL_IDX i = 0; i < 32; i++) {
119 const magic_type *s_ptr;
120 if (!is_magic(creature_ptr->realm1)) {
121 s_ptr = &technic_info[creature_ptr->realm2 - MIN_TECHNIC][i];
123 s_ptr = &mp_ptr->info[creature_ptr->realm2 - 1][i];
126 if (s_ptr->slevel >= 99)
129 SUB_EXP spell_exp = creature_ptr->spell_exp[i + 32];
130 int exp_level = spell_exp_level(spell_exp);
131 fprintf(fff, "%-25s ", exe_spell(creature_ptr, creature_ptr->realm2, i, SPELL_NAME));
132 if (show_actual_value)
133 fprintf(fff, "%4d/%4d ", MIN(spell_exp, SPELL_EXP_MASTER), SPELL_EXP_MASTER);
134 if (exp_level >= EXP_LEVEL_EXPERT)
138 fprintf(fff, "%s", exp_level_str[exp_level]);
140 fprintf(fff, " %d", spell_exp);
146 (void)show_file(creature_ptr, TRUE, file_name, _("魔法の経験値", "Spell Proficiency"), 0, 0);
151 * @brief スキル情報を表示するコマンドのメインルーチン /
154 void do_cmd_knowledge_skill_exp(player_type *creature_ptr)
156 char skill_name[GINOU_TEMPMAX][20] = { _("マーシャルアーツ", "Martial Arts "), _("二刀流 ", "Dual Wielding "),
157 _("乗馬 ", "Riding "), _("盾 ", "Shield ") };
160 char file_name[FILE_NAME_SIZE];
161 if (!open_temporary_file(&fff, file_name))
164 for (int i = 0; i < GINOU_TEMPMAX; i++) {
165 SUB_EXP skill_exp = creature_ptr->skill_exp[i];
166 SUB_EXP skill_max = s_info[creature_ptr->pclass].s_max[i];
167 fprintf(fff, "%-20s ", skill_name[i]);
168 if (show_actual_value)
169 fprintf(fff, "%4d/%4d ", MIN(skill_exp, skill_max), skill_max);
170 if (skill_exp >= skill_max)
174 fprintf(fff, "%s", exp_level_str[(i == GINOU_RIDING) ? riding_exp_level(skill_exp) : weapon_exp_level(skill_exp)]);
176 fprintf(fff, " %d", skill_exp);
181 (void)show_file(creature_ptr, TRUE, file_name, _("技能の経験値", "Miscellaneous Proficiency"), 0, 0);