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"
9 void set_equipment_influence(PlayerType *player_ptr, self_info_type *self_ptr)
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()) {
17 auto tflags = o_ptr->get_flags();
18 self_ptr->flags.set(tflags);
21 if (self_ptr->flags.has(TR_STR)) {
22 self_ptr->info[self_ptr->line++] = _("あなたの腕力は装備によって影響を受けている。", "Your strength is affected by your equipment.");
25 if (self_ptr->flags.has(TR_INT)) {
26 self_ptr->info[self_ptr->line++] = _("あなたの知能は装備によって影響を受けている。", "Your intelligence is affected by your equipment.");
29 if (self_ptr->flags.has(TR_WIS)) {
30 self_ptr->info[self_ptr->line++] = _("あなたの賢さは装備によって影響を受けている。", "Your wisdom is affected by your equipment.");
33 if (self_ptr->flags.has(TR_DEX)) {
34 self_ptr->info[self_ptr->line++] = _("あなたの器用さは装備によって影響を受けている。", "Your dexterity is affected by your equipment.");
37 if (self_ptr->flags.has(TR_CON)) {
38 self_ptr->info[self_ptr->line++] = _("あなたの耐久力は装備によって影響を受けている。", "Your constitution is affected by your equipment.");
41 if (self_ptr->flags.has(TR_CHR)) {
42 self_ptr->info[self_ptr->line++] = _("あなたの魅力は装備によって影響を受けている。", "Your charisma is affected by your equipment.");
45 if (self_ptr->flags.has(TR_STEALTH)) {
46 self_ptr->info[self_ptr->line++] = _("あなたの隠密行動能力は装備によって影響を受けている。", "Your stealth is affected by your equipment.");
49 if (self_ptr->flags.has(TR_SEARCH)) {
50 self_ptr->info[self_ptr->line++] = _("あなたの探索能力は装備によって影響を受けている。", "Your searching ability is affected by your equipment.");
53 if (self_ptr->flags.has(TR_INFRA)) {
54 self_ptr->info[self_ptr->line++] = _("あなたの赤外線視力は装備によって影響を受けている。", "Your infravision is affected by your equipment.");
57 if (self_ptr->flags.has(TR_TUNNEL)) {
58 self_ptr->info[self_ptr->line++] = _("あなたの採掘能力は装備によって影響を受けている。", "Your digging ability is affected by your equipment.");
61 if (self_ptr->flags.has(TR_SPEED)) {
62 self_ptr->info[self_ptr->line++] = _("あなたのスピードは装備によって影響を受けている。", "Your speed is affected by your equipment.");
65 if (self_ptr->flags.has(TR_BLOWS)) {
66 self_ptr->info[self_ptr->line++] = _("あなたの攻撃速度は装備によって影響を受けている。", "Your attack speed is affected by your equipment.");
70 void set_status_sustain_info(PlayerType *player_ptr, self_info_type *self_ptr)
72 if (has_sustain_str(player_ptr)) {
73 self_ptr->info[self_ptr->line++] = _("あなたの腕力は維持されている。", "Your strength is sustained.");
75 if (has_sustain_int(player_ptr)) {
76 self_ptr->info[self_ptr->line++] = _("あなたの知能は維持されている。", "Your intelligence is sustained.");
78 if (has_sustain_wis(player_ptr)) {
79 self_ptr->info[self_ptr->line++] = _("あなたの賢さは維持されている。", "Your wisdom is sustained.");
81 if (has_sustain_con(player_ptr)) {
82 self_ptr->info[self_ptr->line++] = _("あなたの耐久力は維持されている。", "Your constitution is sustained.");
84 if (has_sustain_dex(player_ptr)) {
85 self_ptr->info[self_ptr->line++] = _("あなたの器用さは維持されている。", "Your dexterity is sustained.");
87 if (has_sustain_chr(player_ptr)) {
88 self_ptr->info[self_ptr->line++] = _("あなたの魅力は維持されている。", "Your charisma is sustained.");