2 * @brief 自己分析処理/ Self knowledge
6 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
7 * This software may be copied and distributed for educational, research,
8 * and not for profit purposes provided that this copyright and statement
9 * are included in all such copies. Other copyrights may also apply.
13 #include "player-info/self-info.h"
14 #include "inventory/inventory-slot-types.h"
15 #include "io/input-key-acceptor.h"
16 #include "mutation/mutation-flag-types.h"
17 #include "object-enchant/tr-types.h"
18 #include "object-enchant/trc-types.h"
19 #include "object/object-flags.h"
20 #include "player-info/avatar.h"
21 #include "player-info/body-improvement-info.h"
22 #include "player-info/class-ability-info.h"
23 #include "player-info/mutation-info.h"
24 #include "player-info/race-ability-info.h"
25 #include "player-info/self-info-util.h"
26 #include "player/attack-defense-types.h"
27 #include "player/player-class.h"
28 #include "player/player-race-types.h"
29 #include "player/player-race.h"
30 #include "player/player-status-flags.h"
31 #include "realm/realm-names-table.h"
32 #include "realm/realm-song-numbers.h"
33 #include "status/element-resistance.h"
34 #include "term/screen-processor.h"
35 #include "util/bit-flags-calculator.h"
37 void display_life_rating(player_type *creature_ptr, self_info_type *si_ptr)
39 creature_ptr->knowledge |= KNOW_STAT | KNOW_HPRATE;
40 strcpy(si_ptr->plev_buf, "");
42 = (int)(((long)creature_ptr->player_hp[PY_MAX_LEVEL - 1] * 200L) / (2 * creature_ptr->hitdie + ((PY_MAX_LEVEL - 1 + 3) * (creature_ptr->hitdie + 1))));
43 sprintf(si_ptr->plev_buf, _("現在の体力ランク : %d/100", "Your current Life Rating is %d/100."), percent);
44 strcpy(si_ptr->buf[0], si_ptr->plev_buf);
45 si_ptr->info[si_ptr->line++] = si_ptr->buf[0];
46 si_ptr->info[si_ptr->line++] = "";
49 void display_max_base_status(player_type *creature_ptr, self_info_type *si_ptr)
51 si_ptr->info[si_ptr->line++] = _("能力の最大値", "Limits of maximum stats");
52 for (base_status_type v_nr = 0; v_nr < A_MAX; v_nr++) {
54 sprintf(stat_desc, "%s 18/%d", stat_names[v_nr], creature_ptr->stat_max_max[v_nr] - 18);
55 strcpy(si_ptr->s_string[v_nr], stat_desc);
56 si_ptr->info[si_ptr->line++] = si_ptr->s_string[v_nr];
60 void display_virtue(player_type *creature_ptr, self_info_type *si_ptr)
62 si_ptr->info[si_ptr->line++] = "";
63 sprintf(si_ptr->plev_buf, _("現在の属性 : %s(%ld)", "Your alignment : %s(%ld)"), your_alignment(creature_ptr), (long int)creature_ptr->align);
64 strcpy(si_ptr->buf[1], si_ptr->plev_buf);
65 si_ptr->info[si_ptr->line++] = si_ptr->buf[1];
66 for (int v_nr = 0; v_nr < 8; v_nr++) {
67 GAME_TEXT vir_name[20];
69 int tester = creature_ptr->virtues[v_nr];
70 strcpy(vir_name, virtue[(creature_ptr->vir_types[v_nr]) - 1]);
71 sprintf(vir_desc, _("おっと。%sの情報なし。", "Oops. No info about %s."), vir_name);
73 sprintf(vir_desc, _("[%s]の対極 (%d)", "You are the polar opposite of %s (%d)."), vir_name, tester);
74 else if (tester < -80)
75 sprintf(vir_desc, _("[%s]の大敵 (%d)", "You are an arch-enemy of %s (%d)."), vir_name, tester);
76 else if (tester < -60)
77 sprintf(vir_desc, _("[%s]の強敵 (%d)", "You are a bitter enemy of %s (%d)."), vir_name, tester);
78 else if (tester < -40)
79 sprintf(vir_desc, _("[%s]の敵 (%d)", "You are an enemy of %s (%d)."), vir_name, tester);
80 else if (tester < -20)
81 sprintf(vir_desc, _("[%s]の罪者 (%d)", "You have sinned against %s (%d)."), vir_name, tester);
83 sprintf(vir_desc, _("[%s]の迷道者 (%d)", "You have strayed from the path of %s (%d)."), vir_name, tester);
85 sprintf(vir_desc, _("[%s]の中立者 (%d)", "You are neutral to %s (%d)."), vir_name, tester);
87 sprintf(vir_desc, _("[%s]の小徳者 (%d)", "You are somewhat virtuous in %s (%d)."), vir_name, tester);
89 sprintf(vir_desc, _("[%s]の中徳者 (%d)", "You are virtuous in %s (%d)."), vir_name, tester);
91 sprintf(vir_desc, _("[%s]の高徳者 (%d)", "You are very virtuous in %s (%d)."), vir_name, tester);
93 sprintf(vir_desc, _("[%s]の覇者 (%d)", "You are a champion of %s (%d)."), vir_name, tester);
94 else if (tester < 100)
95 sprintf(vir_desc, _("[%s]の偉大な覇者 (%d)", "You are a great champion of %s (%d)."), vir_name, tester);
97 sprintf(vir_desc, _("[%s]の具現者 (%d)", "You are the living embodiment of %s (%d)."), vir_name, tester);
99 strcpy(si_ptr->v_string[v_nr], vir_desc);
100 si_ptr->info[si_ptr->line++] = si_ptr->v_string[v_nr];
104 void display_mimic_race_ability(player_type *creature_ptr, self_info_type *si_ptr)
106 switch (creature_ptr->mimic_form) {
108 case MIMIC_DEMON_LORD:
109 sprintf(si_ptr->plev_buf, _("あなたは %d ダメージの地獄か火炎のブレスを吐くことができる。(%d MP)", "You can nether breathe, dam. %d (cost %d)."),
110 3 * creature_ptr->lev, 10 + creature_ptr->lev / 3);
112 si_ptr->info[si_ptr->line++] = si_ptr->plev_buf;
115 if (creature_ptr->lev <= 1)
118 sprintf(si_ptr->plev_buf, _("あなたは敵から %d-%d HP の生命力を吸収できる。(%d MP)", "You can steal life from a foe, dam. %d-%d (cost %d)."),
119 creature_ptr->lev + MAX(1, creature_ptr->lev / 10), creature_ptr->lev + creature_ptr->lev * MAX(1, creature_ptr->lev / 10),
120 1 + (creature_ptr->lev / 3));
121 si_ptr->info[si_ptr->line++] = si_ptr->plev_buf;
126 void display_equipment_influence(player_type *creature_ptr, self_info_type *si_ptr)
128 for (int k = INVEN_RARM; k < INVEN_TOTAL; k++) {
129 u32b tflgs[TR_FLAG_SIZE];
130 si_ptr->o_ptr = &creature_ptr->inventory_list[k];
131 if (si_ptr->o_ptr->k_idx == 0)
134 object_flags(creature_ptr, si_ptr->o_ptr, tflgs);
135 for (int j = 0; j < TR_FLAG_SIZE; j++)
136 si_ptr->flags[j] |= tflgs[j];
139 if (have_flag(si_ptr->flags, TR_STR))
140 si_ptr->info[si_ptr->line++] = _("あなたの腕力は装備によって影響を受けている。", "Your strength is affected by your equipment.");
142 if (have_flag(si_ptr->flags, TR_INT))
143 si_ptr->info[si_ptr->line++] = _("あなたの知能は装備によって影響を受けている。", "Your intelligence is affected by your equipment.");
145 if (have_flag(si_ptr->flags, TR_WIS))
146 si_ptr->info[si_ptr->line++] = _("あなたの賢さは装備によって影響を受けている。", "Your wisdom is affected by your equipment.");
148 if (have_flag(si_ptr->flags, TR_DEX))
149 si_ptr->info[si_ptr->line++] = _("あなたの器用さは装備によって影響を受けている。", "Your dexterity is affected by your equipment.");
151 if (have_flag(si_ptr->flags, TR_CON))
152 si_ptr->info[si_ptr->line++] = _("あなたの耐久力は装備によって影響を受けている。", "Your constitution is affected by your equipment.");
154 if (have_flag(si_ptr->flags, TR_CHR))
155 si_ptr->info[si_ptr->line++] = _("あなたの魅力は装備によって影響を受けている。", "Your charisma is affected by your equipment.");
157 if (have_flag(si_ptr->flags, TR_STEALTH))
158 si_ptr->info[si_ptr->line++] = _("あなたの隠密行動能力は装備によって影響を受けている。", "Your stealth is affected by your equipment.");
160 if (have_flag(si_ptr->flags, TR_SEARCH))
161 si_ptr->info[si_ptr->line++] = _("あなたの探索能力は装備によって影響を受けている。", "Your searching ability is affected by your equipment.");
163 if (have_flag(si_ptr->flags, TR_INFRA))
164 si_ptr->info[si_ptr->line++] = _("あなたの赤外線視力は装備によって影響を受けている。", "Your infravision is affected by your equipment.");
166 if (have_flag(si_ptr->flags, TR_TUNNEL))
167 si_ptr->info[si_ptr->line++] = _("あなたの採掘能力は装備によって影響を受けている。", "Your digging ability is affected by your equipment.");
169 if (have_flag(si_ptr->flags, TR_SPEED))
170 si_ptr->info[si_ptr->line++] = _("あなたのスピードは装備によって影響を受けている。", "Your speed is affected by your equipment.");
172 if (have_flag(si_ptr->flags, TR_BLOWS))
173 si_ptr->info[si_ptr->line++] = _("あなたの攻撃速度は装備によって影響を受けている。", "Your attack speed is affected by your equipment.");
176 void set_bad_status_info(player_type *creature_ptr, self_info_type *si_ptr)
178 if (creature_ptr->blind)
179 si_ptr->info[si_ptr->line++] = _("あなたは目が見えない。", "You cannot see.");
181 if (creature_ptr->confused)
182 si_ptr->info[si_ptr->line++] = _("あなたは混乱している。", "You are confused.");
184 if (creature_ptr->afraid)
185 si_ptr->info[si_ptr->line++] = _("あなたは恐怖に侵されている。", "You are terrified.");
187 if (creature_ptr->cut)
188 si_ptr->info[si_ptr->line++] = _("あなたは出血している。", "You are bleeding.");
190 if (creature_ptr->stun)
191 si_ptr->info[si_ptr->line++] = _("あなたはもうろうとしている。", "You are stunned.");
193 if (creature_ptr->poisoned)
194 si_ptr->info[si_ptr->line++] = _("あなたは毒に侵されている。", "You are poisoned.");
196 if (creature_ptr->image)
197 si_ptr->info[si_ptr->line++] = _("あなたは幻覚を見ている。", "You are hallucinating.");
200 void set_curse_info(player_type *creature_ptr, self_info_type *si_ptr)
202 if (creature_ptr->cursed & TRC_TY_CURSE)
203 si_ptr->info[si_ptr->line++] = _("あなたは邪悪な怨念に包まれている。", "You carry an ancient foul curse.");
205 if (creature_ptr->cursed & TRC_AGGRAVATE)
206 si_ptr->info[si_ptr->line++] = _("あなたはモンスターを怒らせている。", "You aggravate monsters.");
208 if (creature_ptr->cursed & TRC_DRAIN_EXP)
209 si_ptr->info[si_ptr->line++] = _("あなたは経験値を吸われている。", "You occasionally lose experience for no reason.");
211 if (creature_ptr->cursed & TRC_SLOW_REGEN)
212 si_ptr->info[si_ptr->line++] = _("あなたの回復力は非常に遅い。", "You regenerate slowly.");
214 if (creature_ptr->cursed & TRC_ADD_L_CURSE)
215 si_ptr->info[si_ptr->line++] = _("あなたの弱い呪いは増える。", "Your weak curses multiply."); /* 暫定的 -- henkma */
217 if (creature_ptr->cursed & TRC_ADD_H_CURSE)
218 si_ptr->info[si_ptr->line++] = _("あなたの強い呪いは増える。", "Your heavy curses multiply."); /* 暫定的 -- henkma */
220 if (creature_ptr->cursed & TRC_CALL_ANIMAL)
221 si_ptr->info[si_ptr->line++] = _("あなたは動物に狙われている。", "You attract animals.");
223 if (creature_ptr->cursed & TRC_CALL_DEMON)
224 si_ptr->info[si_ptr->line++] = _("あなたは悪魔に狙われている。", "You attract demons.");
226 if (creature_ptr->cursed & TRC_CALL_DRAGON)
227 si_ptr->info[si_ptr->line++] = _("あなたはドラゴンに狙われている。", "You attract dragons.");
229 if (creature_ptr->cursed & TRC_COWARDICE)
230 si_ptr->info[si_ptr->line++] = _("あなたは時々臆病になる。", "You are subject to cowardice.");
232 if (creature_ptr->cursed & TRC_TELEPORT)
233 si_ptr->info[si_ptr->line++] = _("あなたの位置はひじょうに不安定だ。", "Your position is very uncertain.");
235 if (creature_ptr->cursed & TRC_LOW_MELEE)
236 si_ptr->info[si_ptr->line++] = _("あなたの武器は攻撃を外しやすい。", "Your weapon causes you to miss blows.");
238 if (creature_ptr->cursed & TRC_LOW_AC)
239 si_ptr->info[si_ptr->line++] = _("あなたは攻撃を受けやすい。", "You are subject to be hit.");
241 if (creature_ptr->cursed & TRC_LOW_MAGIC)
242 si_ptr->info[si_ptr->line++] = _("あなたは魔法を失敗しやすい。", "Your spells fail more frequently.");
244 if (creature_ptr->cursed & TRC_FAST_DIGEST)
245 si_ptr->info[si_ptr->line++] = _("あなたはすぐお腹がへる。", "You have a good appetite.");
247 if (creature_ptr->cursed & TRC_DRAIN_HP)
248 si_ptr->info[si_ptr->line++] = _("あなたは体力を吸われている。", "You occasionally lose hit points for no reason.");
250 if (creature_ptr->cursed & TRC_DRAIN_MANA)
251 si_ptr->info[si_ptr->line++] = _("あなたは魔力を吸われている。", "You occasionally lose spell points for no reason.");
254 void set_special_attack_info(player_type *creature_ptr, self_info_type *si_ptr)
256 if (creature_ptr->special_attack & ATTACK_CONFUSE)
257 si_ptr->info[si_ptr->line++] = _("あなたの手は赤く輝いている。", "Your hands are glowing dull red.");
259 if (creature_ptr->special_attack & ATTACK_FIRE)
260 si_ptr->info[si_ptr->line++] = _("あなたの手は火炎に覆われている。", "You can strike the enemy with flame.");
262 if (creature_ptr->special_attack & ATTACK_COLD)
263 si_ptr->info[si_ptr->line++] = _("あなたの手は冷気に覆われている。", "You can strike the enemy with cold.");
265 if (creature_ptr->special_attack & ATTACK_ACID)
266 si_ptr->info[si_ptr->line++] = _("あなたの手は酸に覆われている。", "You can strike the enemy with acid.");
268 if (creature_ptr->special_attack & ATTACK_ELEC)
269 si_ptr->info[si_ptr->line++] = _("あなたの手は電撃に覆われている。", "You can strike the enemy with electoric shock.");
271 if (creature_ptr->special_attack & ATTACK_POIS)
272 si_ptr->info[si_ptr->line++] = _("あなたの手は毒に覆われている。", "You can strike the enemy with poison.");
275 void set_esp_info(player_type *creature_ptr, self_info_type *si_ptr)
277 if (creature_ptr->telepathy)
278 si_ptr->info[si_ptr->line++] = _("あなたはテレパシー能力を持っている。", "You have ESP.");
280 if (creature_ptr->esp_animal)
281 si_ptr->info[si_ptr->line++] = _("あなたは自然界の生物の存在を感じる能力を持っている。", "You sense natural creatures.");
283 if (creature_ptr->esp_undead)
284 si_ptr->info[si_ptr->line++] = _("あなたはアンデッドの存在を感じる能力を持っている。", "You sense undead.");
286 if (creature_ptr->esp_demon)
287 si_ptr->info[si_ptr->line++] = _("あなたは悪魔の存在を感じる能力を持っている。", "You sense demons.");
289 if (creature_ptr->esp_orc)
290 si_ptr->info[si_ptr->line++] = _("あなたはオークの存在を感じる能力を持っている。", "You sense orcs.");
292 if (creature_ptr->esp_troll)
293 si_ptr->info[si_ptr->line++] = _("あなたはトロルの存在を感じる能力を持っている。", "You sense trolls.");
295 if (creature_ptr->esp_giant)
296 si_ptr->info[si_ptr->line++] = _("あなたは巨人の存在を感じる能力を持っている。", "You sense giants.");
298 if (creature_ptr->esp_dragon)
299 si_ptr->info[si_ptr->line++] = _("あなたはドラゴンの存在を感じる能力を持っている。", "You sense dragons.");
301 if (creature_ptr->esp_human)
302 si_ptr->info[si_ptr->line++] = _("あなたは人間の存在を感じる能力を持っている。", "You sense humans.");
304 if (creature_ptr->esp_evil)
305 si_ptr->info[si_ptr->line++] = _("あなたは邪悪な生き物の存在を感じる能力を持っている。", "You sense evil creatures.");
307 if (creature_ptr->esp_good)
308 si_ptr->info[si_ptr->line++] = _("あなたは善良な生き物の存在を感じる能力を持っている。", "You sense good creatures.");
310 if (creature_ptr->esp_nonliving)
311 si_ptr->info[si_ptr->line++] = _("あなたは活動する無生物体の存在を感じる能力を持っている。", "You sense non-living creatures.");
313 if (creature_ptr->esp_unique)
314 si_ptr->info[si_ptr->line++] = _("あなたは特別な強敵の存在を感じる能力を持っている。", "You sense unique monsters.");
318 * @brief 自己分析処理(Nethackからのアイデア) / self-knowledge... idea from nethack.
322 * Useful for determining powers and
323 * resistences of items. It saves the screen, clears it, then starts listing
324 * attributes, a screenful at a time. (There are a LOT of attributes to
325 * list. It will probably take 2 or 3 screens for a powerful character whose
326 * using several artifacts...) -CFT
328 * It is now a lot more efficient. -BEN-
330 * See also "identify_fully()".
332 * Use the "show_file()" method, perhaps.
335 void self_knowledge(player_type *creature_ptr)
337 self_info_type tmp_si;
338 self_info_type *si_ptr = initialize_self_info_type(&tmp_si);
339 display_life_rating(creature_ptr, si_ptr);
340 chg_virtue(creature_ptr, V_KNOWLEDGE, 1);
341 chg_virtue(creature_ptr, V_ENLIGHTEN, 1);
342 display_max_base_status(creature_ptr, si_ptr);
343 display_virtue(creature_ptr, si_ptr);
344 si_ptr->info[si_ptr->line++] = "";
345 if (creature_ptr->mimic_form)
346 display_mimic_race_ability(creature_ptr, si_ptr);
348 set_race_ability_info(creature_ptr, si_ptr);
350 set_class_ability_info(creature_ptr, si_ptr);
351 set_mutation_info_1(creature_ptr, si_ptr);
352 set_mutation_info_2(creature_ptr, si_ptr);
353 set_mutation_info_3(creature_ptr, si_ptr);
354 set_bad_status_info(creature_ptr, si_ptr);
355 set_curse_info(creature_ptr, si_ptr);
356 set_body_improvement_info_1(creature_ptr, si_ptr);
357 set_special_attack_info(creature_ptr, si_ptr);
358 switch (creature_ptr->action) {
360 si_ptr->info[si_ptr->line++] = _("あなたはひじょうに注意深く周囲を見渡している。", "You are looking around very carefully.");
364 set_body_improvement_info_2(creature_ptr, si_ptr);
365 set_esp_info(creature_ptr, si_ptr);
366 set_body_improvement_info_3(creature_ptr, si_ptr);
367 if (creature_ptr->immune_acid) {
368 si_ptr->info[si_ptr->line++] = _("あなたは酸に対する完全なる免疫を持っている。", "You are completely immune to acid.");
369 } else if (creature_ptr->resist_acid && is_oppose_acid(creature_ptr)) {
370 si_ptr->info[si_ptr->line++] = _("あなたは酸への強力な耐性を持っている。", "You resist acid exceptionally well.");
371 } else if (creature_ptr->resist_acid || is_oppose_acid(creature_ptr)) {
372 si_ptr->info[si_ptr->line++] = _("あなたは酸への耐性を持っている。", "You are resistant to acid.");
375 if (creature_ptr->immune_elec) {
376 si_ptr->info[si_ptr->line++] = _("あなたは電撃に対する完全なる免疫を持っている。", "You are completely immune to lightning.");
377 } else if (creature_ptr->resist_elec && is_oppose_elec(creature_ptr)) {
378 si_ptr->info[si_ptr->line++] = _("あなたは電撃への強力な耐性を持っている。", "You resist lightning exceptionally well.");
379 } else if (creature_ptr->resist_elec || is_oppose_elec(creature_ptr)) {
380 si_ptr->info[si_ptr->line++] = _("あなたは電撃への耐性を持っている。", "You are resistant to lightning.");
383 if (is_specific_player_race(creature_ptr, RACE_ANDROID) && !creature_ptr->immune_elec) {
384 si_ptr->info[si_ptr->line++] = _("あなたは電撃に弱い。", "You are susceptible to damage from lightning.");
387 if (creature_ptr->immune_fire) {
388 si_ptr->info[si_ptr->line++] = _("あなたは火に対する完全なる免疫を持っている。", "You are completely immune to fire.");
389 } else if (creature_ptr->resist_fire && is_oppose_fire(creature_ptr)) {
390 si_ptr->info[si_ptr->line++] = _("あなたは火への強力な耐性を持っている。", "You resist fire exceptionally well.");
391 } else if (creature_ptr->resist_fire || is_oppose_fire(creature_ptr)) {
392 si_ptr->info[si_ptr->line++] = _("あなたは火への耐性を持っている。", "You are resistant to fire.");
395 if (is_specific_player_race(creature_ptr, RACE_ENT) && !creature_ptr->immune_fire) {
396 si_ptr->info[si_ptr->line++] = _("あなたは火に弱い。", "You are susceptible to damage from fire.");
399 if (creature_ptr->immune_cold) {
400 si_ptr->info[si_ptr->line++] = _("あなたは冷気に対する完全なる免疫を持っている。", "You are completely immune to cold.");
401 } else if (creature_ptr->resist_cold && is_oppose_cold(creature_ptr)) {
402 si_ptr->info[si_ptr->line++] = _("あなたは冷気への強力な耐性を持っている。", "You resist cold exceptionally well.");
403 } else if (creature_ptr->resist_cold || is_oppose_cold(creature_ptr)) {
404 si_ptr->info[si_ptr->line++] = _("あなたは冷気への耐性を持っている。", "You are resistant to cold.");
407 if (creature_ptr->resist_pois && is_oppose_pois(creature_ptr)) {
408 si_ptr->info[si_ptr->line++] = _("あなたは毒への強力な耐性を持っている。", "You resist poison exceptionally well.");
409 } else if (creature_ptr->resist_pois || is_oppose_pois(creature_ptr)) {
410 si_ptr->info[si_ptr->line++] = _("あなたは毒への耐性を持っている。", "You are resistant to poison.");
413 if (creature_ptr->resist_lite) {
414 si_ptr->info[si_ptr->line++] = _("あなたは閃光への耐性を持っている。", "You are resistant to bright light.");
417 if (is_specific_player_race(creature_ptr, RACE_VAMPIRE) || is_specific_player_race(creature_ptr, RACE_S_FAIRY)
418 || (creature_ptr->mimic_form == MIMIC_VAMPIRE)) {
419 si_ptr->info[si_ptr->line++] = _("あなたは閃光に弱い。", "You are susceptible to damage from bright light.");
422 if (is_specific_player_race(creature_ptr, RACE_VAMPIRE) || (creature_ptr->mimic_form == MIMIC_VAMPIRE) || creature_ptr->wraith_form) {
423 si_ptr->info[si_ptr->line++] = _("あなたは暗黒に対する完全なる免疫を持っている。", "You are completely immune to darkness.");
424 } else if (creature_ptr->resist_dark) {
425 si_ptr->info[si_ptr->line++] = _("あなたは暗黒への耐性を持っている。", "You are resistant to darkness.");
427 if (creature_ptr->resist_conf) {
428 si_ptr->info[si_ptr->line++] = _("あなたは混乱への耐性を持っている。", "You are resistant to confusion.");
430 if (creature_ptr->resist_sound) {
431 si_ptr->info[si_ptr->line++] = _("あなたは音波の衝撃への耐性を持っている。", "You are resistant to sonic attacks.");
433 if (creature_ptr->resist_disen) {
434 si_ptr->info[si_ptr->line++] = _("あなたは劣化への耐性を持っている。", "You are resistant to disenchantment.");
436 if (creature_ptr->resist_chaos) {
437 si_ptr->info[si_ptr->line++] = _("あなたはカオスの力への耐性を持っている。", "You are resistant to chaos.");
439 if (creature_ptr->resist_shard) {
440 si_ptr->info[si_ptr->line++] = _("あなたは破片の攻撃への耐性を持っている。", "You are resistant to blasts of shards.");
442 if (creature_ptr->resist_nexus) {
443 si_ptr->info[si_ptr->line++] = _("あなたは因果混乱の攻撃への耐性を持っている。", "You are resistant to nexus attacks.");
446 if (is_specific_player_race(creature_ptr, RACE_SPECTRE)) {
447 si_ptr->info[si_ptr->line++] = _("あなたは地獄の力を吸収できる。", "You can drain nether forces.");
448 } else if (creature_ptr->resist_neth) {
449 si_ptr->info[si_ptr->line++] = _("あなたは地獄の力への耐性を持っている。", "You are resistant to nether forces.");
451 if (creature_ptr->resist_fear) {
452 si_ptr->info[si_ptr->line++] = _("あなたは全く恐怖を感じない。", "You are completely fearless.");
454 if (creature_ptr->resist_blind) {
455 si_ptr->info[si_ptr->line++] = _("あなたの目は盲目への耐性を持っている。", "Your eyes are resistant to blindness.");
457 if (creature_ptr->resist_time) {
458 si_ptr->info[si_ptr->line++] = _("あなたは時間逆転への耐性を持っている。", "You are resistant to time.");
461 if (creature_ptr->sustain_str) {
462 si_ptr->info[si_ptr->line++] = _("あなたの腕力は維持されている。", "Your strength is sustained.");
464 if (creature_ptr->sustain_int) {
465 si_ptr->info[si_ptr->line++] = _("あなたの知能は維持されている。", "Your intelligence is sustained.");
467 if (creature_ptr->sustain_wis) {
468 si_ptr->info[si_ptr->line++] = _("あなたの賢さは維持されている。", "Your wisdom is sustained.");
470 if (creature_ptr->sustain_con) {
471 si_ptr->info[si_ptr->line++] = _("あなたの耐久力は維持されている。", "Your constitution is sustained.");
473 if (creature_ptr->sustain_dex) {
474 si_ptr->info[si_ptr->line++] = _("あなたの器用さは維持されている。", "Your dexterity is sustained.");
476 if (creature_ptr->sustain_chr) {
477 si_ptr->info[si_ptr->line++] = _("あなたの魅力は維持されている。", "Your charisma is sustained.");
480 display_equipment_influence(creature_ptr, si_ptr);
482 /* Access the current weapon */
483 si_ptr->o_ptr = &creature_ptr->inventory_list[INVEN_RARM];
485 /* Analyze the weapon */
486 if (si_ptr->o_ptr->k_idx) {
487 /* Indicate Blessing */
488 if (have_flag(si_ptr->flags, TR_BLESSED)) {
489 si_ptr->info[si_ptr->line++] = _("あなたの武器は神の祝福を受けている。", "Your weapon has been blessed by the gods.");
492 if (have_flag(si_ptr->flags, TR_CHAOTIC)) {
493 si_ptr->info[si_ptr->line++] = _("あなたの武器はログルスの徴の属性をもつ。", "Your weapon is branded with the Sign of Logrus.");
496 if (have_flag(si_ptr->flags, TR_IMPACT)) {
497 si_ptr->info[si_ptr->line++] = _("あなたの武器は打撃で地震を発生することができる。", "The impact of your weapon can cause earthquakes.");
500 if (have_flag(si_ptr->flags, TR_VORPAL)) {
501 si_ptr->info[si_ptr->line++] = _("あなたの武器は非常に鋭い。", "Your weapon is very sharp.");
504 if (have_flag(si_ptr->flags, TR_VAMPIRIC)) {
505 si_ptr->info[si_ptr->line++] = _("あなたの武器は敵から生命力を吸収する。", "Your weapon drains life from your foes.");
508 /* Special "Attack Bonuses" */
509 if (have_flag(si_ptr->flags, TR_BRAND_ACID)) {
510 si_ptr->info[si_ptr->line++] = _("あなたの武器は敵を溶かす。", "Your weapon melts your foes.");
512 if (have_flag(si_ptr->flags, TR_BRAND_ELEC)) {
513 si_ptr->info[si_ptr->line++] = _("あなたの武器は敵を感電させる。", "Your weapon shocks your foes.");
515 if (have_flag(si_ptr->flags, TR_BRAND_FIRE)) {
516 si_ptr->info[si_ptr->line++] = _("あなたの武器は敵を燃やす。", "Your weapon burns your foes.");
518 if (have_flag(si_ptr->flags, TR_BRAND_COLD)) {
519 si_ptr->info[si_ptr->line++] = _("あなたの武器は敵を凍らせる。", "Your weapon freezes your foes.");
521 if (have_flag(si_ptr->flags, TR_BRAND_POIS)) {
522 si_ptr->info[si_ptr->line++] = _("あなたの武器は敵を毒で侵す。", "Your weapon poisons your foes.");
525 /* Special "slay" si_ptr->flags */
526 if (have_flag(si_ptr->flags, TR_KILL_ANIMAL)) {
527 si_ptr->info[si_ptr->line++] = _("あなたの武器は動物の天敵である。", "Your weapon is a great bane of animals.");
528 } else if (have_flag(si_ptr->flags, TR_SLAY_ANIMAL)) {
529 si_ptr->info[si_ptr->line++] = _("あなたの武器は動物に対して強い力を発揮する。", "Your weapon strikes at animals with extra force.");
531 if (have_flag(si_ptr->flags, TR_KILL_EVIL)) {
532 si_ptr->info[si_ptr->line++] = _("あなたの武器は邪悪なる存在の天敵である。", "Your weapon is a great bane of evil.");
533 } else if (have_flag(si_ptr->flags, TR_SLAY_EVIL)) {
534 si_ptr->info[si_ptr->line++] = _("あなたの武器は邪悪なる存在に対して強い力を発揮する。", "Your weapon strikes at evil with extra force.");
536 if (have_flag(si_ptr->flags, TR_KILL_HUMAN)) {
537 si_ptr->info[si_ptr->line++] = _("あなたの武器は人間の天敵である。", "Your weapon is a great bane of humans.");
538 } else if (have_flag(si_ptr->flags, TR_SLAY_HUMAN)) {
539 si_ptr->info[si_ptr->line++] = _("あなたの武器は人間に対して特に強い力を発揮する。", "Your weapon is especially deadly against humans.");
541 if (have_flag(si_ptr->flags, TR_KILL_UNDEAD)) {
542 si_ptr->info[si_ptr->line++] = _("あなたの武器はアンデッドの天敵である。", "Your weapon is a great bane of undead.");
543 } else if (have_flag(si_ptr->flags, TR_SLAY_UNDEAD)) {
544 si_ptr->info[si_ptr->line++] = _("あなたの武器はアンデッドに対して神聖なる力を発揮する。", "Your weapon strikes at undead with holy wrath.");
546 if (have_flag(si_ptr->flags, TR_KILL_DEMON)) {
547 si_ptr->info[si_ptr->line++] = _("あなたの武器はデーモンの天敵である。", "Your weapon is a great bane of demons.");
548 } else if (have_flag(si_ptr->flags, TR_SLAY_DEMON)) {
549 si_ptr->info[si_ptr->line++] = _("あなたの武器はデーモンに対して神聖なる力を発揮する。", "Your weapon strikes at demons with holy wrath.");
551 if (have_flag(si_ptr->flags, TR_KILL_ORC)) {
552 si_ptr->info[si_ptr->line++] = _("あなたの武器はオークの天敵である。", "Your weapon is a great bane of orcs.");
553 } else if (have_flag(si_ptr->flags, TR_SLAY_ORC)) {
554 si_ptr->info[si_ptr->line++] = _("あなたの武器はオークに対して特に強い力を発揮する。", "Your weapon is especially deadly against orcs.");
556 if (have_flag(si_ptr->flags, TR_KILL_TROLL)) {
557 si_ptr->info[si_ptr->line++] = _("あなたの武器はトロルの天敵である。", "Your weapon is a great bane of trolls.");
558 } else if (have_flag(si_ptr->flags, TR_SLAY_TROLL)) {
559 si_ptr->info[si_ptr->line++] = _("あなたの武器はトロルに対して特に強い力を発揮する。", "Your weapon is especially deadly against trolls.");
561 if (have_flag(si_ptr->flags, TR_KILL_GIANT)) {
562 si_ptr->info[si_ptr->line++] = _("あなたの武器は巨人の天敵である。", "Your weapon is a great bane of giants.");
563 } else if (have_flag(si_ptr->flags, TR_SLAY_GIANT)) {
564 si_ptr->info[si_ptr->line++] = _("あなたの武器は巨人に対して特に強い力を発揮する。", "Your weapon is especially deadly against giants.");
566 /* Special "kill" si_ptr->flags */
567 if (have_flag(si_ptr->flags, TR_KILL_DRAGON)) {
568 si_ptr->info[si_ptr->line++] = _("あなたの武器はドラゴンの天敵である。", "Your weapon is a great bane of dragons.");
569 } else if (have_flag(si_ptr->flags, TR_SLAY_DRAGON)) {
570 si_ptr->info[si_ptr->line++] = _("あなたの武器はドラゴンに対して特に強い力を発揮する。", "Your weapon is especially deadly against dragons.");
573 if (have_flag(si_ptr->flags, TR_FORCE_WEAPON))
574 si_ptr->info[si_ptr->line++] = _("あなたの武器はMPを使って攻撃する。", "Your weapon causes greate damages using your MP.");
576 if (have_flag(si_ptr->flags, TR_THROW))
577 si_ptr->info[si_ptr->line++] = _("あなたの武器は投げやすい。", "Your weapon can be thrown well.");
581 for (int k = 1; k < 24; k++)
584 prt(_(" あなたの状態:", " Your Attributes:"), 1, 15);
586 for (int j = 0; j < si_ptr->line; j++) {
587 prt(si_ptr->info[j], k++, 15);
589 /* Every 20 entries (lines 2 to 21), start over */
590 if ((k != 22) || (j + 1 >= si_ptr->line))
593 prt(_("-- 続く --", "-- more --"), k, 15);
599 prt(_("[何かキーを押すとゲームに戻ります]", "[Press any key to continue]"), k, 13);
605 * @brief 魔法効果時間のターン数に基づいて表現IDを返す。
609 static int report_magics_aux(int dur)
613 } else if (dur <= 10) {
615 } else if (dur <= 20) {
617 } else if (dur <= 50) {
619 } else if (dur <= 100) {
621 } else if (dur <= 200) {
628 static concptr report_magic_durations[] = {
630 "ごく短い間", "少しの間", "しばらくの間", "多少長い間", "長い間", "非常に長い間", "信じ難いほど長い間", "モンスターを攻撃するまで"
632 "for a short time", "for a little while", "for a while", "for a long while", "for a long time", "for a very long time", "for an incredibly long time",
633 "until you hit a monster"
639 * @brief 現在の一時的効果一覧を返す / Report all currently active magical effects.
642 void report_magics(player_type *creature_ptr)
649 if (creature_ptr->blind) {
650 info2[i] = report_magics_aux(creature_ptr->blind);
651 info[i++] = _("あなたは目が見えない", "You cannot see");
653 if (creature_ptr->confused) {
654 info2[i] = report_magics_aux(creature_ptr->confused);
655 info[i++] = _("あなたは混乱している", "You are confused");
657 if (creature_ptr->afraid) {
658 info2[i] = report_magics_aux(creature_ptr->afraid);
659 info[i++] = _("あなたは恐怖に侵されている", "You are terrified");
661 if (creature_ptr->poisoned) {
662 info2[i] = report_magics_aux(creature_ptr->poisoned);
663 info[i++] = _("あなたは毒に侵されている", "You are poisoned");
665 if (creature_ptr->image) {
666 info2[i] = report_magics_aux(creature_ptr->image);
667 info[i++] = _("あなたは幻覚を見ている", "You are hallucinating");
669 if (creature_ptr->blessed) {
670 info2[i] = report_magics_aux(creature_ptr->blessed);
671 info[i++] = _("あなたは高潔さを感じている", "You feel rightous");
673 if (creature_ptr->hero) {
674 info2[i] = report_magics_aux(creature_ptr->hero);
675 info[i++] = _("あなたはヒーロー気分だ", "You feel heroic");
677 if (creature_ptr->shero) {
678 info2[i] = report_magics_aux(creature_ptr->shero);
679 info[i++] = _("あなたは戦闘狂だ", "You are in a battle rage");
681 if (creature_ptr->protevil) {
682 info2[i] = report_magics_aux(creature_ptr->protevil);
683 info[i++] = _("あなたは邪悪なる存在から守られている", "You are protected from evil");
685 if (creature_ptr->shield) {
686 info2[i] = report_magics_aux(creature_ptr->shield);
687 info[i++] = _("あなたは神秘のシールドで守られている", "You are protected by a mystic shield");
689 if (creature_ptr->invuln) {
690 info2[i] = report_magics_aux(creature_ptr->invuln);
691 info[i++] = _("あなたは無敵だ", "You are invulnerable");
693 if (creature_ptr->wraith_form) {
694 info2[i] = report_magics_aux(creature_ptr->wraith_form);
695 info[i++] = _("あなたは幽体化している", "You are incorporeal");
697 if (creature_ptr->special_attack & ATTACK_CONFUSE) {
699 info[i++] = _("あなたの手は赤く輝いている", "Your hands are glowing dull red.");
701 if (creature_ptr->word_recall) {
702 info2[i] = report_magics_aux(creature_ptr->word_recall);
703 info[i++] = _("この後帰還の詔が発動する", "You are waiting to be recalled");
705 if (creature_ptr->alter_reality) {
706 info2[i] = report_magics_aux(creature_ptr->alter_reality);
707 info[i++] = _("この後現実変容が発動する", "You waiting to be altered");
709 if (creature_ptr->oppose_acid) {
710 info2[i] = report_magics_aux(creature_ptr->oppose_acid);
711 info[i++] = _("あなたは酸への耐性を持っている", "You are resistant to acid");
713 if (creature_ptr->oppose_elec) {
714 info2[i] = report_magics_aux(creature_ptr->oppose_elec);
715 info[i++] = _("あなたは電撃への耐性を持っている", "You are resistant to lightning");
717 if (creature_ptr->oppose_fire) {
718 info2[i] = report_magics_aux(creature_ptr->oppose_fire);
719 info[i++] = _("あなたは火への耐性を持っている", "You are resistant to fire");
721 if (creature_ptr->oppose_cold) {
722 info2[i] = report_magics_aux(creature_ptr->oppose_cold);
723 info[i++] = _("あなたは冷気への耐性を持っている", "You are resistant to cold");
725 if (creature_ptr->oppose_pois) {
726 info2[i] = report_magics_aux(creature_ptr->oppose_pois);
727 info[i++] = _("あなたは毒への耐性を持っている", "You are resistant to poison");
731 /* Erase the screen */
732 for (k = 1; k < 24; k++)
735 /* Label the information */
736 prt(_(" 現在かかっている魔法 :", " Your Current Magic:"), 1, 15);
738 /* We will print on top of the map (column 13) */
739 for (k = 2, j = 0; j < i; j++) {
741 sprintf(Dummy, _("%-28s : 期間 - %s ", "%s %s."), info[j], report_magic_durations[info2[j]]);
744 /* Every 20 entries (lines 2 to 21), start over */
745 if ((k == 22) && (j + 1 < i)) {
746 prt(_("-- 続く --", "-- more --"), k, 15);
754 prt(_("[何かキーを押すとゲームに戻ります]", "[Press any key to continue]"), k, 13);