1 #include "view/display-lore-magics.h"
2 #include "lore/lore-util.h"
3 #include "monster-race/race-flags2.h"
4 #include "system/monster-race-definition.h"
5 #include "term/term-color-types.h"
7 void display_monster_breath(lore_type *lore_ptr)
9 lore_ptr->breath = false;
10 if (lore_ptr->vn <= 0)
13 lore_ptr->breath = true;
14 hooked_roff(format(_("%^sは", "%^s"), Who::who(lore_ptr->msex)));
15 for (int n = 0; n < lore_ptr->vn; n++) {
21 hooked_roff(" may breathe ");
22 else if (n < lore_ptr->vn - 1)
27 hook_c_roff(lore_ptr->color[n], lore_ptr->vp[n]);
31 hooked_roff("のブレスを吐くことがある");
35 void display_monster_magic_types(lore_type *lore_ptr)
37 lore_ptr->magic = false;
38 if (lore_ptr->vn == 0)
41 lore_ptr->magic = true;
42 if (lore_ptr->breath) {
43 hooked_roff(_("、なおかつ", ", and is also"));
45 hooked_roff(format(_("%^sは", "%^s is"), Who::who(lore_ptr->msex)));
49 if (lore_ptr->behavior_flags.has(MonsterBehaviorType::SMART))
50 hook_c_roff(TERM_YELLOW, "的確に");
52 hooked_roff("魔法を使うことができ、");
54 hooked_roff(" magical, casting spells");
55 if (lore_ptr->behavior_flags.has(MonsterBehaviorType::SMART))
56 hook_c_roff(TERM_YELLOW, " intelligently");
59 for (int n = 0; n < lore_ptr->vn; n++) {
65 hooked_roff(" which ");
66 else if (n < lore_ptr->vn - 1)
71 hook_c_roff(lore_ptr->color[n], lore_ptr->vp[n]);
75 hooked_roff("の呪文を唱えることがある");
79 void display_mosnter_magic_possibility(lore_type *lore_ptr)
81 if (!lore_ptr->breath && !lore_ptr->magic && !lore_ptr->shoot && !lore_ptr->rocket)
84 int m = lore_ptr->r_ptr->r_cast_spell;
85 int n = lore_ptr->r_ptr->freq_spell;
86 if (m > 100 || lore_ptr->know_everything) {
87 hooked_roff(format(_("(確率:1/%d)", "; 1 time in %d"), 100 / n));
89 n = ((n + 9) / 10) * 10;
90 hooked_roff(format(_("(確率:約1/%d)", "; about 1 time in %d"), 100 / n));
93 hooked_roff(_("。", ". "));