1 #include "cmd-io/cmd-lore.h"
3 #include "core/stuff-handler.h"
4 #include "game-option/game-play-options.h"
5 #include "game-option/cheat-options.h"
6 #include "monster-race/race-flags1.h"
7 #include "monster-race/race-flags7.h"
8 #include "term/gameterm.h"
9 #include "term/term-color-types.h"
10 #include "view/display-main-window.h"
11 #include "view/display-lore.h"
14 * @brief モンスターの思い出を見るコマンドのメインルーチン
15 * Identify a character, allow recall of monsters
16 * @param player_ptr プレーヤーへの参照ポインタ
20 * Several "special" responses recall "multiple" monsters:
22 * ^U (all unique monsters)
23 * ^N (all non-unique monsters)
25 * The responses may be sorted in several ways, see below.
27 * Note that the player ghosts are ignored.
30 void do_cmd_query_symbol(player_type *creature_ptr)
49 if (!get_com(_("知りたい文字を入力して下さい(記号 or ^A全,^Uユ,^N非ユ,^R乗馬,^M名前): ",
50 "Enter character to be identified(^A:All,^U:Uniqs,^N:Non uniqs,^M:Name): "),
54 for (i = 0; ident_info[i]; ++i) {
55 if (sym == ident_info[i][0])
59 if (sym == KTRL('A')) {
61 strcpy(buf, _("全モンスターのリスト", "Full monster list."));
62 } else if (sym == KTRL('U')) {
64 strcpy(buf, _("ユニーク・モンスターのリスト", "Unique monster list."));
65 } else if (sym == KTRL('N')) {
67 strcpy(buf, _("ユニーク外モンスターのリスト", "Non-unique monster list."));
68 } else if (sym == KTRL('R')) {
70 strcpy(buf, _("乗馬可能モンスターのリスト", "Ridable monster list."));
71 } else if (sym == KTRL('M')) {
73 if (!get_string(_("名前(英語の場合小文字で可)", "Enter name:"), temp, 70)) {
77 sprintf(buf, _("名前:%sにマッチ", "Monsters with a name \"%s\""), temp);
78 } else if (ident_info[i]) {
79 sprintf(buf, "%c - %s.", sym, ident_info[i] + 2);
81 sprintf(buf, "%c - %s", sym, _("無効な文字", "Unknown Symbol"));
85 C_MAKE(who, max_r_idx, MONRACE_IDX);
86 for (n = 0, i = 1; i < max_r_idx; i++) {
87 monster_race *r_ptr = &r_info[i];
88 if (!cheat_know && !r_ptr->r_sights)
91 if (norm && (r_ptr->flags1 & (RF1_UNIQUE)))
94 if (uniq && !(r_ptr->flags1 & (RF1_UNIQUE)))
97 if (ride && !(r_ptr->flags7 & (RF7_RIDING)))
104 for (xx = 0; temp[xx] && xx < 80; xx++) {
106 if (iskanji(temp[xx])) {
111 if (isupper(temp[xx]))
112 temp[xx] = (char)tolower(temp[xx]);
116 strcpy(temp2, r_name + r_ptr->E_name);
118 strcpy(temp2, r_name + r_ptr->name);
120 for (xx = 0; temp2[xx] && xx < 80; xx++)
121 if (isupper(temp2[xx]))
122 temp2[xx] = (char)tolower(temp2[xx]);
125 if (angband_strstr(temp2, temp) || angband_strstr(r_name + r_ptr->name, temp))
127 if (angband_strstr(temp2, temp))
132 else if (all || (r_ptr->d_char == sym))
137 C_KILL(who, max_r_idx, MONRACE_IDX);
141 put_str(_("思い出を見ますか? (k:殺害順/y/n): ", "Recall details? (k/y/n): "), 0, _(36, 40));
145 ang_sort(who, &why, n, ang_sort_comp_hook, ang_sort_swap_hook);
152 C_KILL(who, max_r_idx, MONRACE_IDX);
157 ang_sort(who, &why, n, ang_sort_comp_hook, ang_sort_swap_hook);
163 monster_race_track(creature_ptr, r_idx);
164 handle_stuff(creature_ptr);
168 screen_roff(creature_ptr, who[i], 0);
172 Term_addstr(-1, TERM_WHITE, _(" ['r'思い出, ESC]", " [(r)ecall, ESC]"));
201 C_KILL(who, max_r_idx, IDX);