OSDN Git Service

Merge branch 'For2.2.2-Refactoring' into For3.0.0-Artifact-Monster-Addition
[hengband/hengband.git] / src / player-info / resistance-info.c
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"
6
7 void set_element_resistance_info(player_type* creature_ptr, self_info_type* si_ptr)
8 {
9     if (is_immune_acid(creature_ptr)) {
10         si_ptr->info[si_ptr->line++] = _("あなたは酸に対する完全なる免疫を持っている。", "You are completely immune to acid.");
11     } else if (creature_ptr->resist_acid && is_oppose_acid(creature_ptr)) {
12         si_ptr->info[si_ptr->line++] = _("あなたは酸への強力な耐性を持っている。", "You resist acid exceptionally well.");
13     } else if (creature_ptr->resist_acid || is_oppose_acid(creature_ptr)) {
14         si_ptr->info[si_ptr->line++] = _("あなたは酸への耐性を持っている。", "You are resistant to acid.");
15     }
16
17     if (is_immune_elec(creature_ptr)) {
18         si_ptr->info[si_ptr->line++] = _("あなたは電撃に対する完全なる免疫を持っている。", "You are completely immune to lightning.");
19     } else if (creature_ptr->resist_elec && is_oppose_elec(creature_ptr)) {
20         si_ptr->info[si_ptr->line++] = _("あなたは電撃への強力な耐性を持っている。", "You resist lightning exceptionally well.");
21     } else if (creature_ptr->resist_elec || is_oppose_elec(creature_ptr)) {
22         si_ptr->info[si_ptr->line++] = _("あなたは電撃への耐性を持っている。", "You are resistant to lightning.");
23     }
24
25     if (is_specific_player_race(creature_ptr, RACE_ANDROID) && !is_immune_elec(creature_ptr)) {
26         si_ptr->info[si_ptr->line++] = _("あなたは電撃に弱い。", "You are susceptible to damage from lightning.");
27     }
28
29     if (is_immune_fire(creature_ptr)) {
30         si_ptr->info[si_ptr->line++] = _("あなたは火に対する完全なる免疫を持っている。", "You are completely immune to fire.");
31     } else if (creature_ptr->resist_fire && is_oppose_fire(creature_ptr)) {
32         si_ptr->info[si_ptr->line++] = _("あなたは火への強力な耐性を持っている。", "You resist fire exceptionally well.");
33     } else if (creature_ptr->resist_fire || is_oppose_fire(creature_ptr)) {
34         si_ptr->info[si_ptr->line++] = _("あなたは火への耐性を持っている。", "You are resistant to fire.");
35     }
36
37     if (is_specific_player_race(creature_ptr, RACE_ENT) && !is_immune_fire(creature_ptr)) {
38         si_ptr->info[si_ptr->line++] = _("あなたは火に弱い。", "You are susceptible to damage from fire.");
39     }
40
41     if (is_immune_cold(creature_ptr)) {
42         si_ptr->info[si_ptr->line++] = _("あなたは冷気に対する完全なる免疫を持っている。", "You are completely immune to cold.");
43     } else if (creature_ptr->resist_cold && is_oppose_cold(creature_ptr)) {
44         si_ptr->info[si_ptr->line++] = _("あなたは冷気への強力な耐性を持っている。", "You resist cold exceptionally well.");
45     } else if (creature_ptr->resist_cold || is_oppose_cold(creature_ptr)) {
46         si_ptr->info[si_ptr->line++] = _("あなたは冷気への耐性を持っている。", "You are resistant to cold.");
47     }
48
49     if (creature_ptr->resist_pois && is_oppose_pois(creature_ptr)) {
50         si_ptr->info[si_ptr->line++] = _("あなたは毒への強力な耐性を持っている。", "You resist poison exceptionally well.");
51     } else if (creature_ptr->resist_pois || is_oppose_pois(creature_ptr)) {
52         si_ptr->info[si_ptr->line++] = _("あなたは毒への耐性を持っている。", "You are resistant to poison.");
53     }
54 }
55
56 void set_high_resistance_info(player_type *creature_ptr, self_info_type *si_ptr)
57 {
58     if (creature_ptr->resist_lite)
59         si_ptr->info[si_ptr->line++] = _("あなたは閃光への耐性を持っている。", "You are resistant to bright light.");
60
61     if (is_specific_player_race(creature_ptr, RACE_VAMPIRE) || is_specific_player_race(creature_ptr, RACE_S_FAIRY)
62         || (creature_ptr->mimic_form == MIMIC_VAMPIRE))
63         si_ptr->info[si_ptr->line++] = _("あなたは閃光に弱い。", "You are susceptible to damage from bright light.");
64
65     if (is_specific_player_race(creature_ptr, RACE_VAMPIRE) || (creature_ptr->mimic_form == MIMIC_VAMPIRE) || creature_ptr->wraith_form)
66         si_ptr->info[si_ptr->line++] = _("あなたは暗黒に対する完全なる免疫を持っている。", "You are completely immune to darkness.");
67     else if (creature_ptr->resist_dark)
68         si_ptr->info[si_ptr->line++] = _("あなたは暗黒への耐性を持っている。", "You are resistant to darkness.");
69     
70     if (creature_ptr->resist_conf)
71         si_ptr->info[si_ptr->line++] = _("あなたは混乱への耐性を持っている。", "You are resistant to confusion.");
72     
73     if (creature_ptr->resist_sound)
74         si_ptr->info[si_ptr->line++] = _("あなたは音波の衝撃への耐性を持っている。", "You are resistant to sonic attacks.");
75     
76     if (creature_ptr->resist_disen)
77         si_ptr->info[si_ptr->line++] = _("あなたは劣化への耐性を持っている。", "You are resistant to disenchantment.");
78     
79     if (creature_ptr->resist_chaos)
80         si_ptr->info[si_ptr->line++] = _("あなたはカオスの力への耐性を持っている。", "You are resistant to chaos.");
81     
82     if (creature_ptr->resist_shard)
83         si_ptr->info[si_ptr->line++] = _("あなたは破片の攻撃への耐性を持っている。", "You are resistant to blasts of shards.");
84     
85     if (creature_ptr->resist_nexus)
86         si_ptr->info[si_ptr->line++] = _("あなたは因果混乱の攻撃への耐性を持っている。", "You are resistant to nexus attacks.");
87
88     if (is_specific_player_race(creature_ptr, RACE_SPECTRE))
89         si_ptr->info[si_ptr->line++] = _("あなたは地獄の力を吸収できる。", "You can drain nether forces.");
90     else if (creature_ptr->resist_neth)
91         si_ptr->info[si_ptr->line++] = _("あなたは地獄の力への耐性を持っている。", "You are resistant to nether forces.");
92 }