1 #include "view/display-lore-magics.h"
2 #include "monster-race/race-flags2.h"
3 #include "term/term-color-types.h"
5 void display_monster_breath(lore_type *lore_ptr)
7 lore_ptr->breath = FALSE;
11 lore_ptr->breath = TRUE;
12 hooked_roff(format(_("%^sは", "%^s"), wd_he[lore_ptr->msex]));
13 for (int n = 0; n < lore_ptr->vn; n++) {
19 hooked_roff(" may breathe ");
20 else if (n < lore_ptr->vn - 1)
25 hook_c_roff(lore_ptr->color[n], lore_ptr->vp[n]);
29 hooked_roff("のブレスを吐くことがある");
33 void display_monster_magic_types(lore_type *lore_ptr)
35 lore_ptr->magic = FALSE;
36 if (lore_ptr->vn == 0)
39 lore_ptr->magic = TRUE;
40 if (lore_ptr->breath) {
41 hooked_roff(_("、なおかつ", ", and is also"));
43 hooked_roff(format(_("%^sは", "%^s is"), wd_he[lore_ptr->msex]));
47 if (lore_ptr->flags2 & (RF2_SMART))
48 hook_c_roff(TERM_YELLOW, "的確に");
50 hooked_roff("魔法を使うことができ、");
52 hooked_roff(" magical, casting spells");
53 if (lore_ptr->flags2 & RF2_SMART)
54 hook_c_roff(TERM_YELLOW, " intelligently");
57 for (int n = 0; n < lore_ptr->vn; n++) {
63 hooked_roff(" which ");
64 else if (n < lore_ptr->vn - 1)
69 hook_c_roff(lore_ptr->color[n], lore_ptr->vp[n]);
73 hooked_roff("の呪文を唱えることがある");
77 void display_mosnter_magic_possibility(lore_type *lore_ptr)
79 if (!lore_ptr->breath && !lore_ptr->magic)
82 int m = lore_ptr->r_ptr->r_cast_spell;
83 int n = lore_ptr->r_ptr->freq_spell;
84 if (m > 100 || lore_ptr->know_everything) {
85 hooked_roff(format(_("(確率:1/%d)", "; 1 time in %d"), 100 / n));
87 n = ((n + 9) / 10) * 10;
88 hooked_roff(format(_("(確率:約1/%d)", "; about 1 time in %d"), 100 / n));
91 hooked_roff(_("。", ". "));