2 * @brief モンスターの思い出表示に必要なフラグ類の処理
7 #include "lore/monster-lore.h"
8 #include "game-option/cheat-options.h"
9 #include "lore/lore-calculator.h"
10 #include "lore/lore-util.h"
11 #include "lore/magic-types-setter.h"
12 #include "monster-race/monster-race.h"
13 #include "monster-race/race-flags1.h"
14 #include "monster-race/race-flags2.h"
15 #include "monster-race/race-flags3.h"
16 #include "monster-race/race-indice-types.h"
17 #include "player-ability/player-abillity-types.h"
18 #include "system/angband.h"
19 #include "system/monster-race-definition.h"
20 #include "term/term-color-types.h"
21 #include "view/display-lore-attacks.h"
22 #include "view/display-lore-drops.h"
23 #include "view/display-lore-magics.h"
24 #include "view/display-lore-status.h"
25 #include "view/display-lore.h"
27 static void set_msex_flags(lore_type *lore_ptr)
29 lore_ptr->msex = MSEX_NONE;
30 if (lore_ptr->r_ptr->flags1 & RF1_FEMALE) {
31 lore_ptr->msex = MSEX_FEMALE;
35 if (lore_ptr->r_ptr->flags1 & RF1_MALE)
36 lore_ptr->msex = MSEX_MALE;
39 static void set_flags1(lore_type *lore_ptr)
41 if (lore_ptr->r_ptr->flags1 & RF1_UNIQUE)
42 lore_ptr->flags1 |= (RF1_UNIQUE);
44 if (lore_ptr->r_ptr->flags1 & RF1_QUESTOR)
45 lore_ptr->flags1 |= (RF1_QUESTOR);
47 if (lore_ptr->r_ptr->flags1 & RF1_MALE)
48 lore_ptr->flags1 |= (RF1_MALE);
50 if (lore_ptr->r_ptr->flags1 & RF1_FEMALE)
51 lore_ptr->flags1 |= (RF1_FEMALE);
53 if (lore_ptr->r_ptr->flags1 & RF1_FRIENDS)
54 lore_ptr->flags1 |= (RF1_FRIENDS);
56 if (lore_ptr->r_ptr->flags1 & RF1_ESCORT)
57 lore_ptr->flags1 |= (RF1_ESCORT);
59 if (lore_ptr->r_ptr->flags1 & RF1_ESCORTS)
60 lore_ptr->flags1 |= (RF1_ESCORTS);
63 static void set_race_flags(lore_type *lore_ptr)
65 if (!lore_ptr->r_ptr->r_tkills && !lore_ptr->know_everything)
68 if (lore_ptr->r_ptr->flags3 & RF3_ORC)
69 lore_ptr->flags3 |= (RF3_ORC);
71 if (lore_ptr->r_ptr->flags3 & RF3_TROLL)
72 lore_ptr->flags3 |= (RF3_TROLL);
74 if (lore_ptr->r_ptr->flags3 & RF3_GIANT)
75 lore_ptr->flags3 |= (RF3_GIANT);
77 if (lore_ptr->r_ptr->flags3 & RF3_DRAGON)
78 lore_ptr->flags3 |= (RF3_DRAGON);
80 if (lore_ptr->r_ptr->flags3 & RF3_DEMON)
81 lore_ptr->flags3 |= (RF3_DEMON);
83 if (lore_ptr->r_ptr->flags3 & RF3_UNDEAD)
84 lore_ptr->flags3 |= (RF3_UNDEAD);
86 if (lore_ptr->r_ptr->flags3 & RF3_EVIL)
87 lore_ptr->flags3 |= (RF3_EVIL);
89 if (lore_ptr->r_ptr->flags3 & RF3_GOOD)
90 lore_ptr->flags3 |= (RF3_GOOD);
92 if (lore_ptr->r_ptr->flags3 & RF3_ANIMAL)
93 lore_ptr->flags3 |= (RF3_ANIMAL);
95 if (lore_ptr->r_ptr->flags3 & RF3_AMBERITE)
96 lore_ptr->flags3 |= (RF3_AMBERITE);
98 if (lore_ptr->r_ptr->flags2 & RF2_HUMAN)
99 lore_ptr->flags2 |= (RF2_HUMAN);
101 if (lore_ptr->r_ptr->flags2 & RF2_QUANTUM)
102 lore_ptr->flags2 |= (RF2_QUANTUM);
104 if (lore_ptr->r_ptr->flags1 & RF1_FORCE_DEPTH)
105 lore_ptr->flags1 |= (RF1_FORCE_DEPTH);
107 if (lore_ptr->r_ptr->flags1 & RF1_FORCE_MAXHP)
108 lore_ptr->flags1 |= (RF1_FORCE_MAXHP);
112 * @brief モンスターの思い出情報を表示するメインルーチン
113 * Hack -- display monster information using "hooked_roff()"
114 * @param r_idx モンスターの種族ID
115 * @param mode 表示オプション
118 * This function should only be called with the cursor placed at the
119 * left edge of the screen, on a cleared line, in which the recall is
120 * to take place. One extra blank line is left after the recall.
122 void process_monster_lore(player_type *player_ptr, MONRACE_IDX r_idx, monster_lore_mode mode)
125 lore_type *lore_ptr = initialize_lore_type(&tmp_lore, r_idx, mode);
126 for (int n = 0; n < A_MAX; n++) {
127 if (lore_ptr->r_ptr->reinforce_id[n] > 0)
128 lore_ptr->reinforce = TRUE;
131 if (cheat_know || (mode == MONSTER_LORE_RESEARCH) || (mode == MONSTER_LORE_DEBUG))
132 lore_ptr->know_everything = TRUE;
134 set_drop_flags(lore_ptr);
135 set_msex_flags(lore_ptr);
136 set_flags1(lore_ptr);
137 set_race_flags(lore_ptr);
138 display_kill_numbers(lore_ptr);
139 concptr tmp = lore_ptr->r_ptr->text.c_str();
145 if (r_idx == MON_KAGE) {
150 if (!display_where_to_appear(lore_ptr))
153 display_monster_move(lore_ptr);
154 display_monster_never_move(lore_ptr);
156 hooked_roff(_("。", ". "));
157 lore_ptr->old = FALSE;
160 display_lore_this(player_ptr, lore_ptr);
161 display_monster_aura(lore_ptr);
162 if (lore_ptr->flags2 & RF2_REFLECTING)
163 hooked_roff(format(_("%^sは矢の呪文を跳ね返す。", "%^s reflects bolt spells. "), Who::who(lore_ptr->msex)));
165 display_monster_collective(lore_ptr);
167 if (lore_ptr->ability_flags.has(RF_ABILITY::SHRIEK)) {
168 lore_ptr->vp[lore_ptr->vn] = _("悲鳴で助けを求める", "shriek for help");
169 lore_ptr->color[lore_ptr->vn++] = TERM_L_WHITE;
172 display_monster_launching(player_ptr, lore_ptr);
173 if (lore_ptr->ability_flags.has(RF_ABILITY::SPECIAL)) {
174 lore_ptr->vp[lore_ptr->vn] = _("特別な行動をする", "do something");
175 lore_ptr->color[lore_ptr->vn++] = TERM_VIOLET;
178 display_monster_sometimes(lore_ptr);
179 set_breath_types(player_ptr, lore_ptr);
180 display_monster_breath(lore_ptr);
183 set_ball_types(player_ptr, lore_ptr);
184 set_particular_types(player_ptr, lore_ptr);
185 set_bolt_types(player_ptr, lore_ptr);
186 set_status_types(lore_ptr);
187 set_teleport_types(lore_ptr);
188 set_floor_types(player_ptr, lore_ptr);
189 set_summon_types(lore_ptr);
190 display_monster_magic_types(lore_ptr);
191 display_mosnter_magic_possibility(lore_ptr);
192 display_monster_hp_ac(lore_ptr);
195 display_monster_concrete_abilities(lore_ptr);
196 display_monster_abilities(lore_ptr);
197 display_monster_constitutions(lore_ptr);
200 display_monster_concrete_weakness(lore_ptr);
201 display_monster_weakness(lore_ptr);
204 display_monster_concrete_resistances(lore_ptr);
205 display_monster_resistances(lore_ptr);
206 display_monster_evolution(lore_ptr);
209 display_monster_concrete_immunities(lore_ptr);
210 display_monster_immunities(lore_ptr);
211 display_monster_alert(lore_ptr);
212 display_monster_drops(lore_ptr);
213 display_monster_blows(lore_ptr);
214 display_monster_guardian(lore_ptr);