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"
10 void set_equipment_influence(PlayerType *player_ptr, self_info_type *self_ptr)
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()) {
18 auto tflags = object_flags(o_ptr);
19 self_ptr->flags.set(tflags);
22 if (self_ptr->flags.has(TR_STR)) {
23 self_ptr->info[self_ptr->line++] = _("あなたの腕力は装備によって影響を受けている。", "Your strength is affected by your equipment.");
26 if (self_ptr->flags.has(TR_INT)) {
27 self_ptr->info[self_ptr->line++] = _("あなたの知能は装備によって影響を受けている。", "Your intelligence is affected by your equipment.");
30 if (self_ptr->flags.has(TR_WIS)) {
31 self_ptr->info[self_ptr->line++] = _("あなたの賢さは装備によって影響を受けている。", "Your wisdom is affected by your equipment.");
34 if (self_ptr->flags.has(TR_DEX)) {
35 self_ptr->info[self_ptr->line++] = _("あなたの器用さは装備によって影響を受けている。", "Your dexterity is affected by your equipment.");
38 if (self_ptr->flags.has(TR_CON)) {
39 self_ptr->info[self_ptr->line++] = _("あなたの耐久力は装備によって影響を受けている。", "Your constitution is affected by your equipment.");
42 if (self_ptr->flags.has(TR_CHR)) {
43 self_ptr->info[self_ptr->line++] = _("あなたの魅力は装備によって影響を受けている。", "Your charisma is affected by your equipment.");
46 if (self_ptr->flags.has(TR_STEALTH)) {
47 self_ptr->info[self_ptr->line++] = _("あなたの隠密行動能力は装備によって影響を受けている。", "Your stealth is affected by your equipment.");
50 if (self_ptr->flags.has(TR_SEARCH)) {
51 self_ptr->info[self_ptr->line++] = _("あなたの探索能力は装備によって影響を受けている。", "Your searching ability is affected by your equipment.");
54 if (self_ptr->flags.has(TR_INFRA)) {
55 self_ptr->info[self_ptr->line++] = _("あなたの赤外線視力は装備によって影響を受けている。", "Your infravision is affected by your equipment.");
58 if (self_ptr->flags.has(TR_TUNNEL)) {
59 self_ptr->info[self_ptr->line++] = _("あなたの採掘能力は装備によって影響を受けている。", "Your digging ability is affected by your equipment.");
62 if (self_ptr->flags.has(TR_SPEED)) {
63 self_ptr->info[self_ptr->line++] = _("あなたのスピードは装備によって影響を受けている。", "Your speed is affected by your equipment.");
66 if (self_ptr->flags.has(TR_BLOWS)) {
67 self_ptr->info[self_ptr->line++] = _("あなたの攻撃速度は装備によって影響を受けている。", "Your attack speed is affected by your equipment.");
71 void set_status_sustain_info(PlayerType *player_ptr, self_info_type *self_ptr)
73 if (has_sustain_str(player_ptr)) {
74 self_ptr->info[self_ptr->line++] = _("あなたの腕力は維持されている。", "Your strength is sustained.");
76 if (has_sustain_int(player_ptr)) {
77 self_ptr->info[self_ptr->line++] = _("あなたの知能は維持されている。", "Your intelligence is sustained.");
79 if (has_sustain_wis(player_ptr)) {
80 self_ptr->info[self_ptr->line++] = _("あなたの賢さは維持されている。", "Your wisdom is sustained.");
82 if (has_sustain_con(player_ptr)) {
83 self_ptr->info[self_ptr->line++] = _("あなたの耐久力は維持されている。", "Your constitution is sustained.");
85 if (has_sustain_dex(player_ptr)) {
86 self_ptr->info[self_ptr->line++] = _("あなたの器用さは維持されている。", "Your dexterity is sustained.");
88 if (has_sustain_chr(player_ptr)) {
89 self_ptr->info[self_ptr->line++] = _("あなたの魅力は維持されている。", "Your charisma is sustained.");