OSDN Git Service

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