3 * @brief 魔法効果の実装/ Spell code (part 2)
7 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
8 * This software may be copied and distributed for educational, research,
9 * and not for profit purposes provided that this copyright and statement
10 * are included in all such copies. Other copyrights may also apply.
18 * @brief 自己分析処理(Nethackからのアイデア) / self-knowledge... idea from nethack.
22 * Useful for determining powers and
23 * resistences of items. It saves the screen, clears it, then starts listing
24 * attributes, a screenful at a time. (There are a LOT of attributes to
25 * list. It will probably take 2 or 3 screens for a powerful character whose
26 * using several artifacts...) -CFT
28 * It is now a lot more efficient. -BEN-
30 * See also "identify_fully()".
32 * XXX XXX XXX Use the "show_file()" method, perhaps.
35 void self_knowledge(void)
40 char v_string [8] [128];
41 char s_string [6] [128];
43 u32b flgs[TR_FLAG_SIZE];
52 int plev = p_ptr->lev;
56 for (j = 0; j < TR_FLAG_SIZE; j++)
59 p_ptr->knowledge |= (KNOW_STAT | KNOW_HPRATE);
63 percent = (int)(((long)p_ptr->player_hp[PY_MAX_LEVEL - 1] * 200L) /
65 ((PY_MAX_LEVEL - 1+3) * (p_ptr->hitdie + 1))));
67 sprintf(Dummy, _("現在の体力ランク : %d/100", "Your current Life Rating is %d/100."), percent);
68 strcpy(buf[0], Dummy);
72 chg_virtue(V_KNOWLEDGE, 1);
73 chg_virtue(V_ENLIGHTEN, 1);
75 /* Acquire item flags from equipment */
76 for (k = INVEN_RARM; k < INVEN_TOTAL; k++)
78 u32b tflgs[TR_FLAG_SIZE];
80 o_ptr = &inventory[k];
82 /* Skip non-objects */
83 if (!o_ptr->k_idx) continue;
85 /* Extract the flags */
86 object_flags(o_ptr, tflgs);
89 for (j = 0; j < TR_FLAG_SIZE; j++)
93 info[i++] = _("能力の最大値", "Limits of maximum stats");
95 for (v_nr = 0; v_nr < 6; v_nr++)
99 sprintf(stat_desc, "%s 18/%d", stat_names[v_nr], p_ptr->stat_max_max[v_nr]-18);
101 strcpy(s_string[v_nr], stat_desc);
103 info[i++] = s_string[v_nr];
107 sprintf(Dummy, _("現在の属性 : %s(%ld)", "Your alighnment : %s(%ld)"), your_alignment(), (long int)p_ptr->align);
108 strcpy(buf[1], Dummy);
110 for (v_nr = 0; v_nr < 8; v_nr++)
114 int tester = p_ptr->virtues[v_nr];
116 strcpy(v_name, virtue[(p_ptr->vir_types[v_nr])-1]);
118 sprintf(vir_desc, _("おっと。%sの情報なし。", "Oops. No info about %s."), v_name);
120 sprintf(vir_desc, _("[%s]の対極 (%d)", "You are the polar opposite of %s (%d)."),
122 else if (tester < -80)
123 sprintf(vir_desc, _("[%s]の大敵 (%d)", "You are an arch-enemy of %s (%d)."),
125 else if (tester < -60)
126 sprintf(vir_desc, _("[%s]の強敵 (%d)", "You are a bitter enemy of %s (%d)."),
128 else if (tester < -40)
129 sprintf(vir_desc, _("[%s]の敵 (%d)", "You are an enemy of %s (%d)."),
131 else if (tester < -20)
132 sprintf(vir_desc, _("[%s]の罪者 (%d)", "You have sinned against %s (%d)."),
135 sprintf(vir_desc, _("[%s]の迷道者 (%d)", "You have strayed from the path of %s (%d)."),
137 else if (tester == 0)
138 sprintf(vir_desc, _("[%s]の中立者 (%d)", "You are neutral to %s (%d)."),
140 else if (tester < 20)
141 sprintf(vir_desc, _("[%s]の小徳者 (%d)", "You are somewhat virtuous in %s (%d)."),
143 else if (tester < 40)
144 sprintf(vir_desc, _("[%s]の中徳者 (%d)", "You are virtuous in %s (%d)."),
146 else if (tester < 60)
147 sprintf(vir_desc, _("[%s]の高徳者 (%d)", "You are very virtuous in %s (%d)."),
149 else if (tester < 80)
150 sprintf(vir_desc, _("[%s]の覇者 (%d)", "You are a champion of %s (%d)."),
152 else if (tester < 100)
153 sprintf(vir_desc, _("[%s]の偉大な覇者 (%d)", "You are a great champion of %s (%d)."),
156 sprintf(vir_desc, _("[%s]の具現者 (%d)", "You are the living embodiment of %s (%d)."),
159 strcpy(v_string[v_nr], vir_desc);
161 info[i++] = v_string[v_nr];
165 /* Racial powers... */
166 if (p_ptr->mimic_form)
168 switch (p_ptr->mimic_form)
171 case MIMIC_DEMON_LORD:
172 sprintf(Dummy, _("あなたは %d ダメージの地獄か火炎のブレスを吐くことができる。(%d MP)",
173 "You can nether breathe, dam. %d (cost %d)."), 3 * plev, 10+plev/3);
180 sprintf(Dummy, _("あなたは敵から %d-%d HP の生命力を吸収できる。(%d MP)",
181 "You can steal life from a foe, dam. %d-%d (cost %d)."),
182 plev + MAX(1, plev / 10), plev + plev * MAX(1, plev / 10), 1 + (plev / 3));
190 switch (p_ptr->prace)
195 info[i++] = _("あなたは罠とドアと階段を感知できる。(5 MP)", "You can find traps, doors and stairs (cost 5).");
200 info[i++] = _("あなたは食料を生成できる。(10 MP)", "You can produce food (cost 10).");
206 sprintf(Dummy, _("あなたは範囲 %d 以内にテレポートできる。(%d MP)", "You can teleport, range %d (cost %d)."),
207 (1 + plev), (5 + (plev / 5)));
213 info[i++] = _("あなたは恐怖を除去できる。(5 MP)", "You can remove fear (cost 5).");
215 case RACE_HALF_TROLL:
217 info[i++] = _("あなたは狂暴化することができる。(12 MP) ", "You enter berserk fury (cost 12).");
221 info[i++] = _("あなたはシャドウシフトすることができる。(50 MP)", "You can Shift Shadows (cost 50).");
224 info[i++] = _("あなたは「パターン」を心に描いて歩くことができる。(75 MP)", "You can mentally Walk the Pattern (cost 75).");
229 info[i++] = _("あなたは狂暴化することができる。(10 MP) ", "You can enter berserk fury (cost 10).");
234 info[i++] = _("あなたは爆発のルーンを仕掛けることができる。(35 MP)", "You can set an Explosive Rune (cost 35).");
237 case RACE_HALF_GIANT:
239 info[i++] = _("あなたは石の壁を壊すことができる。(10 MP)", "You can break stone walls (cost 10).");
241 case RACE_HALF_TITAN:
243 info[i++] = _("あなたはモンスターをスキャンすることができる。(20 MP)", "You can probe monsters (cost 20).");
248 sprintf(Dummy, _("あなたは %d ダメージの岩石を投げることができる。(15 MP)",
249 "You can throw a boulder, dam. %d (cost 15)."), 3 * plev);
255 info[i++] = _("あなたは恐怖を呼び起こす叫び声を発することができる。(15 MP)", "You can make a terrifying scream (cost 15).");
260 sprintf(Dummy, _("あなたは %d ダメージの酸を吹きかけることができる。(9 MP)", "You can spit acid, dam. %d (cost 9)."), plev);
268 _("あなたは %d ダメージの毒矢を投げることができる。(8 MP)", "You can throw a dart of poison, dam. %d (cost 8)."), plev);
275 sprintf(Dummy, _("あなたは %d ダメージのマジック・ミサイルの呪文を使える。(2 MP)", "You can cast a Magic Missile, dam %d (cost 2)."),
276 (3 + ((plev-1) / 5)));
281 sprintf(Dummy, _("あなたは %d ダメージのブレスを吐くことができる。(%d MP)", "You can breathe, dam. %d (cost %d)."), 2 * plev, plev);
284 case RACE_MIND_FLAYER:
286 sprintf(Dummy, _("あなたは %d ダメージの精神攻撃をすることができる。(12 MP)", "You can mind blast your enemies, dam %d (cost 12)."), plev);
292 sprintf(Dummy, _("あなたは %d ダメージのファイア・ボールの呪文を使える。(15 MP)", "You can cast a Fire Ball, dam. %d (cost 15)."), plev);
297 sprintf(Dummy, _("あなたは %d ダメージのファイア・ボルトの呪文を使える。(15 MP)", "You can cast a Fire Bolt, dam. %d (cost 15)."), plev);
303 info[i++] = _("あなたは d20+30 ターンの間肌を石に変化させられる。(15 MP)", "You can turn your skin to stone, dur d20+30 (cost 15).");
308 info[i++] = _("あなたは失った経験値を回復することができる。(30 MP)", "You can restore lost experience (cost 30).");
313 sprintf(Dummy, _("あなたは敵から %d-%d HP の生命力を吸収できる。(%d MP)", "You can steal life from a foe, dam. %d-%d (cost %d)."),
314 plev + MAX(1, plev / 10), plev + plev * MAX(1, plev / 10), 1 + (plev / 3));
321 info[i++] = _("あなたは泣き叫んで敵を恐怖させることができる。(3 MP)", "You can wail to terrify your enemies (cost 3).");
327 info[i++] = _("あなたは敵を眠らせる魔法の粉を投げることができる。(12 MP)", "You can throw magical dust which induces sleep (cost 12).");
331 sprintf(Dummy, _("あなたは %d ダメージの地獄か火炎のブレスを吐くことができる。(%d MP)",
332 "You can breathe nether, dam. %d (cost %d)."), 3 * plev, 10+plev/3);
338 info[i++] = _("あなたは d20+30 ターンの間横に伸びることができる。(15 MP)", "You can expand horizontally, dur d20+30 (cost 15).");
342 sprintf(Dummy, _("あなたは %d ダメージのレイガンを撃つことができる。(7 MP)", "You can fire a ray gun with damage %d (cost 7)."),
345 sprintf(Dummy, _("あなたは %d ダメージのブラスターを撃つことができる。(13 MP)", "You can fire a blaster with damage %d (cost 13)."), plev);
347 sprintf(Dummy, _("あなたは %d ダメージのバズーカを撃つことができる。(26 MP)", "You can fire a bazooka with damage %d (cost 26)."), plev * 2);
349 sprintf(Dummy, _("あなたは %d ダメージのビームキャノンを撃つことができる。(40 MP)",
350 "You can fire a beam cannon with damage %d (cost 40)."), plev * 2);
352 sprintf(Dummy, _("あなたは %d ダメージのロケットを撃つことができる。(60 MP)",
353 "You can fire a rocket with damage %d (cost 60)."), plev * 5);
362 switch(p_ptr->pclass)
367 info[i++] = _("あなたはランダムな方向に対して数回攻撃することができる。(75 MP)",
368 "You can attack some random directions at a time (cost 75).");
371 case CLASS_HIGH_MAGE:
372 if (p_ptr->realm1 == REALM_HEX) break;
377 info[i++] = _("あなたはアイテムの魔力を吸収することができる。(1 MP)",
378 "You can absorb charges from an item (cost 1).");
382 if (is_good_realm(p_ptr->realm1))
386 info[i++] = _("あなたは武器を祝福することができる。(70 MP)", "You can bless a weapon (cost 70).");
393 info[i++] = _("あなたは周りのすべてのモンスターを攻撃することができる。(40 MP)", "You can damages all monsters in sight (cost 40).");
400 info[i++] = _("あなたは攻撃して即座に逃げることができる。(12 MP)", "You can hit a monster and teleport at a time (cost 12).");
406 info[i++] = _("あなたは怪物を調査することができる。(20 MP)", "You can prove monsters (cost 20).");
410 if (is_good_realm(p_ptr->realm1))
414 info[i++] = _("あなたは聖なる槍を放つことができる。(30 MP)", "You can fires a holy spear (cost 30).");
421 info[i++] = _("あなたは生命力を減少させる槍を放つことができる。(30 MP)", "You can fires a spear which drains vitality (cost 30).");
425 case CLASS_WARRIOR_MAGE:
428 info[i++] = _("あなたはHPをMPに変換することができる。(0 MP)", "You can convert HP to SP (cost 0).");
429 info[i++] = _("あなたはMPをHPに変換することができる。(0 MP)", "You can convert SP to HP (cost 0).");
432 case CLASS_CHAOS_WARRIOR:
435 info[i++] = _("あなたは周囲に怪物を惑わす光を発生させることができる。(50 MP)",
436 "You can radiate light which confuses nearby monsters (cost 50).");
442 info[i++] = _("あなたは構えることができる。(0 MP)", "You can assume a posture of special form (cost 0).");
446 info[i++] = _("あなたは通常の2倍の攻撃を行うことができる。(30 MP)", "You can perform double attacks in a time (cost 30).");
449 case CLASS_MINDCRAFTER:
450 case CLASS_FORCETRAINER:
453 info[i++] = _("あなたは精神を集中してMPを回復させることができる。(0 MP)", "You can concentrate to regenerate your mana (cost 0).");
457 info[i++] = _("あなたは写真を撮影することができる。(0 MP)", "You can take a photograph (cost 0).");
460 info[i++] = _("あなたはアイテムを完全に鑑定することができる。(20 MP)", "You can *identify* items (cost 20).");
466 info[i++] = _("あなたは怪物の特殊攻撃をダメージ2倍でまねることができる。(100 MP)",
467 "You can imitate monster's special attacks with double damage (cost 100).");
470 case CLASS_BEASTMASTER:
471 info[i++] = _("あなたは1体の生命のあるモンスターを支配することができる。(レベル/4 MP)", "You can dominate a monster (cost level/4).");
474 info[i++] = _("あなたは視界内の生命のあるモンスターを支配することができる。((レベル+20)/2 MP)",
475 "You can dominate living monsters in sight (cost (level+20)/4).");
478 case CLASS_MAGIC_EATER:
479 info[i++] = _("あなたは杖/魔法棒/ロッドの魔力を自分のものにすることができる。", "You can absorb a staff, wand or rod itself.");
484 info[i++] = _("あなたは1ターンに2回魔法を唱えることができる。(20 MP)", "You can cast two spells in one time (cost 20).");
489 info[i++] = _("あなたは精神を集中して気合いを溜めることができる。", "You can concentrate to regenerate your mana.");
493 info[i++] = _("あなたは特殊な型で構えることができる。", "You can assume a posture of special form.");
496 case CLASS_BLUE_MAGE:
497 info[i++] = _("あなたは相手に使われた魔法を学ぶことができる。", "You can study spells which your enemy casts on you.");
502 info[i++] = _("あなたはモンスターに乗って無理矢理ペットにすることができる。", "You can ride on a hostile monster forcibly to turn it into pet.");
505 case CLASS_BERSERKER:
508 info[i++] = _("あなたは街とダンジョンの間を行き来することができる。", "You can travel between town and the depths.");
511 case CLASS_MIRROR_MASTER:
512 info[i++] = _("あなたは鏡を作り出すことができる。(2 MP)", "You can create a Mirror (cost 2).");
513 info[i++] = _("あなたは鏡を割ることができる。(0 MP)", "You can break distant Mirrors (cost 0).");
518 info[i++] = _("あなたは素早く移動することができる。", "You can walk extremery fast.");
525 if (p_ptr->muta1 & MUT1_SPIT_ACID)
527 info[i++] = _("あなたは酸を吹きかけることができる。(ダメージ レベルX1)", "You can spit acid (dam lvl).");
529 if (p_ptr->muta1 & MUT1_BR_FIRE)
531 info[i++] = _("あなたは炎のブレスを吐くことができる。(ダメージ レベルX2)", "You can breathe fire (dam lvl * 2).");
533 if (p_ptr->muta1 & MUT1_HYPN_GAZE)
535 info[i++] = _("あなたの睨みは催眠効果をもつ。", "Your gaze is hypnotic.");
537 if (p_ptr->muta1 & MUT1_TELEKINES)
539 info[i++] = _("あなたは念動力をもっている。", "You are telekinetic.");
541 if (p_ptr->muta1 & MUT1_VTELEPORT)
543 info[i++] = _("あなたは自分の意思でテレポートできる。", "You can teleport at will.");
545 if (p_ptr->muta1 & MUT1_MIND_BLST)
547 info[i++] = _("あなたは精神攻撃を行える。(ダメージ 3~12d3)", "You can Mind Blast your enemies (3 to 12d3 dam).");
549 if (p_ptr->muta1 & MUT1_RADIATION)
551 info[i++] = _("あなたは自分の意思で強い放射線を発生することができる。(ダメージ レベルX2)", "You can emit hard radiation at will (dam lvl * 2).");
553 if (p_ptr->muta1 & MUT1_VAMPIRISM)
555 info[i++] = _("あなたは吸血鬼のように敵から生命力を吸収することができる。(ダメージ レベルX2)",
556 "You can drain life from a foe like a vampire (dam lvl * 2).");
558 if (p_ptr->muta1 & MUT1_SMELL_MET)
560 info[i++] = _("あなたは近くにある貴金属をかぎ分けることができる。", "You can smell nearby precious metal.");
562 if (p_ptr->muta1 & MUT1_SMELL_MON)
564 info[i++] = _("あなたは近くのモンスターの存在をかぎ分けることができる。", "You can smell nearby monsters.");
566 if (p_ptr->muta1 & MUT1_BLINK)
568 info[i++] = _("あなたは短い距離をテレポートできる。", "You can teleport yourself short distances.");
570 if (p_ptr->muta1 & MUT1_EAT_ROCK)
572 info[i++] = _("あなたは硬い岩を食べることができる。", "You can consume solid rock.");
574 if (p_ptr->muta1 & MUT1_SWAP_POS)
576 info[i++] = _("あなたは他の者と場所を入れ替わることができる。", "You can switch locations with another being.");
578 if (p_ptr->muta1 & MUT1_SHRIEK)
580 info[i++] = _("あなたは身の毛もよだつ叫び声を発することができる。(ダメージ レベルX2)", "You can emit a horrible shriek (dam 2 * lvl).");
582 if (p_ptr->muta1 & MUT1_ILLUMINE)
584 info[i++] = _("あなたは明るい光を放つことができる。", "You can emit bright light.");
586 if (p_ptr->muta1 & MUT1_DET_CURSE)
588 info[i++] = _("あなたは邪悪な魔法の危険を感じとることができる。", "You can feel the danger of evil magic.");
590 if (p_ptr->muta1 & MUT1_BERSERK)
592 info[i++] = _("あなたは自分の意思で狂乱戦闘状態になることができる。", "You can drive yourself into a berserk frenzy.");
594 if (p_ptr->muta1 & MUT1_POLYMORPH)
596 info[i++] = _("あなたは自分の意志で変化できる。", "You can polymorph yourself at will.");
598 if (p_ptr->muta1 & MUT1_MIDAS_TCH)
600 info[i++] = _("あなたは通常アイテムを金に変えることができる。", "You can turn ordinary items to gold.");
602 if (p_ptr->muta1 & MUT1_GROW_MOLD)
604 info[i++] = _("あなたは周囲にキノコを生やすことができる。", "You can cause mold to grow near you.");
606 if (p_ptr->muta1 & MUT1_RESIST)
608 info[i++] = _("あなたは元素の攻撃に対して身を硬くすることができる。", "You can harden yourself to the ravages of the elements.");
610 if (p_ptr->muta1 & MUT1_EARTHQUAKE)
612 info[i++] = _("あなたは周囲のダンジョンを崩壊させることができる。", "You can bring down the dungeon around your ears.");
614 if (p_ptr->muta1 & MUT1_EAT_MAGIC)
616 info[i++] = _("あなたは魔法のエネルギーを自分の物として使用できる。", "You can consume magic energy for your own use.");
618 if (p_ptr->muta1 & MUT1_WEIGH_MAG)
620 info[i++] = _("あなたは自分に影響を与える魔法の力を感じることができる。", "You can feel the strength of the magics affecting you.");
622 if (p_ptr->muta1 & MUT1_STERILITY)
624 info[i++] = _("あなたは集団的生殖不能を起こすことができる。", "You can cause mass impotence.");
626 if (p_ptr->muta1 & MUT1_PANIC_HIT)
628 info[i++] = _("あなたは攻撃した後身を守るため逃げることができる。", "You can run for your life after hitting something.");
630 if (p_ptr->muta1 & MUT1_DAZZLE)
632 info[i++] = _("あなたは混乱と盲目を引き起こす放射能を発生することができる。 ", "You can emit confusing, blinding radiation.");
634 if (p_ptr->muta1 & MUT1_LASER_EYE)
636 info[i++] = _("あなたは目からレーザー光線を発することができる。(ダメージ レベルX2)", "Your eyes can fire laser beams (dam 2 * lvl).");
638 if (p_ptr->muta1 & MUT1_RECALL)
640 info[i++] = _("あなたは街とダンジョンの間を行き来することができる。", "You can travel between town and the depths.");
642 if (p_ptr->muta1 & MUT1_BANISH)
644 info[i++] = _("あなたは邪悪なモンスターを地獄に落とすことができる。", "You can send evil creatures directly to Hell.");
646 if (p_ptr->muta1 & MUT1_COLD_TOUCH)
648 info[i++] = _("あなたは敵を触って凍らせることができる。(ダメージ レベルX3)", "You can freeze things with a touch (dam 3 * lvl).");
650 if (p_ptr->muta1 & MUT1_LAUNCHER)
652 info[i++] = _("あなたはアイテムを力強く投げることができる。", "You can hurl objects with great force.");
658 if (p_ptr->muta2 & MUT2_BERS_RAGE)
660 info[i++] = _("あなたは狂戦士化の発作を起こす。", "You are subject to berserker fits.");
662 if (p_ptr->muta2 & MUT2_COWARDICE)
664 info[i++] = _("あなたは時々臆病になる。", "You are subject to cowardice.");
666 if (p_ptr->muta2 & MUT2_RTELEPORT)
668 info[i++] = _("あなたはランダムにテレポートする。", "You are teleporting randomly.");
670 if (p_ptr->muta2 & MUT2_ALCOHOL)
672 info[i++] = _("あなたの体はアルコールを分泌する。", "Your body produces alcohol.");
674 if (p_ptr->muta2 & MUT2_HALLU)
676 info[i++] = _("あなたは幻覚を引き起こす精神錯乱に侵されている。", "You have a hallucinatory insanity.");
678 if (p_ptr->muta2 & MUT2_FLATULENT)
680 info[i++] = _("あなたは制御できない強烈な屁をこく。", "You are subject to uncontrollable flatulence.");
682 if (p_ptr->muta2 & MUT2_PROD_MANA)
684 info[i++] = _("あなたは制御不能な魔法のエネルギーを発している。", "You are producing magical energy uncontrollably.");
686 if (p_ptr->muta2 & MUT2_ATT_DEMON)
688 info[i++] = _("あなたはデーモンを引きつける。", "You attract demons.");
690 if (p_ptr->muta2 & MUT2_SCOR_TAIL)
692 info[i++] = _("あなたはサソリの尻尾が生えている。(毒、ダメージ 3d7)", "You have a scorpion tail (poison, 3d7).");
694 if (p_ptr->muta2 & MUT2_HORNS)
696 info[i++] = _("あなたは角が生えている。(ダメージ 2d6)", "You have horns (dam. 2d6).");
698 if (p_ptr->muta2 & MUT2_BEAK)
700 info[i++] = _("あなたはクチバシが生えている。(ダメージ 2d4)", "You have a beak (dam. 2d4).");
702 if (p_ptr->muta2 & MUT2_SPEED_FLUX)
704 info[i++] = _("あなたはランダムに早く動いたり遅く動いたりする。", "You move faster or slower randomly.");
706 if (p_ptr->muta2 & MUT2_BANISH_ALL)
708 info[i++] = _("あなたは時々近くのモンスターを消滅させる。", "You sometimes cause nearby creatures to vanish.");
710 if (p_ptr->muta2 & MUT2_EAT_LIGHT)
712 info[i++] = _("あなたは時々周囲の光を吸収して栄養にする。", "You sometimes feed off of the light around you.");
714 if (p_ptr->muta2 & MUT2_TRUNK)
716 info[i++] = _("あなたは象のような鼻を持っている。(ダメージ 1d4)", "You have an elephantine trunk (dam 1d4).");
718 if (p_ptr->muta2 & MUT2_ATT_ANIMAL)
720 info[i++] = _("あなたは動物を引きつける。", "You attract animals.");
722 if (p_ptr->muta2 & MUT2_TENTACLES)
724 info[i++] = _("あなたは邪悪な触手を持っている。(ダメージ 2d5)", "You have evil looking tentacles (dam 2d5).");
726 if (p_ptr->muta2 & MUT2_RAW_CHAOS)
728 info[i++] = _("あなたはしばしば純カオスに包まれる。", "You occasionally are surrounded with raw chaos.");
730 if (p_ptr->muta2 & MUT2_NORMALITY)
732 info[i++] = _("あなたは変異していたが、回復してきている。", "You may be mutated, but you're recovering.");
734 if (p_ptr->muta2 & MUT2_WRAITH)
736 info[i++] = _("あなたの肉体は幽体化したり実体化したりする。", "You fade in and out of physical reality.");
738 if (p_ptr->muta2 & MUT2_POLY_WOUND)
740 info[i++] = _("あなたの健康はカオスの力に影響を受ける。", "Your health is subject to chaotic forces.");
742 if (p_ptr->muta2 & MUT2_WASTING)
744 info[i++] = _("あなたは衰弱する恐ろしい病気にかかっている。", "You have a horrible wasting disease.");
746 if (p_ptr->muta2 & MUT2_ATT_DRAGON)
748 info[i++] = _("あなたはドラゴンを引きつける。", "You attract dragons.");
750 if (p_ptr->muta2 & MUT2_WEIRD_MIND)
752 info[i++] = _("あなたの精神はランダムに拡大したり縮小したりしている。", "Your mind randomly expands and contracts.");
754 if (p_ptr->muta2 & MUT2_NAUSEA)
756 info[i++] = _("あなたの胃は非常に落ち着きがない。", "You have a seriously upset stomach.");
758 if (p_ptr->muta2 & MUT2_CHAOS_GIFT)
760 info[i++] = _("あなたはカオスの守護悪魔から褒美をうけとる。", "Chaos deities give you gifts.");
762 if (p_ptr->muta2 & MUT2_WALK_SHAD)
764 info[i++] = _("あなたはしばしば他の「影」に迷い込む。", "You occasionally stumble into other shadows.");
766 if (p_ptr->muta2 & MUT2_WARNING)
768 info[i++] = _("あなたは敵に関する警告を感じる。", "You receive warnings about your foes.");
770 if (p_ptr->muta2 & MUT2_INVULN)
772 info[i++] = _("あなたは時々負け知らずな気分になる。", "You occasionally feel invincible.");
774 if (p_ptr->muta2 & MUT2_SP_TO_HP)
776 info[i++] = _("あなたは時々血が筋肉にどっと流れる。", "Your blood sometimes rushes to your muscles.");
778 if (p_ptr->muta2 & MUT2_HP_TO_SP)
780 info[i++] = _("あなたは時々頭に血がどっと流れる。", "Your blood sometimes rushes to your head.");
782 if (p_ptr->muta2 & MUT2_DISARM)
784 info[i++] = _("あなたはよくつまづいて物を落とす。", "You occasionally stumble and drop things.");
790 if (p_ptr->muta3 & MUT3_HYPER_STR)
792 info[i++] = _("あなたは超人的に強い。(腕力+4)", "You are superhumanly strong (+4 STR).");
794 if (p_ptr->muta3 & MUT3_PUNY)
796 info[i++] = _("あなたは虚弱だ。(腕力-4)", "You are puny (-4 STR).");
798 if (p_ptr->muta3 & MUT3_HYPER_INT)
800 info[i++] = _("あなたの脳は生体コンピュータだ。(知能&賢さ+4)", "Your brain is a living computer (+4 INT/WIS).");
802 if (p_ptr->muta3 & MUT3_MORONIC)
804 info[i++] = _("あなたは精神薄弱だ。(知能&賢さ-4)", "You are moronic (-4 INT/WIS).");
806 if (p_ptr->muta3 & MUT3_RESILIENT)
808 info[i++] = _("あなたは非常にタフだ。(耐久+4)", "You are very resilient (+4 CON).");
810 if (p_ptr->muta3 & MUT3_XTRA_FAT)
812 info[i++] = _("あなたは極端に太っている。(耐久+2,スピード-2)", "You are extremely fat (+2 CON, -2 speed).");
814 if (p_ptr->muta3 & MUT3_ALBINO)
816 info[i++] = _("あなたはアルビノだ。(耐久-4)", "You are albino (-4 CON).");
818 if (p_ptr->muta3 & MUT3_FLESH_ROT)
820 info[i++] = _("あなたの肉体は腐敗している。(耐久-2,魅力-1)", "Your flesh is rotting (-2 CON, -1 CHR).");
822 if (p_ptr->muta3 & MUT3_SILLY_VOI)
824 info[i++] = _("あなたの声は間抜けなキーキー声だ。(魅力-4)", "Your voice is a silly squeak (-4 CHR).");
826 if (p_ptr->muta3 & MUT3_BLANK_FAC)
828 info[i++] = _("あなたはのっぺらぼうだ。(魅力-1)", "Your face is featureless (-1 CHR).");
830 if (p_ptr->muta3 & MUT3_ILL_NORM)
832 info[i++] = _("あなたは幻影に覆われている。", "Your appearance is masked with illusion.");
834 if (p_ptr->muta3 & MUT3_XTRA_EYES)
836 info[i++] = _("あなたは余分に二つの目を持っている。(探索+15)", "You have an extra pair of eyes (+15 search).");
838 if (p_ptr->muta3 & MUT3_MAGIC_RES)
840 info[i++] = _("あなたは魔法への耐性をもっている。", "You are resistant to magic.");
842 if (p_ptr->muta3 & MUT3_XTRA_NOIS)
844 info[i++] = _("あなたは変な音を発している。(隠密-3)", "You make a lot of strange noise (-3 stealth).");
846 if (p_ptr->muta3 & MUT3_INFRAVIS)
848 info[i++] = _("あなたは素晴らしい赤外線視力を持っている。(+3)", "You have remarkable infravision (+3).");
850 if (p_ptr->muta3 & MUT3_XTRA_LEGS)
852 info[i++] = _("あなたは余分に二本の足が生えている。(加速+3)", "You have an extra pair of legs (+3 speed).");
854 if (p_ptr->muta3 & MUT3_SHORT_LEG)
856 info[i++] = _("あなたの足は短い突起だ。(加速-3)", "Your legs are short stubs (-3 speed).");
858 if (p_ptr->muta3 & MUT3_ELEC_TOUC)
860 info[i++] = _("あなたの血管には電流が流れている。", "Electricity is running through your veins.");
862 if (p_ptr->muta3 & MUT3_FIRE_BODY)
864 info[i++] = _("あなたの体は炎につつまれている。", "Your body is enveloped in flames.");
866 if (p_ptr->muta3 & MUT3_WART_SKIN)
868 info[i++] = _("あなたの肌はイボに被われている。(魅力-2, AC+5)", "Your skin is covered with warts (-2 CHR, +5 AC).");
870 if (p_ptr->muta3 & MUT3_SCALES)
872 info[i++] = _("あなたの肌は鱗になっている。(魅力-1, AC+10)", "Your skin has turned into scales (-1 CHR, +10 AC).");
874 if (p_ptr->muta3 & MUT3_IRON_SKIN)
876 info[i++] = _("あなたの肌は鉄でできている。(器用-1, AC+25)", "Your skin is made of steel (-1 DEX, +25 AC).");
878 if (p_ptr->muta3 & MUT3_WINGS)
880 info[i++] = _("あなたは羽を持っている。", "You have wings.");
882 if (p_ptr->muta3 & MUT3_FEARLESS)
886 if (p_ptr->muta3 & MUT3_REGEN)
890 if (p_ptr->muta3 & MUT3_ESP)
894 if (p_ptr->muta3 & MUT3_LIMBER)
896 info[i++] = _("あなたの体は非常にしなやかだ。(器用+3)", "Your body is very limber (+3 DEX).");
898 if (p_ptr->muta3 & MUT3_ARTHRITIS)
900 info[i++] = _("あなたはいつも関節に痛みを感じている。(器用-3)", "Your joints ache constantly (-3 DEX).");
902 if (p_ptr->muta3 & MUT3_VULN_ELEM)
904 info[i++] = _("あなたは元素の攻撃に弱い。", "You are susceptible to damage from the elements.");
906 if (p_ptr->muta3 & MUT3_MOTION)
908 info[i++] = _("あなたの動作は正確で力強い。(隠密+1)", "Your movements are precise and forceful (+1 STL).");
910 if (p_ptr->muta3 & MUT3_GOOD_LUCK)
912 info[i++] = _("あなたは白いオーラにつつまれている。", "There is a white aura surrounding you.");
914 if (p_ptr->muta3 & MUT3_BAD_LUCK)
916 info[i++] = _("あなたは黒いオーラにつつまれている。", "There is a black aura surrounding you.");
922 info[i++] = _("あなたは目が見えない。", "You cannot see.");
926 info[i++] = _("あなたは混乱している。", "You are confused.");
930 info[i++] = _("あなたは恐怖に侵されている。", "You are terrified.");
934 info[i++] = _("あなたは出血している。", "You are bleeding.");
938 info[i++] = _("あなたはもうろうとしている。", "You are stunned.");
942 info[i++] = _("あなたは毒に侵されている。", "You are poisoned.");
946 info[i++] = _("あなたは幻覚を見ている。", "You are hallucinating.");
948 if (p_ptr->cursed & TRC_TY_CURSE)
950 info[i++] = _("あなたは邪悪な怨念に包まれている。", "You carry an ancient foul curse.");
952 if (p_ptr->cursed & TRC_AGGRAVATE)
954 info[i++] = _("あなたはモンスターを怒らせている。", "You aggravate monsters.");
956 if (p_ptr->cursed & TRC_DRAIN_EXP)
958 info[i++] = _("あなたは経験値を吸われている。", "You are drained.");
960 if (p_ptr->cursed & TRC_SLOW_REGEN)
962 info[i++] = _("あなたの回復力は非常に遅い。", "You regenerate slowly.");
964 if (p_ptr->cursed & TRC_ADD_L_CURSE)
966 info[i++] = _("あなたの弱い呪いは増える。","Your weak curses multiply."); /* 暫定的 -- henkma */
968 if (p_ptr->cursed & TRC_ADD_H_CURSE)
970 info[i++] = _("あなたの強い呪いは増える。","Your heavy curses multiply."); /* 暫定的 -- henkma */
972 if (p_ptr->cursed & TRC_CALL_ANIMAL)
974 info[i++] = _("あなたは動物に狙われている。", "You attract animals.");
976 if (p_ptr->cursed & TRC_CALL_DEMON)
978 info[i++] = _("あなたは悪魔に狙われている。", "You attract demons.");
980 if (p_ptr->cursed & TRC_CALL_DRAGON)
982 info[i++] = _("あなたはドラゴンに狙われている。", "You attract dragons.");
984 if (p_ptr->cursed & TRC_COWARDICE)
986 info[i++] = _("あなたは時々臆病になる。", "You are subject to cowardice.");
988 if (p_ptr->cursed & TRC_TELEPORT)
990 info[i++] = _("あなたの位置はひじょうに不安定だ。", "Your position is very uncertain.");
992 if (p_ptr->cursed & TRC_LOW_MELEE)
994 info[i++] = _("あなたの武器は攻撃を外しやすい。", "Your weapon causes you to miss blows.");
996 if (p_ptr->cursed & TRC_LOW_AC)
998 info[i++] = _("あなたは攻撃を受けやすい。", "You are subject to be hit.");
1000 if (p_ptr->cursed & TRC_LOW_MAGIC)
1002 info[i++] = _("あなたは魔法を失敗しやすい。", "You are subject to fail spellcasting.");
1004 if (p_ptr->cursed & TRC_FAST_DIGEST)
1006 info[i++] = _("あなたはすぐお腹がへる。", "You have a good appetite.");
1008 if (p_ptr->cursed & TRC_DRAIN_HP)
1010 info[i++] = _("あなたは体力を吸われている。", "You are drained.");
1012 if (p_ptr->cursed & TRC_DRAIN_MANA)
1014 info[i++] = _("あなたは魔力を吸われている。", "You brain is drained.");
1018 info[i++] = _("あなたは高潔さを感じている。", "You feel rightous.");
1022 info[i++] = _("あなたはヒーロー気分だ。", "You feel heroic.");
1026 info[i++] = _("あなたは戦闘狂だ。", "You are in a battle rage.");
1028 if (p_ptr->protevil)
1030 info[i++] = _("あなたは邪悪なる存在から守られている。", "You are protected from evil.");
1034 info[i++] = _("あなたは神秘のシールドで守られている。", "You are protected by a mystic shield.");
1038 info[i++] = _("あなたは現在傷つかない。", "You are temporarily invulnerable.");
1040 if (p_ptr->wraith_form)
1042 info[i++] = _("あなたは一時的に幽体化している。", "You are temporarily incorporeal.");
1044 if (p_ptr->special_attack & ATTACK_CONFUSE)
1046 info[i++] = _("あなたの手は赤く輝いている。", "Your hands are glowing dull red.");
1048 if (p_ptr->special_attack & ATTACK_FIRE)
1050 info[i++] = _("あなたの手は火炎に覆われている。", "You can strike the enemy with flame.");
1052 if (p_ptr->special_attack & ATTACK_COLD)
1054 info[i++] = _("あなたの手は冷気に覆われている。", "You can strike the enemy with cold.");
1056 if (p_ptr->special_attack & ATTACK_ACID)
1058 info[i++] = _("あなたの手は酸に覆われている。", "You can strike the enemy with acid.");
1060 if (p_ptr->special_attack & ATTACK_ELEC)
1062 info[i++] = _("あなたの手は電撃に覆われている。", "You can strike the enemy with electoric shock.");
1064 if (p_ptr->special_attack & ATTACK_POIS)
1066 info[i++] = _("あなたの手は毒に覆われている。", "You can strike the enemy with poison.");
1068 switch (p_ptr->action)
1071 info[i++] = _("あなたはひじょうに注意深く周囲を見渡している。", "You are looking around very carefully.");
1074 if (p_ptr->new_spells)
1076 info[i++] = _("あなたは呪文や祈りを学ぶことができる。", "You can learn some spells/prayers.");
1078 if (p_ptr->word_recall)
1080 info[i++] = _("あなたはすぐに帰還するだろう。", "You will soon be recalled.");
1082 if (p_ptr->alter_reality)
1084 info[i++] = _("あなたはすぐにこの世界を離れるだろう。", "You will soon be altered.");
1086 if (p_ptr->see_infra)
1088 info[i++] = _("あなたの瞳は赤外線に敏感である。", "Your eyes are sensitive to infrared light.");
1092 info[i++] = _("あなたは透明なモンスターを見ることができる。", "You can see invisible creatures.");
1094 if (p_ptr->levitation)
1096 info[i++] = _("あなたは飛ぶことができる。", "You can fly.");
1098 if (p_ptr->free_act)
1100 info[i++] = _("あなたは麻痺知らずの効果を持っている。", "You have free action.");
1102 if (p_ptr->regenerate)
1104 info[i++] = _("あなたは素早く体力を回復する。", "You regenerate quickly.");
1106 if (p_ptr->slow_digest)
1108 info[i++] = _("あなたは食欲が少ない。", "Your appetite is small.");
1110 if (p_ptr->telepathy)
1112 info[i++] = _("あなたはテレパシー能力を持っている。", "You have ESP.");
1114 if (p_ptr->esp_animal)
1116 info[i++] = _("あなたは自然界の生物の存在を感じる能力を持っている。", "You sense natural creatures.");
1118 if (p_ptr->esp_undead)
1120 info[i++] = _("あなたはアンデッドの存在を感じる能力を持っている。", "You sense undead.");
1122 if (p_ptr->esp_demon)
1124 info[i++] = _("あなたは悪魔の存在を感じる能力を持っている。", "You sense demons.");
1128 info[i++] = _("あなたはオークの存在を感じる能力を持っている。", "You sense orcs.");
1130 if (p_ptr->esp_troll)
1132 info[i++] = _("あなたはトロルの存在を感じる能力を持っている。", "You sense trolls.");
1134 if (p_ptr->esp_giant)
1136 info[i++] = _("あなたは巨人の存在を感じる能力を持っている。", "You sense giants.");
1138 if (p_ptr->esp_dragon)
1140 info[i++] = _("あなたはドラゴンの存在を感じる能力を持っている。", "You sense dragons.");
1142 if (p_ptr->esp_human)
1144 info[i++] = _("あなたは人間の存在を感じる能力を持っている。", "You sense humans.");
1146 if (p_ptr->esp_evil)
1148 info[i++] = _("あなたは邪悪な生き物の存在を感じる能力を持っている。", "You sense evil creatures.");
1150 if (p_ptr->esp_good)
1152 info[i++] = _("あなたは善良な生き物の存在を感じる能力を持っている。", "You sense good creatures.");
1154 if (p_ptr->esp_nonliving)
1156 info[i++] = _("あなたは活動する無生物体の存在を感じる能力を持っている。", "You sense non-living creatures.");
1158 if (p_ptr->esp_unique)
1160 info[i++] = _("あなたは特別な強敵の存在を感じる能力を持っている。", "You sense unique monsters.");
1162 if (p_ptr->hold_exp)
1164 info[i++] = _("あなたは自己の経験値をしっかりと維持する。", "You have a firm hold on your experience.");
1168 info[i++] = _("あなたは矢の呪文を反射する。", "You reflect bolt spells.");
1172 info[i++] = _("あなたは炎のオーラに包まれている。", "You are surrounded with a fiery aura.");
1176 info[i++] = _("あなたは電気に包まれている。", "You are surrounded with electricity.");
1180 info[i++] = _("あなたは冷気のオーラに包まれている。", "You are surrounded with an aura of coldness.");
1182 if (p_ptr->tim_sh_holy)
1184 info[i++] = _("あなたは聖なるオーラに包まれている。", "You are surrounded with a holy aura.");
1186 if (p_ptr->tim_sh_touki)
1188 info[i++] = _("あなたは闘気のオーラに包まれている。", "You are surrounded with a energy aura.");
1190 if (p_ptr->anti_magic)
1192 info[i++] = _("あなたは反魔法シールドに包まれている。", "You are surrounded by an anti-magic shell.");
1194 if (p_ptr->anti_tele)
1196 info[i++] = _("あなたはテレポートできない。", "You cannot teleport.");
1200 info[i++] = _("あなたの身体は光っている。", "You are carrying a permanent light.");
1204 info[i++] = _("あなたは行動の前に危険を察知することができる。", "You will be warned before dangerous actions.");
1206 if (p_ptr->dec_mana)
1208 info[i++] = _("あなたは少ない消費魔力で魔法を唱えることができる。", "You can cast spells with fewer mana points.");
1210 if (p_ptr->easy_spell)
1212 info[i++] = _("あなたは低い失敗率で魔法を唱えることができる。", "Fail rate of your magic is decreased.");
1214 if (p_ptr->heavy_spell)
1216 info[i++] = _("あなたは高い失敗率で魔法を唱えなければいけない。", "Fail rate of your magic is increased.");
1218 if (p_ptr->mighty_throw)
1220 info[i++] = _("あなたは強く物を投げる。", "You can throw objects powerfully.");
1223 if (p_ptr->immune_acid)
1225 info[i++] = _("あなたは酸に対する完全なる免疫を持っている。", "You are completely immune to acid.");
1227 else if (p_ptr->resist_acid && IS_OPPOSE_ACID())
1229 info[i++] = _("あなたは酸への強力な耐性を持っている。", "You resist acid exceptionally well.");
1231 else if (p_ptr->resist_acid || IS_OPPOSE_ACID())
1233 info[i++] = _("あなたは酸への耐性を持っている。", "You are resistant to acid.");
1236 if (p_ptr->immune_elec)
1238 info[i++] = _("あなたは電撃に対する完全なる免疫を持っている。", "You are completely immune to lightning.");
1240 else if (p_ptr->resist_elec && IS_OPPOSE_ELEC())
1242 info[i++] = _("あなたは電撃への強力な耐性を持っている。", "You resist lightning exceptionally well.");
1244 else if (p_ptr->resist_elec || IS_OPPOSE_ELEC())
1246 info[i++] = _("あなたは電撃への耐性を持っている。", "You are resistant to lightning.");
1249 if (prace_is_(RACE_ANDROID) && !p_ptr->immune_elec)
1251 info[i++] = _("あなたは電撃に弱い。", "You are susceptible to damage from lightning.");
1254 if (p_ptr->immune_fire)
1256 info[i++] = _("あなたは火に対する完全なる免疫を持っている。", "You are completely immune to fire.");
1258 else if (p_ptr->resist_fire && IS_OPPOSE_FIRE())
1260 info[i++] = _("あなたは火への強力な耐性を持っている。", "You resist fire exceptionally well.");
1262 else if (p_ptr->resist_fire || IS_OPPOSE_FIRE())
1264 info[i++] = _("あなたは火への耐性を持っている。", "You are resistant to fire.");
1267 if (prace_is_(RACE_ENT) && !p_ptr->immune_fire)
1269 info[i++] = _("あなたは火に弱い。", "You are susceptible to damage from fire.");
1272 if (p_ptr->immune_cold)
1274 info[i++] = _("あなたは冷気に対する完全なる免疫を持っている。", "You are completely immune to cold.");
1276 else if (p_ptr->resist_cold && IS_OPPOSE_COLD())
1278 info[i++] = _("あなたは冷気への強力な耐性を持っている。", "You resist cold exceptionally well.");
1280 else if (p_ptr->resist_cold || IS_OPPOSE_COLD())
1282 info[i++] = _("あなたは冷気への耐性を持っている。", "You are resistant to cold.");
1285 if (p_ptr->resist_pois && IS_OPPOSE_POIS())
1287 info[i++] = _("あなたは毒への強力な耐性を持っている。", "You resist poison exceptionally well.");
1289 else if (p_ptr->resist_pois || IS_OPPOSE_POIS())
1291 info[i++] = _("あなたは毒への耐性を持っている。", "You are resistant to poison.");
1294 if (p_ptr->resist_lite)
1296 info[i++] = _("あなたは閃光への耐性を持っている。", "You are resistant to bright light.");
1299 if (prace_is_(RACE_VAMPIRE) || prace_is_(RACE_S_FAIRY) || (p_ptr->mimic_form == MIMIC_VAMPIRE))
1301 info[i++] = _("あなたは閃光に弱い。", "You are susceptible to damage from bright light.");
1304 if (prace_is_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE) || p_ptr->wraith_form)
1306 info[i++] = _("あなたは暗黒に対する完全なる免疫を持っている。", "You are completely immune to darkness.");
1309 else if (p_ptr->resist_dark)
1311 info[i++] = _("あなたは暗黒への耐性を持っている。", "You are resistant to darkness.");
1313 if (p_ptr->resist_conf)
1315 info[i++] = _("あなたは混乱への耐性を持っている。", "You are resistant to confusion.");
1317 if (p_ptr->resist_sound)
1319 info[i++] = _("あなたは音波の衝撃への耐性を持っている。", "You are resistant to sonic attacks.");
1321 if (p_ptr->resist_disen)
1323 info[i++] = _("あなたは劣化への耐性を持っている。", "You are resistant to disenchantment.");
1325 if (p_ptr->resist_chaos)
1327 info[i++] = _("あなたはカオスの力への耐性を持っている。", "You are resistant to chaos.");
1329 if (p_ptr->resist_shard)
1331 info[i++] = _("あなたは破片の攻撃への耐性を持っている。", "You are resistant to blasts of shards.");
1333 if (p_ptr->resist_nexus)
1335 info[i++] = _("あなたは因果混乱の攻撃への耐性を持っている。", "You are resistant to nexus attacks.");
1338 if (prace_is_(RACE_SPECTRE))
1340 info[i++] = _("あなたは地獄の力を吸収できる。", "You can drain nether forces.");
1342 else if (p_ptr->resist_neth)
1344 info[i++] = _("あなたは地獄の力への耐性を持っている。", "You are resistant to nether forces.");
1346 if (p_ptr->resist_fear)
1348 info[i++] = _("あなたは全く恐怖を感じない。", "You are completely fearless.");
1350 if (p_ptr->resist_blind)
1352 info[i++] = _("あなたの目は盲目への耐性を持っている。", "Your eyes are resistant to blindness.");
1354 if (p_ptr->resist_time)
1356 info[i++] = _("あなたは時間逆転への耐性を持っている。", "You are resistant to time.");
1359 if (p_ptr->sustain_str)
1361 info[i++] = _("あなたの腕力は維持されている。", "Your strength is sustained.");
1363 if (p_ptr->sustain_int)
1365 info[i++] = _("あなたの知能は維持されている。", "Your intelligence is sustained.");
1367 if (p_ptr->sustain_wis)
1369 info[i++] = _("あなたの賢さは維持されている。", "Your wisdom is sustained.");
1371 if (p_ptr->sustain_con)
1373 info[i++] = _("あなたの耐久力は維持されている。", "Your constitution is sustained.");
1375 if (p_ptr->sustain_dex)
1377 info[i++] = _("あなたの器用さは維持されている。", "Your dexterity is sustained.");
1379 if (p_ptr->sustain_chr)
1381 info[i++] = _("あなたの魅力は維持されている。", "Your charisma is sustained.");
1384 if (have_flag(flgs, TR_STR))
1386 info[i++] = _("あなたの腕力は装備によって影響を受けている。", "Your strength is affected by your equipment.");
1388 if (have_flag(flgs, TR_INT))
1390 info[i++] = _("あなたの知能は装備によって影響を受けている。", "Your intelligence is affected by your equipment.");
1392 if (have_flag(flgs, TR_WIS))
1394 info[i++] = _("あなたの賢さは装備によって影響を受けている。", "Your wisdom is affected by your equipment.");
1396 if (have_flag(flgs, TR_DEX))
1398 info[i++] = _("あなたの器用さは装備によって影響を受けている。", "Your dexterity is affected by your equipment.");
1400 if (have_flag(flgs, TR_CON))
1402 info[i++] = _("あなたの耐久力は装備によって影響を受けている。", "Your constitution is affected by your equipment.");
1404 if (have_flag(flgs, TR_CHR))
1406 info[i++] = _("あなたの魅力は装備によって影響を受けている。", "Your charisma is affected by your equipment.");
1409 if (have_flag(flgs, TR_STEALTH))
1411 info[i++] = _("あなたの隠密行動能力は装備によって影響を受けている。", "Your stealth is affected by your equipment.");
1413 if (have_flag(flgs, TR_SEARCH))
1415 info[i++] = _("あなたの探索能力は装備によって影響を受けている。", "Your searching ability is affected by your equipment.");
1417 if (have_flag(flgs, TR_INFRA))
1419 info[i++] = _("あなたの赤外線視力は装備によって影響を受けている。", "Your infravision is affected by your equipment.");
1421 if (have_flag(flgs, TR_TUNNEL))
1423 info[i++] = _("あなたの採掘能力は装備によって影響を受けている。", "Your digging ability is affected by your equipment.");
1425 if (have_flag(flgs, TR_SPEED))
1427 info[i++] = _("あなたのスピードは装備によって影響を受けている。", "Your speed is affected by your equipment.");
1429 if (have_flag(flgs, TR_BLOWS))
1431 info[i++] = _("あなたの攻撃速度は装備によって影響を受けている。", "Your attack speed is affected by your equipment.");
1435 /* Access the current weapon */
1436 o_ptr = &inventory[INVEN_RARM];
1438 /* Analyze the weapon */
1441 /* Indicate Blessing */
1442 if (have_flag(flgs, TR_BLESSED))
1444 info[i++] = _("あなたの武器は神の祝福を受けている。", "Your weapon has been blessed by the gods.");
1447 if (have_flag(flgs, TR_CHAOTIC))
1449 info[i++] = _("あなたの武器はログルスの徴の属性をもつ。", "Your weapon is branded with the Sign of Logrus.");
1453 if (have_flag(flgs, TR_IMPACT))
1455 info[i++] = _("あなたの武器は打撃で地震を発生することができる。", "The impact of your weapon can cause earthquakes.");
1458 if (have_flag(flgs, TR_VORPAL))
1460 info[i++] = _("あなたの武器は非常に鋭い。", "Your weapon is very sharp.");
1463 if (have_flag(flgs, TR_VAMPIRIC))
1465 info[i++] = _("あなたの武器は敵から生命力を吸収する。", "Your weapon drains life from your foes.");
1468 /* Special "Attack Bonuses" */
1469 if (have_flag(flgs, TR_BRAND_ACID))
1471 info[i++] = _("あなたの武器は敵を溶かす。", "Your weapon melts your foes.");
1473 if (have_flag(flgs, TR_BRAND_ELEC))
1475 info[i++] = _("あなたの武器は敵を感電させる。", "Your weapon shocks your foes.");
1477 if (have_flag(flgs, TR_BRAND_FIRE))
1479 info[i++] = _("あなたの武器は敵を燃やす。", "Your weapon burns your foes.");
1481 if (have_flag(flgs, TR_BRAND_COLD))
1483 info[i++] = _("あなたの武器は敵を凍らせる。", "Your weapon freezes your foes.");
1485 if (have_flag(flgs, TR_BRAND_POIS))
1487 info[i++] = _("あなたの武器は敵を毒で侵す。", "Your weapon poisons your foes.");
1490 /* Special "slay" flags */
1491 if (have_flag(flgs, TR_KILL_ANIMAL))
1493 info[i++] = _("あなたの武器は動物の天敵である。", "Your weapon is a great bane of animals.");
1495 else if (have_flag(flgs, TR_SLAY_ANIMAL))
1497 info[i++] = _("あなたの武器は動物に対して強い力を発揮する。", "Your weapon strikes at animals with extra force.");
1499 if (have_flag(flgs, TR_KILL_EVIL))
1501 info[i++] = _("あなたの武器は邪悪なる存在の天敵である。", "Your weapon is a great bane of evil.");
1503 else if (have_flag(flgs, TR_SLAY_EVIL))
1505 info[i++] = _("あなたの武器は邪悪なる存在に対して強い力を発揮する。", "Your weapon strikes at evil with extra force.");
1507 if (have_flag(flgs, TR_KILL_HUMAN))
1509 info[i++] = _("あなたの武器は人間の天敵である。", "Your weapon is a great bane of humans.");
1511 else if (have_flag(flgs, TR_SLAY_HUMAN))
1513 info[i++] = _("あなたの武器は人間に対して特に強い力を発揮する。", "Your weapon is especially deadly against humans.");
1515 if (have_flag(flgs, TR_KILL_UNDEAD))
1517 info[i++] = _("あなたの武器はアンデッドの天敵である。", "Your weapon is a great bane of undead.");
1519 else if (have_flag(flgs, TR_SLAY_UNDEAD))
1521 info[i++] = _("あなたの武器はアンデッドに対して神聖なる力を発揮する。", "Your weapon strikes at undead with holy wrath.");
1523 if (have_flag(flgs, TR_KILL_DEMON))
1525 info[i++] = _("あなたの武器はデーモンの天敵である。", "Your weapon is a great bane of demons.");
1527 else if (have_flag(flgs, TR_SLAY_DEMON))
1529 info[i++] = _("あなたの武器はデーモンに対して神聖なる力を発揮する。", "Your weapon strikes at demons with holy wrath.");
1531 if (have_flag(flgs, TR_KILL_ORC))
1533 info[i++] = _("あなたの武器はオークの天敵である。", "Your weapon is a great bane of orcs.");
1535 else if (have_flag(flgs, TR_SLAY_ORC))
1537 info[i++] = _("あなたの武器はオークに対して特に強い力を発揮する。", "Your weapon is especially deadly against orcs.");
1539 if (have_flag(flgs, TR_KILL_TROLL))
1541 info[i++] = _("あなたの武器はトロルの天敵である。", "Your weapon is a great bane of trolls.");
1543 else if (have_flag(flgs, TR_SLAY_TROLL))
1545 info[i++] = _("あなたの武器はトロルに対して特に強い力を発揮する。", "Your weapon is especially deadly against trolls.");
1547 if (have_flag(flgs, TR_KILL_GIANT))
1549 info[i++] = _("あなたの武器はジャイアントの天敵である。", "Your weapon is a great bane of giants.");
1551 else if (have_flag(flgs, TR_SLAY_GIANT))
1553 info[i++] = _("あなたの武器はジャイアントに対して特に強い力を発揮する。", "Your weapon is especially deadly against giants.");
1555 /* Special "kill" flags */
1556 if (have_flag(flgs, TR_KILL_DRAGON))
1558 info[i++] = _("あなたの武器はドラゴンの天敵である。", "Your weapon is a great bane of dragons.");
1560 else if (have_flag(flgs, TR_SLAY_DRAGON))
1562 info[i++] = _("あなたの武器はドラゴンに対して特に強い力を発揮する。", "Your weapon is especially deadly against dragons.");
1565 if (have_flag(flgs, TR_FORCE_WEAPON))
1567 info[i++] = _("あなたの武器はMPを使って攻撃する。", "Your weapon causes greate damages using your MP.");
1569 if (have_flag(flgs, TR_THROW))
1571 info[i++] = _("あなたの武器は投げやすい。", "Your weapon can be thrown well.");
1576 /* Save the screen */
1579 /* Erase the screen */
1580 for (k = 1; k < 24; k++) prt("", k, 13);
1582 /* Label the information */
1583 prt(_(" あなたの状態:", " Your Attributes:"), 1, 15);
1585 /* We will print on top of the map (column 13) */
1586 for (k = 2, j = 0; j < i; j++)
1589 prt(info[j], k++, 15);
1591 /* Every 20 entries (lines 2 to 21), start over */
1592 if ((k == 22) && (j+1 < i))
1594 prt(_("-- 続く --", "-- more --"), k, 15);
1596 for (; k > 2; k--) prt("", k, 15);
1601 prt(_("[何かキーを押すとゲームに戻ります]", "[Press any key to continue]"), k, 13);
1604 /* Restore the screen */
1609 * @brief 魔法効果時間のターン数に基づいて表現IDを返す。
1613 static int report_magics_aux(int dur)
1631 else if (dur <= 100)
1635 else if (dur <= 200)
1645 static cptr report_magic_durations[] =
1658 "for a little while",
1662 "for a very long time",
1663 "for an incredibly long time",
1664 "until you hit a monster"
1670 * @brief 現在の一時的効果一覧を返す / Report all currently active magical effects.
1673 void report_magics(void)
1683 info2[i] = report_magics_aux(p_ptr->blind);
1684 info[i++] = _("あなたは目が見えない", "You cannot see");
1686 if (p_ptr->confused)
1688 info2[i] = report_magics_aux(p_ptr->confused);
1689 info[i++] = _("あなたは混乱している", "You are confused");
1693 info2[i] = report_magics_aux(p_ptr->afraid);
1694 info[i++] = _("あなたは恐怖に侵されている", "You are terrified");
1696 if (p_ptr->poisoned)
1698 info2[i] = report_magics_aux(p_ptr->poisoned);
1699 info[i++] = _("あなたは毒に侵されている", "You are poisoned");
1703 info2[i] = report_magics_aux(p_ptr->image);
1704 info[i++] = _("あなたは幻覚を見ている", "You are hallucinating");
1708 info2[i] = report_magics_aux(p_ptr->blessed);
1709 info[i++] = _("あなたは高潔さを感じている", "You feel rightous");
1713 info2[i] = report_magics_aux(p_ptr->hero);
1714 info[i++] = _("あなたはヒーロー気分だ", "You feel heroic");
1718 info2[i] = report_magics_aux(p_ptr->shero);
1719 info[i++] = _("あなたは戦闘狂だ", "You are in a battle rage");
1721 if (p_ptr->protevil)
1723 info2[i] = report_magics_aux(p_ptr->protevil);
1724 info[i++] = _("あなたは邪悪なる存在から守られている", "You are protected from evil");
1728 info2[i] = report_magics_aux(p_ptr->shield);
1729 info[i++] = _("あなたは神秘のシールドで守られている", "You are protected by a mystic shield");
1733 info2[i] = report_magics_aux(p_ptr->invuln);
1734 info[i++] = _("あなたは無敵だ", "You are invulnerable");
1736 if (p_ptr->wraith_form)
1738 info2[i] = report_magics_aux(p_ptr->wraith_form);
1739 info[i++] = _("あなたは幽体化している", "You are incorporeal");
1741 if (p_ptr->special_attack & ATTACK_CONFUSE)
1744 info[i++] = _("あなたの手は赤く輝いている", "Your hands are glowing dull red.");
1746 if (p_ptr->word_recall)
1748 info2[i] = report_magics_aux(p_ptr->word_recall);
1749 info[i++] = _("この後帰還の詔が発動する", "You are waiting to be recalled");
1751 if (p_ptr->alter_reality)
1753 info2[i] = report_magics_aux(p_ptr->alter_reality);
1754 info[i++] = _("この後現実変容が発動する", "You waiting to be altered");
1756 if (p_ptr->oppose_acid)
1758 info2[i] = report_magics_aux(p_ptr->oppose_acid);
1759 info[i++] = _("あなたは酸への耐性を持っている", "You are resistant to acid");
1761 if (p_ptr->oppose_elec)
1763 info2[i] = report_magics_aux(p_ptr->oppose_elec);
1764 info[i++] = _("あなたは電撃への耐性を持っている", "You are resistant to lightning");
1766 if (p_ptr->oppose_fire)
1768 info2[i] = report_magics_aux(p_ptr->oppose_fire);
1769 info[i++] = _("あなたは火への耐性を持っている", "You are resistant to fire");
1771 if (p_ptr->oppose_cold)
1773 info2[i] = report_magics_aux(p_ptr->oppose_cold);
1774 info[i++] = _("あなたは冷気への耐性を持っている", "You are resistant to cold");
1776 if (p_ptr->oppose_pois)
1778 info2[i] = report_magics_aux(p_ptr->oppose_pois);
1779 info[i++] = _("あなたは毒への耐性を持っている", "You are resistant to poison");
1782 /* Save the screen */
1785 /* Erase the screen */
1786 for (k = 1; k < 24; k++) prt("", k, 13);
1788 /* Label the information */
1789 prt(_(" 現在かかっている魔法 :", " Your Current Magic:"), 1, 15);
1792 /* We will print on top of the map (column 13) */
1793 for (k = 2, j = 0; j < i; j++)
1796 sprintf(Dummy, _("%-28s : 期間 - %s ", "%s %s."), info[j],
1797 report_magic_durations[info2[j]]);
1798 prt(Dummy, k++, 15);
1800 /* Every 20 entries (lines 2 to 21), start over */
1801 if ((k == 22) && (j + 1 < i))
1803 prt(_("-- 続く --", "-- more --"), k, 15);
1805 for (; k > 2; k--) prt("", k, 15);
1810 prt(_("[何かキーを押すとゲームに戻ります]", "[Press any key to continue]"), k, 13);
1813 /* Restore the screen */
1818 * @brief プレイヤー周辺の地形を感知する
1820 * @param flag 特定地形ID
1821 * @param known 地形から危険フラグを外すならTRUE
1822 * @return 効力があった場合TRUEを返す
1824 static bool detect_feat_flag(int range, int flag, bool known)
1827 bool detect = FALSE;
1830 if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
1832 /* Scan the current panel */
1833 for (y = 1; y < cur_hgt - 1; y++)
1835 for (x = 1; x <= cur_wid - 1; x++)
1837 int dist = distance(py, px, y, x);
1838 if (dist > range) continue;
1840 /* Access the grid */
1841 c_ptr = &cave[y][x];
1844 if (flag == FF_TRAP)
1846 /* Mark as detected */
1847 if (dist <= range && known)
1849 if (dist <= range - 1) c_ptr->info |= (CAVE_IN_DETECT);
1851 c_ptr->info &= ~(CAVE_UNSAFE);
1859 if (cave_have_flag_grid(c_ptr, flag))
1861 /* Detect secrets */
1862 disclose_grid(y, x);
1864 /* Hack -- Memorize */
1865 c_ptr->info |= (CAVE_MARK);
1882 * @brief プレイヤー周辺のトラップを感知する / Detect all traps on current panel
1884 * @param known 感知外範囲を超える警告フラグを立てる場合TRUEを返す
1885 * @return 効力があった場合TRUEを返す
1887 bool detect_traps(int range, bool known)
1889 bool detect = detect_feat_flag(range, FF_TRAP, known);
1891 if (known) p_ptr->dtrap = TRUE;
1893 if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 0) detect = FALSE;
1898 msg_print(_("トラップの存在を感じとった!", "You sense the presence of traps!"));
1907 * @brief プレイヤー周辺のドアを感知する / Detect all doors on current panel
1909 * @return 効力があった場合TRUEを返す
1911 bool detect_doors(int range)
1913 bool detect = detect_feat_flag(range, FF_DOOR, TRUE);
1915 if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 0) detect = FALSE;
1920 msg_print(_("ドアの存在を感じとった!", "You sense the presence of doors!"));
1929 * @brief プレイヤー周辺の階段を感知する / Detect all stairs on current panel
1931 * @return 効力があった場合TRUEを返す
1933 bool detect_stairs(int range)
1935 bool detect = detect_feat_flag(range, FF_STAIRS, TRUE);
1937 if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 0) detect = FALSE;
1942 msg_print(_("階段の存在を感じとった!", "You sense the presence of stairs!"));
1951 * @brief プレイヤー周辺の地形財宝を感知する / Detect any treasure on the current panel
1953 * @return 効力があった場合TRUEを返す
1955 bool detect_treasure(int range)
1957 bool detect = detect_feat_flag(range, FF_HAS_GOLD, TRUE);
1959 if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 6) detect = FALSE;
1964 msg_print(_("埋蔵された財宝の存在を感じとった!", "You sense the presence of buried treasure!"));
1973 * @brief プレイヤー周辺のアイテム財宝を感知する / Detect all "gold" objects on the current panel
1975 * @return 効力があった場合TRUEを返す
1977 bool detect_objects_gold(int range)
1982 bool detect = FALSE;
1984 if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range2 /= 3;
1987 for (i = 1; i < o_max; i++)
1989 object_type *o_ptr = &o_list[i];
1991 /* Skip dead objects */
1992 if (!o_ptr->k_idx) continue;
1994 /* Skip held objects */
1995 if (o_ptr->held_m_idx) continue;
2001 /* Only detect nearby objects */
2002 if (distance(py, px, y, x) > range2) continue;
2004 /* Detect "gold" objects */
2005 if (o_ptr->tval == TV_GOLD)
2007 /* Hack -- memorize it */
2008 o_ptr->marked |= OM_FOUND;
2018 if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 6) detect = FALSE;
2023 msg_print(_("財宝の存在を感じとった!", "You sense the presence of treasure!"));
2026 if (detect_monsters_string(range, "$"))
2037 * @brief 通常のアイテムオブジェクトを感知する / Detect all "normal" objects on the current panel
2039 * @return 効力があった場合TRUEを返す
2041 bool detect_objects_normal(int range)
2046 bool detect = FALSE;
2048 if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range2 /= 3;
2051 for (i = 1; i < o_max; i++)
2053 object_type *o_ptr = &o_list[i];
2055 /* Skip dead objects */
2056 if (!o_ptr->k_idx) continue;
2058 /* Skip held objects */
2059 if (o_ptr->held_m_idx) continue;
2065 /* Only detect nearby objects */
2066 if (distance(py, px, y, x) > range2) continue;
2068 /* Detect "real" objects */
2069 if (o_ptr->tval != TV_GOLD)
2071 /* Hack -- memorize it */
2072 o_ptr->marked |= OM_FOUND;
2082 if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 6) detect = FALSE;
2087 msg_print(_("アイテムの存在を感じとった!", "You sense the presence of objects!"));
2090 if (detect_monsters_string(range, "!=?|/`"))
2101 * @brief 魔法効果のあるのアイテムオブジェクトを感知する / Detect all "magic" objects on the current panel.
2103 * @return 効力があった場合TRUEを返す
2106 * This will light up all spaces with "magic" items, including artifacts,
2107 * ego-items, potions, scrolls, books, rods, wands, staves, amulets, rings,
2108 * and "enchanted" items of the "good" variety.
2110 * It can probably be argued that this function is now too powerful.
2113 bool detect_objects_magic(int range)
2117 bool detect = FALSE;
2119 if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
2121 /* Scan all objects */
2122 for (i = 1; i < o_max; i++)
2124 object_type *o_ptr = &o_list[i];
2126 /* Skip dead objects */
2127 if (!o_ptr->k_idx) continue;
2129 /* Skip held objects */
2130 if (o_ptr->held_m_idx) continue;
2136 /* Only detect nearby objects */
2137 if (distance(py, px, y, x) > range) continue;
2139 /* Examine the tval */
2142 /* Artifacts, misc magic items, or enchanted wearables */
2143 if (object_is_artifact(o_ptr) ||
2144 object_is_ego(o_ptr) ||
2145 (tv == TV_WHISTLE) ||
2146 (tv == TV_AMULET) ||
2151 (tv == TV_SCROLL) ||
2152 (tv == TV_POTION) ||
2153 (tv == TV_LIFE_BOOK) ||
2154 (tv == TV_SORCERY_BOOK) ||
2155 (tv == TV_NATURE_BOOK) ||
2156 (tv == TV_CHAOS_BOOK) ||
2157 (tv == TV_DEATH_BOOK) ||
2158 (tv == TV_TRUMP_BOOK) ||
2159 (tv == TV_ARCANE_BOOK) ||
2160 (tv == TV_CRAFT_BOOK) ||
2161 (tv == TV_DAEMON_BOOK) ||
2162 (tv == TV_CRUSADE_BOOK) ||
2163 (tv == TV_MUSIC_BOOK) ||
2164 (tv == TV_HISSATSU_BOOK) ||
2165 (tv == TV_HEX_BOOK) ||
2166 ((o_ptr->to_a > 0) || (o_ptr->to_h + o_ptr->to_d > 0)))
2168 /* Memorize the item */
2169 o_ptr->marked |= OM_FOUND;
2182 msg_print(_("魔法のアイテムの存在を感じとった!", "You sense the presence of magic objects!"));
2191 * @brief 一般のモンスターを感知する / Detect all "normal" monsters on the current panel
2193 * @return 効力があった場合TRUEを返す
2195 bool detect_monsters_normal(int range)
2201 if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
2204 for (i = 1; i < m_max; i++)
2206 monster_type *m_ptr = &m_list[i];
2207 monster_race *r_ptr = &r_info[m_ptr->r_idx];
2209 /* Skip dead monsters */
2210 if (!m_ptr->r_idx) continue;
2216 /* Only detect nearby monsters */
2217 if (distance(py, px, y, x) > range) continue;
2219 /* Detect all non-invisible monsters */
2220 if (!(r_ptr->flags2 & RF2_INVISIBLE) || p_ptr->see_inv)
2222 /* Repair visibility later */
2223 repair_monsters = TRUE;
2225 /* Hack -- Detect monster */
2226 m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
2228 /* Update the monster */
2229 update_mon(i, FALSE);
2236 if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 3) flag = FALSE;
2241 /* Describe result */
2242 msg_print(_("モンスターの存在を感じとった!", "You sense the presence of monsters!"));
2251 * @brief 不可視のモンスターを感知する / Detect all "invisible" monsters around the player
2253 * @return 効力があった場合TRUEを返す
2255 bool detect_monsters_invis(int range)
2260 if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
2263 for (i = 1; i < m_max; i++)
2265 monster_type *m_ptr = &m_list[i];
2266 monster_race *r_ptr = &r_info[m_ptr->r_idx];
2268 /* Skip dead monsters */
2269 if (!m_ptr->r_idx) continue;
2275 /* Only detect nearby monsters */
2276 if (distance(py, px, y, x) > range) continue;
2278 /* Detect invisible monsters */
2279 if (r_ptr->flags2 & RF2_INVISIBLE)
2281 /* Update monster recall window */
2282 if (p_ptr->monster_race_idx == m_ptr->r_idx)
2285 p_ptr->window |= (PW_MONSTER);
2288 /* Repair visibility later */
2289 repair_monsters = TRUE;
2291 /* Hack -- Detect monster */
2292 m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
2294 /* Update the monster */
2295 update_mon(i, FALSE);
2302 if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 3) flag = FALSE;
2307 /* Describe result */
2308 msg_print(_("透明な生物の存在を感じとった!", "You sense the presence of invisible creatures!"));
2316 * @brief 邪悪なモンスターを感知する / Detect all "evil" monsters on current panel
2318 * @return 効力があった場合TRUEを返す
2320 bool detect_monsters_evil(int range)
2325 if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
2328 for (i = 1; i < m_max; i++)
2330 monster_type *m_ptr = &m_list[i];
2331 monster_race *r_ptr = &r_info[m_ptr->r_idx];
2333 /* Skip dead monsters */
2334 if (!m_ptr->r_idx) continue;
2340 /* Only detect nearby monsters */
2341 if (distance(py, px, y, x) > range) continue;
2343 /* Detect evil monsters */
2344 if (r_ptr->flags3 & RF3_EVIL)
2346 if (is_original_ap(m_ptr))
2348 /* Take note that they are evil */
2349 r_ptr->r_flags3 |= (RF3_EVIL);
2351 /* Update monster recall window */
2352 if (p_ptr->monster_race_idx == m_ptr->r_idx)
2355 p_ptr->window |= (PW_MONSTER);
2359 /* Repair visibility later */
2360 repair_monsters = TRUE;
2362 /* Hack -- Detect monster */
2363 m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
2365 /* Update the monster */
2366 update_mon(i, FALSE);
2376 /* Describe result */
2377 msg_print(_("邪悪なる生物の存在を感じとった!", "You sense the presence of evil creatures!"));
2385 * @brief 無生命のモンスターを感知する(アンデッド、悪魔系を含む) / Detect all "nonliving", "undead" or "demonic" monsters on current panel
2387 * @return 効力があった場合TRUEを返す
2389 bool detect_monsters_nonliving(int range)
2394 if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
2397 for (i = 1; i < m_max; i++)
2399 monster_type *m_ptr = &m_list[i];
2400 monster_race *r_ptr = &r_info[m_ptr->r_idx];
2402 /* Skip dead monsters */
2403 if (!m_ptr->r_idx) continue;
2409 /* Only detect nearby monsters */
2410 if (distance(py, px, y, x) > range) continue;
2412 /* Detect non-living monsters */
2413 if (!monster_living(r_ptr))
2415 /* Update monster recall window */
2416 if (p_ptr->monster_race_idx == m_ptr->r_idx)
2419 p_ptr->window |= (PW_MONSTER);
2422 /* Repair visibility later */
2423 repair_monsters = TRUE;
2425 /* Hack -- Detect monster */
2426 m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
2428 /* Update the monster */
2429 update_mon(i, FALSE);
2439 /* Describe result */
2440 msg_print(_("自然でないモンスターの存在を感じた!", "You sense the presence of unnatural beings!"));
2448 * @brief 精神のあるモンスターを感知する / Detect all monsters it has mind on current panel
2450 * @return 効力があった場合TRUEを返す
2452 bool detect_monsters_mind(int range)
2457 if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
2460 for (i = 1; i < m_max; i++)
2462 monster_type *m_ptr = &m_list[i];
2463 monster_race *r_ptr = &r_info[m_ptr->r_idx];
2465 /* Skip dead monsters */
2466 if (!m_ptr->r_idx) continue;
2472 /* Only detect nearby monsters */
2473 if (distance(py, px, y, x) > range) continue;
2475 /* Detect non-living monsters */
2476 if (!(r_ptr->flags2 & RF2_EMPTY_MIND))
2478 /* Update monster recall window */
2479 if (p_ptr->monster_race_idx == m_ptr->r_idx)
2482 p_ptr->window |= (PW_MONSTER);
2485 /* Repair visibility later */
2486 repair_monsters = TRUE;
2488 /* Hack -- Detect monster */
2489 m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
2491 /* Update the monster */
2492 update_mon(i, FALSE);
2502 /* Describe result */
2503 msg_print(_("殺気を感じとった!", "You sense the presence of someone's mind!"));
2512 * @brief 該当シンボルのモンスターを感知する / Detect all (string) monsters on current panel
2514 * @param Match 対応シンボルの混じったモンスター文字列(複数指定化)
2515 * @return 効力があった場合TRUEを返す
2517 bool detect_monsters_string(int range, cptr Match)
2522 if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
2525 for (i = 1; i < m_max; i++)
2527 monster_type *m_ptr = &m_list[i];
2528 monster_race *r_ptr = &r_info[m_ptr->r_idx];
2530 /* Skip dead monsters */
2531 if (!m_ptr->r_idx) continue;
2537 /* Only detect nearby monsters */
2538 if (distance(py, px, y, x) > range) continue;
2540 /* Detect monsters with the same symbol */
2541 if (my_strchr(Match, r_ptr->d_char))
2543 /* Update monster recall window */
2544 if (p_ptr->monster_race_idx == m_ptr->r_idx)
2547 p_ptr->window |= (PW_MONSTER);
2550 /* Repair visibility later */
2551 repair_monsters = TRUE;
2553 /* Hack -- Detect monster */
2554 m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
2556 /* Update the monster */
2557 update_mon(i, FALSE);
2564 if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 3) flag = FALSE;
2569 /* Describe result */
2570 msg_print(_("モンスターの存在を感じとった!", "You sense the presence of monsters!"));
2578 * @brief flags3に対応するモンスターを感知する / A "generic" detect monsters routine, tagged to flags3
2580 * @param match_flag 感知フラグ
2581 * @return 効力があった場合TRUEを返す
2583 bool detect_monsters_xxx(int range, u32b match_flag)
2587 cptr desc_monsters = _("変なモンスター", "weird monsters");
2589 if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
2592 for (i = 1; i < m_max; i++)
2594 monster_type *m_ptr = &m_list[i];
2595 monster_race *r_ptr = &r_info[m_ptr->r_idx];
2597 /* Skip dead monsters */
2598 if (!m_ptr->r_idx) continue;
2604 /* Only detect nearby monsters */
2605 if (distance(py, px, y, x) > range) continue;
2607 /* Detect evil monsters */
2608 if (r_ptr->flags3 & (match_flag))
2610 if (is_original_ap(m_ptr))
2612 /* Take note that they are something */
2613 r_ptr->r_flags3 |= (match_flag);
2615 /* Update monster recall window */
2616 if (p_ptr->monster_race_idx == m_ptr->r_idx)
2619 p_ptr->window |= (PW_MONSTER);
2623 /* Repair visibility later */
2624 repair_monsters = TRUE;
2626 /* Hack -- Detect monster */
2627 m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
2629 /* Update the monster */
2630 update_mon(i, FALSE);
2643 desc_monsters = _("デーモン", "demons");
2646 desc_monsters = _("アンデッド", "the undead");
2650 /* Describe result */
2651 msg_format(_("%sの存在を感じとった!", "You sense the presence of %s!"), desc_monsters);
2661 * @brief 全感知処理 / Detect everything
2663 * @return 効力があった場合TRUEを返す
2665 bool detect_all(int range)
2667 bool detect = FALSE;
2669 /* Detect everything */
2670 if (detect_traps(range, TRUE)) detect = TRUE;
2671 if (detect_doors(range)) detect = TRUE;
2672 if (detect_stairs(range)) detect = TRUE;
2674 /* There are too many hidden treasure. So... */
2675 /* if (detect_treasure(range)) detect = TRUE; */
2677 if (detect_objects_gold(range)) detect = TRUE;
2678 if (detect_objects_normal(range)) detect = TRUE;
2679 if (detect_monsters_invis(range)) detect = TRUE;
2680 if (detect_monsters_normal(range)) detect = TRUE;
2688 * @brief 視界内モンスターに魔法効果を与える / Apply a "project()" directly to all viewable monsters
2691 * @return 効力があった場合TRUEを返す
2694 * Note that affected monsters are NOT auto-tracked by this usage.
2696 * To avoid misbehavior when monster deaths have side-effects,
2697 * this is done in two passes. -- JDL
2700 bool project_hack(int typ, int dam)
2703 int flg = PROJECT_JUMP | PROJECT_KILL | PROJECT_HIDE;
2704 bool obvious = FALSE;
2707 /* Mark all (nearby) monsters */
2708 for (i = 1; i < m_max; i++)
2710 monster_type *m_ptr = &m_list[i];
2712 /* Paranoia -- Skip dead monsters */
2713 if (!m_ptr->r_idx) continue;
2719 /* Require line of sight */
2720 if (!player_has_los_bold(y, x) || !projectable(py, px, y, x)) continue;
2722 /* Mark the monster */
2723 m_ptr->mflag |= (MFLAG_TEMP);
2726 /* Affect all marked monsters */
2727 for (i = 1; i < m_max; i++)
2729 monster_type *m_ptr = &m_list[i];
2731 /* Skip unmarked monsters */
2732 if (!(m_ptr->mflag & (MFLAG_TEMP))) continue;
2735 m_ptr->mflag &= ~(MFLAG_TEMP);
2741 /* Jump directly to the target monster */
2742 if (project(0, 0, y, x, dam, typ, flg, -1)) obvious = TRUE;
2751 * @brief 視界内モンスターを加速する処理 / Speed monsters
2752 * @return 効力があった場合TRUEを返す
2754 bool speed_monsters(void)
2756 return (project_hack(GF_OLD_SPEED, p_ptr->lev));
2760 * @brief 視界内モンスターを加速する処理 / Slow monsters
2761 * @return 効力があった場合TRUEを返す
2763 bool slow_monsters(int power)
2765 return (project_hack(GF_OLD_SLOW, power));
2769 * @brief 視界内モンスターを眠らせる処理 / Sleep monsters
2770 * @return 効力があった場合TRUEを返す
2772 bool sleep_monsters(int power)
2774 return (project_hack(GF_OLD_SLEEP, power));
2778 * @brief 視界内の邪悪なモンスターをテレポート・アウェイさせる処理 / Banish evil monsters
2779 * @return 効力があった場合TRUEを返す
2781 bool banish_evil(int dist)
2783 return (project_hack(GF_AWAY_EVIL, dist));
2787 * @brief 視界内のアンデッド・モンスターを恐怖させる処理 / Turn undead
2788 * @return 効力があった場合TRUEを返す
2790 bool turn_undead(void)
2792 bool tester = (project_hack(GF_TURN_UNDEAD, p_ptr->lev));
2794 chg_virtue(V_UNLIFE, -1);
2799 * @brief 視界内のアンデッド・モンスターにダメージを与える処理 / Dispel undead monsters
2800 * @return 効力があった場合TRUEを返す
2802 bool dispel_undead(int dam)
2804 bool tester = (project_hack(GF_DISP_UNDEAD, dam));
2806 chg_virtue(V_UNLIFE, -2);
2811 * @brief 視界内の邪悪なモンスターにダメージを与える処理 / Dispel evil monsters
2812 * @return 効力があった場合TRUEを返す
2814 bool dispel_evil(int dam)
2816 return (project_hack(GF_DISP_EVIL, dam));
2820 * @brief 視界内の善良なモンスターにダメージを与える処理 / Dispel good monsters
2821 * @return 効力があった場合TRUEを返す
2823 bool dispel_good(int dam)
2825 return (project_hack(GF_DISP_GOOD, dam));
2829 * @brief 視界内のあらゆるモンスターにダメージを与える処理 / Dispel all monsters
2830 * @return 効力があった場合TRUEを返す
2832 bool dispel_monsters(int dam)
2834 return (project_hack(GF_DISP_ALL, dam));
2838 * @brief 視界内の生命のあるモンスターにダメージを与える処理 / Dispel 'living' monsters
2839 * @return 効力があった場合TRUEを返す
2841 bool dispel_living(int dam)
2843 return (project_hack(GF_DISP_LIVING, dam));
2847 * @brief 視界内の悪魔系モンスターにダメージを与える処理 / Dispel 'living' monsters
2848 * @return 効力があった場合TRUEを返す
2850 bool dispel_demons(int dam)
2852 return (project_hack(GF_DISP_DEMON, dam));
2856 * @brief 視界内のモンスターに「聖戦」効果を与える処理
2857 * @return 効力があった場合TRUEを返す
2861 return (project_hack(GF_CRUSADE, p_ptr->lev*4));
2865 * @brief 視界内モンスターを怒らせる処理 / Wake up all monsters, and speed up "los" monsters.
2866 * @param who 怒らせる原因を起こしたモンスター(0ならばプレイヤー)
2869 void aggravate_monsters(int who)
2876 /* Aggravate everyone nearby */
2877 for (i = 1; i < m_max; i++)
2879 monster_type *m_ptr = &m_list[i];
2880 /* monster_race *r_ptr = &r_info[m_ptr->r_idx]; */
2882 /* Paranoia -- Skip dead monsters */
2883 if (!m_ptr->r_idx) continue;
2885 /* Skip aggravating monster (or player) */
2886 if (i == who) continue;
2888 /* Wake up nearby sleeping monsters */
2889 if (m_ptr->cdis < MAX_SIGHT * 2)
2892 if (MON_CSLEEP(m_ptr))
2894 (void)set_monster_csleep(i, 0);
2897 if (!is_pet(m_ptr)) m_ptr->mflag2 |= MFLAG2_NOPET;
2900 /* Speed up monsters in line of sight */
2901 if (player_has_los_bold(m_ptr->fy, m_ptr->fx))
2905 (void)set_monster_fast(i, MON_FAST(m_ptr) + 100);
2913 if (speed) msg_print("付近で何かが突如興奮したような感じを受けた!");
2914 else if (sleep) msg_print("何かが突如興奮したような騒々しい音が遠くに聞こえた!");
2916 if (speed) msg_print("You feel a sudden stirring nearby!");
2917 else if (sleep) msg_print("You hear a sudden stirring in the distance!");
2919 if (p_ptr->riding) p_ptr->update |= PU_BONUS;
2924 * @brief モンスターへの単体抹殺処理サブルーチン / Delete a non-unique/non-quest monster
2925 * @param m_idx 抹殺するモンスターID
2926 * @param power 抹殺の威力
2927 * @param player_cast プレイヤーの魔法によるものならば TRUE
2928 * @param dam_side プレイヤーへの負担ダメージ量(1d(dam_side))
2929 * @param spell_name 抹殺効果を起こした魔法の名前
2930 * @return 効力があった場合TRUEを返す
2932 bool genocide_aux(int m_idx, int power, bool player_cast, int dam_side, cptr spell_name)
2934 int msec = delay_factor * delay_factor * delay_factor;
2935 monster_type *m_ptr = &m_list[m_idx];
2936 monster_race *r_ptr = &r_info[m_ptr->r_idx];
2937 bool resist = FALSE;
2939 if (is_pet(m_ptr) && !player_cast) return FALSE;
2941 /* Hack -- Skip Unique Monsters or Quest Monsters */
2942 if (r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) resist = TRUE;
2944 else if (r_ptr->flags7 & RF7_UNIQUE2) resist = TRUE;
2946 else if (m_idx == p_ptr->riding) resist = TRUE;
2948 else if ((p_ptr->inside_quest && !random_quest_number(dun_level)) || p_ptr->inside_arena || p_ptr->inside_battle) resist = TRUE;
2950 else if (player_cast && (r_ptr->level > randint0(power))) resist = TRUE;
2952 else if (player_cast && (m_ptr->mflag2 & MFLAG2_NOGENO)) resist = TRUE;
2954 /* Delete the monster */
2957 if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname)
2961 monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
2962 do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_GENOCIDE, m_name);
2965 delete_monster_idx(m_idx);
2968 if (resist && player_cast)
2970 bool see_m = is_seen(m_ptr);
2973 monster_desc(m_name, m_ptr, 0);
2976 msg_format(_("%^sには効果がなかった。", "%^s is unaffected."), m_name);
2978 if (MON_CSLEEP(m_ptr))
2980 (void)set_monster_csleep(m_idx, 0);
2983 msg_format(_("%^sが目を覚ました。", "%^s wakes up."), m_name);
2986 if (is_friendly(m_ptr) && !is_pet(m_ptr))
2990 msg_format(_("%sは怒った!", "%^s gets angry!"), m_name);
2994 if (one_in_(13)) m_ptr->mflag2 |= MFLAG2_NOGENO;
3000 take_hit(DAMAGE_GENO, randint1(dam_side), format(_("%^sの呪文を唱えた疲労", "the strain of casting %^s"), spell_name), -1);
3003 /* Visual feedback */
3004 move_cursor_relative(py, px);
3007 p_ptr->redraw |= (PR_HP);
3010 p_ptr->window |= (PW_PLAYER);
3019 Term_xtra(TERM_XTRA_DELAY, msec);
3026 * @brief モンスターへのシンボル抹殺処理ルーチン / Delete all non-unique/non-quest monsters of a given "type" from the level
3027 * @param power 抹殺の威力
3028 * @param player_cast プレイヤーの魔法によるものならば TRUE
3029 * @return 効力があった場合TRUEを返す
3031 bool symbol_genocide(int power, bool player_cast)
3035 bool result = FALSE;
3037 /* Prevent genocide in quest levels */
3038 if ((p_ptr->inside_quest && !random_quest_number(dun_level)) || p_ptr->inside_arena || p_ptr->inside_battle)
3043 /* Mega-Hack -- Get a monster symbol */
3044 while (!get_com(_("どの種類(文字)のモンスターを抹殺しますか: ", "Choose a monster race (by symbol) to genocide: "), &typ, FALSE)) ;
3046 /* Delete the monsters of that "type" */
3047 for (i = 1; i < m_max; i++)
3049 monster_type *m_ptr = &m_list[i];
3050 monster_race *r_ptr = &r_info[m_ptr->r_idx];
3052 /* Paranoia -- Skip dead monsters */
3053 if (!m_ptr->r_idx) continue;
3055 /* Skip "wrong" monsters */
3056 if (r_ptr->d_char != typ) continue;
3059 result |= genocide_aux(i, power, player_cast, 4, _("抹殺", "Genocide"));
3064 chg_virtue(V_VITALITY, -2);
3065 chg_virtue(V_CHANCE, -1);
3073 * @brief モンスターへの周辺抹殺処理ルーチン / Delete all nearby (non-unique) monsters
3074 * @param power 抹殺の威力
3075 * @param player_cast プレイヤーの魔法によるものならば TRUE
3076 * @return 効力があった場合TRUEを返す
3078 bool mass_genocide(int power, bool player_cast)
3081 bool result = FALSE;
3083 /* Prevent mass genocide in quest levels */
3084 if ((p_ptr->inside_quest && !random_quest_number(dun_level)) || p_ptr->inside_arena || p_ptr->inside_battle)
3089 /* Delete the (nearby) monsters */
3090 for (i = 1; i < m_max; i++)
3092 monster_type *m_ptr = &m_list[i];
3094 /* Paranoia -- Skip dead monsters */
3095 if (!m_ptr->r_idx) continue;
3097 /* Skip distant monsters */
3098 if (m_ptr->cdis > MAX_SIGHT) continue;
3101 result |= genocide_aux(i, power, player_cast, 3, _("周辺抹殺", "Mass Genocide"));
3106 chg_virtue(V_VITALITY, -2);
3107 chg_virtue(V_CHANCE, -1);
3115 * @brief アンデッド・モンスターへの周辺抹殺処理ルーチン / Delete all nearby (non-unique) undead
3116 * @param power 抹殺の威力
3117 * @param player_cast プレイヤーの魔法によるものならば TRUE
3118 * @return 効力があった場合TRUEを返す
3120 bool mass_genocide_undead(int power, bool player_cast)
3123 bool result = FALSE;
3125 /* Prevent mass genocide in quest levels */
3126 if ((p_ptr->inside_quest && !random_quest_number(dun_level)) || p_ptr->inside_arena || p_ptr->inside_battle)
3131 /* Delete the (nearby) monsters */
3132 for (i = 1; i < m_max; i++)
3134 monster_type *m_ptr = &m_list[i];
3135 monster_race *r_ptr = &r_info[m_ptr->r_idx];
3137 /* Paranoia -- Skip dead monsters */
3138 if (!m_ptr->r_idx) continue;
3140 if (!(r_ptr->flags3 & RF3_UNDEAD)) continue;
3142 /* Skip distant monsters */
3143 if (m_ptr->cdis > MAX_SIGHT) continue;
3146 result |= genocide_aux(i, power, player_cast, 3, _("アンデッド消滅", "Annihilate Undead"));
3151 chg_virtue(V_UNLIFE, -2);
3152 chg_virtue(V_CHANCE, -1);
3160 * @brief 周辺モンスターを調査する / Probe nearby monsters
3161 * @return 効力があった場合TRUEを返す
3176 /* Probe all (nearby) monsters */
3177 for (i = 1; i < m_max; i++)
3179 monster_type *m_ptr = &m_list[i];
3180 monster_race *r_ptr = &r_info[m_ptr->r_idx];
3182 /* Paranoia -- Skip dead monsters */
3183 if (!m_ptr->r_idx) continue;
3185 /* Require line of sight */
3186 if (!player_has_los_bold(m_ptr->fy, m_ptr->fx)) continue;
3188 /* Probe visible monsters */
3193 /* Start the message */
3196 msg_print(_("調査中...", "Probing..."));
3201 if (!is_original_ap(m_ptr))
3203 if (m_ptr->mflag2 & MFLAG2_KAGE)
3204 m_ptr->mflag2 &= ~(MFLAG2_KAGE);
3206 m_ptr->ap_r_idx = m_ptr->r_idx;
3207 lite_spot(m_ptr->fy, m_ptr->fx);
3209 /* Get "the monster" or "something" */
3210 monster_desc(m_name, m_ptr, MD_IGNORE_HALLU | MD_INDEF_HIDDEN);
3212 speed = m_ptr->mspeed - 110;
3213 if (MON_FAST(m_ptr)) speed += 10;
3214 if (MON_SLOW(m_ptr)) speed -= 10;
3216 /* Get the monster's alignment */
3218 if ((r_ptr->flags3 & (RF3_EVIL | RF3_GOOD)) == (RF3_EVIL | RF3_GOOD)) align = "善悪";
3219 else if (r_ptr->flags3 & RF3_EVIL) align = "邪悪";
3220 else if (r_ptr->flags3 & RF3_GOOD) align = "善良";
3221 else if ((m_ptr->sub_align & (SUB_ALIGN_EVIL | SUB_ALIGN_GOOD)) == (SUB_ALIGN_EVIL | SUB_ALIGN_GOOD)) align = "中立(善悪)";
3222 else if (m_ptr->sub_align & SUB_ALIGN_EVIL) align = "中立(邪悪)";
3223 else if (m_ptr->sub_align & SUB_ALIGN_GOOD) align = "中立(善良)";
3226 if ((r_ptr->flags3 & (RF3_EVIL | RF3_GOOD)) == (RF3_EVIL | RF3_GOOD)) align = "good&evil";
3227 else if (r_ptr->flags3 & RF3_EVIL) align = "evil";
3228 else if (r_ptr->flags3 & RF3_GOOD) align = "good";
3229 else if ((m_ptr->sub_align & (SUB_ALIGN_EVIL | SUB_ALIGN_GOOD)) == (SUB_ALIGN_EVIL | SUB_ALIGN_GOOD)) align = "neutral(good&evil)";
3230 else if (m_ptr->sub_align & SUB_ALIGN_EVIL) align = "neutral(evil)";
3231 else if (m_ptr->sub_align & SUB_ALIGN_GOOD) align = "neutral(good)";
3232 else align = "neutral";
3235 /* Describe the monster */
3237 sprintf(buf,"%s ... 属性:%s HP:%d/%d AC:%d 速度:%s%d 経験:", m_name, align, m_ptr->hp, m_ptr->maxhp, r_ptr->ac, (speed > 0) ? "+" : "", speed);
3239 sprintf(buf, "%s ... align:%s HP:%d/%d AC:%d speed:%s%d exp:", m_name, align, m_ptr->hp, m_ptr->maxhp, r_ptr->ac, (speed > 0) ? "+" : "", speed);
3241 if (r_ptr->next_r_idx)
3243 strcat(buf, format("%d/%d ", m_ptr->exp, r_ptr->next_exp));
3247 strcat(buf, "xxx ");
3251 if (MON_CSLEEP(m_ptr)) strcat(buf,"睡眠 ");
3252 if (MON_STUNNED(m_ptr)) strcat(buf,"朦朧 ");
3253 if (MON_MONFEAR(m_ptr)) strcat(buf,"恐怖 ");
3254 if (MON_CONFUSED(m_ptr)) strcat(buf,"混乱 ");
3255 if (MON_INVULNER(m_ptr)) strcat(buf,"無敵 ");
3257 if (MON_CSLEEP(m_ptr)) strcat(buf,"sleeping ");
3258 if (MON_STUNNED(m_ptr)) strcat(buf,"stunned ");
3259 if (MON_MONFEAR(m_ptr)) strcat(buf,"scared ");
3260 if (MON_CONFUSED(m_ptr)) strcat(buf,"confused ");
3261 if (MON_INVULNER(m_ptr)) strcat(buf,"invulnerable ");
3263 buf[strlen(buf)-1] = '\0';
3266 /* HACK : Add the line to message buffer */
3268 p_ptr->window |= (PW_MESSAGE);
3271 if (m_ptr->ml) move_cursor_relative(m_ptr->fy, m_ptr->fx);
3274 Term_erase(0, 0, 255);
3276 /* Learn everything about this monster */
3277 if (lore_do_probe(m_ptr->r_idx))
3281 /* Get base name of monster */
3282 strcpy(buf, (r_name + r_ptr->name));
3285 /* Note that we learnt some new flags -Mogami- */
3286 msg_format("%sについてさらに詳しくなった気がする。", buf);
3291 /* Note that we learnt some new flags -Mogami- */
3292 msg_format("You now know more about %s.", buf);
3294 /* Clear -more- prompt */
3310 chg_virtue(V_KNOWLEDGE, 1);
3311 msg_print(_("これで全部です。", "That's all."));
3321 * @brief *破壊*処理を行う / The spell of destruction
3322 * @param y1 破壊の中心Y座標
3323 * @param x1 破壊の中心X座標
3325 * @param in_generate ダンジョンフロア生成中の処理ならばTRUE
3326 * @return 効力があった場合TRUEを返す
3329 * This spell "deletes" monsters (instead of "killing" them).
3331 * Later we may use one function for both "destruction" and
3332 * "earthquake" by using the "full" to select "destruction".
3335 bool destroy_area(int y1, int x1, int r, bool in_generate)
3341 /* Prevent destruction of quest levels and town */
3342 if ((p_ptr->inside_quest && is_fixed_quest_idx(p_ptr->inside_quest)) || !dun_level)
3347 /* Lose monster light */
3348 if (!in_generate) clear_mon_lite();
3350 /* Big area of affect */
3351 for (y = (y1 - r); y <= (y1 + r); y++)
3353 for (x = (x1 - r); x <= (x1 + r); x++)
3355 /* Skip illegal grids */
3356 if (!in_bounds(y, x)) continue;
3358 /* Extract the distance */
3359 k = distance(y1, x1, y, x);
3361 /* Stay in the circle of death */
3362 if (k > r) continue;
3364 /* Access the grid */
3365 c_ptr = &cave[y][x];
3367 /* Lose room and vault */
3368 c_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
3370 /* Lose light and knowledge */
3371 c_ptr->info &= ~(CAVE_MARK | CAVE_GLOW | CAVE_KNOWN);
3373 if (!in_generate) /* Normal */
3376 c_ptr->info &= ~(CAVE_UNSAFE);
3378 /* Hack -- Notice player affect */
3379 if (player_bold(y, x))
3381 /* Hurt the player later */
3384 /* Do not hurt this grid */
3389 /* Hack -- Skip the epicenter */
3390 if ((y == y1) && (x == x1)) continue;
3394 monster_type *m_ptr = &m_list[c_ptr->m_idx];
3395 monster_race *r_ptr = &r_info[m_ptr->r_idx];
3397 if (in_generate) /* In generation */
3399 /* Delete the monster (if any) */
3400 delete_monster(y, x);
3402 else if (r_ptr->flags1 & RF1_QUESTOR)
3404 /* Heal the monster */
3405 m_ptr->hp = m_ptr->maxhp;
3407 /* Try to teleport away quest monsters */
3408 if (!teleport_away(c_ptr->m_idx, (r * 2) + 1, TELEPORT_DEC_VALOUR)) continue;
3412 if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname)
3416 monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
3417 do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_DESTROY, m_name);
3420 /* Delete the monster (if any) */
3421 delete_monster(y, x);
3425 /* During generation, destroyed artifacts are "preserved" */
3426 if (preserve_mode || in_generate)
3428 s16b this_o_idx, next_o_idx = 0;
3430 /* Scan all objects in the grid */
3431 for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
3435 /* Acquire object */
3436 o_ptr = &o_list[this_o_idx];
3438 /* Acquire next object */
3439 next_o_idx = o_ptr->next_o_idx;
3441 /* Hack -- Preserve unknown artifacts */
3442 if (object_is_fixed_artifact(o_ptr) && (!object_is_known(o_ptr) || in_generate))
3444 /* Mega-Hack -- Preserve the artifact */
3445 a_info[o_ptr->name1].cur_num = 0;
3447 if (in_generate && cheat_peek)
3449 char o_name[MAX_NLEN];
3450 object_desc(o_name, o_ptr, (OD_NAME_ONLY | OD_STORE));
3451 msg_format(_("伝説のアイテム (%s) は生成中に*破壊*された。", "Artifact (%s) was *destroyed* during generation."), o_name);
3454 else if (in_generate && cheat_peek && o_ptr->art_name)
3456 msg_print(_("ランダム・アーティファクトの1つは生成中に*破壊*された。",
3457 "One of the random artifacts was *destroyed* during generation."));
3462 /* Delete objects */
3463 delete_object(y, x);
3465 /* Destroy "non-permanent" grids */
3466 if (!cave_perma_grid(c_ptr))
3468 /* Wall (or floor) type */
3471 if (!in_generate) /* Normal */
3475 /* Create granite wall */
3476 cave_set_feat(y, x, feat_granite);
3480 /* Create quartz vein */
3481 cave_set_feat(y, x, feat_quartz_vein);
3485 /* Create magma vein */
3486 cave_set_feat(y, x, feat_magma_vein);
3491 cave_set_feat(y, x, floor_type[randint0(100)]);
3494 else /* In generation */
3498 /* Create granite wall */
3499 place_extra_grid(c_ptr);
3503 /* Create quartz vein */
3504 c_ptr->feat = feat_quartz_vein;
3508 /* Create magma vein */
3509 c_ptr->feat = feat_magma_vein;
3514 place_floor_grid(c_ptr);
3517 /* Clear garbage of hidden trap or door */
3526 /* Process "re-glowing" */
3527 for (y = (y1 - r); y <= (y1 + r); y++)
3529 for (x = (x1 - r); x <= (x1 + r); x++)
3531 /* Skip illegal grids */
3532 if (!in_bounds(y, x)) continue;
3534 /* Extract the distance */
3535 k = distance(y1, x1, y, x);
3537 /* Stay in the circle of death */
3538 if (k > r) continue;
3540 /* Access the grid */
3541 c_ptr = &cave[y][x];
3543 if (is_mirror_grid(c_ptr)) c_ptr->info |= CAVE_GLOW;
3544 else if (!(d_info[dungeon_type].flags1 & DF1_DARKNESS))
3549 for (i = 0; i < 9; i++)
3551 yy = y + ddy_ddd[i];
3552 xx = x + ddx_ddd[i];
3553 if (!in_bounds2(yy, xx)) continue;
3554 cc_ptr = &cave[yy][xx];
3555 if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW))
3557 c_ptr->info |= CAVE_GLOW;
3565 /* Hack -- Affect player */
3569 msg_print(_("燃えるような閃光が発生した!", "There is a searing blast of light!"));
3571 /* Blind the player */
3572 if (!p_ptr->resist_blind && !p_ptr->resist_lite)
3575 (void)set_blind(p_ptr->blind + 10 + randint1(10));
3581 /* Mega-Hack -- Forget the view and lite */
3582 p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE);
3585 p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE | PU_MONSTERS);
3588 p_ptr->redraw |= (PR_MAP);
3591 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
3593 if (p_ptr->special_defense & NINJA_S_STEALTH)
3595 if (cave[py][px].info & CAVE_GLOW) set_superstealth(FALSE);
3605 * @brief 地震処理(サブルーチン) /
3606 * Induce an "earthquake" of the given radius at the given location.
3607 * @return 効力があった場合TRUEを返す
3611 * @param m_idx 地震を起こしたモンスターID(0ならばプレイヤー)
3615 * This will turn some walls into floors and some floors into walls.
3617 * The player will take damage and "jump" into a safe grid if possible,
3618 * otherwise, he will "tunnel" through the rubble instantaneously.
3620 * Monsters will take damage, and "jump" into a safe grid if possible,
3621 * otherwise they will be "buried" in the rubble, disappearing from
3622 * the level in the same way that they do when genocided.
3624 * Note that thus the player and monsters (except eaters of walls and
3625 * passers through walls) will never occupy the same grid as a wall.
3626 * Note that as of now (2.7.8) no monster may occupy a "wall" grid, even
3627 * for a single turn, unless that monster can pass_walls or kill_walls.
3628 * This has allowed massive simplification of the "monster" code.
3631 bool earthquake_aux(int cy, int cx, int r, int m_idx)
3633 int i, t, y, x, yy, xx, dy, dx;
3635 int sn = 0, sy = 0, sx = 0;
3641 /* Prevent destruction of quest levels and town */
3642 if ((p_ptr->inside_quest && is_fixed_quest_idx(p_ptr->inside_quest)) || !dun_level)
3647 /* Paranoia -- Enforce maximum range */
3650 /* Clear the "maximal blast" area */
3651 for (y = 0; y < 32; y++)
3653 for (x = 0; x < 32; x++)
3659 /* Check around the epicenter */
3660 for (dy = -r; dy <= r; dy++)
3662 for (dx = -r; dx <= r; dx++)
3664 /* Extract the location */
3668 /* Skip illegal grids */
3669 if (!in_bounds(yy, xx)) continue;
3671 /* Skip distant grids */
3672 if (distance(cy, cx, yy, xx) > r) continue;
3674 /* Access the grid */
3675 c_ptr = &cave[yy][xx];
3677 /* Lose room and vault */
3678 c_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY | CAVE_UNSAFE);
3680 /* Lose light and knowledge */
3681 c_ptr->info &= ~(CAVE_GLOW | CAVE_MARK | CAVE_KNOWN);
3683 /* Skip the epicenter */
3684 if (!dx && !dy) continue;
3686 /* Skip most grids */
3687 if (randint0(100) < 85) continue;
3689 /* Damage this grid */
3690 map[16+yy-cy][16+xx-cx] = TRUE;
3692 /* Hack -- Take note of player damage */
3693 if (player_bold(yy, xx)) hurt = TRUE;
3697 /* First, affect the player (if necessary) */
3698 if (hurt && !p_ptr->pass_wall && !p_ptr->kill_wall)
3700 /* Check around the player */
3701 for (i = 0; i < 8; i++)
3703 /* Access the location */
3704 y = py + ddy_ddd[i];
3705 x = px + ddx_ddd[i];
3707 /* Skip non-empty grids */
3708 if (!cave_empty_bold(y, x)) continue;
3710 /* Important -- Skip "quake" grids */
3711 if (map[16+y-cy][16+x-cx]) continue;
3713 if (cave[y][x].m_idx) continue;
3715 /* Count "safe" grids */
3718 /* Randomize choice */
3719 if (randint0(sn) > 0) continue;
3721 /* Save the safe location */
3725 /* Random message */
3726 switch (randint1(3))
3730 msg_print(_("ダンジョンの壁が崩れた!", "The cave ceiling collapses!"));
3735 msg_print(_("ダンジョンの床が不自然にねじ曲がった!", "The cave floor twists in an unnatural way!"));
3740 msg_print(_("ダンジョンが揺れた!崩れた岩が頭に降ってきた!", "The cave quakes! You are pummeled with debris!"));
3745 /* Hurt the player a lot */
3748 /* Message and damage */
3749 msg_print(_("あなたはひどい怪我を負った!", "You are severely crushed!"));
3753 /* Destroy the grid, and push the player to safety */
3756 /* Calculate results */
3757 switch (randint1(3))
3761 msg_print(_("降り注ぐ岩をうまく避けた!", "You nimbly dodge the blast!"));
3767 msg_print(_("岩石があなたに直撃した!", "You are bashed by rubble!"));
3768 damage = damroll(10, 4);
3769 (void)set_stun(p_ptr->stun + randint1(50));
3774 msg_print(_("あなたは床と壁との間に挟まれてしまった!", "You are crushed between the floor and ceiling!"));
3775 damage = damroll(10, 4);
3776 (void)set_stun(p_ptr->stun + randint1(50));
3781 /* Move the player to the safe location */
3782 (void)move_player_effect(sy, sx, MPE_DONT_PICKUP);
3785 /* Important -- no wall on player */
3786 map[16+py-cy][16+px-cx] = FALSE;
3788 /* Take some damage */
3796 monster_type *m_ptr = &m_list[m_idx];
3798 /* Get the monster's real name */
3799 monster_desc(m_name, m_ptr, MD_IGNORE_HALLU | MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE);
3801 killer = format(_("%sの起こした地震", "an earthquake caused by %s"), m_name);
3805 killer = _("地震", "an earthquake");
3808 take_hit(DAMAGE_ATTACK, damage, killer, -1);
3812 /* Examine the quaked region */
3813 for (dy = -r; dy <= r; dy++)
3815 for (dx = -r; dx <= r; dx++)
3817 /* Extract the location */
3821 /* Skip unaffected grids */
3822 if (!map[16+yy-cy][16+xx-cx]) continue;
3824 /* Access the grid */
3825 c_ptr = &cave[yy][xx];
3827 if (c_ptr->m_idx == p_ptr->riding) continue;
3829 /* Process monsters */
3832 monster_type *m_ptr = &m_list[c_ptr->m_idx];
3833 monster_race *r_ptr = &r_info[m_ptr->r_idx];
3835 /* Quest monsters */
3836 if (r_ptr->flags1 & RF1_QUESTOR)
3838 /* No wall on quest monsters */
3839 map[16+yy-cy][16+xx-cx] = FALSE;
3844 /* Most monsters cannot co-exist with rock */
3845 if (!(r_ptr->flags2 & (RF2_KILL_WALL)) &&
3846 !(r_ptr->flags2 & (RF2_PASS_WALL)))
3850 /* Assume not safe */
3853 /* Monster can move to escape the wall */
3854 if (!(r_ptr->flags1 & (RF1_NEVER_MOVE)))
3856 /* Look for safety */
3857 for (i = 0; i < 8; i++)
3859 /* Access the grid */
3860 y = yy + ddy_ddd[i];
3861 x = xx + ddx_ddd[i];
3863 /* Skip non-empty grids */
3864 if (!cave_empty_bold(y, x)) continue;
3866 /* Hack -- no safety on glyph of warding */
3867 if (is_glyph_grid(&cave[y][x])) continue;
3868 if (is_explosive_rune_grid(&cave[y][x])) continue;
3870 /* ... nor on the Pattern */
3871 if (pattern_tile(y, x)) continue;
3873 /* Important -- Skip "quake" grids */
3874 if (map[16+y-cy][16+x-cx]) continue;
3876 if (cave[y][x].m_idx) continue;
3877 if (player_bold(y, x)) continue;
3879 /* Count "safe" grids */
3882 /* Randomize choice */
3883 if (randint0(sn) > 0) continue;
3885 /* Save the safe grid */
3890 /* Describe the monster */
3891 monster_desc(m_name, m_ptr, 0);
3893 /* Scream in pain */
3894 if (!ignore_unview || is_seen(m_ptr)) msg_format(_("%^sは苦痛で泣きわめいた!", "%^s wails out in pain!"), m_name);
3896 /* Take damage from the quake */
3897 damage = (sn ? damroll(4, 8) : (m_ptr->hp + 1));
3899 /* Monster is certainly awake */
3900 (void)set_monster_csleep(c_ptr->m_idx, 0);
3902 /* Apply damage directly */
3903 m_ptr->hp -= damage;
3905 /* Delete (not kill) "dead" monsters */
3909 if (!ignore_unview || is_seen(m_ptr))
3910 msg_format(_("%^sは岩石に埋もれてしまった!", "%^s is embedded in the rock!"), m_name);
3914 if (record_named_pet && is_pet(&m_list[c_ptr->m_idx]) && m_list[c_ptr->m_idx].nickname)
3918 monster_desc(m2_name, m_ptr, MD_INDEF_VISIBLE);
3919 do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_EARTHQUAKE, m2_name);
3923 /* Delete the monster */
3924 delete_monster(yy, xx);
3926 /* No longer safe */
3930 /* Hack -- Escape from the rock */
3933 int m_idx = cave[yy][xx].m_idx;
3935 /* Update the old location */
3936 cave[yy][xx].m_idx = 0;
3938 /* Update the new location */
3939 cave[sy][sx].m_idx = m_idx;
3941 /* Move the monster */
3945 /* Update the monster (new location) */
3946 update_mon(m_idx, TRUE);
3948 /* Redraw the old grid */
3951 /* Redraw the new grid */
3959 /* Lose monster light */
3962 /* Examine the quaked region */
3963 for (dy = -r; dy <= r; dy++)
3965 for (dx = -r; dx <= r; dx++)
3967 /* Extract the location */
3971 /* Skip unaffected grids */
3972 if (!map[16+yy-cy][16+xx-cx]) continue;
3974 /* Access the cave grid */
3975 c_ptr = &cave[yy][xx];
3977 /* Paranoia -- never affect player */
3978 /* if (player_bold(yy, xx)) continue; */
3980 /* Destroy location (if valid) */
3981 if (cave_valid_bold(yy, xx))
3983 /* Delete objects */
3984 delete_object(yy, xx);
3986 /* Wall (or floor) type */
3987 t = cave_have_flag_bold(yy, xx, FF_PROJECT) ? randint0(100) : 200;
3992 /* Create granite wall */
3993 cave_set_feat(yy, xx, feat_granite);
3999 /* Create quartz vein */
4000 cave_set_feat(yy, xx, feat_quartz_vein);
4006 /* Create magma vein */
4007 cave_set_feat(yy, xx, feat_magma_vein);
4014 cave_set_feat(yy, xx, floor_type[randint0(100)]);
4021 /* Process "re-glowing" */
4022 for (dy = -r; dy <= r; dy++)
4024 for (dx = -r; dx <= r; dx++)
4026 /* Extract the location */
4030 /* Skip illegal grids */
4031 if (!in_bounds(yy, xx)) continue;
4033 /* Skip distant grids */
4034 if (distance(cy, cx, yy, xx) > r) continue;
4036 /* Access the grid */
4037 c_ptr = &cave[yy][xx];
4039 if (is_mirror_grid(c_ptr)) c_ptr->info |= CAVE_GLOW;
4040 else if (!(d_info[dungeon_type].flags1 & DF1_DARKNESS))
4045 for (ii = 0; ii < 9; ii++)
4047 yyy = yy + ddy_ddd[ii];
4048 xxx = xx + ddx_ddd[ii];
4049 if (!in_bounds2(yyy, xxx)) continue;
4050 cc_ptr = &cave[yyy][xxx];
4051 if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW))
4053 c_ptr->info |= CAVE_GLOW;
4062 /* Mega-Hack -- Forget the view and lite */
4063 p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE);
4066 p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE | PU_MONSTERS);
4068 /* Update the health bar */
4069 p_ptr->redraw |= (PR_HEALTH | PR_UHEALTH);
4072 p_ptr->redraw |= (PR_MAP);
4075 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
4077 if (p_ptr->special_defense & NINJA_S_STEALTH)
4079 if (cave[py][px].info & CAVE_GLOW) set_superstealth(FALSE);
4087 * @brief 地震処理(プレイヤーの中心発動) /
4088 * Induce an "earthquake" of the given radius at the given location.
4089 * @return 効力があった場合TRUEを返す
4093 bool earthquake(int cy, int cx, int r)
4095 return earthquake_aux(cy, cx, r, 0);
4102 void discharge_minion(void)
4107 for (i = 1; i < m_max; i++)
4109 monster_type *m_ptr = &m_list[i];
4110 if (!m_ptr->r_idx || !is_pet(m_ptr)) continue;
4111 if (m_ptr->nickname) okay = FALSE;
4113 if (!okay || p_ptr->riding)
4115 if (!get_check(_("本当に全ペットを爆破しますか?", "You will blast all pets. Are you sure? ")))
4118 for (i = 1; i < m_max; i++)
4121 monster_type *m_ptr = &m_list[i];
4122 monster_race *r_ptr;
4124 if (!m_ptr->r_idx || !is_pet(m_ptr)) continue;
4125 r_ptr = &r_info[m_ptr->r_idx];
4127 /* Uniques resist discharging */
4128 if (r_ptr->flags1 & RF1_UNIQUE)
4131 monster_desc(m_name, m_ptr, 0x00);
4132 msg_format(_("%sは爆破されるのを嫌がり、勝手に自分の世界へと帰った。", "%^s resists to be blasted, and run away."), m_name);
4133 delete_monster_idx(i);
4136 dam = m_ptr->maxhp / 2;
4137 if (dam > 100) dam = (dam-100)/2 + 100;
4138 if (dam > 400) dam = (dam-400)/2 + 400;
4139 if (dam > 800) dam = 800;
4140 project(i, 2+(r_ptr->level/20), m_ptr->fy,
4141 m_ptr->fx, dam, GF_PLASMA,
4142 PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL, -1);
4144 if (record_named_pet && m_ptr->nickname)
4148 monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
4149 do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_BLAST, m_name);
4152 delete_monster_idx(i);
4158 * @brief 部屋全体を照らすサブルーチン
4162 * This routine clears the entire "temp" set.
4163 * This routine will Perma-Lite all "temp" grids.
4164 * This routine is used (only) by "lite_room()"
4165 * Dark grids are illuminated.
4166 * Also, process all affected monsters.
4168 * SMART monsters always wake up when illuminated
4169 * NORMAL monsters wake up 1/4 the time when illuminated
4170 * STUPID monsters wake up 1/10 the time when illuminated
4173 static void cave_temp_room_lite(void)
4177 /* Clear them all */
4178 for (i = 0; i < temp_n; i++)
4183 cave_type *c_ptr = &cave[y][x];
4185 /* No longer in the array */
4186 c_ptr->info &= ~(CAVE_TEMP);
4188 /* Update only non-CAVE_GLOW grids */
4189 /* if (c_ptr->info & (CAVE_GLOW)) continue; */
4192 c_ptr->info |= (CAVE_GLOW);
4194 /* Process affected monsters */
4199 monster_type *m_ptr = &m_list[c_ptr->m_idx];
4201 monster_race *r_ptr = &r_info[m_ptr->r_idx];
4203 /* Update the monster */
4204 update_mon(c_ptr->m_idx, FALSE);
4206 /* Stupid monsters rarely wake up */
4207 if (r_ptr->flags2 & (RF2_STUPID)) chance = 10;
4209 /* Smart monsters always wake up */
4210 if (r_ptr->flags2 & (RF2_SMART)) chance = 100;
4212 /* Sometimes monsters wake up */
4213 if (MON_CSLEEP(m_ptr) && (randint0(100) < chance))
4216 (void)set_monster_csleep(c_ptr->m_idx, 0);
4218 /* Notice the "waking up" */
4223 /* Acquire the monster name */
4224 monster_desc(m_name, m_ptr, 0);
4226 /* Dump a message */
4227 msg_format(_("%^sが目を覚ました。", "%^s wakes up."), m_name);
4238 update_local_illumination(y, x);
4248 * @brief 部屋全体を暗くするサブルーチン
4252 * This routine clears the entire "temp" set.
4253 * This routine will "darken" all "temp" grids.
4254 * In addition, some of these grids will be "unmarked".
4255 * This routine is used (only) by "unlite_room()"
4256 * Also, process all affected monsters
4259 static void cave_temp_room_unlite(void)
4263 /* Clear them all */
4264 for (i = 0; i < temp_n; i++)
4270 cave_type *c_ptr = &cave[y][x];
4271 bool do_dark = !is_mirror_grid(c_ptr);
4273 /* No longer in the array */
4274 c_ptr->info &= ~(CAVE_TEMP);
4276 /* Darken the grid */
4279 if (dun_level || !is_daytime())
4281 for (j = 0; j < 9; j++)
4283 int by = y + ddy_ddd[j];
4284 int bx = x + ddx_ddd[j];
4286 if (in_bounds2(by, bx))
4288 cave_type *cc_ptr = &cave[by][bx];
4290 if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW))
4298 if (!do_dark) continue;
4301 c_ptr->info &= ~(CAVE_GLOW);
4303 /* Hack -- Forget "boring" grids */
4304 if (!have_flag(f_info[get_feat_mimic(c_ptr)].flags, FF_REMEMBER))
4306 /* Forget the grid */
4307 if (!view_torch_grids) c_ptr->info &= ~(CAVE_MARK);
4313 /* Process affected monsters */
4316 /* Update the monster */
4317 update_mon(c_ptr->m_idx, FALSE);
4323 update_local_illumination(y, x);
4333 * @brief 周辺に関数ポインタの条件に該当する地形がいくつあるかを計算する / Determine how much contiguous open space this grid is next to
4336 * @param pass_bold 地形条件を返す関数ポインタ
4339 static int next_to_open(int cy, int cx, bool (*pass_bold)(int, int))
4348 for (i = 0; i < 16; i++)
4350 y = cy + ddy_cdd[i % 8];
4351 x = cx + ddx_cdd[i % 8];
4353 /* Found a wall, break the length */
4354 if (!pass_bold(y, x))
4356 /* Track best length */
4370 return (MAX(len, blen));
4374 * @brief 周辺に関数ポインタの条件に該当する地形がいくつあるかを計算する / Determine how much contiguous open space this grid is next to
4377 * @param pass_bold 地形条件を返す関数ポインタ
4380 static int next_to_walls_adj(int cy, int cx, bool (*pass_bold)(int, int))
4388 for (i = 0; i < 8; i++)
4390 y = cy + ddy_ddd[i];
4391 x = cx + ddx_ddd[i];
4393 if (!pass_bold(y, x)) c++;
4401 * @brief 部屋内にある一点の周囲に該当する地形数かいくつあるかをグローバル変数temp_nに返す / Aux function -- see below
4402 * @param y 部屋内のy座標1点
4403 * @param x 部屋内のx座標1点
4404 * @param only_room 部屋内地形のみをチェック対象にするならば TRUE
4405 * @param pass_bold 地形条件を返す関数ポインタ
4408 static void cave_temp_room_aux(int y, int x, bool only_room, bool (*pass_bold)(int, int))
4413 c_ptr = &cave[y][x];
4415 /* Avoid infinite recursion */
4416 if (c_ptr->info & (CAVE_TEMP)) return;
4418 /* Do not "leave" the current room */
4419 if (!(c_ptr->info & (CAVE_ROOM)))
4421 if (only_room) return;
4424 if (!in_bounds2(y, x)) return;
4426 /* Do not exceed the maximum spell range */
4427 if (distance(py, px, y, x) > MAX_RANGE) return;
4429 /* Verify this grid */
4431 * The reason why it is ==6 instead of >5 is that 8 is impossible
4432 * due to the check for cave_bold above.
4433 * 7 lights dead-end corridors (you need to do this for the
4434 * checkboard interesting rooms, so that the boundary is lit
4436 * This leaves only a check for 6 bounding walls!
4438 if (in_bounds(y, x) && pass_bold(y, x) &&
4439 (next_to_walls_adj(y, x, pass_bold) == 6) && (next_to_open(y, x, pass_bold) <= 1)) return;
4442 /* Paranoia -- verify space */
4443 if (temp_n == TEMP_MAX) return;
4445 /* Mark the grid as "seen" */
4446 c_ptr->info |= (CAVE_TEMP);
4448 /* Add it to the "seen" set */
4455 * @brief 指定のマスが光を通すか(LOSフラグを持つか)を返す。 / Aux function -- see below
4458 * @return 光を通すならばtrueを返す。
4460 static bool cave_pass_lite_bold(int y, int x)
4462 return cave_los_bold(y, x);
4466 * @brief 部屋内にある一点の周囲がいくつ光を通すかをグローバル変数temp_nに返す / Aux function -- see below
4471 static void cave_temp_lite_room_aux(int y, int x)
4473 cave_temp_room_aux(y, x, FALSE, cave_pass_lite_bold);
4477 * @brief 指定のマスが光を通さず射線のみを通すかを返す。 / Aux function -- see below
4480 * @return 射線を通すならばtrueを返す。
4482 static bool cave_pass_dark_bold(int y, int x)
4484 return cave_have_flag_bold(y, x, FF_PROJECT);
4489 * @brief 部屋内にある一点の周囲がいくつ射線を通すかをグローバル変数temp_nに返す / Aux function -- see below
4494 static void cave_temp_unlite_room_aux(int y, int x)
4496 cave_temp_room_aux(y, x, TRUE, cave_pass_dark_bold);
4501 * @brief 指定された部屋内を照らす / Illuminate any room containing the given location.
4506 void lite_room(int y1, int x1)
4510 /* Add the initial grid */
4511 cave_temp_lite_room_aux(y1, x1);
4513 /* While grids are in the queue, add their neighbors */
4514 for (i = 0; i < temp_n; i++)
4516 x = temp_x[i], y = temp_y[i];
4518 /* Walls get lit, but stop light */
4519 if (!cave_pass_lite_bold(y, x)) continue;
4521 /* Spread adjacent */
4522 cave_temp_lite_room_aux(y + 1, x);
4523 cave_temp_lite_room_aux(y - 1, x);
4524 cave_temp_lite_room_aux(y, x + 1);
4525 cave_temp_lite_room_aux(y, x - 1);
4527 /* Spread diagonal */
4528 cave_temp_lite_room_aux(y + 1, x + 1);
4529 cave_temp_lite_room_aux(y - 1, x - 1);
4530 cave_temp_lite_room_aux(y - 1, x + 1);
4531 cave_temp_lite_room_aux(y + 1, x - 1);
4534 /* Now, lite them all up at once */
4535 cave_temp_room_lite();
4537 if (p_ptr->special_defense & NINJA_S_STEALTH)
4539 if (cave[py][px].info & CAVE_GLOW) set_superstealth(FALSE);
4545 * @brief 指定された部屋内を暗くする / Darken all rooms containing the given location
4550 void unlite_room(int y1, int x1)
4554 /* Add the initial grid */
4555 cave_temp_unlite_room_aux(y1, x1);
4557 /* Spread, breadth first */
4558 for (i = 0; i < temp_n; i++)
4560 x = temp_x[i], y = temp_y[i];
4562 /* Walls get dark, but stop darkness */
4563 if (!cave_pass_dark_bold(y, x)) continue;
4565 /* Spread adjacent */
4566 cave_temp_unlite_room_aux(y + 1, x);
4567 cave_temp_unlite_room_aux(y - 1, x);
4568 cave_temp_unlite_room_aux(y, x + 1);
4569 cave_temp_unlite_room_aux(y, x - 1);
4571 /* Spread diagonal */
4572 cave_temp_unlite_room_aux(y + 1, x + 1);
4573 cave_temp_unlite_room_aux(y - 1, x - 1);
4574 cave_temp_unlite_room_aux(y - 1, x + 1);
4575 cave_temp_unlite_room_aux(y + 1, x - 1);
4578 /* Now, darken them all at once */
4579 cave_temp_room_unlite();
4585 * @brief プレイヤー位置を中心にLITE_WEAK属性を通じた照明処理を行う / Hack -- call light around the player Affect all monsters in the projection radius
4588 * @return 作用が実際にあった場合TRUEを返す
4590 bool lite_area(int dam, int rad)
4592 int flg = PROJECT_GRID | PROJECT_KILL;
4594 if (d_info[dungeon_type].flags1 & DF1_DARKNESS)
4596 msg_print(_("ダンジョンが光を吸収した。", "The darkness of this dungeon absorb your light."));
4600 /* Hack -- Message */
4603 msg_print(_("白い光が辺りを覆った。", "You are surrounded by a white light."));
4606 /* Hook into the "project()" function */
4607 (void)project(0, rad, py, px, dam, GF_LITE_WEAK, flg, -1);
4609 /* Lite up the room */
4618 * @brief プレイヤー位置を中心にLITE_DARK属性を通じた消灯処理を行う / Hack -- call light around the player Affect all monsters in the projection radius
4621 * @return 作用が実際にあった場合TRUEを返す
4623 bool unlite_area(int dam, int rad)
4625 int flg = PROJECT_GRID | PROJECT_KILL;
4627 /* Hack -- Message */
4630 msg_print(_("暗闇が辺りを覆った。", "Darkness surrounds you."));
4633 /* Hook into the "project()" function */
4634 (void)project(0, rad, py, px, dam, GF_DARK_WEAK, flg, -1);
4636 /* Lite up the room */
4637 unlite_room(py, px);
4646 * @brief ボール系スペルの発動 / Cast a ball spell
4648 * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
4651 * @return 作用が実際にあった場合TRUEを返す
4654 * Stop if we hit a monster, act as a "ball"
4655 * Allow "target" mode to pass over monsters
4656 * Affect grids, objects, and monsters
4659 bool fire_ball(int typ, int dir, int dam, int rad)
4663 int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
4665 if (typ == GF_CONTROL_LIVING) flg|= PROJECT_HIDE;
4666 /* Use the given direction */
4667 tx = px + 99 * ddx[dir];
4668 ty = py + 99 * ddy[dir];
4670 /* Hack -- Use an actual "target" */
4671 if ((dir == 5) && target_okay())
4673 flg &= ~(PROJECT_STOP);
4678 /* Analyze the "dir" and the "target". Hurt items on floor. */
4679 return (project(0, rad, ty, tx, dam, typ, flg, -1));
4685 * @brief ロケット系スペルの発動(詳細な差は確認中) / Cast a ball spell
4687 * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
4690 * @return 作用が実際にあった場合TRUEを返す
4693 * Stop if we hit a monster, act as a "ball"
4694 * Allow "target" mode to pass over monsters
4695 * Affect grids, objects, and monsters
4698 bool fire_rocket(int typ, int dir, int dam, int rad)
4702 int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
4704 /* Use the given direction */
4705 tx = px + 99 * ddx[dir];
4706 ty = py + 99 * ddy[dir];
4708 /* Hack -- Use an actual "target" */
4709 if ((dir == 5) && target_okay())
4715 /* Analyze the "dir" and the "target". Hurt items on floor. */
4716 return (project(0, rad, ty, tx, dam, typ, flg, -1));
4721 * @brief ボール(ハイド)系スペルの発動 / Cast a ball spell
4723 * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
4726 * @return 作用が実際にあった場合TRUEを返す
4729 * Stop if we hit a monster, act as a "ball"
4730 * Allow "target" mode to pass over monsters
4731 * Affect grids, objects, and monsters
4734 bool fire_ball_hide(int typ, int dir, int dam, int rad)
4738 int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_HIDE;
4740 /* Use the given direction */
4741 tx = px + 99 * ddx[dir];
4742 ty = py + 99 * ddy[dir];
4744 /* Hack -- Use an actual "target" */
4745 if ((dir == 5) && target_okay())
4747 flg &= ~(PROJECT_STOP);
4752 /* Analyze the "dir" and the "target". Hurt items on floor. */
4753 return (project(0, rad, ty, tx, dam, typ, flg, -1));
4758 * @brief メテオ系スペルの発動 / Cast a meteor spell
4759 * @param who スぺル詠唱者のモンスターID(0=プレイヤー)
4761 * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
4764 * @return 作用が実際にあった場合TRUEを返す
4767 * Cast a meteor spell, defined as a ball spell cast by an arbitary monster,
4768 * player, or outside source, that starts out at an arbitrary location, and
4769 * leaving no trail from the "caster" to the target. This function is
4770 * especially useful for bombardments and similar. -LM-
4772 * Option to hurt the player.
4775 bool fire_meteor(int who, int typ, int y, int x, int dam, int rad)
4777 int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
4779 /* Analyze the "target" and the caster. */
4780 return (project(who, rad, y, x, dam, typ, flg, -1));
4785 * @brief ブラスト系スペルの発動 / Cast a blast spell
4786 * @param who スぺル詠唱者のモンスターID(0=プレイヤー)
4788 * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
4793 * @return 作用が実際にあった場合TRUEを返す
4795 bool fire_blast(int typ, int dir, int dd, int ds, int num, int dev)
4801 int flg = PROJECT_FAST | PROJECT_THRU | PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE | PROJECT_GRID;
4806 /* Use the given direction */
4809 ly = ty = py + 20 * ddy[dir];
4810 lx = tx = px + 20 * ddx[dir];
4813 /* Use an actual "target" */
4814 else /* if (dir == 5) */
4819 lx = 20 * (tx - px) + px;
4820 ly = 20 * (ty - py) + py;
4823 ld = distance(py, px, ly, lx);
4826 for (i = 0; i < num; i++)
4830 /* Get targets for some bolts */
4831 y = rand_spread(ly, ld * dev / 20);
4832 x = rand_spread(lx, ld * dev / 20);
4834 if (distance(ly, lx, y, x) <= ld * dev / 20) break;
4837 /* Analyze the "dir" and the "target". */
4838 if (!project(0, 0, y, x, damroll(dd, ds), typ, flg, -1))
4849 * @brief モンスターとの位置交換処理 / Switch position with a monster.
4850 * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
4851 * @return 作用が実際にあった場合TRUEを返す
4853 bool teleport_swap(int dir)
4857 monster_type * m_ptr;
4858 monster_race * r_ptr;
4860 if ((dir == 5) && target_okay())
4870 c_ptr = &cave[ty][tx];
4872 if (p_ptr->anti_tele)
4874 msg_print(_("不思議な力がテレポートを防いだ!", "A mysterious force prevents you from teleporting!"));
4878 if (!c_ptr->m_idx || (c_ptr->m_idx == p_ptr->riding))
4880 msg_print(_("それとは場所を交換できません。", "You can't trade places with that!"));
4886 if ((c_ptr->info & CAVE_ICKY) || (distance(ty, tx, py, px) > p_ptr->lev * 3 / 2 + 10))
4888 msg_print(_("失敗した。", "Failed to swap."));
4894 m_ptr = &m_list[c_ptr->m_idx];
4895 r_ptr = &r_info[m_ptr->r_idx];
4897 (void)set_monster_csleep(c_ptr->m_idx, 0);
4899 if (r_ptr->flagsr & RFR_RES_TELE)
4901 msg_print(_("テレポートを邪魔された!", "Your teleportation is blocked!"));
4903 if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
4909 sound(SOUND_TELEPORT);
4911 /* Swap the player and monster */
4912 (void)move_player_effect(ty, tx, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
4920 * @brief 指定方向に飛び道具を飛ばす(フラグ任意指定) / Hack -- apply a "projection()" in a direction (or at the target)
4922 * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
4925 * @return 作用が実際にあった場合TRUEを返す
4927 bool project_hook(int typ, int dir, int dam, int flg)
4931 /* Pass through the target if needed */
4932 flg |= (PROJECT_THRU);
4934 /* Use the given direction */
4938 /* Hack -- Use an actual "target" */
4939 if ((dir == 5) && target_okay())
4945 /* Analyze the "dir" and the "target", do NOT explode */
4946 return (project(0, 0, ty, tx, dam, typ, flg, -1));
4951 * Cast a bolt spell.
4952 * Stop if we hit a monster, as a "bolt".
4953 * Affect monsters and grids (not objects).
4955 bool fire_bolt(int typ, int dir, int dam)
4957 int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_GRID;
4958 if (typ != GF_ARROW) flg |= PROJECT_REFLECTABLE;
4959 return (project_hook(typ, dir, dam, flg));
4964 * Cast a beam spell.
4965 * Pass through monsters, as a "beam".
4966 * Affect monsters, grids and objects.
4968 bool fire_beam(int typ, int dir, int dam)
4970 int flg = PROJECT_BEAM | PROJECT_KILL | PROJECT_GRID | PROJECT_ITEM;
4971 return (project_hook(typ, dir, dam, flg));
4976 * Cast a bolt spell, or rarely, a beam spell
4978 bool fire_bolt_or_beam(int prob, int typ, int dir, int dam)
4980 if (randint0(100) < prob)
4982 return (fire_beam(typ, dir, dam));
4986 return (fire_bolt(typ, dir, dam));
4992 * Some of the old functions
4994 bool lite_line(int dir, int dam)
4996 int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_KILL;
4997 return (project_hook(GF_LITE_WEAK, dir, dam, flg));
5001 bool drain_life(int dir, int dam)
5003 int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
5004 return (project_hook(GF_OLD_DRAIN, dir, dam, flg));
5008 bool wall_to_mud(int dir, int dam)
5010 int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
5011 return (project_hook(GF_KILL_WALL, dir, dam, flg));
5015 bool wizard_lock(int dir)
5017 int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
5018 return (project_hook(GF_JAM_DOOR, dir, 20 + randint1(30), flg));
5022 bool destroy_door(int dir)
5024 int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
5025 return (project_hook(GF_KILL_DOOR, dir, 0, flg));
5029 bool disarm_trap(int dir)
5031 int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
5032 return (project_hook(GF_KILL_TRAP, dir, 0, flg));
5036 bool heal_monster(int dir, int dam)
5038 int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
5039 return (project_hook(GF_OLD_HEAL, dir, dam, flg));
5043 bool speed_monster(int dir, int power)
5045 int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
5046 return (project_hook(GF_OLD_SPEED, dir, power, flg));
5050 bool slow_monster(int dir, int power)
5052 int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
5053 return (project_hook(GF_OLD_SLOW, dir, power, flg));
5057 bool sleep_monster(int dir, int power)
5059 int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
5060 return (project_hook(GF_OLD_SLEEP, dir, power, flg));
5064 bool stasis_monster(int dir)
5066 return (fire_ball_hide(GF_STASIS, dir, p_ptr->lev*2, 0));
5070 bool stasis_evil(int dir)
5072 return (fire_ball_hide(GF_STASIS_EVIL, dir, p_ptr->lev*2, 0));
5076 bool confuse_monster(int dir, int plev)
5078 int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
5079 return (project_hook(GF_OLD_CONF, dir, plev, flg));
5083 bool stun_monster(int dir, int plev)
5085 int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
5086 return (project_hook(GF_STUN, dir, plev, flg));
5090 bool poly_monster(int dir, int power)
5092 int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
5093 bool tester = (project_hook(GF_OLD_POLY, dir, power, flg));
5095 chg_virtue(V_CHANCE, 1);
5100 bool clone_monster(int dir)
5102 int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
5103 return (project_hook(GF_OLD_CLONE, dir, 0, flg));
5107 bool fear_monster(int dir, int plev)
5109 int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
5110 return (project_hook(GF_TURN_ALL, dir, plev, flg));
5114 bool death_ray(int dir, int plev)
5116 int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
5117 return (project_hook(GF_DEATH_RAY, dir, plev * 200, flg));
5121 bool teleport_monster(int dir, int distance)
5123 int flg = PROJECT_BEAM | PROJECT_KILL;
5124 return (project_hook(GF_AWAY_ALL, dir, distance, flg));
5128 * Hooks -- affect adjacent grids (radius 1 ball attack)
5130 bool door_creation(void)
5132 int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
5133 return (project(0, 1, py, px, 0, GF_MAKE_DOOR, flg, -1));
5137 bool trap_creation(int y, int x)
5139 int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
5140 return (project(0, 1, y, x, 0, GF_MAKE_TRAP, flg, -1));
5144 bool tree_creation(void)
5146 int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
5147 return (project(0, 1, py, px, 0, GF_MAKE_TREE, flg, -1));
5151 bool glyph_creation(void)
5153 int flg = PROJECT_GRID | PROJECT_ITEM;
5154 return (project(0, 1, py, px, 0, GF_MAKE_GLYPH, flg, -1));
5158 bool wall_stone(void)
5160 int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
5162 bool dummy = (project(0, 1, py, px, 0, GF_STONE_WALL, flg, -1));
5165 p_ptr->update |= (PU_FLOW);
5168 p_ptr->redraw |= (PR_MAP);
5174 bool destroy_doors_touch(void)
5176 int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
5177 return (project(0, 1, py, px, 0, GF_KILL_DOOR, flg, -1));
5180 bool disarm_traps_touch(void)
5182 int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
5183 return (project(0, 1, py, px, 0, GF_KILL_TRAP, flg, -1));
5186 bool sleep_monsters_touch(void)
5188 int flg = PROJECT_KILL | PROJECT_HIDE;
5189 return (project(0, 1, py, px, p_ptr->lev, GF_OLD_SLEEP, flg, -1));
5193 bool animate_dead(int who, int y, int x)
5195 int flg = PROJECT_ITEM | PROJECT_HIDE;
5196 return (project(who, 5, y, x, 0, GF_ANIM_DEAD, flg, -1));
5200 void call_chaos(void)
5202 int Chaos_type, dummy, dir;
5203 int plev = p_ptr->lev;
5204 bool line_chaos = FALSE;
5206 int hurt_types[31] =
5208 GF_ELEC, GF_POIS, GF_ACID, GF_COLD,
5209 GF_FIRE, GF_MISSILE, GF_ARROW, GF_PLASMA,
5210 GF_HOLY_FIRE, GF_WATER, GF_LITE, GF_DARK,
5211 GF_FORCE, GF_INERTIA, GF_MANA, GF_METEOR,
5212 GF_ICE, GF_CHAOS, GF_NETHER, GF_DISENCHANT,
5213 GF_SHARDS, GF_SOUND, GF_NEXUS, GF_CONFUSION,
5214 GF_TIME, GF_GRAVITY, GF_ROCKET, GF_NUKE,
5215 GF_HELL_FIRE, GF_DISINTEGRATE, GF_PSY_SPEAR
5218 Chaos_type = hurt_types[randint0(31)];
5219 if (one_in_(4)) line_chaos = TRUE;
5223 for (dummy = 1; dummy < 10; dummy++)
5228 fire_beam(Chaos_type, dummy, 150);
5230 fire_ball(Chaos_type, dummy, 150, 2);
5234 else if (one_in_(3))
5236 fire_ball(Chaos_type, 0, 500, 8);
5240 if (!get_aim_dir(&dir)) return;
5242 fire_beam(Chaos_type, dir, 250);
5244 fire_ball(Chaos_type, dir, 250, 3 + (plev / 35));
5250 * Activate the evil Topi Ylinen curse
5251 * rr9: Stop the nasty things when a Cyberdemon is summoned
5252 * or the player gets paralyzed.
5254 bool activate_ty_curse(bool stop_ty, int *count)
5258 int flg = (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP);
5262 switch (randint1(34))
5267 msg_print(_("地面が揺れた...", "The ground trembles..."));
5268 earthquake(py, px, 5 + randint0(10));
5269 if (!one_in_(6)) break;
5274 int dam = damroll(10, 10);
5275 msg_print(_("純粋な魔力の次元への扉が開いた!", "A portal opens to a plane of raw mana!"));
5276 project(0, 8, py, px, dam, GF_MANA, flg, -1);
5277 take_hit(DAMAGE_NOESCAPE, dam, _("純粋な魔力の解放", "released pure mana"), -1);
5278 if (!one_in_(6)) break;
5283 msg_print(_("周囲の空間が歪んだ!", "Space warps about you!"));
5284 teleport_player(damroll(10, 10), TELEPORT_PASSIVE);
5285 if (randint0(13)) (*count) += activate_hi_summon(py, px, FALSE);
5286 if (!one_in_(6)) break;
5289 msg_print(_("エネルギーのうねりを感じた!", "You feel a surge of energy!"));
5293 project(0, 7, py, px, 50, GF_KILL_WALL, flg, -1);
5294 take_hit(DAMAGE_NOESCAPE, 50, _("エネルギーのうねり", "surge of energy"), -1);
5296 if (!one_in_(6)) break;
5297 case 1: case 2: case 3: case 16: case 17:
5298 aggravate_monsters(0);
5299 if (!one_in_(6)) break;
5300 case 4: case 5: case 6:
5301 (*count) += activate_hi_summon(py, px, FALSE);
5302 if (!one_in_(6)) break;
5303 case 7: case 8: case 9: case 18:
5304 (*count) += summon_specific(0, py, px, dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
5305 if (!one_in_(6)) break;
5306 case 10: case 11: case 12:
5307 msg_print(_("経験値が体から吸い取られた気がする!", "You feel your experience draining away..."));
5308 lose_exp(p_ptr->exp / 16);
5309 if (!one_in_(6)) break;
5310 case 13: case 14: case 15: case 19: case 20:
5311 if (stop_ty || (p_ptr->free_act && (randint1(125) < p_ptr->skill_sav)) || (p_ptr->pclass == CLASS_BERSERKER))
5317 msg_print(_("彫像になった気分だ!", "You feel like a statue!"));
5318 if (p_ptr->free_act)
5319 set_paralyzed(p_ptr->paralyzed + randint1(3));
5321 set_paralyzed(p_ptr->paralyzed + randint1(13));
5324 if (!one_in_(6)) break;
5325 case 21: case 22: case 23:
5326 (void)do_dec_stat(randint0(6));
5327 if (!one_in_(6)) break;
5329 msg_print(_("ほえ?私は誰?ここで何してる?", "Huh? Who am I? What am I doing here?"));
5331 if (!one_in_(6)) break;
5334 * Only summon Cyberdemons deep in the dungeon.
5336 if ((dun_level > 65) && !stop_ty)
5338 (*count) += summon_cyber(-1, py, px);
5342 if (!one_in_(6)) break;
5348 (void)do_dec_stat(i);
5356 while (one_in_(3) && !stop_ty);
5362 int activate_hi_summon(int y, int x, bool can_pet)
5367 u32b mode = PM_ALLOW_GROUP;
5374 mode |= PM_FORCE_FRIENDLY;
5378 mode |= PM_FORCE_PET;
5383 if (!pet) mode |= PM_NO_PET;
5385 summon_lev = (pet ? p_ptr->lev * 2 / 3 + randint1(p_ptr->lev / 2) : dun_level);
5387 for (i = 0; i < (randint1(7) + (dun_level / 40)); i++)
5389 switch (randint1(25) + (dun_level / 20))
5392 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_ANT, mode);
5395 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_SPIDER, mode);
5398 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HOUND, mode);
5401 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HYDRA, mode);
5404 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_ANGEL, mode);
5407 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_UNDEAD, mode);
5410 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_DRAGON, mode);
5413 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_DEMON, mode);
5417 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_AMBERITES, (mode | PM_ALLOW_UNIQUE));
5421 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_UNIQUE, (mode | PM_ALLOW_UNIQUE));
5424 if (!can_pet) mode |= PM_ALLOW_UNIQUE;
5425 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HI_UNDEAD, mode);
5428 if (!can_pet) mode |= PM_ALLOW_UNIQUE;
5429 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HI_DRAGON, mode);
5432 count += summon_specific((pet ? -1 : 0), y, x, 100, SUMMON_CYBER, mode);
5435 if (!can_pet) mode |= PM_ALLOW_UNIQUE;
5436 count += summon_specific((pet ? -1 : 0), y, x,pet ? summon_lev : (((summon_lev * 3) / 2) + 5), 0, mode);
5445 int summon_cyber(int who, int y, int x)
5448 int max_cyber = (easy_band ? 1 : (dun_level / 50) + randint1(2));
5450 u32b mode = PM_ALLOW_GROUP;
5452 /* Summoned by a monster */
5455 monster_type *m_ptr = &m_list[who];
5456 if (is_pet(m_ptr)) mode |= PM_FORCE_PET;
5459 if (max_cyber > 4) max_cyber = 4;
5461 for (i = 0; i < max_cyber; i++)
5463 count += summon_specific(who, y, x, 100, SUMMON_CYBER, mode);
5470 void wall_breaker(void)
5474 int attempts = 1000;
5476 if (randint1(80 + p_ptr->lev) < 70)
5480 scatter(&y, &x, py, px, 4, 0);
5482 if (!cave_have_flag_bold(y, x, FF_PROJECT)) continue;
5484 if (!player_bold(y, x)) break;
5487 project(0, 0, y, x, 20 + randint1(30), GF_KILL_WALL,
5488 (PROJECT_BEAM | PROJECT_THRU | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL), -1);
5490 else if (randint1(100) > 30)
5492 earthquake(py, px, 1);
5496 int num = damroll(5, 3);
5498 for (i = 0; i < num; i++)
5502 scatter(&y, &x, py, px, 10, 0);
5504 if (!player_bold(y, x)) break;
5507 project(0, 0, y, x, 20 + randint1(30), GF_KILL_WALL,
5508 (PROJECT_BEAM | PROJECT_THRU | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL), -1);
5517 bool confuse_monsters(int dam)
5519 return (project_hack(GF_OLD_CONF, dam));
5526 bool charm_monsters(int dam)
5528 return (project_hack(GF_CHARM, dam));
5535 bool charm_animals(int dam)
5537 return (project_hack(GF_CONTROL_ANIMAL, dam));
5544 bool stun_monsters(int dam)
5546 return (project_hack(GF_STUN, dam));
5553 bool stasis_monsters(int dam)
5555 return (project_hack(GF_STASIS, dam));
5560 * Mindblast monsters
5562 bool mindblast_monsters(int dam)
5564 return (project_hack(GF_PSI, dam));
5569 * Banish all monsters
5571 bool banish_monsters(int dist)
5573 return (project_hack(GF_AWAY_ALL, dist));
5580 bool turn_evil(int dam)
5582 return (project_hack(GF_TURN_EVIL, dam));
5589 bool turn_monsters(int dam)
5591 return (project_hack(GF_TURN_ALL, dam));
5596 * Death-ray all monsters (note: OBSCENELY powerful)
5598 bool deathray_monsters(void)
5600 return (project_hack(GF_DEATH_RAY, p_ptr->lev * 200));
5604 bool charm_monster(int dir, int plev)
5606 int flg = PROJECT_STOP | PROJECT_KILL;
5607 return (project_hook(GF_CHARM, dir, plev, flg));
5611 bool control_one_undead(int dir, int plev)
5613 int flg = PROJECT_STOP | PROJECT_KILL;
5614 return (project_hook(GF_CONTROL_UNDEAD, dir, plev, flg));
5618 bool control_one_demon(int dir, int plev)
5620 int flg = PROJECT_STOP | PROJECT_KILL;
5621 return (project_hook(GF_CONTROL_DEMON, dir, plev, flg));
5625 bool charm_animal(int dir, int plev)
5627 int flg = PROJECT_STOP | PROJECT_KILL;
5628 return (project_hook(GF_CONTROL_ANIMAL, dir, plev, flg));
5632 bool charm_living(int dir, int plev)
5634 int flg = PROJECT_STOP | PROJECT_KILL;
5635 return (project_hook(GF_CONTROL_LIVING, dir, plev, flg));
5639 bool kawarimi(bool success)
5642 object_type *q_ptr = &forge;
5645 if (p_ptr->is_dead) return FALSE;
5646 if (p_ptr->confused || p_ptr->blind || p_ptr->paralyzed || p_ptr->image) return FALSE;
5647 if (randint0(200) < p_ptr->stun) return FALSE;
5649 if (!success && one_in_(3))
5651 msg_print(_("失敗!逃げられなかった。", "Failed! You couldn't run away."));
5652 p_ptr->special_defense &= ~(NINJA_KAWARIMI);
5653 p_ptr->redraw |= (PR_STATUS);
5660 teleport_player(10 + randint1(90), 0L);
5664 object_prep(q_ptr, lookup_kind(TV_STATUE, SV_WOODEN_STATUE));
5666 q_ptr->pval = MON_NINJA;
5668 /* Drop it in the dungeon */
5669 (void)drop_near(q_ptr, -1, y, x);
5672 if (success) msg_print("攻撃を受ける前に素早く身をひるがえした。");
5673 else msg_print("失敗!攻撃を受けてしまった。");
5675 if (success) msg_print("You have turned around just before the attack hit you.");
5676 else msg_print("Failed! You are hit by the attack.");
5679 p_ptr->special_defense &= ~(NINJA_KAWARIMI);
5680 p_ptr->redraw |= (PR_STATUS);
5688 * "Rush Attack" routine for Samurai or Ninja
5689 * Return value is for checking "done"
5691 bool rush_attack(bool *mdeath)
5698 bool tmp_mdeath = FALSE;
5701 if (mdeath) *mdeath = FALSE;
5704 if (!get_aim_dir(&dir)) return FALSE;
5706 /* Use the given direction */
5707 tx = px + project_length * ddx[dir];
5708 ty = py + project_length * ddy[dir];
5710 /* Hack -- Use an actual "target" */
5711 if ((dir == 5) && target_okay())
5717 if (in_bounds(ty, tx)) tm_idx = cave[ty][tx].m_idx;
5719 path_n = project_path(path_g, project_length, py, px, ty, tx, PROJECT_STOP | PROJECT_KILL);
5722 /* No need to move */
5723 if (!path_n) return TRUE;
5725 /* Use ty and tx as to-move point */
5729 /* Project along the path */
5730 for (i = 0; i < path_n; i++)
5732 monster_type *m_ptr;
5734 int ny = GRID_Y(path_g[i]);
5735 int nx = GRID_X(path_g[i]);
5737 if (cave_empty_bold(ny, nx) && player_can_enter(cave[ny][nx].feat, 0))
5742 /* Go to next grid */
5746 if (!cave[ny][nx].m_idx)
5750 msg_print(_("失敗!", "Failed!"));
5754 msg_print(_("ここには入身では入れない。", "You can't move to that place."));
5761 /* Move player before updating the monster */
5762 if (!player_bold(ty, tx)) teleport_player_to(ty, tx, TELEPORT_NONMAGICAL);
5764 /* Update the monster */
5765 update_mon(cave[ny][nx].m_idx, TRUE);
5767 /* Found a monster */
5768 m_ptr = &m_list[cave[ny][nx].m_idx];
5770 if (tm_idx != cave[ny][nx].m_idx)
5773 msg_format("%s%sが立ちふさがっている!", tm_idx ? "別の" : "",
5774 m_ptr->ml ? "モンスター" : "何か");
5776 msg_format("There is %s in the way!", m_ptr->ml ? (tm_idx ? "another monster" : "a monster") : "someone");
5779 else if (!player_bold(ty, tx))
5781 /* Hold the monster name */
5784 /* Get the monster name (BEFORE polymorphing) */
5785 monster_desc(m_name, m_ptr, 0);
5786 msg_format(_("素早く%sの懐に入り込んだ!", "You quickly jump in and attack %s!"), m_name);
5789 if (!player_bold(ty, tx)) teleport_player_to(ty, tx, TELEPORT_NONMAGICAL);
5791 tmp_mdeath = py_attack(ny, nx, HISSATSU_NYUSIN);
5796 if (!moved && !player_bold(ty, tx)) teleport_player_to(ty, tx, TELEPORT_NONMAGICAL);
5798 if (mdeath) *mdeath = tmp_mdeath;
5804 * Remove all mirrors in this floor
5806 void remove_all_mirrors(bool explode)
5810 for (x = 0; x < cur_wid; x++)
5812 for (y = 0; y < cur_hgt; y++)
5814 if (is_mirror_grid(&cave[y][x]))
5816 remove_mirror(y, x);
5818 project(0, 2, y, x, p_ptr->lev / 2 + 5, GF_SHARDS,
5819 (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP | PROJECT_NO_HANGEKI), -1);