1 #include "player-info/resistance-info.h"
2 #include "player-info/self-info-util.h"
3 #include "player/player-race.h"
4 #include "status/element-resistance.h"
5 #include "player/player-status-flags.h"
7 void set_element_resistance_info(player_type* creature_ptr, self_info_type* self_ptr)
9 if (has_immune_acid(creature_ptr)) {
10 self_ptr->info[self_ptr->line++] = _("あなたは酸に対する完全なる免疫を持っている。", "You are completely immune to acid.");
11 } else if (has_resist_acid(creature_ptr) && is_oppose_acid(creature_ptr)) {
12 self_ptr->info[self_ptr->line++] = _("あなたは酸への強力な耐性を持っている。", "You resist acid exceptionally well.");
13 } else if (has_resist_acid(creature_ptr) || is_oppose_acid(creature_ptr)) {
14 self_ptr->info[self_ptr->line++] = _("あなたは酸への耐性を持っている。", "You are resistant to acid.");
17 if (has_immune_elec(creature_ptr)) {
18 self_ptr->info[self_ptr->line++] = _("あなたは電撃に対する完全なる免疫を持っている。", "You are completely immune to lightning.");
19 } else if (has_resist_elec(creature_ptr) && is_oppose_elec(creature_ptr)) {
20 self_ptr->info[self_ptr->line++] = _("あなたは電撃への強力な耐性を持っている。", "You resist lightning exceptionally well.");
21 } else if (has_resist_elec(creature_ptr) || is_oppose_elec(creature_ptr)) {
22 self_ptr->info[self_ptr->line++] = _("あなたは電撃への耐性を持っている。", "You are resistant to lightning.");
24 if (is_specific_player_race(creature_ptr, RACE_ANDROID) && !has_immune_elec(creature_ptr)) {
25 self_ptr->info[self_ptr->line++] = _("あなたは電撃に弱い。", "You are susceptible to damage from lightning.");
28 if (has_immune_fire(creature_ptr)) {
29 self_ptr->info[self_ptr->line++] = _("あなたは火に対する完全なる免疫を持っている。", "You are completely immune to fire.");
30 } else if (has_resist_fire(creature_ptr) &&is_oppose_fire(creature_ptr)) {
31 self_ptr->info[self_ptr->line++] = _("あなたは火への強力な耐性を持っている。", "You resist fire exceptionally well.");
32 } else if (has_resist_fire(creature_ptr) || is_oppose_fire(creature_ptr)) {
33 self_ptr->info[self_ptr->line++] = _("あなたは火への耐性を持っている。", "You are resistant to fire.");
36 if (is_specific_player_race(creature_ptr, RACE_ENT) && !has_immune_fire(creature_ptr)) {
37 self_ptr->info[self_ptr->line++] = _("あなたは火に弱い。", "You are susceptible to damage from fire.");
40 if (has_immune_cold(creature_ptr)) {
41 self_ptr->info[self_ptr->line++] = _("あなたは冷気に対する完全なる免疫を持っている。", "You are completely immune to cold.");
42 } else if (has_resist_cold(creature_ptr) && is_oppose_cold(creature_ptr)) {
43 self_ptr->info[self_ptr->line++] = _("あなたは冷気への強力な耐性を持っている。", "You resist cold exceptionally well.");
44 } else if (has_resist_cold(creature_ptr) || is_oppose_cold(creature_ptr)) {
45 self_ptr->info[self_ptr->line++] = _("あなたは冷気への耐性を持っている。", "You are resistant to cold.");
48 if (has_resist_pois(creature_ptr) && is_oppose_pois(creature_ptr)) {
49 self_ptr->info[self_ptr->line++] = _("あなたは毒への強力な耐性を持っている。", "You resist poison exceptionally well.");
50 } else if (has_resist_pois(creature_ptr) || is_oppose_pois(creature_ptr)) {
51 self_ptr->info[self_ptr->line++] = _("あなたは毒への耐性を持っている。", "You are resistant to poison.");
55 void set_high_resistance_info(player_type *creature_ptr, self_info_type *self_ptr)
57 if (has_resist_lite(creature_ptr))
58 self_ptr->info[self_ptr->line++] = _("あなたは閃光への耐性を持っている。", "You are resistant to bright light.");
60 if (is_specific_player_race(creature_ptr, RACE_VAMPIRE) || is_specific_player_race(creature_ptr, RACE_S_FAIRY)
61 || (creature_ptr->mimic_form == MIMIC_VAMPIRE))
62 self_ptr->info[self_ptr->line++] = _("あなたは閃光に弱い。", "You are susceptible to damage from bright light.");
64 if (is_specific_player_race(creature_ptr, RACE_VAMPIRE) || (creature_ptr->mimic_form == MIMIC_VAMPIRE) || creature_ptr->wraith_form)
65 self_ptr->info[self_ptr->line++] = _("あなたは暗黒に対する完全なる免疫を持っている。", "You are completely immune to darkness.");
66 else if (creature_ptr->resist_dark)
67 self_ptr->info[self_ptr->line++] = _("あなたは暗黒への耐性を持っている。", "You are resistant to darkness.");
69 if (has_resist_conf(creature_ptr))
70 self_ptr->info[self_ptr->line++] = _("あなたは混乱への耐性を持っている。", "You are resistant to confusion.");
72 if (has_resist_sound(creature_ptr))
73 self_ptr->info[self_ptr->line++] = _("あなたは音波の衝撃への耐性を持っている。", "You are resistant to sonic attacks.");
75 if (creature_ptr->resist_disen)
76 self_ptr->info[self_ptr->line++] = _("あなたは劣化への耐性を持っている。", "You are resistant to disenchantment.");
78 if (creature_ptr->resist_chaos)
79 self_ptr->info[self_ptr->line++] = _("あなたはカオスの力への耐性を持っている。", "You are resistant to chaos.");
81 if (creature_ptr->resist_shard)
82 self_ptr->info[self_ptr->line++] = _("あなたは破片の攻撃への耐性を持っている。", "You are resistant to blasts of shards.");
84 if (creature_ptr->resist_nexus)
85 self_ptr->info[self_ptr->line++] = _("あなたは因果混乱の攻撃への耐性を持っている。", "You are resistant to nexus attacks.");
87 if (is_specific_player_race(creature_ptr, RACE_SPECTRE))
88 self_ptr->info[self_ptr->line++] = _("あなたは地獄の力を吸収できる。", "You can drain nether forces.");
89 else if (creature_ptr->resist_neth)
90 self_ptr->info[self_ptr->line++] = _("あなたは地獄の力への耐性を持っている。", "You are resistant to nether forces.");