OSDN Git Service

Merge pull request #3569 from sikabane-works/release/3.0.0.88-alpha
[hengbandforosx/hengbandosx.git] / src / player-info / base-status-info.cpp
1 #include "player-info/base-status-info.h"
2 #include "inventory/inventory-slot-types.h"
3 #include "object-enchant/tr-types.h"
4 #include "object/object-flags.h"
5 #include "player-info/self-info-util.h"
6 #include "player/player-status-flags.h"
7 #include "system/player-type-definition.h"
8 #include "util/bit-flags-calculator.h"
9
10 void set_equipment_influence(PlayerType *player_ptr, self_info_type *self_ptr)
11 {
12     for (int k = INVEN_MAIN_HAND; k < INVEN_TOTAL; k++) {
13         auto *o_ptr = &player_ptr->inventory_list[k];
14         if (!o_ptr->is_valid()) {
15             continue;
16         }
17
18         auto tflags = object_flags(o_ptr);
19         self_ptr->flags.set(tflags);
20     }
21
22     if (self_ptr->flags.has(TR_STR)) {
23         self_ptr->info[self_ptr->line++] = _("あなたの腕力は装備によって影響を受けている。", "Your strength is affected by your equipment.");
24     }
25
26     if (self_ptr->flags.has(TR_INT)) {
27         self_ptr->info[self_ptr->line++] = _("あなたの知能は装備によって影響を受けている。", "Your intelligence is affected by your equipment.");
28     }
29
30     if (self_ptr->flags.has(TR_WIS)) {
31         self_ptr->info[self_ptr->line++] = _("あなたの賢さは装備によって影響を受けている。", "Your wisdom is affected by your equipment.");
32     }
33
34     if (self_ptr->flags.has(TR_DEX)) {
35         self_ptr->info[self_ptr->line++] = _("あなたの器用さは装備によって影響を受けている。", "Your dexterity is affected by your equipment.");
36     }
37
38     if (self_ptr->flags.has(TR_CON)) {
39         self_ptr->info[self_ptr->line++] = _("あなたの耐久力は装備によって影響を受けている。", "Your constitution is affected by your equipment.");
40     }
41
42     if (self_ptr->flags.has(TR_CHR)) {
43         self_ptr->info[self_ptr->line++] = _("あなたの魅力は装備によって影響を受けている。", "Your charisma is affected by your equipment.");
44     }
45
46     if (self_ptr->flags.has(TR_STEALTH)) {
47         self_ptr->info[self_ptr->line++] = _("あなたの隠密行動能力は装備によって影響を受けている。", "Your stealth is affected by your equipment.");
48     }
49
50     if (self_ptr->flags.has(TR_SEARCH)) {
51         self_ptr->info[self_ptr->line++] = _("あなたの探索能力は装備によって影響を受けている。", "Your searching ability is affected by your equipment.");
52     }
53
54     if (self_ptr->flags.has(TR_INFRA)) {
55         self_ptr->info[self_ptr->line++] = _("あなたの赤外線視力は装備によって影響を受けている。", "Your infravision is affected by your equipment.");
56     }
57
58     if (self_ptr->flags.has(TR_TUNNEL)) {
59         self_ptr->info[self_ptr->line++] = _("あなたの採掘能力は装備によって影響を受けている。", "Your digging ability is affected by your equipment.");
60     }
61
62     if (self_ptr->flags.has(TR_SPEED)) {
63         self_ptr->info[self_ptr->line++] = _("あなたのスピードは装備によって影響を受けている。", "Your speed is affected by your equipment.");
64     }
65
66     if (self_ptr->flags.has(TR_BLOWS)) {
67         self_ptr->info[self_ptr->line++] = _("あなたの攻撃速度は装備によって影響を受けている。", "Your attack speed is affected by your equipment.");
68     }
69 }
70
71 void set_status_sustain_info(PlayerType *player_ptr, self_info_type *self_ptr)
72 {
73     if (has_sustain_str(player_ptr)) {
74         self_ptr->info[self_ptr->line++] = _("あなたの腕力は維持されている。", "Your strength is sustained.");
75     }
76     if (has_sustain_int(player_ptr)) {
77         self_ptr->info[self_ptr->line++] = _("あなたの知能は維持されている。", "Your intelligence is sustained.");
78     }
79     if (has_sustain_wis(player_ptr)) {
80         self_ptr->info[self_ptr->line++] = _("あなたの賢さは維持されている。", "Your wisdom is sustained.");
81     }
82     if (has_sustain_con(player_ptr)) {
83         self_ptr->info[self_ptr->line++] = _("あなたの耐久力は維持されている。", "Your constitution is sustained.");
84     }
85     if (has_sustain_dex(player_ptr)) {
86         self_ptr->info[self_ptr->line++] = _("あなたの器用さは維持されている。", "Your dexterity is sustained.");
87     }
88     if (has_sustain_chr(player_ptr)) {
89         self_ptr->info[self_ptr->line++] = _("あなたの魅力は維持されている。", "Your charisma is sustained.");
90     }
91 }