OSDN Git Service

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