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 "io-dump/dump-util.h"
12 #include "object/object-kind.h"
13 #include "sv-definition/sv-bow-types.h"
14 #include "player/player-class.h"
15 #include "player/player-skill.h"
16 #include "realm/realm-names-table.h"
17 #include "spell/spells-execution.h"
18 #include "spell/technic-info-table.h"
19 #include "util/angband-files.h"
24 void do_cmd_knowledge_weapon_exp(player_type *creature_ptr)
27 GAME_TEXT file_name[FILE_NAME_SIZE];
28 if (!open_temporary_file(&fff, file_name)) return;
30 for (int i = 0; i < 5; i++)
32 for (int num = 0; num < 64; num++)
36 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)) continue;
41 if ((k_ptr->tval == TV_BOW) && (k_ptr->sval == SV_CRIMSON || k_ptr->sval == SV_HARP)) continue;
43 weapon_exp = creature_ptr->weapon_exp[4 - i][num];
45 fprintf(fff, "%-25s ", tmp);
46 if (weapon_exp >= s_info[creature_ptr->pclass].w_max[4 - i][num]) fprintf(fff, "!");
47 else fprintf(fff, " ");
48 fprintf(fff, "%s", exp_level_str[weapon_exp_level(weapon_exp)]);
49 if (cheat_xtra) fprintf(fff, " %d", weapon_exp);
57 (void)show_file(creature_ptr, TRUE, file_name, _("武器の経験値", "Weapon Proficiency"), 0, 0);
63 * @brief 魔法の経験値を表示するコマンドのメインルーチン
67 void do_cmd_knowledge_spell_exp(player_type *creature_ptr)
70 GAME_TEXT file_name[FILE_NAME_SIZE];
71 if (!open_temporary_file(&fff, file_name)) return;
73 if (creature_ptr->realm1 != REALM_NONE)
75 fprintf(fff, _("%sの魔法書\n", "%s Spellbook\n"), realm_names[creature_ptr->realm1]);
76 for (SPELL_IDX i = 0; i < 32; i++)
78 const magic_type *s_ptr;
79 if (!is_magic(creature_ptr->realm1))
81 s_ptr = &technic_info[creature_ptr->realm1 - MIN_TECHNIC][i];
85 s_ptr = &mp_ptr->info[creature_ptr->realm1 - 1][i];
88 if (s_ptr->slevel >= 99) continue;
89 SUB_EXP spell_exp = creature_ptr->spell_exp[i];
90 int exp_level = spell_exp_level(spell_exp);
91 fprintf(fff, "%-25s ", exe_spell(creature_ptr, creature_ptr->realm1, i, SPELL_NAME));
92 if (creature_ptr->realm1 == REALM_HISSATSU)
96 if (exp_level >= EXP_LEVEL_MASTER) fprintf(fff, "!");
97 else fprintf(fff, " ");
98 fprintf(fff, "%s", exp_level_str[exp_level]);
101 if (cheat_xtra) fprintf(fff, " %d", spell_exp);
106 if (creature_ptr->realm2 != REALM_NONE)
108 fprintf(fff, _("%sの魔法書\n", "\n%s Spellbook\n"), realm_names[creature_ptr->realm2]);
109 for (SPELL_IDX i = 0; i < 32; i++)
111 const magic_type *s_ptr;
112 if (!is_magic(creature_ptr->realm1))
114 s_ptr = &technic_info[creature_ptr->realm2 - MIN_TECHNIC][i];
118 s_ptr = &mp_ptr->info[creature_ptr->realm2 - 1][i];
121 if (s_ptr->slevel >= 99) continue;
123 SUB_EXP spell_exp = creature_ptr->spell_exp[i + 32];
124 int exp_level = spell_exp_level(spell_exp);
125 fprintf(fff, "%-25s ", exe_spell(creature_ptr, creature_ptr->realm2, i, SPELL_NAME));
126 if (exp_level >= EXP_LEVEL_EXPERT) fprintf(fff, "!");
127 else fprintf(fff, " ");
128 fprintf(fff, "%s", exp_level_str[exp_level]);
129 if (cheat_xtra) fprintf(fff, " %d", spell_exp);
135 (void)show_file(creature_ptr, TRUE, file_name, _("魔法の経験値", "Spell Proficiency"), 0, 0);
141 * @brief スキル情報を表示するコマンドのメインルーチン /
145 void do_cmd_knowledge_skill_exp(player_type *creature_ptr)
147 char skill_name[GINOU_TEMPMAX][20] =
149 _("マーシャルアーツ", "Martial Arts "),
150 _("二刀流 ", "Dual Wielding "),
156 char file_name[FILE_NAME_SIZE];
157 if (!open_temporary_file(&fff, file_name)) return;
159 for (int i = 0; i < GINOU_TEMPMAX; i++)
161 int skill_exp = creature_ptr->skill_exp[i];
162 fprintf(fff, "%-20s ", skill_name[i]);
163 if (skill_exp >= s_info[creature_ptr->pclass].s_max[i]) fprintf(fff, "!");
164 else fprintf(fff, " ");
165 fprintf(fff, "%s", exp_level_str[(i == GINOU_RIDING) ? riding_exp_level(skill_exp) : weapon_exp_level(skill_exp)]);
166 if (cheat_xtra) fprintf(fff, " %d", skill_exp);
171 (void)show_file(creature_ptr, TRUE, file_name, _("技能の経験値", "Miscellaneous Proficiency"), 0, 0);