OSDN Git Service

[Refactor] Shift-JISのファイルをUTF-8に変換 / Changed Shift-JIS based files to UTF-8 based
[hengband/hengband.git] / src / player-info / base-status-info.c
1 #include "player-info/base-status-info.h"
2 #include "inventory/inventory-slot-types.h"
3 #include "player-info/self-info-util.h"
4 #include "object/object-flags.h"
5 #include "object-enchant/tr-types.h"
6 #include "util/bit-flags-calculator.h"
7
8 void set_equipment_influence(player_type *creature_ptr, self_info_type *si_ptr)
9 {
10     for (int k = INVEN_RARM; k < INVEN_TOTAL; k++) {
11         u32b tflgs[TR_FLAG_SIZE];
12         object_type *o_ptr = &creature_ptr->inventory_list[k];
13         if (o_ptr->k_idx == 0)
14             continue;
15
16         object_flags(creature_ptr, o_ptr, tflgs);
17         for (int j = 0; j < TR_FLAG_SIZE; j++)
18             si_ptr->flags[j] |= tflgs[j];
19     }
20
21     if (has_flag(si_ptr->flags, TR_STR))
22         si_ptr->info[si_ptr->line++] = _("あなたの腕力は装備によって影響を受けている。", "Your strength is affected by your equipment.");
23
24     if (has_flag(si_ptr->flags, TR_INT))
25         si_ptr->info[si_ptr->line++] = _("あなたの知能は装備によって影響を受けている。", "Your intelligence is affected by your equipment.");
26
27     if (has_flag(si_ptr->flags, TR_WIS))
28         si_ptr->info[si_ptr->line++] = _("あなたの賢さは装備によって影響を受けている。", "Your wisdom is affected by your equipment.");
29
30     if (has_flag(si_ptr->flags, TR_DEX))
31         si_ptr->info[si_ptr->line++] = _("あなたの器用さは装備によって影響を受けている。", "Your dexterity is affected by your equipment.");
32
33     if (has_flag(si_ptr->flags, TR_CON))
34         si_ptr->info[si_ptr->line++] = _("あなたの耐久力は装備によって影響を受けている。", "Your constitution is affected by your equipment.");
35
36     if (has_flag(si_ptr->flags, TR_CHR))
37         si_ptr->info[si_ptr->line++] = _("あなたの魅力は装備によって影響を受けている。", "Your charisma is affected by your equipment.");
38
39     if (has_flag(si_ptr->flags, TR_STEALTH))
40         si_ptr->info[si_ptr->line++] = _("あなたの隠密行動能力は装備によって影響を受けている。", "Your stealth is affected by your equipment.");
41
42     if (has_flag(si_ptr->flags, TR_SEARCH))
43         si_ptr->info[si_ptr->line++] = _("あなたの探索能力は装備によって影響を受けている。", "Your searching ability is affected by your equipment.");
44
45     if (has_flag(si_ptr->flags, TR_INFRA))
46         si_ptr->info[si_ptr->line++] = _("あなたの赤外線視力は装備によって影響を受けている。", "Your infravision is affected by your equipment.");
47
48     if (has_flag(si_ptr->flags, TR_TUNNEL))
49         si_ptr->info[si_ptr->line++] = _("あなたの採掘能力は装備によって影響を受けている。", "Your digging ability is affected by your equipment.");
50
51     if (has_flag(si_ptr->flags, TR_SPEED))
52         si_ptr->info[si_ptr->line++] = _("あなたのスピードは装備によって影響を受けている。", "Your speed is affected by your equipment.");
53
54     if (has_flag(si_ptr->flags, TR_BLOWS))
55         si_ptr->info[si_ptr->line++] = _("あなたの攻撃速度は装備によって影響を受けている。", "Your attack speed is affected by your equipment.");
56 }
57
58 void set_status_sustain_info(player_type *creature_ptr, self_info_type *si_ptr)
59 {
60     if (creature_ptr->sustain_str) {
61         si_ptr->info[si_ptr->line++] = _("あなたの腕力は維持されている。", "Your strength is sustained.");
62     }
63     if (creature_ptr->sustain_int) {
64         si_ptr->info[si_ptr->line++] = _("あなたの知能は維持されている。", "Your intelligence is sustained.");
65     }
66     if (creature_ptr->sustain_wis) {
67         si_ptr->info[si_ptr->line++] = _("あなたの賢さは維持されている。", "Your wisdom is sustained.");
68     }
69     if (creature_ptr->sustain_con) {
70         si_ptr->info[si_ptr->line++] = _("あなたの耐久力は維持されている。", "Your constitution is sustained.");
71     }
72     if (creature_ptr->sustain_dex) {
73         si_ptr->info[si_ptr->line++] = _("あなたの器用さは維持されている。", "Your dexterity is sustained.");
74     }
75     if (creature_ptr->sustain_chr) {
76         si_ptr->info[si_ptr->line++] = _("あなたの魅力は維持されている。", "Your charisma is sustained.");
77     }
78 }