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"
9 void set_equipment_influence(player_type *creature_ptr, self_info_type *self_ptr)
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)
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];
22 if (has_flag(self_ptr->flags, TR_STR))
23 self_ptr->info[self_ptr->line++] = _("あなたの腕力は装備によって影響を受けている。", "Your strength is affected by your equipment.");
25 if (has_flag(self_ptr->flags, TR_INT))
26 self_ptr->info[self_ptr->line++] = _("あなたの知能は装備によって影響を受けている。", "Your intelligence is affected by your equipment.");
28 if (has_flag(self_ptr->flags, TR_WIS))
29 self_ptr->info[self_ptr->line++] = _("あなたの賢さは装備によって影響を受けている。", "Your wisdom is affected by your equipment.");
31 if (has_flag(self_ptr->flags, TR_DEX))
32 self_ptr->info[self_ptr->line++] = _("あなたの器用さは装備によって影響を受けている。", "Your dexterity is affected by your equipment.");
34 if (has_flag(self_ptr->flags, TR_CON))
35 self_ptr->info[self_ptr->line++] = _("あなたの耐久力は装備によって影響を受けている。", "Your constitution is affected by your equipment.");
37 if (has_flag(self_ptr->flags, TR_CHR))
38 self_ptr->info[self_ptr->line++] = _("あなたの魅力は装備によって影響を受けている。", "Your charisma is affected by your equipment.");
40 if (has_flag(self_ptr->flags, TR_STEALTH))
41 self_ptr->info[self_ptr->line++] = _("あなたの隠密行動能力は装備によって影響を受けている。", "Your stealth is affected by your equipment.");
43 if (has_flag(self_ptr->flags, TR_SEARCH))
44 self_ptr->info[self_ptr->line++] = _("あなたの探索能力は装備によって影響を受けている。", "Your searching ability is affected by your equipment.");
46 if (has_flag(self_ptr->flags, TR_INFRA))
47 self_ptr->info[self_ptr->line++] = _("あなたの赤外線視力は装備によって影響を受けている。", "Your infravision is affected by your equipment.");
49 if (has_flag(self_ptr->flags, TR_TUNNEL))
50 self_ptr->info[self_ptr->line++] = _("あなたの採掘能力は装備によって影響を受けている。", "Your digging ability is affected by your equipment.");
52 if (has_flag(self_ptr->flags, TR_SPEED))
53 self_ptr->info[self_ptr->line++] = _("あなたのスピードは装備によって影響を受けている。", "Your speed is affected by your equipment.");
55 if (has_flag(self_ptr->flags, TR_BLOWS))
56 self_ptr->info[self_ptr->line++] = _("あなたの攻撃速度は装備によって影響を受けている。", "Your attack speed is affected by your equipment.");
59 void set_status_sustain_info(player_type *creature_ptr, self_info_type *self_ptr)
61 if (has_sustain_str(creature_ptr)) {
62 self_ptr->info[self_ptr->line++] = _("あなたの腕力は維持されている。", "Your strength is sustained.");
64 if (has_sustain_int(creature_ptr)) {
65 self_ptr->info[self_ptr->line++] = _("あなたの知能は維持されている。", "Your intelligence is sustained.");
67 if (has_sustain_wis(creature_ptr)) {
68 self_ptr->info[self_ptr->line++] = _("あなたの賢さは維持されている。", "Your wisdom is sustained.");
70 if (has_sustain_con(creature_ptr)) {
71 self_ptr->info[self_ptr->line++] = _("あなたの耐久力は維持されている。", "Your constitution is sustained.");
73 if (has_sustain_dex(creature_ptr)) {
74 self_ptr->info[self_ptr->line++] = _("あなたの器用さは維持されている。", "Your dexterity is sustained.");
76 if (has_sustain_chr(creature_ptr)) {
77 self_ptr->info[self_ptr->line++] = _("あなたの魅力は維持されている。", "Your charisma is sustained.");