1 #include "view/display-lore-status.h"
2 #include "lore/lore-calculator.h"
3 #include "monster-race/monster-race.h"
4 #include "monster-race/race-flags-resistance.h"
5 #include "monster-race/race-flags1.h"
6 #include "monster-race/race-flags2.h"
7 #include "monster-race/race-flags3.h"
8 #include "monster-race/race-flags7.h"
9 #include "term/term-color-types.h"
11 #include "locale/japanese.h"
14 void display_monster_hp_ac(lore_type *lore_ptr)
16 if (!know_armour(lore_ptr->r_idx, lore_ptr->know_everything))
19 hooked_roff(format(_("%^sは AC%d の防御力と", "%^s has an armor rating of %d"), Who::who(lore_ptr->msex), lore_ptr->r_ptr->ac));
20 if ((lore_ptr->flags1 & RF1_FORCE_MAXHP) || (lore_ptr->r_ptr->hside == 1)) {
21 u32b hp = lore_ptr->r_ptr->hdice * (lore_ptr->nightmare ? 2 : 1) * lore_ptr->r_ptr->hside;
22 hooked_roff(format(_(" %d の体力がある。", " and a life rating of %d. "), (s16b)MIN(30000, hp)));
25 _(" %dd%d の体力がある。", " and a life rating of %dd%d. "), lore_ptr->r_ptr->hdice * (lore_ptr->nightmare ? 2 : 1), lore_ptr->r_ptr->hside));
29 void display_monster_concrete_abilities(lore_type *lore_ptr)
31 if (lore_ptr->flags7 & (RF7_HAS_LITE_1 | RF7_HAS_LITE_2)) {
32 lore_ptr->vp[lore_ptr->vn] = _("ダンジョンを照らす", "illuminate the dungeon");
33 lore_ptr->color[lore_ptr->vn++] = TERM_WHITE;
36 if (lore_ptr->flags7 & (RF7_HAS_DARK_1 | RF7_HAS_DARK_2)) {
37 lore_ptr->vp[lore_ptr->vn] = _("ダンジョンを暗くする", "darken the dungeon");
38 lore_ptr->color[lore_ptr->vn++] = TERM_L_DARK;
41 if (lore_ptr->flags2 & RF2_OPEN_DOOR) {
42 lore_ptr->vp[lore_ptr->vn] = _("ドアを開ける", "open doors");
43 lore_ptr->color[lore_ptr->vn++] = TERM_WHITE;
46 if (lore_ptr->flags2 & RF2_BASH_DOOR) {
47 lore_ptr->vp[lore_ptr->vn] = _("ドアを打ち破る", "bash down doors");
48 lore_ptr->color[lore_ptr->vn++] = TERM_WHITE;
51 if (lore_ptr->flags7 & RF7_CAN_FLY) {
52 lore_ptr->vp[lore_ptr->vn] = _("空を飛ぶ", "fly");
53 lore_ptr->color[lore_ptr->vn++] = TERM_WHITE;
56 if (lore_ptr->flags7 & RF7_CAN_SWIM) {
57 lore_ptr->vp[lore_ptr->vn] = _("水を渡る", "swim");
58 lore_ptr->color[lore_ptr->vn++] = TERM_WHITE;
61 if (lore_ptr->flags2 & RF2_PASS_WALL) {
62 lore_ptr->vp[lore_ptr->vn] = _("壁をすり抜ける", "pass through walls");
63 lore_ptr->color[lore_ptr->vn++] = TERM_WHITE;
66 if (lore_ptr->flags2 & RF2_KILL_WALL) {
67 lore_ptr->vp[lore_ptr->vn] = _("壁を掘り進む", "bore through walls");
68 lore_ptr->color[lore_ptr->vn++] = TERM_WHITE;
71 if (lore_ptr->flags2 & RF2_MOVE_BODY) {
72 lore_ptr->vp[lore_ptr->vn] = _("弱いモンスターを押しのける", "push past weaker monsters");
73 lore_ptr->color[lore_ptr->vn++] = TERM_WHITE;
76 if (lore_ptr->flags2 & RF2_KILL_BODY) {
77 lore_ptr->vp[lore_ptr->vn] = _("弱いモンスターを倒す", "destroy weaker monsters");
78 lore_ptr->color[lore_ptr->vn++] = TERM_WHITE;
81 if (lore_ptr->flags2 & RF2_TAKE_ITEM) {
82 lore_ptr->vp[lore_ptr->vn] = _("アイテムを拾う", "pick up objects");
83 lore_ptr->color[lore_ptr->vn++] = TERM_WHITE;
86 if (lore_ptr->flags2 & RF2_KILL_ITEM) {
87 lore_ptr->vp[lore_ptr->vn] = _("アイテムを壊す", "destroy objects");
88 lore_ptr->color[lore_ptr->vn++] = TERM_WHITE;
92 void display_monster_abilities(lore_type *lore_ptr)
94 if (lore_ptr->vn <= 0)
97 hooked_roff(format(_("%^sは", "%^s"), Who::who(lore_ptr->msex)));
98 for (int n = 0; n < lore_ptr->vn; n++) {
100 if (n != lore_ptr->vn - 1) {
101 jverb(lore_ptr->vp[n], lore_ptr->jverb_buf, JVERB_AND);
102 hook_c_roff(lore_ptr->color[n], lore_ptr->jverb_buf);
105 hook_c_roff(lore_ptr->color[n], lore_ptr->vp[n]);
109 hooked_roff(" can ");
110 else if (n < lore_ptr->vn - 1)
113 hooked_roff(" and ");
115 hook_c_roff(lore_ptr->color[n], lore_ptr->vp[n]);
119 hooked_roff(_("ことができる。", ". "));
122 void display_monster_constitutions(lore_type *lore_ptr)
124 if (lore_ptr->flags7 & RF7_AQUATIC)
125 hooked_roff(format(_("%^sは水中に棲んでいる。", "%^s lives in water. "), Who::who(lore_ptr->msex)));
127 if (lore_ptr->flags7 & (RF7_SELF_LITE_1 | RF7_SELF_LITE_2))
128 hooked_roff(format(_("%^sは光っている。", "%^s is shining. "), Who::who(lore_ptr->msex)));
130 if (lore_ptr->flags7 & (RF7_SELF_DARK_1 | RF7_SELF_DARK_2))
131 hook_c_roff(TERM_L_DARK, format(_("%^sは暗黒に包まれている。", "%^s is surrounded by darkness. "), Who::who(lore_ptr->msex)));
133 if (lore_ptr->flags2 & RF2_INVISIBLE)
134 hooked_roff(format(_("%^sは透明で目に見えない。", "%^s is invisible. "), Who::who(lore_ptr->msex)));
136 if (lore_ptr->flags2 & RF2_COLD_BLOOD)
137 hooked_roff(format(_("%^sは冷血動物である。", "%^s is cold blooded. "), Who::who(lore_ptr->msex)));
139 if (lore_ptr->flags2 & RF2_EMPTY_MIND)
140 hooked_roff(format(_("%^sはテレパシーでは感知できない。", "%^s is not detected by telepathy. "), Who::who(lore_ptr->msex)));
141 else if (lore_ptr->flags2 & RF2_WEIRD_MIND)
142 hooked_roff(format(_("%^sはまれにテレパシーで感知できる。", "%^s is rarely detected by telepathy. "), Who::who(lore_ptr->msex)));
144 if (lore_ptr->flags2 & RF2_MULTIPLY)
145 hook_c_roff(TERM_L_UMBER, format(_("%^sは爆発的に増殖する。", "%^s breeds explosively. "), Who::who(lore_ptr->msex)));
147 if (lore_ptr->flags2 & RF2_REGENERATE)
148 hook_c_roff(TERM_L_WHITE, format(_("%^sは素早く体力を回復する。", "%^s regenerates quickly. "), Who::who(lore_ptr->msex)));
150 if (lore_ptr->flags7 & RF7_RIDING)
151 hook_c_roff(TERM_SLATE, format(_("%^sに乗ることができる。", "%^s is suitable for riding. "), Who::who(lore_ptr->msex)));
154 void display_monster_concrete_weakness(lore_type *lore_ptr)
156 if (lore_ptr->flags3 & RF3_HURT_ROCK) {
157 lore_ptr->vp[lore_ptr->vn] = _("岩を除去するもの", "rock remover");
158 lore_ptr->color[lore_ptr->vn++] = TERM_UMBER;
161 if (lore_ptr->flags3 & RF3_HURT_LITE) {
162 lore_ptr->vp[lore_ptr->vn] = _("明るい光", "bright light");
163 lore_ptr->color[lore_ptr->vn++] = TERM_YELLOW;
166 if (lore_ptr->flags3 & RF3_HURT_FIRE) {
167 lore_ptr->vp[lore_ptr->vn] = _("炎", "fire");
168 lore_ptr->color[lore_ptr->vn++] = TERM_RED;
171 if (lore_ptr->flags3 & RF3_HURT_COLD) {
172 lore_ptr->vp[lore_ptr->vn] = _("冷気", "cold");
173 lore_ptr->color[lore_ptr->vn++] = TERM_L_WHITE;
177 void display_monster_weakness(lore_type *lore_ptr)
179 if (lore_ptr->vn <= 0)
182 hooked_roff(format(_("%^sには", "%^s"), Who::who(lore_ptr->msex)));
183 for (int n = 0; n < lore_ptr->vn; n++) {
189 hooked_roff(" is hurt by ");
190 else if (n < lore_ptr->vn - 1)
193 hooked_roff(" and ");
195 hook_c_roff(lore_ptr->color[n], lore_ptr->vp[n]);
198 hooked_roff(_("でダメージを与えられる。", ". "));
201 void display_monster_concrete_resistances(lore_type *lore_ptr)
203 if (lore_ptr->flagsr & RFR_IM_ACID) {
204 lore_ptr->vp[lore_ptr->vn] = _("酸", "acid");
205 lore_ptr->color[lore_ptr->vn++] = TERM_GREEN;
208 if (lore_ptr->flagsr & RFR_IM_ELEC) {
209 lore_ptr->vp[lore_ptr->vn] = _("稲妻", "lightning");
210 lore_ptr->color[lore_ptr->vn++] = TERM_BLUE;
213 if (lore_ptr->flagsr & RFR_IM_FIRE) {
214 lore_ptr->vp[lore_ptr->vn] = _("炎", "fire");
215 lore_ptr->color[lore_ptr->vn++] = TERM_RED;
218 if (lore_ptr->flagsr & RFR_IM_COLD) {
219 lore_ptr->vp[lore_ptr->vn] = _("冷気", "cold");
220 lore_ptr->color[lore_ptr->vn++] = TERM_L_WHITE;
223 if (lore_ptr->flagsr & RFR_IM_POIS) {
224 lore_ptr->vp[lore_ptr->vn] = _("毒", "poison");
225 lore_ptr->color[lore_ptr->vn++] = TERM_L_GREEN;
228 if (lore_ptr->flagsr & RFR_RES_LITE) {
229 lore_ptr->vp[lore_ptr->vn] = _("閃光", "light");
230 lore_ptr->color[lore_ptr->vn++] = TERM_YELLOW;
233 if (lore_ptr->flagsr & RFR_RES_DARK) {
234 lore_ptr->vp[lore_ptr->vn] = _("暗黒", "dark");
235 lore_ptr->color[lore_ptr->vn++] = TERM_L_DARK;
238 if (lore_ptr->flagsr & RFR_RES_NETH) {
239 lore_ptr->vp[lore_ptr->vn] = _("地獄", "nether");
240 lore_ptr->color[lore_ptr->vn++] = TERM_L_DARK;
243 if (lore_ptr->flagsr & RFR_RES_WATE) {
244 lore_ptr->vp[lore_ptr->vn] = _("水", "water");
245 lore_ptr->color[lore_ptr->vn++] = TERM_BLUE;
248 if (lore_ptr->flagsr & RFR_RES_PLAS) {
249 lore_ptr->vp[lore_ptr->vn] = _("プラズマ", "plasma");
250 lore_ptr->color[lore_ptr->vn++] = TERM_L_RED;
253 if (lore_ptr->flagsr & RFR_RES_SHAR) {
254 lore_ptr->vp[lore_ptr->vn] = _("破片", "shards");
255 lore_ptr->color[lore_ptr->vn++] = TERM_L_UMBER;
258 if (lore_ptr->flagsr & RFR_RES_SOUN) {
259 lore_ptr->vp[lore_ptr->vn] = _("轟音", "sound");
260 lore_ptr->color[lore_ptr->vn++] = TERM_ORANGE;
263 if (lore_ptr->flagsr & RFR_RES_CHAO) {
264 lore_ptr->vp[lore_ptr->vn] = _("カオス", "chaos");
265 lore_ptr->color[lore_ptr->vn++] = TERM_VIOLET;
268 if (lore_ptr->flagsr & RFR_RES_NEXU) {
269 lore_ptr->vp[lore_ptr->vn] = _("因果混乱", "nexus");
270 lore_ptr->color[lore_ptr->vn++] = TERM_VIOLET;
273 if (lore_ptr->flagsr & RFR_RES_DISE) {
274 lore_ptr->vp[lore_ptr->vn] = _("劣化", "disenchantment");
275 lore_ptr->color[lore_ptr->vn++] = TERM_VIOLET;
278 if (lore_ptr->flagsr & RFR_RES_WALL) {
279 lore_ptr->vp[lore_ptr->vn] = _("フォース", "force");
280 lore_ptr->color[lore_ptr->vn++] = TERM_UMBER;
283 if (lore_ptr->flagsr & RFR_RES_INER) {
284 lore_ptr->vp[lore_ptr->vn] = _("遅鈍", "inertia");
285 lore_ptr->color[lore_ptr->vn++] = TERM_SLATE;
288 if (lore_ptr->flagsr & RFR_RES_TIME) {
289 lore_ptr->vp[lore_ptr->vn] = _("時間逆転", "time");
290 lore_ptr->color[lore_ptr->vn++] = TERM_L_BLUE;
293 if (lore_ptr->flagsr & RFR_RES_GRAV) {
294 lore_ptr->vp[lore_ptr->vn] = _("重力", "gravity");
295 lore_ptr->color[lore_ptr->vn++] = TERM_SLATE;
298 if (lore_ptr->flagsr & RFR_RES_ALL) {
299 lore_ptr->vp[lore_ptr->vn] = _("あらゆる攻撃", "all");
300 lore_ptr->color[lore_ptr->vn++] = TERM_YELLOW;
303 if ((lore_ptr->flagsr & RFR_RES_TELE) && !(lore_ptr->r_ptr->flags1 & RF1_UNIQUE)) {
304 lore_ptr->vp[lore_ptr->vn] = _("テレポート", "teleportation");
305 lore_ptr->color[lore_ptr->vn++] = TERM_ORANGE;
309 void display_monster_resistances(lore_type *lore_ptr)
311 if (lore_ptr->vn <= 0)
314 hooked_roff(format(_("%^sは", "%^s"), Who::who(lore_ptr->msex)));
315 for (int n = 0; n < lore_ptr->vn; n++) {
321 hooked_roff(" resists ");
322 else if (n < lore_ptr->vn - 1)
325 hooked_roff(" and ");
327 hook_c_roff(lore_ptr->color[n], lore_ptr->vp[n]);
330 hooked_roff(_("の耐性を持っている。", ". "));
333 void display_monster_evolution(lore_type* lore_ptr)
335 if (((lore_ptr->r_ptr->r_xtra1 & MR1_EVOLUTION) == 0) && !lore_ptr->know_everything)
338 if (lore_ptr->r_ptr->next_r_idx) {
339 hooked_roff(format(_("%^sは経験を積むと、", "%^s will evolve into "), Who::who(lore_ptr->msex)));
340 hook_c_roff(TERM_YELLOW, format("%s", r_info[lore_ptr->r_ptr->next_r_idx].name.c_str()));
342 hooked_roff(_(format("に進化する。"), format(" when %s gets enough experience. ", Who::who(lore_ptr->msex))));
343 } else if (!(lore_ptr->r_ptr->flags1 & RF1_UNIQUE)) {
344 hooked_roff(format(_("%sは進化しない。", "%s won't evolve. "), Who::who(lore_ptr->msex)));
348 void display_monster_concrete_immunities(lore_type *lore_ptr)
350 if (lore_ptr->flags3 & RF3_NO_STUN) {
351 lore_ptr->vp[lore_ptr->vn] = _("朦朧としない", "stunned");
352 lore_ptr->color[lore_ptr->vn++] = TERM_ORANGE;
355 if (lore_ptr->flags3 & RF3_NO_FEAR) {
356 lore_ptr->vp[lore_ptr->vn] = _("恐怖を感じない", "frightened");
357 lore_ptr->color[lore_ptr->vn++] = TERM_SLATE;
360 if (lore_ptr->flags3 & RF3_NO_CONF) {
361 lore_ptr->vp[lore_ptr->vn] = _("混乱しない", "confused");
362 lore_ptr->color[lore_ptr->vn++] = TERM_L_UMBER;
365 if (lore_ptr->flags3 & RF3_NO_SLEEP) {
366 lore_ptr->vp[lore_ptr->vn] = _("眠らされない", "slept");
367 lore_ptr->color[lore_ptr->vn++] = TERM_BLUE;
370 if ((lore_ptr->flagsr & RFR_RES_TELE) && (lore_ptr->r_ptr->flags1 & RF1_UNIQUE)) {
371 lore_ptr->vp[lore_ptr->vn] = _("テレポートされない", "teleported");
372 lore_ptr->color[lore_ptr->vn++] = TERM_ORANGE;
376 void display_monster_immunities(lore_type *lore_ptr)
378 if (lore_ptr->vn <= 0)
381 hooked_roff(format(_("%^sは", "%^s"), Who::who(lore_ptr->msex)));
382 for (int n = 0; n < lore_ptr->vn; n++) {
388 hooked_roff(" cannot be ");
389 else if (n < lore_ptr->vn - 1)
394 hook_c_roff(lore_ptr->color[n], lore_ptr->vp[n]);
397 hooked_roff(_("。", ". "));
400 void display_monster_alert(lore_type *lore_ptr)
402 bool alert = ((int)lore_ptr->r_ptr->r_wake * (int)lore_ptr->r_ptr->r_wake) > lore_ptr->r_ptr->sleep;
403 alert |= lore_ptr->r_ptr->r_ignore == MAX_UCHAR;
404 alert |= (lore_ptr->r_ptr->sleep == 0) && (lore_ptr->r_ptr->r_tkills >= 10);
405 alert |= lore_ptr->know_everything;
410 if (lore_ptr->r_ptr->sleep > 200) {
411 act = _("を無視しがちであるが", "prefers to ignore");
412 } else if (lore_ptr->r_ptr->sleep > 95) {
413 act = _("に対してほとんど注意を払わないが", "pays very little attention to");
414 } else if (lore_ptr->r_ptr->sleep > 75) {
415 act = _("に対してあまり注意を払わないが", "pays little attention to");
416 } else if (lore_ptr->r_ptr->sleep > 45) {
417 act = _("を見過ごしがちであるが", "tends to overlook");
418 } else if (lore_ptr->r_ptr->sleep > 25) {
419 act = _("をほんの少しは見ており", "takes quite a while to see");
420 } else if (lore_ptr->r_ptr->sleep > 10) {
421 act = _("をしばらくは見ており", "takes a while to see");
422 } else if (lore_ptr->r_ptr->sleep > 5) {
423 act = _("を幾分注意深く見ており", "is fairly observant of");
424 } else if (lore_ptr->r_ptr->sleep > 3) {
425 act = _("を注意深く見ており", "is observant of");
426 } else if (lore_ptr->r_ptr->sleep > 1) {
427 act = _("をかなり注意深く見ており", "is very observant of");
428 } else if (lore_ptr->r_ptr->sleep > 0) {
429 act = _("を警戒しており", "is vigilant for");
431 act = _("をかなり警戒しており", "is ever vigilant for");
434 hooked_roff(_(format("%^sは侵入者%s、 %d フィート先から侵入者に気付くことがある。", Who::who(lore_ptr->msex), act, 10 * lore_ptr->r_ptr->aaf),
435 format("%^s %s intruders, which %s may notice from %d feet. ", Who::who(lore_ptr->msex), act, Who::who(lore_ptr->msex), 10 * lore_ptr->r_ptr->aaf)));