OSDN Git Service

#37287 (2.2.0.31) do-spell.c内のC4457警告に対応。 / Deal C4457 warning in do-spell.c.
[hengband/hengband.git] / src / do-spell.c
1 /*!
2     @file do-spell.c
3     @brief 魔法のインターフェイスと発動 / Purpose: Do everything for each spell
4     @date 2013/12/31
5     @author
6     2013 Deskull rearranged comment for Doxygen.
7  */
8
9 #include "angband.h"
10
11
12 /*!
13  * @brief
14  * 魔法の効果を「キャプション:ダイス+定数値」のフォーマットで出力する / Generate dice info string such as "foo 2d10"
15  * @param str キャプション
16  * @param dice ダイス数
17  * @param sides ダイス目
18  * @param base 固定値
19  * @return フォーマットに従い整形された文字列
20  */
21 static cptr info_string_dice(cptr str, int dice, int sides, int base)
22 {
23         /* Fix value */
24         if (!dice)
25                 return format("%s%d", str, base);
26
27         /* Dice only */
28         else if (!base)
29                 return format("%s%dd%d", str, dice, sides);
30
31         /* Dice plus base value */
32         else
33                 return format("%s%dd%d%+d", str, dice, sides, base);
34 }
35
36
37 /*!
38  * @brief 魔法によるダメージを出力する / Generate damage-dice info string such as "dam 2d10"
39  * @param dice ダイス数
40  * @param sides ダイス目
41  * @param base 固定値
42  * @return フォーマットに従い整形された文字列
43  */
44 static cptr info_damage(int dice, int sides, int base)
45 {
46         return info_string_dice(_("損傷:", "dam "), dice, sides, base);
47 }
48
49 /*!
50  * @brief 魔法の効果時間を出力する / Generate duration info string such as "dur 20+1d20"
51  * @param base 固定値
52  * @param sides ダイス目
53  * @return フォーマットに従い整形された文字列
54  */
55 static cptr info_duration(int base, int sides)
56 {
57         return format(_("期間:%d+1d%d", "dur %d+1d%d"), base, sides);
58 }
59
60 /*!
61  * @brief 魔法の効果範囲を出力する / Generate range info string such as "range 5"
62  * @param range 効果範囲
63  * @return フォーマットに従い整形された文字列
64  */
65 static cptr info_range(int range)
66 {
67         return format(_("範囲:%d", "range %d"), range);
68 }
69
70 /*!
71  * @brief 魔法による回復量を出力する / Generate heal info string such as "heal 2d8"
72  * @param dice ダイス数
73  * @param sides ダイス目
74  * @param base 固定値
75  * @return フォーマットに従い整形された文字列
76  */
77 static cptr info_heal(int dice, int sides, int base)
78 {
79         return info_string_dice(_("回復:", "heal "), dice, sides, base);
80 }
81
82 /*!
83  * @brief 魔法効果発動までの遅延ターンを出力する / Generate delay info string such as "delay 15+1d15"
84  * @param base 固定値
85  * @param sides ダイス目
86  * @return フォーマットに従い整形された文字列
87  */
88 static cptr info_delay(int base, int sides)
89 {
90         return format(_("遅延:%d+1d%d", "delay %d+1d%d"), base, sides);
91 }
92
93
94 /*!
95  * @brief 魔法によるダメージを出力する(固定値&複数回処理) / Generate multiple-damage info string such as "dam 25 each"
96  * @param dam 固定値
97  * @return フォーマットに従い整形された文字列
98  */
99 static cptr info_multi_damage(int dam)
100 {
101         return format(_("損傷:各%d", "dam %d each"), dam);
102 }
103
104
105 /*!
106  * @brief 魔法によるダメージを出力する(ダイスのみ&複数回処理) / Generate multiple-damage-dice info string such as "dam 5d2 each"
107  * @param dice ダイス数
108  * @param sides ダイス目
109  * @return フォーマットに従い整形された文字列
110  */
111 static cptr info_multi_damage_dice(int dice, int sides)
112 {
113         return format(_("損傷:各%dd%d", "dam %dd%d each"), dice, sides);
114 }
115
116 /*!
117  * @brief 魔法による一般的な効力値を出力する(固定値) / Generate power info string such as "power 100"
118  * @param power 固定値
119  * @return フォーマットに従い整形された文字列
120  */
121 static cptr info_power(int power)
122 {
123         return format(_("効力:%d", "power %d"), power);
124 }
125
126
127 /*!
128  * @brief 魔法による一般的な効力値を出力する(ダイス値) / Generate power info string such as "power 100"
129  * @param dice ダイス数
130  * @param sides ダイス目
131  * @return フォーマットに従い整形された文字列
132  */
133 /*
134  * Generate power info string such as "power 1d100"
135  */
136 static cptr info_power_dice(int dice, int sides)
137 {
138         return format(_("効力:%dd%d", "power %dd%d"), dice, sides);
139 }
140
141
142 /*!
143  * @brief 魔法の効果半径を出力する / Generate radius info string such as "rad 100"
144  * @param rad 効果半径
145  * @return フォーマットに従い整形された文字列
146  */
147 static cptr info_radius(int rad)
148 {
149         return format(_("半径:%d", "rad %d"), rad);
150 }
151
152
153 /*!
154  * @brief 魔法効果の限界重量を出力する / Generate weight info string such as "max wgt 15"
155  * @param weight 最大重量
156  * @return フォーマットに従い整形された文字列
157  */
158 static cptr info_weight(int weight)
159 {
160 #ifdef JP
161         return format("最大重量:%d.%dkg", lbtokg1(weight), lbtokg2(weight));
162 #else
163         return format("max wgt %d", weight/10);
164 #endif
165 }
166
167
168 /*!
169  * @brief 一部ボルト魔法のビーム化確率を算出する / Prepare standard probability to become beam for fire_bolt_or_beam()
170  * @return ビーム化確率(%)
171  * @details
172  * ハードコーティングによる実装が行われている。
173  * メイジは(レベル)%、ハイメイジ、スペルマスターは(レベル)%、それ以外の職業は(レベル/2)%
174  */
175 static int beam_chance(void)
176 {
177         if (p_ptr->pclass == CLASS_MAGE)
178                 return p_ptr->lev;
179         if (p_ptr->pclass == CLASS_HIGH_MAGE || p_ptr->pclass == CLASS_SORCERER)
180                 return p_ptr->lev + 10;
181
182         return p_ptr->lev / 2;
183 }
184
185 /*!
186  * @brief トランプ魔法独自の召喚処理を行う / Handle summoning and failure of trump spells
187  * @param num summon_specific()関数を呼び出す回数
188  * @param pet ペット化として召喚されるか否か
189  * @param y 召喚位置のy座標
190  * @param x 召喚位置のx座標
191  * @param lev 召喚レベル
192  * @param type 召喚条件ID
193  * @param mode モンスター生成条件フラグ
194  * @return モンスターが(敵対も含めて)召還されたならばTRUEを返す。
195  */
196 static bool trump_summoning(int num, bool pet, int y, int x, int lev, int type, u32b mode)
197 {
198         int plev = p_ptr->lev;
199
200         int who;
201         int i;
202         bool success = FALSE;
203
204         /* Default level */
205         if (!lev) lev = plev * 2 / 3 + randint1(plev / 2);
206
207         if (pet)
208         {
209                 /* Become pet */
210                 mode |= PM_FORCE_PET;
211
212                 /* Only sometimes allow unique monster */
213                 if (mode & PM_ALLOW_UNIQUE)
214                 {
215                         /* Forbid often */
216                         if (randint1(50 + plev) >= plev / 10)
217                                 mode &= ~PM_ALLOW_UNIQUE;
218                 }
219
220                 /* Player is who summons */
221                 who = -1;
222         }
223         else
224         {
225                 /* Prevent taming, allow unique monster */
226                 mode |= PM_NO_PET;
227
228                 /* Behave as if they appear by themselfs */
229                 who = 0;
230         }
231
232         for (i = 0; i < num; i++)
233         {
234                 if (summon_specific(who, y, x, lev, type, mode))
235                         success = TRUE;
236         }
237
238         if (!success)
239         {
240                 msg_print(_("誰もあなたのカードの呼び声に答えない。", "Nobody answers to your Trump call."));
241         }
242
243         return success;
244 }
245
246
247 /*!
248  * @brief 「ワンダー」のランダムな効果を決定して処理する。
249  * @param dir 方向ID
250  * @return なし
251  * @details
252  * This spell should become more useful (more controlled) as the\n
253  * player gains experience levels.  Thus, add 1/5 of the player's\n
254  * level to the die roll.  This eliminates the worst effects later on,\n
255  * while keeping the results quite random.  It also allows some potent\n
256  * effects only at high level.
257  */
258 static void cast_wonder(int dir)
259 {
260         int plev = p_ptr->lev;
261         int die = randint1(100) + plev / 5;
262         int vir = virtue_number(V_CHANCE);
263
264         if (vir)
265         {
266                 if (p_ptr->virtues[vir - 1] > 0)
267                 {
268                         while (randint1(400) < p_ptr->virtues[vir - 1]) die++;
269                 }
270                 else
271                 {
272                         while (randint1(400) < (0-p_ptr->virtues[vir - 1])) die--;
273                 }
274         }
275
276         if (die < 26)
277                 chg_virtue(V_CHANCE, 1);
278
279         if (die > 100)
280         {
281                 msg_print(_("あなたは力がみなぎるのを感じた!", "You feel a surge of power!"));
282         }
283
284         if (die < 8) clone_monster(dir);
285         else if (die < 14) speed_monster(dir, plev);
286         else if (die < 26) heal_monster(dir, damroll(4, 6));
287         else if (die < 31) poly_monster(dir, plev);
288         else if (die < 36)
289                 fire_bolt_or_beam(beam_chance() - 10, GF_MISSILE, dir,
290                                   damroll(3 + ((plev - 1) / 5), 4));
291         else if (die < 41) confuse_monster(dir, plev);
292         else if (die < 46) fire_ball(GF_POIS, dir, 20 + (plev / 2), 3);
293         else if (die < 51) (void)lite_line(dir, damroll(6, 8));
294         else if (die < 56)
295                 fire_bolt_or_beam(beam_chance() - 10, GF_ELEC, dir,
296                                   damroll(3 + ((plev - 5) / 4), 8));
297         else if (die < 61)
298                 fire_bolt_or_beam(beam_chance() - 10, GF_COLD, dir,
299                                   damroll(5 + ((plev - 5) / 4), 8));
300         else if (die < 66)
301                 fire_bolt_or_beam(beam_chance(), GF_ACID, dir,
302                                   damroll(6 + ((plev - 5) / 4), 8));
303         else if (die < 71)
304                 fire_bolt_or_beam(beam_chance(), GF_FIRE, dir,
305                                   damroll(8 + ((plev - 5) / 4), 8));
306         else if (die < 76) drain_life(dir, 75);
307         else if (die < 81) fire_ball(GF_ELEC, dir, 30 + plev / 2, 2);
308         else if (die < 86) fire_ball(GF_ACID, dir, 40 + plev, 2);
309         else if (die < 91) fire_ball(GF_ICE, dir, 70 + plev, 3);
310         else if (die < 96) fire_ball(GF_FIRE, dir, 80 + plev, 3);
311         else if (die < 101) drain_life(dir, 100 + plev);
312         else if (die < 104)
313         {
314                 earthquake(p_ptr->y, p_ptr->x, 12);
315         }
316         else if (die < 106)
317         {
318                 (void)destroy_area(p_ptr->y, p_ptr->x, 13 + randint0(5), FALSE);
319         }
320         else if (die < 108)
321         {
322                 symbol_genocide(plev+50, TRUE);
323         }
324         else if (die < 110) dispel_monsters(120);
325         else /* RARE */
326         {
327                 dispel_monsters(150);
328                 slow_monsters(plev);
329                 sleep_monsters(plev);
330                 hp_player(300);
331         }
332 }
333
334
335 /*!
336  * @brief 「悪霊召喚」のランダムな効果を決定して処理する。
337  * @param dir 方向ID
338  * @return なし
339  */
340 static void cast_invoke_spirits(int dir)
341 {
342         int plev = p_ptr->lev;
343         int die = randint1(100) + plev / 5;
344         int vir = virtue_number(V_CHANCE);
345
346         if (vir)
347         {
348                 if (p_ptr->virtues[vir - 1] > 0)
349                 {
350                         while (randint1(400) < p_ptr->virtues[vir - 1]) die++;
351                 }
352                 else
353                 {
354                         while (randint1(400) < (0-p_ptr->virtues[vir - 1])) die--;
355                 }
356         }
357
358         msg_print(_("あなたは死者たちの力を招集した...", "You call on the power of the dead..."));
359         if (die < 26)
360                 chg_virtue(V_CHANCE, 1);
361
362         if (die > 100)
363         {
364                 msg_print(_("あなたはおどろおどろしい力のうねりを感じた!", "You feel a surge of eldritch force!"));
365         }
366
367
368         if (die < 8)
369         {
370                 msg_print(_("なんてこった!あなたの周りの地面から朽ちた人影が立ち上がってきた!", 
371                                         "Oh no! Mouldering forms rise from the earth around you!"));
372
373                 (void)summon_specific(0, p_ptr->y, p_ptr->x, dun_level, SUMMON_UNDEAD, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
374                 chg_virtue(V_UNLIFE, 1);
375         }
376         else if (die < 14)
377         {
378                 msg_print(_("名状し難い邪悪な存在があなたの心を通り過ぎて行った...", "An unnamable evil brushes against your mind..."));
379
380                 set_afraid(p_ptr->afraid + randint1(4) + 4);
381         }
382         else if (die < 26)
383         {
384                 msg_print(_("あなたの頭に大量の幽霊たちの騒々しい声が押し寄せてきた...",
385                                         "Your head is invaded by a horde of gibbering spectral voices..."));
386
387                 set_confused(p_ptr->confused + randint1(4) + 4);
388         }
389         else if (die < 31)
390         {
391                 poly_monster(dir, plev);
392         }
393         else if (die < 36)
394         {
395                 fire_bolt_or_beam(beam_chance() - 10, GF_MISSILE, dir,
396                                   damroll(3 + ((plev - 1) / 5), 4));
397         }
398         else if (die < 41)
399         {
400                 confuse_monster (dir, plev);
401         }
402         else if (die < 46)
403         {
404                 fire_ball(GF_POIS, dir, 20 + (plev / 2), 3);
405         }
406         else if (die < 51)
407         {
408                 (void)lite_line(dir, damroll(6, 8));
409         }
410         else if (die < 56)
411         {
412                 fire_bolt_or_beam(beam_chance() - 10, GF_ELEC, dir,
413                                   damroll(3+((plev-5)/4),8));
414         }
415         else if (die < 61)
416         {
417                 fire_bolt_or_beam(beam_chance() - 10, GF_COLD, dir,
418                                   damroll(5+((plev-5)/4),8));
419         }
420         else if (die < 66)
421         {
422                 fire_bolt_or_beam(beam_chance(), GF_ACID, dir,
423                                   damroll(6+((plev-5)/4),8));
424         }
425         else if (die < 71)
426         {
427                 fire_bolt_or_beam(beam_chance(), GF_FIRE, dir,
428                                   damroll(8+((plev-5)/4),8));
429         }
430         else if (die < 76)
431         {
432                 drain_life(dir, 75);
433         }
434         else if (die < 81)
435         {
436                 fire_ball(GF_ELEC, dir, 30 + plev / 2, 2);
437         }
438         else if (die < 86)
439         {
440                 fire_ball(GF_ACID, dir, 40 + plev, 2);
441         }
442         else if (die < 91)
443         {
444                 fire_ball(GF_ICE, dir, 70 + plev, 3);
445         }
446         else if (die < 96)
447         {
448                 fire_ball(GF_FIRE, dir, 80 + plev, 3);
449         }
450         else if (die < 101)
451         {
452                 drain_life(dir, 100 + plev);
453         }
454         else if (die < 104)
455         {
456                 earthquake(p_ptr->y, p_ptr->x, 12);
457         }
458         else if (die < 106)
459         {
460                 (void)destroy_area(p_ptr->y, p_ptr->x, 13 + randint0(5), FALSE);
461         }
462         else if (die < 108)
463         {
464                 symbol_genocide(plev+50, TRUE);
465         }
466         else if (die < 110)
467         {
468                 dispel_monsters(120);
469         }
470         else
471         { /* RARE */
472                 dispel_monsters(150);
473                 slow_monsters(plev);
474                 sleep_monsters(plev);
475                 hp_player(300);
476         }
477
478         if (die < 31)
479         {
480                 msg_print(_("陰欝な声がクスクス笑う。「もうすぐおまえは我々の仲間になるだろう。弱き者よ。」",
481                                         "Sepulchral voices chuckle. 'Soon you will join us, mortal.'"));
482         }
483 }
484
485 /*!
486  * @brief カオス的効果あるいは及びシャッフルの「運命の輪」効果を引数基準に処理する。
487  * @param spell 基準となる引数ID
488  * @return なし
489  */
490 static void wild_magic(int spell)
491 {
492         int counter = 0;
493         int type = SUMMON_MOLD + randint0(6);
494
495         if (type < SUMMON_MOLD) type = SUMMON_MOLD;
496         else if (type > SUMMON_MIMIC) type = SUMMON_MIMIC;
497
498         switch (randint1(spell) + randint1(8) + 1)
499         {
500         case 1:
501         case 2:
502         case 3:
503                 teleport_player(10, TELEPORT_PASSIVE);
504                 break;
505         case 4:
506         case 5:
507         case 6:
508                 teleport_player(100, TELEPORT_PASSIVE);
509                 break;
510         case 7:
511         case 8:
512                 teleport_player(200, TELEPORT_PASSIVE);
513                 break;
514         case 9:
515         case 10:
516         case 11:
517                 unlite_area(10, 3);
518                 break;
519         case 12:
520         case 13:
521         case 14:
522                 lite_area(damroll(2, 3), 2);
523                 break;
524         case 15:
525                 destroy_doors_touch();
526                 break;
527         case 16: case 17:
528                 wall_breaker();
529         case 18:
530                 sleep_monsters_touch();
531                 break;
532         case 19:
533         case 20:
534                 trap_creation(p_ptr->y, p_ptr->x);
535                 break;
536         case 21:
537         case 22:
538                 door_creation();
539                 break;
540         case 23:
541         case 24:
542         case 25:
543                 aggravate_monsters(0);
544                 break;
545         case 26:
546                 earthquake(p_ptr->y, p_ptr->x, 5);
547                 break;
548         case 27:
549         case 28:
550                 (void)gain_random_mutation(0);
551                 break;
552         case 29:
553         case 30:
554                 apply_disenchant(1);
555                 break;
556         case 31:
557                 lose_all_info();
558                 break;
559         case 32:
560                 fire_ball(GF_CHAOS, 0, spell + 5, 1 + (spell / 10));
561                 break;
562         case 33:
563                 wall_stone();
564                 break;
565         case 34:
566         case 35:
567                 while (counter++ < 8)
568                 {
569                         (void)summon_specific(0, p_ptr->y, p_ptr->x, (dun_level * 3) / 2, type, (PM_ALLOW_GROUP | PM_NO_PET));
570                 }
571                 break;
572         case 36:
573         case 37:
574                 activate_hi_summon(p_ptr->y, p_ptr->x, FALSE);
575                 break;
576         case 38:
577                 (void)summon_cyber(-1, p_ptr->y, p_ptr->x);
578                 break;
579         default:
580                 {
581                         int count = 0;
582                         (void)activate_ty_curse(FALSE, &count);
583                         break;
584                 }
585         }
586 }
587
588 /*!
589  * @brief トランプ領域の「シャッフル」の効果をランダムに決めて処理する。
590  * @return なし
591  */
592 static void cast_shuffle(void)
593 {
594         int plev = p_ptr->lev;
595         int dir;
596         int die;
597         int vir = virtue_number(V_CHANCE);
598         int i;
599
600         /* Card sharks and high mages get a level bonus */
601         if ((p_ptr->pclass == CLASS_ROGUE) ||
602             (p_ptr->pclass == CLASS_HIGH_MAGE) ||
603             (p_ptr->pclass == CLASS_SORCERER))
604                 die = (randint1(110)) + plev / 5;
605         else
606                 die = randint1(120);
607
608
609         if (vir)
610         {
611                 if (p_ptr->virtues[vir - 1] > 0)
612                 {
613                         while (randint1(400) < p_ptr->virtues[vir - 1]) die++;
614                 }
615                 else
616                 {
617                         while (randint1(400) < (0-p_ptr->virtues[vir - 1])) die--;
618                 }
619         }
620
621         msg_print(_("あなたはカードを切って一枚引いた...", "You shuffle the deck and draw a card..."));
622
623         if (die < 30)
624                 chg_virtue(V_CHANCE, 1);
625
626         if (die < 7)
627         {
628                 msg_print(_("なんてこった!《死》だ!", "Oh no! It's Death!"));
629
630                 for (i = 0; i < randint1(3); i++)
631                         activate_hi_summon(p_ptr->y, p_ptr->x, FALSE);
632         }
633         else if (die < 14)
634         {
635                 msg_print(_("なんてこった!《悪魔》だ!", "Oh no! It's the Devil!"));
636                 summon_specific(0, p_ptr->y, p_ptr->x, dun_level, SUMMON_DEMON, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
637         }
638         else if (die < 18)
639         {
640                 int count = 0;
641                 msg_print(_("なんてこった!《吊られた男》だ!", "Oh no! It's the Hanged Man."));
642                 activate_ty_curse(FALSE, &count);
643         }
644         else if (die < 22)
645         {
646                 msg_print(_("《不調和の剣》だ。", "It's the swords of discord."));
647                 aggravate_monsters(0);
648         }
649         else if (die < 26)
650         {
651                 msg_print(_("《愚者》だ。", "It's the Fool."));
652                 do_dec_stat(A_INT);
653                 do_dec_stat(A_WIS);
654         }
655         else if (die < 30)
656         {
657                 msg_print(_("奇妙なモンスターの絵だ。", "It's the picture of a strange monster."));
658                 trump_summoning(1, FALSE, p_ptr->y, p_ptr->x, (dun_level * 3 / 2), (32 + randint1(6)), PM_ALLOW_GROUP | PM_ALLOW_UNIQUE);
659         }
660         else if (die < 33)
661         {
662                 msg_print(_("《月》だ。", "It's the Moon."));
663                 unlite_area(10, 3);
664         }
665         else if (die < 38)
666         {
667                 msg_print(_("《運命の輪》だ。", "It's the Wheel of Fortune."));
668                 wild_magic(randint0(32));
669         }
670         else if (die < 40)
671         {
672                 msg_print(_("テレポート・カードだ。", "It's a teleport trump card."));
673                 teleport_player(10, TELEPORT_PASSIVE);
674         }
675         else if (die < 42)
676         {
677                 msg_print(_("《正義》だ。", "It's Justice."));
678                 set_blessed(p_ptr->lev, FALSE);
679         }
680         else if (die < 47)
681         {
682                 msg_print(_("テレポート・カードだ。", "It's a teleport trump card."));
683                 teleport_player(100, TELEPORT_PASSIVE);
684         }
685         else if (die < 52)
686         {
687                 msg_print(_("テレポート・カードだ。", "It's a teleport trump card."));
688                 teleport_player(200, TELEPORT_PASSIVE);
689         }
690         else if (die < 60)
691         {
692                 msg_print(_("《塔》だ。", "It's the Tower."));
693                 wall_breaker();
694         }
695         else if (die < 72)
696         {
697                 msg_print(_("《節制》だ。", "It's Temperance."));
698                 sleep_monsters_touch();
699         }
700         else if (die < 80)
701         {
702                 msg_print(_("《塔》だ。", "It's the Tower."));
703
704                 earthquake(p_ptr->y, p_ptr->x, 5);
705         }
706         else if (die < 82)
707         {
708                 msg_print(_("友好的なモンスターの絵だ。", "It's the picture of a friendly monster."));
709                 trump_summoning(1, TRUE, p_ptr->y, p_ptr->x, (dun_level * 3 / 2), SUMMON_MOLD, 0L);
710         }
711         else if (die < 84)
712         {
713                 msg_print(_("友好的なモンスターの絵だ。", "It's the picture of a friendly monster."));
714                 trump_summoning(1, TRUE, p_ptr->y, p_ptr->x, (dun_level * 3 / 2), SUMMON_BAT, 0L);
715         }
716         else if (die < 86)
717         {
718                 msg_print(_("友好的なモンスターの絵だ。", "It's the picture of a friendly monster."));
719                 trump_summoning(1, TRUE, p_ptr->y, p_ptr->x, (dun_level * 3 / 2), SUMMON_VORTEX, 0L);
720         }
721         else if (die < 88)
722         {
723                 msg_print(_("友好的なモンスターの絵だ。", "It's the picture of a friendly monster."));
724                 trump_summoning(1, TRUE, p_ptr->y, p_ptr->x, (dun_level * 3 / 2), SUMMON_COIN_MIMIC, 0L);
725         }
726         else if (die < 96)
727         {
728                 msg_print(_("《恋人》だ。", "It's the Lovers."));
729
730                 if (get_aim_dir(&dir))
731                         charm_monster(dir, MIN(p_ptr->lev, 20));
732         }
733         else if (die < 101)
734         {
735                 msg_print(_("《隠者》だ。", "It's the Hermit."));
736                 wall_stone();
737         }
738         else if (die < 111)
739         {
740                 msg_print(_("《審判》だ。", "It's the Judgement."));
741                 do_cmd_rerate(FALSE);
742                 if (p_ptr->muta1 || p_ptr->muta2 || p_ptr->muta3)
743                 {
744                         msg_print(_("全ての突然変異が治った。", "You are cured of all mutations."));
745                         p_ptr->muta1 = p_ptr->muta2 = p_ptr->muta3 = 0;
746                         p_ptr->update |= PU_BONUS;
747                         handle_stuff();
748                 }
749         }
750         else if (die < 120)
751         {
752                 msg_print(_("《太陽》だ。", "It's the Sun."));
753                 chg_virtue(V_KNOWLEDGE, 1);
754                 chg_virtue(V_ENLIGHTEN, 1);
755                 wiz_lite(FALSE);
756         }
757         else
758         {
759                 msg_print(_("《世界》だ。", "It's the World."));
760                 if (p_ptr->exp < PY_MAX_EXP)
761                 {
762                         s32b ee = (p_ptr->exp / 25) + 1;
763                         if (ee > 5000) ee = 5000;
764                         msg_print(_("更に経験を積んだような気がする。", "You feel more experienced."));
765                         gain_exp(ee);
766                 }
767         }
768 }
769
770 /*!
771  * @brief カオス魔法「流星群」の処理としてプレイヤーを中心に隕石落下処理を10+1d10回繰り返す。
772  * / Drop 10+1d10 meteor ball at random places near the player
773  * @param dam ダメージ
774  * @param rad 効力の半径
775  * @return なし
776  */
777 static void cast_meteor(int dam, int rad)
778 {
779         int i;
780         int b = 10 + randint1(10);
781
782         for (i = 0; i < b; i++)
783         {
784                 int y = 0, x = 0;
785                 int count;
786
787                 for (count = 0; count <= 20; count++)
788                 {
789                         int dy, dx, d;
790
791                         x = p_ptr->x - 8 + randint0(17);
792                         y = p_ptr->y - 8 + randint0(17);
793
794                         dx = (p_ptr->x > x) ? (p_ptr->x - x) : (x - p_ptr->x);
795                         dy = (p_ptr->y > y) ? (p_ptr->y - y) : (y - p_ptr->y);
796
797                         /* Approximate distance */
798                         d = (dy > dx) ? (dy + (dx >> 1)) : (dx + (dy >> 1));
799
800                         if (d >= 9) continue;
801
802                         if (!in_bounds(y, x) || !projectable(p_ptr->y, p_ptr->x, y, x)
803                             || !cave_have_flag_bold(y, x, FF_PROJECT)) continue;
804
805                         /* Valid position */
806                         break;
807                 }
808
809                 if (count > 20) continue;
810
811                 project(0, rad, y, x, dam, GF_METEOR, PROJECT_KILL | PROJECT_JUMP | PROJECT_ITEM, -1);
812         }
813 }
814
815
816 /*!
817  * @brief 破邪魔法「神の怒り」の処理としてターゲットを指定した後分解のボールを最大20回発生させる。
818  * @param dam ダメージ
819  * @param rad 効力の半径
820  * @return ターゲットを指定し、実行したならばTRUEを返す。
821  */
822 static bool cast_wrath_of_the_god(int dam, int rad)
823 {
824         int x, y, tx, ty;
825         int nx, ny;
826         int dir, i;
827         int b = 10 + randint1(10);
828
829         if (!get_aim_dir(&dir)) return FALSE;
830
831         /* Use the given direction */
832         tx = p_ptr->x + 99 * ddx[dir];
833         ty = p_ptr->y + 99 * ddy[dir];
834
835         /* Hack -- Use an actual "target" */
836         if ((dir == 5) && target_okay())
837         {
838                 tx = target_col;
839                 ty = target_row;
840         }
841
842         x = p_ptr->x;
843         y = p_ptr->y;
844
845         while (1)
846         {
847                 /* Hack -- Stop at the target */
848                 if ((y == ty) && (x == tx)) break;
849
850                 ny = y;
851                 nx = x;
852                 mmove2(&ny, &nx, p_ptr->y, p_ptr->x, ty, tx);
853
854                 /* Stop at maximum range */
855                 if (MAX_RANGE <= distance(p_ptr->y, p_ptr->x, ny, nx)) break;
856
857                 /* Stopped by walls/doors */
858                 if (!cave_have_flag_bold(ny, nx, FF_PROJECT)) break;
859
860                 /* Stopped by monsters */
861                 if ((dir != 5) && cave[ny][nx].m_idx != 0) break;
862
863                 /* Save the new location */
864                 x = nx;
865                 y = ny;
866         }
867         tx = x;
868         ty = y;
869
870         for (i = 0; i < b; i++)
871         {
872                 int count = 20, d = 0;
873
874                 while (count--)
875                 {
876                         int dx, dy;
877
878                         x = tx - 5 + randint0(11);
879                         y = ty - 5 + randint0(11);
880
881                         dx = (tx > x) ? (tx - x) : (x - tx);
882                         dy = (ty > y) ? (ty - y) : (y - ty);
883
884                         /* Approximate distance */
885                         d = (dy > dx) ? (dy + (dx >> 1)) : (dx + (dy >> 1));
886                         /* Within the radius */
887                         if (d < 5) break;
888                 }
889
890                 if (count < 0) continue;
891
892                 /* Cannot penetrate perm walls */
893                 if (!in_bounds(y,x) ||
894                     cave_stop_disintegration(y,x) ||
895                     !in_disintegration_range(ty, tx, y, x))
896                         continue;
897
898                 project(0, rad, y, x, dam, GF_DISINTEGRATE, PROJECT_JUMP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL, -1);
899         }
900
901         return TRUE;
902 }
903
904 /*!
905  * @brief 悪魔領域のグレーターデーモン召喚に利用可能な死体かどうかを返す。 / An "item_tester_hook" for offer
906  * @param o_ptr オブジェクト構造体の参照ポインタ
907  * @return 生贄に使用可能な死体ならばTRUEを返す。
908  */
909 static bool item_tester_offer(object_type *o_ptr)
910 {
911         /* Flasks of oil are okay */
912         if (o_ptr->tval != TV_CORPSE) return (FALSE);
913
914         if (o_ptr->sval != SV_CORPSE) return (FALSE);
915
916         if (my_strchr("pht", r_info[o_ptr->pval].d_char)) return (TRUE);
917
918         /* Assume not okay */
919         return (FALSE);
920 }
921
922 /*!
923  * @brief 悪魔領域のグレーターデーモン召喚を処理する / Daemon spell Summon Greater Demon
924  * @return 処理を実行したならばTRUEを返す。
925  */
926 static bool cast_summon_greater_demon(void)
927 {
928         int plev = p_ptr->lev;
929         int item;
930         cptr q, s;
931         int summon_lev;
932         object_type *o_ptr;
933
934         item_tester_hook = item_tester_offer;
935         q = _("どの死体を捧げますか? ", "Sacrifice which corpse? ");
936         s = _("捧げられる死体を持っていない。", "You have nothing to scrifice.");
937         if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return FALSE;
938
939         /* Get the item (in the pack) */
940         if (item >= 0)
941         {
942                 o_ptr = &inventory[item];
943         }
944
945         /* Get the item (on the floor) */
946         else
947         {
948                 o_ptr = &o_list[0 - item];
949         }
950
951         summon_lev = plev * 2 / 3 + r_info[o_ptr->pval].level;
952
953         if (summon_specific(-1, p_ptr->y, p_ptr->x, summon_lev, SUMMON_HI_DEMON, (PM_ALLOW_GROUP | PM_FORCE_PET)))
954         {
955                 msg_print(_("硫黄の悪臭が充満した。", "The area fills with a stench of sulphur and brimstone."));
956                 msg_print(_("「ご用でございますか、ご主人様」", "'What is thy bidding... Master?'"));
957
958                 /* Decrease the item (from the pack) */
959                 if (item >= 0)
960                 {
961                         inven_item_increase(item, -1);
962                         inven_item_describe(item);
963                         inven_item_optimize(item);
964                 }
965
966                 /* Decrease the item (from the floor) */
967                 else
968                 {
969                         floor_item_increase(0 - item, -1);
970                         floor_item_describe(0 - item);
971                         floor_item_optimize(0 - item);
972                 }
973         }
974         else
975         {
976                 msg_print(_("悪魔は現れなかった。", "No Greater Demon arrive."));
977         }
978
979         return TRUE;
980 }
981
982 /*!
983  * @brief 歌の開始を処理する / Start singing if the player is a Bard 
984  * @param spell 領域魔法としてのID
985  * @param song 魔法効果のID
986  * @return なし
987  */
988 static void start_singing(int spell, int song)
989 {
990         /* Remember the song index */
991         p_ptr->magic_num1[0] = song;
992
993         /* Remember the index of the spell which activated the song */
994         p_ptr->magic_num2[0] = spell;
995
996
997         /* Now the player is singing */
998         set_action(ACTION_SING);
999
1000
1001         /* Recalculate bonuses */
1002         p_ptr->update |= (PU_BONUS);
1003
1004         /* Redraw status bar */
1005         p_ptr->redraw |= (PR_STATUS);
1006 }
1007
1008 /*!
1009  * @brief 歌の停止を処理する / Stop singing if the player is a Bard 
1010  * @return なし
1011  */
1012 void stop_singing(void)
1013 {
1014         if (p_ptr->pclass != CLASS_BARD) return;
1015
1016         /* Are there interupted song? */
1017         if (p_ptr->magic_num1[1])
1018         {
1019                 /* Forget interupted song */
1020                 p_ptr->magic_num1[1] = 0;
1021                 return;
1022         }
1023
1024         /* The player is singing? */
1025         if (!p_ptr->magic_num1[0]) return;
1026
1027         /* Hack -- if called from set_action(), avoid recursive loop */
1028         if (p_ptr->action == ACTION_SING) set_action(ACTION_NONE);
1029
1030         /* Message text of each song or etc. */
1031         do_spell(REALM_MUSIC, p_ptr->magic_num2[0], SPELL_STOP);
1032
1033         p_ptr->magic_num1[0] = MUSIC_NONE;
1034         p_ptr->magic_num2[0] = 0;
1035
1036         /* Recalculate bonuses */
1037         p_ptr->update |= (PU_BONUS);
1038
1039         /* Redraw status bar */
1040         p_ptr->redraw |= (PR_STATUS);
1041 }
1042
1043
1044 /*!
1045  * @brief 生命領域魔法の各処理を行う
1046  * @param spell 魔法ID
1047  * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
1048  * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
1049  */
1050 static cptr do_life_spell(int spell, int mode)
1051 {
1052         bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
1053         bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
1054         bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
1055         bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
1056
1057         int dir;
1058         int plev = p_ptr->lev;
1059
1060         switch (spell)
1061         {
1062         case 0:
1063                 if (name) return _("軽傷の治癒", "Cure Light Wounds");
1064                 if (desc) return _("怪我と体力を少し回復させる。", "Heals cut and HP a little.");
1065                 {
1066                         int dice = 2;
1067                         int sides = 10;
1068
1069                         if (info) return info_heal(dice, sides, 0);
1070
1071                         if (cast)
1072                         {
1073                                 hp_player(damroll(dice, sides));
1074                                 set_cut(p_ptr->cut - 10);
1075                         }
1076                 }
1077                 break;
1078
1079         case 1:
1080                 if (name) return _("祝福", "Bless");
1081                 if (desc) return _("一定時間、命中率とACにボーナスを得る。", "Gives bonus to hit and AC for a few turns.");
1082                 {
1083                         int base = 12;
1084
1085                         if (info) return info_duration(base, base);
1086
1087                         if (cast)
1088                         {
1089                                 set_blessed(randint1(base) + base, FALSE);
1090                         }
1091                 }
1092                 break;
1093
1094         case 2:
1095                 if (name) return _("軽傷", "Cause Light Wounds");
1096                 if (desc) return _("1体のモンスターに小ダメージを与える。抵抗されると無効。", "Wounds a monster a little unless resisted.");
1097                 {
1098                         int dice = 3 + (plev - 1) / 5;
1099                         int sides = 4;
1100
1101                         if (info) return info_damage(dice, sides, 0);
1102
1103                         if (cast)
1104                         {
1105                                 if (!get_aim_dir(&dir)) return NULL;
1106                                 fire_ball_hide(GF_WOUNDS, dir, damroll(dice, sides), 0);
1107                         }
1108                 }
1109                 break;
1110
1111         case 3:
1112                 if (name) return _("光の召喚", "Call Light");
1113                 if (desc) return _("光源が照らしている範囲か部屋全体を永久に明るくする。", "Lights up nearby area and the inside of a room permanently.");
1114                 {
1115                         int dice = 2;
1116                         int sides = plev / 2;
1117                         int rad = plev / 10 + 1;
1118
1119                         if (info) return info_damage(dice, sides, 0);
1120
1121                         if (cast)
1122                         {
1123                                 lite_area(damroll(dice, sides), rad);
1124                         }
1125                 }
1126                 break;
1127
1128         case 4:
1129                 if (name) return _("罠 & 隠し扉感知", "Detect Doors & Traps");
1130                 if (desc) return _("近くの全ての罠と扉と階段を感知する。", "Detects traps, doors, and stairs in your vicinity.");
1131                 {
1132                         int rad = DETECT_RAD_DEFAULT;
1133
1134                         if (info) return info_radius(rad);
1135
1136                         if (cast)
1137                         {
1138                                 detect_traps(rad, TRUE);
1139                                 detect_doors(rad);
1140                                 detect_stairs(rad);
1141                         }
1142                 }
1143                 break;
1144
1145         case 5:
1146                 if (name) return _("重傷の治癒", "Cure Medium Wounds");
1147                 if (desc) return _("怪我と体力を中程度回復させる。", "Heals cut and HP more.");
1148                 {
1149                         int dice = 4;
1150                         int sides = 10;
1151
1152                         if (info) return info_heal(dice, sides, 0);
1153
1154                         if (cast)
1155                         {
1156                                 hp_player(damroll(dice, sides));
1157                                 set_cut((p_ptr->cut / 2) - 20);
1158                         }
1159                 }
1160                 break;
1161
1162         case 6:
1163                 if (name) return _("解毒", "Cure Poison");
1164                 if (desc) return _("体内の毒を取り除く。", "Cure poison status.");
1165                 {
1166                         if (cast)
1167                         {
1168                                 set_poisoned(0);
1169                         }
1170                 }
1171                 break;
1172
1173         case 7:
1174                 if (name) return _("空腹充足", "Satisfy Hunger");
1175                 if (desc) return _("満腹にする。", "Satisfies hunger.");
1176                 {
1177                         if (cast)
1178                         {
1179                                 set_food(PY_FOOD_MAX - 1);
1180                         }
1181                 }
1182                 break;
1183
1184         case 8:
1185                 if (name) return _("解呪", "Remove Curse");
1186                 if (desc) return _("アイテムにかかった弱い呪いを解除する。", "Removes normal curses from equipped items.");
1187                 {
1188                         if (cast)
1189                         {
1190                                 if (remove_curse())
1191                                 {
1192                                         msg_print(_("誰かに見守られているような気がする。", "You feel as if someone is watching over you."));
1193                                 }
1194                         }
1195                 }
1196                 break;
1197
1198         case 9:
1199                 if (name) return _("重傷", "Cause Medium Wounds");
1200                 if (desc) return _("1体のモンスターに中ダメージを与える。抵抗されると無効。", "Wounds a monster unless resisted.");
1201                 {
1202                         int sides = 8 + (plev - 5) / 4;
1203                         int dice = 8;
1204
1205                         if (info) return info_damage(dice, sides, 0);
1206
1207                         if (cast)
1208                         {
1209                                 if (!get_aim_dir(&dir)) return NULL;
1210                                 fire_ball_hide(GF_WOUNDS, dir, damroll(sides, dice), 0);
1211                         }
1212                 }
1213                 break;
1214
1215         case 10:
1216                 if (name) return _("致命傷の治癒", "Cure Critical Wounds");
1217                 if (desc) return _("体力を大幅に回復させ、負傷と朦朧状態も全快する。", "Heals cut, stun and HP greatly.");
1218                 {
1219                         int dice = 8;
1220                         int sides = 10;
1221
1222                         if (info) return info_heal(dice, sides, 0);
1223
1224                         if (cast)
1225                         {
1226                                 hp_player(damroll(dice, sides));
1227                                 set_stun(0);
1228                                 set_cut(0);
1229                         }
1230                 }
1231                 break;
1232
1233         case 11:
1234                 if (name) return _("耐熱耐寒", "Resist Heat and Cold");
1235                 if (desc) return _("一定時間、火炎と冷気に対する耐性を得る。装備による耐性に累積する。", 
1236                         "Gives resistance to fire and cold. These resistances can be added to which from equipment for more powerful resistances.");
1237     
1238                 {
1239                         int base = 20;
1240
1241                         if (info) return info_duration(base, base);
1242
1243                         if (cast)
1244                         {
1245                                 set_oppose_cold(randint1(base) + base, FALSE);
1246                                 set_oppose_fire(randint1(base) + base, FALSE);
1247                         }
1248                 }
1249                 break;
1250
1251         case 12:
1252                 if (name) return _("周辺感知", "Sense Surroundings");
1253                 if (desc) return _("周辺の地形を感知する。", "Maps nearby area.");
1254     
1255                 {
1256                         int rad = DETECT_RAD_MAP;
1257
1258                         if (info) return info_radius(rad);
1259
1260                         if (cast)
1261                         {
1262                                 map_area(rad);
1263                         }
1264                 }
1265                 break;
1266
1267         case 13:
1268                 if (name) return _("パニック・アンデッド", "Turn Undead");
1269                 if (desc) return _("視界内のアンデッドを恐怖させる。抵抗されると無効。", "Attempts to scare undead monsters in sight.");
1270     
1271                 {
1272                         if (cast)
1273                         {
1274                                 turn_undead();
1275                         }
1276                 }
1277                 break;
1278
1279         case 14:
1280                 if (name) return _("体力回復", "Healing");
1281                 if (desc) return _("極めて強力な回復呪文で、負傷と朦朧状態も全快する。", "Much powerful healing magic, and heals cut and stun completely.");
1282     
1283                 {
1284                         int heal = 300;
1285
1286                         if (info) return info_heal(0, 0, heal);
1287
1288                         if (cast)
1289                         {
1290                                 hp_player(heal);
1291                                 set_stun(0);
1292                                 set_cut(0);
1293                         }
1294                 }
1295                 break;
1296
1297         case 15:
1298                 if (name) return _("結界の紋章", "Glyph of Warding");
1299                 if (desc) return _("自分のいる床の上に、モンスターが通り抜けたり召喚されたりすることができなくなるルーンを描く。",
1300                         "Sets a glyph on the floor beneath you. Monsters cannot attack you if you are on a glyph, but can try to break glyph.");
1301     
1302                 {
1303                         if (cast)
1304                         {
1305                                 warding_glyph();
1306                         }
1307                 }
1308                 break;
1309
1310         case 16:
1311                 if (name) return _("*解呪*", "Dispel Curse");
1312                 if (desc) return _("アイテムにかかった強力な呪いを解除する。", "Removes normal and heavy curse from equipped items.");
1313     
1314                 {
1315                         if (cast)
1316                         {
1317                                 if (remove_all_curse())
1318                                 {
1319                                         msg_print(_("誰かに見守られているような気がする。", "You feel as if someone is watching over you."));
1320                                 }
1321                         }
1322                 }
1323                 break;
1324
1325         case 17:
1326                 if (name) return _("鑑識", "Perception");
1327                 if (desc) return _("アイテムを識別する。", "Identifies an item.");
1328     
1329                 {
1330                         if (cast)
1331                         {
1332                                 if (!ident_spell(FALSE)) return NULL;
1333                         }
1334                 }
1335                 break;
1336
1337         case 18:
1338                 if (name) return _("アンデッド退散", "Dispel Undead");
1339                 if (desc) return _("視界内の全てのアンデッドにダメージを与える。", "Damages all undead monsters in sight.");
1340     
1341                 {
1342                         int dice = 1;
1343                         int sides = plev * 5;
1344
1345                         if (info) return info_damage(dice, sides, 0);
1346
1347                         if (cast)
1348                         {
1349                                 dispel_undead(damroll(dice, sides));
1350                         }
1351                 }
1352                 break;
1353
1354         case 19:
1355                 if (name) return _("凪の刻", "Day of the Dove");
1356                 if (desc) return _("視界内の全てのモンスターを魅了する。抵抗されると無効。", "Attempts to charm all monsters in sight.");
1357     
1358                 {
1359                         int power = plev * 2;
1360
1361                         if (info) return info_power(power);
1362
1363                         if (cast)
1364                         {
1365                                 charm_monsters(power);
1366                         }
1367                 }
1368                 break;
1369
1370         case 20:
1371                 if (name) return _("致命傷", "Cause Critical Wounds");
1372                 if (desc) return _("1体のモンスターに大ダメージを与える。抵抗されると無効。", "Wounds a monster critically unless resisted.");
1373     
1374                 {
1375                         int dice = 5 + (plev - 5) / 3;
1376                         int sides = 15;
1377
1378                         if (info) return info_damage(dice, sides, 0);
1379
1380                         if (cast)
1381                         {
1382                                 if (!get_aim_dir(&dir)) return NULL;
1383                                 fire_ball_hide(GF_WOUNDS, dir, damroll(dice, sides), 0);
1384                         }
1385                 }
1386                 break;
1387
1388         case 21:
1389                 if (name) return _("帰還の詔", "Word of Recall");
1390                 if (desc) return _("地上にいるときはダンジョンの最深階へ、ダンジョンにいるときは地上へと移動する。", "Recalls player from dungeon to town, or from town to the deepest level of dungeon.");
1391     
1392                 {
1393                         int base = 15;
1394                         int sides = 20;
1395
1396                         if (info) return info_delay(base, sides);
1397
1398                         if (cast)
1399                         {
1400                                 if (!word_of_recall()) return NULL;
1401                         }
1402                 }
1403                 break;
1404
1405         case 22:
1406                 if (name) return _("真実の祭壇", "Alter Reality");
1407                 if (desc) return _("現在の階を再構成する。", "Recreates current dungeon level.");
1408     
1409                 {
1410                         int base = 15;
1411                         int sides = 20;
1412
1413                         if (info) return info_delay(base, sides);
1414
1415                         if (cast)
1416                         {
1417                                 alter_reality();
1418                         }
1419                 }
1420                 break;
1421
1422         case 23:
1423                 if (name) return _("真・結界", "Warding True");
1424                 if (desc) return _("自分のいる床と周囲8マスの床の上に、モンスターが通り抜けたり召喚されたりすることができなくなるルーンを描く。", "Creates glyphs in all adjacent squares and under you.");
1425     
1426                 {
1427                         int rad = 1;
1428
1429                         if (info) return info_radius(rad);
1430
1431                         if (cast)
1432                         {
1433                                 warding_glyph();
1434                                 glyph_creation();
1435                         }
1436                 }
1437                 break;
1438
1439         case 24:
1440                 if (name) return _("不毛化", "Sterilization");
1441                 if (desc) return _("この階の増殖するモンスターが増殖できなくなる。", "Prevents any breeders on current level from breeding.");
1442     
1443                 {
1444                         if (cast)
1445                         {
1446                                 num_repro += MAX_REPRO;
1447                         }
1448                 }
1449                 break;
1450
1451         case 25:
1452                 if (name) return _("全感知", "Detection");
1453                 if (desc) return _("近くの全てのモンスター、罠、扉、階段、財宝、そしてアイテムを感知する。", "Detects all monsters, traps, doors, stairs, treasures and items in your vicinity.");
1454
1455                 {
1456                         int rad = DETECT_RAD_DEFAULT;
1457
1458                         if (info) return info_radius(rad);
1459
1460                         if (cast)
1461                         {
1462                                 detect_all(rad);
1463                         }
1464                 }
1465                 break;
1466
1467         case 26:
1468                 if (name) return _("アンデッド消滅", "Annihilate Undead");
1469                 if (desc) return _("自分の周囲にいるアンデッドを現在の階から消し去る。抵抗されると無効。",
1470                         "Eliminates all nearby undead monsters, exhausting you.  Powerful or unique monsters may be able to resist.");
1471     
1472                 {
1473                         int power = plev + 50;
1474
1475                         if (info) return info_power(power);
1476
1477                         if (cast)
1478                         {
1479                                 mass_genocide_undead(power, TRUE);
1480                         }
1481                 }
1482                 break;
1483
1484         case 27:
1485                 if (name) return _("千里眼", "Clairvoyance");
1486                 if (desc) return _("その階全体を永久に照らし、ダンジョン内すべてのアイテムを感知する。", "Maps and lights whole dungeon level. Knows all objects location. And gives telepathy for a while.");
1487     
1488                 {
1489                         if (cast)
1490                         {
1491                                 wiz_lite(FALSE);
1492                         }
1493                 }
1494                 break;
1495
1496         case 28:
1497                 if (name) return _("全復活", "Restoration");
1498                 if (desc) return _("すべてのステータスと経験値を回復する。", "Restores all stats and experience.");
1499     
1500                 {
1501                         if (cast)
1502                         {
1503                                 do_res_stat(A_STR);
1504                                 do_res_stat(A_INT);
1505                                 do_res_stat(A_WIS);
1506                                 do_res_stat(A_DEX);
1507                                 do_res_stat(A_CON);
1508                                 do_res_stat(A_CHR);
1509                                 restore_level();
1510                         }
1511                 }
1512                 break;
1513
1514         case 29:
1515                 if (name) return _("*体力回復*", "Healing True");
1516                 if (desc) return _("最強の治癒の魔法で、負傷と朦朧状態も全快する。", "The greatest healing magic. Heals all HP, cut and stun.");
1517     
1518                 {
1519                         int heal = 2000;
1520
1521                         if (info) return info_heal(0, 0, heal);
1522
1523                         if (cast)
1524                         {
1525                                 hp_player(heal);
1526                                 set_stun(0);
1527                                 set_cut(0);
1528                         }
1529                 }
1530                 break;
1531
1532         case 30:
1533                 if (name) return _("聖なるビジョン", "Holy Vision");
1534                 if (desc) return _("アイテムの持つ能力を完全に知る。", "*Identifies* an item.");
1535     
1536                 {
1537                         if (cast)
1538                         {
1539                                 if (!identify_fully(FALSE)) return NULL;
1540                         }
1541                 }
1542                 break;
1543
1544         case 31:
1545                 if (name) return _("究極の耐性", "Ultimate Resistance");
1546                 if (desc) return _("一定時間、あらゆる耐性を付け、ACと魔法防御能力を上昇させる。", "Gives ultimate resistance, bonus to AC and speed.");
1547     
1548                 {
1549                         int base = plev / 2;
1550
1551                         if (info) return info_duration(base, base);
1552
1553                         if (cast)
1554                         {
1555                                 int v = randint1(base) + base;
1556                                 set_fast(v, FALSE);
1557                                 set_oppose_acid(v, FALSE);
1558                                 set_oppose_elec(v, FALSE);
1559                                 set_oppose_fire(v, FALSE);
1560                                 set_oppose_cold(v, FALSE);
1561                                 set_oppose_pois(v, FALSE);
1562                                 set_ultimate_res(v, FALSE);
1563                         }
1564                 }
1565                 break;
1566         }
1567
1568         return "";
1569 }
1570
1571 /*!
1572  * @brief 仙術領域魔法の各処理を行う
1573  * @param spell 魔法ID
1574  * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
1575  * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
1576  */
1577 static cptr do_sorcery_spell(int spell, int mode)
1578 {
1579         bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
1580         bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
1581         bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
1582         bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
1583
1584         int dir;
1585         int plev = p_ptr->lev;
1586
1587         switch (spell)
1588         {
1589         case 0:
1590                 if (name) return _("モンスター感知", "Detect Monsters");
1591                 if (desc) return _("近くの全ての見えるモンスターを感知する。", "Detects all monsters in your vicinity unless invisible.");
1592     
1593                 {
1594                         int rad = DETECT_RAD_DEFAULT;
1595
1596                         if (info) return info_radius(rad);
1597
1598                         if (cast)
1599                         {
1600                                 detect_monsters_normal(rad);
1601                         }
1602                 }
1603                 break;
1604
1605         case 1:
1606                 if (name) return _("ショート・テレポート", "Phase Door");
1607                 if (desc) return _("近距離のテレポートをする。", "Teleport short distance.");
1608     
1609                 {
1610                         int range = 10;
1611
1612                         if (info) return info_range(range);
1613
1614                         if (cast)
1615                         {
1616                                 teleport_player(range, 0L);
1617                         }
1618                 }
1619                 break;
1620
1621         case 2:
1622                 if (name) return _("罠と扉感知", "Detect Doors and Traps");
1623                 if (desc) return _("近くの全ての扉と罠を感知する。", "Detects traps, doors, and stairs in your vicinity.");
1624     
1625                 {
1626                         int rad = DETECT_RAD_DEFAULT;
1627
1628                         if (info) return info_radius(rad);
1629
1630                         if (cast)
1631                         {
1632                                 detect_traps(rad, TRUE);
1633                                 detect_doors(rad);
1634                                 detect_stairs(rad);
1635                         }
1636                 }
1637                 break;
1638
1639         case 3:
1640                 if (name) return _("ライト・エリア", "Light Area");
1641                 if (desc) return _("光源が照らしている範囲か部屋全体を永久に明るくする。", "Lights up nearby area and the inside of a room permanently.");
1642     
1643                 {
1644                         int dice = 2;
1645                         int sides = plev / 2;
1646                         int rad = plev / 10 + 1;
1647
1648                         if (info) return info_damage(dice, sides, 0);
1649
1650                         if (cast)
1651                         {
1652                                 lite_area(damroll(dice, sides), rad);
1653                         }
1654                 }
1655                 break;
1656
1657         case 4:
1658                 if (name) return _("パニック・モンスター", "Confuse Monster");
1659                 if (desc) return _("モンスター1体を混乱させる。抵抗されると無効。", "Attempts to confuse a monster.");
1660     
1661                 {
1662                         int power = (plev * 3) / 2;
1663
1664                         if (info) return info_power(power);
1665
1666                         if (cast)
1667                         {
1668                                 if (!get_aim_dir(&dir)) return NULL;
1669
1670                                 confuse_monster(dir, power);
1671                         }
1672                 }
1673                 break;
1674
1675         case 5:
1676                 if (name) return _("テレポート", "Teleport");
1677                 if (desc) return _("遠距離のテレポートをする。", "Teleport long distance.");
1678     
1679                 {
1680                         int range = plev * 5;
1681
1682                         if (info) return info_range(range);
1683
1684                         if (cast)
1685                         {
1686                                 teleport_player(range, 0L);
1687                         }
1688                 }
1689                 break;
1690
1691         case 6:
1692                 if (name) return _("スリープ・モンスター", "Sleep Monster");
1693                 if (desc) return _("モンスター1体を眠らせる。抵抗されると無効。", "Attempts to sleep a monster.");
1694     
1695                 {
1696                         int power = plev;
1697
1698                         if (info) return info_power(power);
1699
1700                         if (cast)
1701                         {
1702                                 if (!get_aim_dir(&dir)) return NULL;
1703
1704                                 sleep_monster(dir, plev);
1705                         }
1706                 }
1707                 break;
1708
1709         case 7:
1710                 if (name) return _("魔力充填", "Recharging");
1711                 if (desc) return _("杖/魔法棒の充填回数を増やすか、充填中のロッドの充填時間を減らす。", "Recharges staffs, wands or rods.");
1712     
1713                 {
1714                         int power = plev * 4;
1715
1716                         if (info) return info_power(power);
1717
1718                         if (cast)
1719                         {
1720                                 if (!recharge(power)) return NULL;
1721                         }
1722                 }
1723                 break;
1724
1725         case 8:
1726                 if (name) return _("魔法の地図", "Magic Mapping");
1727                 if (desc) return _("周辺の地形を感知する。", "Maps nearby area.");
1728     
1729                 {
1730                         int rad = DETECT_RAD_MAP;
1731
1732                         if (info) return info_radius(rad);
1733
1734                         if (cast)
1735                         {
1736                                 map_area(rad);
1737                         }
1738                 }
1739                 break;
1740
1741         case 9:
1742                 if (name) return _("鑑定", "Identify");
1743                 if (desc) return _("アイテムを識別する。", "Identifies an item.");
1744     
1745                 {
1746                         if (cast)
1747                         {
1748                                 if (!ident_spell(FALSE)) return NULL;
1749                         }
1750                 }
1751                 break;
1752
1753         case 10:
1754                 if (name) return _("スロウ・モンスター", "Slow Monster");
1755                 if (desc) return _("モンスター1体を減速さる。抵抗されると無効。", "Attempts to slow a monster.");
1756     
1757                 {
1758                         int power = plev;
1759
1760                         if (info) return info_power(power);
1761
1762                         if (cast)
1763                         {
1764                                 if (!get_aim_dir(&dir)) return NULL;
1765
1766                                 slow_monster(dir, plev);
1767                         }
1768                 }
1769                 break;
1770
1771         case 11:
1772                 if (name) return _("周辺スリープ", "Mass Sleep");
1773                 if (desc) return _("視界内の全てのモンスターを眠らせる。抵抗されると無効。", "Attempts to sleep all monsters in sight.");
1774     
1775                 {
1776                         int power = plev;
1777
1778                         if (info) return info_power(power);
1779
1780                         if (cast)
1781                         {
1782                                 sleep_monsters(plev);
1783                         }
1784                 }
1785                 break;
1786
1787         case 12:
1788                 if (name) return _("テレポート・モンスター", "Teleport Away");
1789                 if (desc) return _("モンスターをテレポートさせるビームを放つ。抵抗されると無効。", "Teleports all monsters on the line away unless resisted.");
1790     
1791                 {
1792                         int power = plev;
1793
1794                         if (info) return info_power(power);
1795
1796                         if (cast)
1797                         {
1798                                 if (!get_aim_dir(&dir)) return NULL;
1799
1800                                 fire_beam(GF_AWAY_ALL, dir, power);
1801                         }
1802                 }
1803                 break;
1804
1805         case 13:
1806                 if (name) return _("スピード", "Haste Self");
1807                 if (desc) return _("一定時間、加速する。", "Hastes you for a while.");
1808     
1809                 {
1810                         int base = plev;
1811                         int sides = 20 + plev;
1812
1813                         if (info) return info_duration(base, sides);
1814
1815                         if (cast)
1816                         {
1817                                 set_fast(randint1(sides) + base, FALSE);
1818                         }
1819                 }
1820                 break;
1821
1822         case 14:
1823                 if (name) return _("真・感知", "Detection True");
1824                 if (desc) return _("近くの全てのモンスター、罠、扉、階段、財宝、そしてアイテムを感知する。",
1825                         "Detects all monsters, traps, doors, stairs, treasures and items in your vicinity.");
1826     
1827                 {
1828                         int rad = DETECT_RAD_DEFAULT;
1829
1830                         if (info) return info_radius(rad);
1831
1832                         if (cast)
1833                         {
1834                                 detect_all(rad);
1835                         }
1836                 }
1837                 break;
1838
1839         case 15:
1840                 if (name) return _("真・鑑定", "Identify True");
1841                 if (desc) return _("アイテムの持つ能力を完全に知る。", "*Identifies* an item.");
1842     
1843                 {
1844                         if (cast)
1845                         {
1846                                 if (!identify_fully(FALSE)) return NULL;
1847                         }
1848                 }
1849                 break;
1850
1851         case 16:
1852                 if (name) return _("物体と財宝感知", "Detect items and Treasure");
1853                 if (desc) return _("近くの全てのアイテムと財宝を感知する。", "Detects all treasures and items in your vicinity.");
1854     
1855                 {
1856                         int rad = DETECT_RAD_DEFAULT;
1857
1858                         if (info) return info_radius(rad);
1859
1860                         if (cast)
1861                         {
1862                                 detect_objects_normal(rad);
1863                                 detect_treasure(rad);
1864                                 detect_objects_gold(rad);
1865                         }
1866                 }
1867                 break;
1868
1869         case 17:
1870                 if (name) return _("チャーム・モンスター", "Charm Monster");
1871                 if (desc) return _("モンスター1体を魅了する。抵抗されると無効。", "Attempts to charm a monster.");
1872     
1873                 {
1874                         int power = plev;
1875
1876                         if (info) return info_power(power);
1877
1878                         if (cast)
1879                         {
1880                                 if (!get_aim_dir(&dir)) return NULL;
1881
1882                                 charm_monster(dir, power);
1883                         }
1884                 }
1885                 break;
1886
1887         case 18:
1888                 if (name) return _("精神感知", "Sense Minds");
1889                 if (desc) return _("一定時間、テレパシー能力を得る。", "Gives telepathy for a while.");
1890     
1891                 {
1892                         int base = 25;
1893                         int sides = 30;
1894
1895                         if (info) return info_duration(base, sides);
1896
1897                         if (cast)
1898                         {
1899                                 set_tim_esp(randint1(sides) + base, FALSE);
1900                         }
1901                 }
1902                 break;
1903
1904         case 19:
1905                 if (name) return _("街移動", "Teleport to town");
1906                 if (desc) return _("街へ移動する。地上にいるときしか使えない。", "Teleport to a town which you choose in a moment. Can only be used outdoors.");
1907     
1908                 {
1909                         if (cast)
1910                         {
1911                                 if (!tele_town()) return NULL;
1912                         }
1913                 }
1914                 break;
1915
1916         case 20:
1917                 if (name) return _("自己分析", "Self Knowledge");
1918                 if (desc) return _("現在の自分の状態を完全に知る。",
1919                         "Gives you useful info regarding your current resistances, the powers of your weapon and maximum limits of your stats.");
1920     
1921                 {
1922                         if (cast)
1923                         {
1924                                 self_knowledge();
1925                         }
1926                 }
1927                 break;
1928
1929         case 21:
1930                 if (name) return _("テレポート・レベル", "Teleport Level");
1931                 if (desc) return _("瞬時に上か下の階にテレポートする。", "Teleport to up or down stairs in a moment.");
1932     
1933                 {
1934                         if (cast)
1935                         {
1936                                 if (!get_check(_("本当に他の階にテレポートしますか?", "Are you sure? (Teleport Level)"))) return NULL;
1937                                 teleport_level(0);
1938                         }
1939                 }
1940                 break;
1941
1942         case 22:
1943                 if (name) return _("帰還の呪文", "Word of Recall");
1944                 if (desc) return _("地上にいるときはダンジョンの最深階へ、ダンジョンにいるときは地上へと移動する。", 
1945                         "Recalls player from dungeon to town, or from town to the deepest level of dungeon.");
1946     
1947                 {
1948                         int base = 15;
1949                         int sides = 20;
1950
1951                         if (info) return info_delay(base, sides);
1952
1953                         if (cast)
1954                         {
1955                                 if (!word_of_recall()) return NULL;
1956                         }
1957                 }
1958                 break;
1959
1960         case 23:
1961                 if (name) return _("次元の扉", "Dimension Door");
1962                 if (desc) return _("短距離内の指定した場所にテレポートする。", "Teleport to given location.");
1963     
1964                 {
1965                         int range = plev / 2 + 10;
1966
1967                         if (info) return info_range(range);
1968
1969                         if (cast)
1970                         {
1971                                 msg_print(_("次元の扉が開いた。目的地を選んで下さい。", "You open a dimensional gate. Choose a destination."));
1972                                 if (!dimension_door()) return NULL;
1973                         }
1974                 }
1975                 break;
1976
1977         case 24:
1978                 if (name) return _("調査", "Probing");
1979                 if (desc) return _("モンスターの属性、残り体力、最大体力、スピード、正体を知る。",
1980                         "Proves all monsters' alignment, HP, speed and their true character.");
1981     
1982                 {
1983                         if (cast)
1984                         {
1985                                 probing();
1986                         }
1987                 }
1988                 break;
1989
1990         case 25:
1991                 if (name) return _("爆発のルーン", "Explosive Rune");
1992                 if (desc) return _("自分のいる床の上に、モンスターが通ると爆発してダメージを与えるルーンを描く。", 
1993                         "Sets a glyph under you. The glyph will explode when a monster moves on it.");
1994     
1995                 {
1996                         int dice = 7;
1997                         int sides = 7;
1998                         int base = plev;
1999
2000                         if (info) return info_damage(dice, sides, base);
2001
2002                         if (cast)
2003                         {
2004                                 explosive_rune();
2005                         }
2006                 }
2007                 break;
2008
2009         case 26:
2010                 if (name) return _("念動力", "Telekinesis");
2011                 if (desc) return _("アイテムを自分の足元へ移動させる。", "Pulls a distant item close to you.");
2012     
2013                 {
2014                         int weight = plev * 15;
2015
2016                         if (info) return info_weight(weight);
2017
2018                         if (cast)
2019                         {
2020                                 if (!get_aim_dir(&dir)) return NULL;
2021
2022                                 fetch(dir, weight, FALSE);
2023                         }
2024                 }
2025                 break;
2026
2027         case 27:
2028                 if (name) return _("千里眼", "Clairvoyance");
2029                 if (desc) return _("その階全体を永久に照らし、ダンジョン内すべてのアイテムを感知する。さらに、一定時間テレパシー能力を得る。",
2030                         "Maps and lights whole dungeon level. Knows all objects location. And gives telepathy for a while.");
2031     
2032                 {
2033                         int base = 25;
2034                         int sides = 30;
2035
2036                         if (info) return info_duration(base, sides);
2037
2038                         if (cast)
2039                         {
2040                                 chg_virtue(V_KNOWLEDGE, 1);
2041                                 chg_virtue(V_ENLIGHTEN, 1);
2042
2043                                 wiz_lite(FALSE);
2044
2045                                 if (!p_ptr->telepathy)
2046                                 {
2047                                         set_tim_esp(randint1(sides) + base, FALSE);
2048                                 }
2049                         }
2050                 }
2051                 break;
2052
2053         case 28:
2054                 if (name) return _("魅了の視線", "Charm monsters");
2055                 if (desc) return _("視界内の全てのモンスターを魅了する。抵抗されると無効。", "Attempts to charm all monsters in sight.");
2056     
2057                 {
2058                         int power = plev * 2;
2059
2060                         if (info) return info_power(power);
2061
2062                         if (cast)
2063                         {
2064                                 charm_monsters(power);
2065                         }
2066                 }
2067                 break;
2068
2069         case 29:
2070                 if (name) return _("錬金術", "Alchemy");
2071                 if (desc) return _("アイテム1つをお金に変える。", "Turns an item into 1/3 of its value in gold.");
2072     
2073                 {
2074                         if (cast)
2075                         {
2076                                 if (!alchemy()) return NULL;
2077                         }
2078                 }
2079                 break;
2080
2081         case 30:
2082                 if (name) return _("怪物追放", "Banishment");
2083                 if (desc) return _("視界内の全てのモンスターをテレポートさせる。抵抗されると無効。", "Teleports all monsters in sight away unless resisted.");
2084     
2085                 {
2086                         int power = plev * 4;
2087
2088                         if (info) return info_power(power);
2089
2090                         if (cast)
2091                         {
2092                                 banish_monsters(power);
2093                         }
2094                 }
2095                 break;
2096
2097         case 31:
2098                 if (name) return _("無傷の球", "Globe of Invulnerability");
2099                 if (desc) return _("一定時間、ダメージを受けなくなるバリアを張る。切れた瞬間に少しターンを消費するので注意。",
2100                         "Generates barrier which completely protect you from almost all damages. Takes a few your turns when the barrier breaks or duration time is exceeded.");
2101     
2102                 {
2103                         int base = 4;
2104
2105                         if (info) return info_duration(base, base);
2106
2107                         if (cast)
2108                         {
2109                                 set_invuln(randint1(base) + base, FALSE);
2110                         }
2111                 }
2112                 break;
2113         }
2114
2115         return "";
2116 }
2117
2118
2119 /*!
2120  * @brief 自然領域魔法の各処理を行う
2121  * @param spell 魔法ID
2122  * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
2123  * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
2124  */
2125 static cptr do_nature_spell(int spell, int mode)
2126 {
2127         bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
2128         bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
2129         bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
2130         bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
2131
2132         static const char s_dam[] = _("損傷:", "dam ");
2133         static const char s_rng[] = _("射程", "rng ");
2134
2135         int dir;
2136         int plev = p_ptr->lev;
2137
2138         switch (spell)
2139         {
2140         case 0:
2141                 if (name) return _("モンスター感知", "Detect Creatures");
2142                 if (desc) return _("近くの全ての見えるモンスターを感知する。", "Detects all monsters in your vicinity unless invisible.");
2143     
2144                 {
2145                         int rad = DETECT_RAD_DEFAULT;
2146
2147                         if (info) return info_radius(rad);
2148
2149                         if (cast)
2150                         {
2151                                 detect_monsters_normal(rad);
2152                         }
2153                 }
2154                 break;
2155
2156         case 1:
2157                 if (name) return _("稲妻", "Lightning");
2158                 if (desc) return _("電撃の短いビームを放つ。", "Fires a short beam of lightning.");
2159     
2160                 {
2161                         int dice = 3 + (plev - 1) / 5;
2162                         int sides = 4;
2163                         int range = plev / 6 + 2;
2164
2165                         if (info) return format("%s%dd%d %s%d", s_dam, dice, sides, s_rng, range);
2166
2167                         if (cast)
2168                         {
2169                                 project_length = range;
2170
2171                                 if (!get_aim_dir(&dir)) return NULL;
2172
2173                                 fire_beam(GF_ELEC, dir, damroll(dice, sides));
2174                         }
2175                 }
2176                 break;
2177
2178         case 2:
2179                 if (name) return _("罠と扉感知", "Detect Doors and Traps");
2180                 if (desc) return _("近くの全ての罠と扉を感知する。", "Detects traps, doors, and stairs in your vicinity.");
2181     
2182                 {
2183                         int rad = DETECT_RAD_DEFAULT;
2184
2185                         if (info) return info_radius(rad);
2186
2187                         if (cast)
2188                         {
2189                                 detect_traps(rad, TRUE);
2190                                 detect_doors(rad);
2191                                 detect_stairs(rad);
2192                         }
2193                 }
2194                 break;
2195
2196         case 3:
2197                 if (name) return _("食糧生成", "Produce Food");
2198                 if (desc) return _("食料を一つ作り出す。", "Produces a Ration of Food.");
2199     
2200                 {
2201                         if (cast)
2202                         {
2203                                 object_type forge, *q_ptr = &forge;
2204                                 msg_print(_("食料を生成した。", "A food ration is produced."));
2205
2206                                 /* Create the food ration */
2207                                 object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_RATION));
2208
2209                                 /* Drop the object from heaven */
2210                                 drop_near(q_ptr, -1, p_ptr->y, p_ptr->x);
2211                         }
2212                 }
2213                 break;
2214
2215         case 4:
2216                 if (name) return _("日の光", "Daylight");
2217                 if (desc) return _("光源が照らしている範囲か部屋全体を永久に明るくする。", "Lights up nearby area and the inside of a room permanently.");
2218     
2219                 {
2220                         int dice = 2;
2221                         int sides = plev / 2;
2222                         int rad = (plev / 10) + 1;
2223
2224                         if (info) return info_damage(dice, sides, 0);
2225
2226                         if (cast)
2227                         {
2228                                 lite_area(damroll(dice, sides), rad);
2229
2230                                 if ((prace_is_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE)) && !p_ptr->resist_lite)
2231                                 {
2232                                         msg_print(_("日の光があなたの肉体を焦がした!", "The daylight scorches your flesh!"));
2233                                         take_hit(DAMAGE_NOESCAPE, damroll(2, 2), _("日の光", "daylight"), -1);
2234                                 }
2235                         }
2236                 }
2237                 break;
2238
2239         case 5:
2240                 if (name) return _("動物習し", "Animal Taming");
2241                 if (desc) return _("動物1体を魅了する。抵抗されると無効。", "Attempts to charm an animal.");
2242     
2243                 {
2244                         int power = plev;
2245
2246                         if (info) return info_power(power);
2247
2248                         if (cast)
2249                         {
2250                                 if (!get_aim_dir(&dir)) return NULL;
2251
2252                                 charm_animal(dir, power);
2253                         }
2254                 }
2255                 break;
2256
2257         case 6:
2258                 if (name) return _("環境への耐性", "Resist Environment");
2259                 if (desc) return _("一定時間、冷気、炎、電撃に対する耐性を得る。装備による耐性に累積する。",
2260                         "Gives resistance to fire, cold and electricity for a while. These resistances can be added to which from equipment for more powerful resistances.");
2261     
2262                 {
2263                         int base = 20;
2264
2265                         if (info) return info_duration(base, base);
2266
2267                         if (cast)
2268                         {
2269                                 set_oppose_cold(randint1(base) + base, FALSE);
2270                                 set_oppose_fire(randint1(base) + base, FALSE);
2271                                 set_oppose_elec(randint1(base) + base, FALSE);
2272                         }
2273                 }
2274                 break;
2275
2276         case 7:
2277                 if (name) return _("傷と毒治療", "Cure Wounds & Poison");
2278                 if (desc) return _("怪我を全快させ、毒を体から完全に取り除き、体力を少し回復させる。", "Heals all cut and poison status. Heals HP a little.");
2279     
2280                 {
2281                         int dice = 2;
2282                         int sides = 8;
2283
2284                         if (info) return info_heal(dice, sides, 0);
2285
2286                         if (cast)
2287                         {
2288                                 hp_player(damroll(dice, sides));
2289                                 set_cut(0);
2290                                 set_poisoned(0);
2291                         }
2292                 }
2293                 break;
2294
2295         case 8:
2296                 if (name) return _("岩石溶解", "Stone to Mud");
2297                 if (desc) return _("壁を溶かして床にする。", "Turns one rock square to mud.");
2298     
2299                 {
2300                         int dice = 1;
2301                         int sides = 30;
2302                         int base = 20;
2303
2304                         if (info) return info_damage(dice, sides, base);
2305
2306                         if (cast)
2307                         {
2308                                 if (!get_aim_dir(&dir)) return NULL;
2309
2310                                 wall_to_mud(dir, 20 + randint1(30));
2311                         }
2312                 }
2313                 break;
2314
2315         case 9:
2316                 if (name) return _("アイス・ボルト", "Frost Bolt");
2317                 if (desc) return _("冷気のボルトもしくはビームを放つ。", "Fires a bolt or beam of cold.");
2318     
2319                 {
2320                         int dice = 3 + (plev - 5) / 4;
2321                         int sides = 8;
2322
2323                         if (info) return info_damage(dice, sides, 0);
2324
2325                         if (cast)
2326                         {
2327                                 if (!get_aim_dir(&dir)) return NULL;
2328                                 fire_bolt_or_beam(beam_chance() - 10, GF_COLD, dir, damroll(dice, sides));
2329                         }
2330                 }
2331                 break;
2332
2333         case 10:
2334                 if (name) return _("自然の覚醒", "Nature Awareness");
2335                 if (desc) return _("周辺の地形を感知し、近くの罠、扉、階段、全てのモンスターを感知する。",
2336                         "Maps nearby area. Detects all monsters, traps, doors and stairs.");
2337     
2338                 {
2339                         int rad1 = DETECT_RAD_MAP;
2340                         int rad2 = DETECT_RAD_DEFAULT;
2341
2342                         if (info) return info_radius(MAX(rad1, rad2));
2343
2344                         if (cast)
2345                         {
2346                                 map_area(rad1);
2347                                 detect_traps(rad2, TRUE);
2348                                 detect_doors(rad2);
2349                                 detect_stairs(rad2);
2350                                 detect_monsters_normal(rad2);
2351                         }
2352                 }
2353                 break;
2354
2355         case 11:
2356                 if (name) return _("ファイア・ボルト", "Fire Bolt");
2357                 if (desc) return _("火炎のボルトもしくはビームを放つ。", "Fires a bolt or beam of fire.");
2358     
2359                 {
2360                         int dice = 5 + (plev - 5) / 4;
2361                         int sides = 8;
2362
2363                         if (info) return info_damage(dice, sides, 0);
2364
2365                         if (cast)
2366                         {
2367                                 if (!get_aim_dir(&dir)) return NULL;
2368                                 fire_bolt_or_beam(beam_chance() - 10, GF_FIRE, dir, damroll(dice, sides));
2369                         }
2370                 }
2371                 break;
2372
2373         case 12:
2374                 if (name) return _("太陽光線", "Ray of Sunlight");
2375                 if (desc) return _("光線を放つ。光りを嫌うモンスターに効果がある。", "Fires a beam of light which damages to light-sensitive monsters.");
2376     
2377                 {
2378                         int dice = 6;
2379                         int sides = 8;
2380
2381                         if (info) return info_damage(dice, sides, 0);
2382
2383                         if (cast)
2384                         {
2385                                 if (!get_aim_dir(&dir)) return NULL;
2386                                 msg_print(_("太陽光線が現れた。", "A line of sunlight appears."));
2387                                 lite_line(dir, damroll(6, 8));
2388                         }
2389                 }
2390                 break;
2391
2392         case 13:
2393                 if (name) return _("足かせ", "Entangle");
2394                 if (desc) return _("視界内の全てのモンスターを減速させる。抵抗されると無効。", "Attempts to slow all monsters in sight.");
2395     
2396                 {
2397                         int power = plev;
2398
2399                         if (info) return info_power(power);
2400
2401                         if (cast)
2402                         {
2403                                 slow_monsters(plev);
2404                         }
2405                 }
2406                 break;
2407
2408         case 14:
2409                 if (name) return _("動物召喚", "Summon Animal");
2410                 if (desc) return _("動物を1体召喚する。", "Summons an animal.");
2411     
2412                 {
2413                         if (cast)
2414                         {
2415                                 if (!(summon_specific(-1, p_ptr->y, p_ptr->x, plev, SUMMON_ANIMAL_RANGER, (PM_ALLOW_GROUP | PM_FORCE_PET))))
2416                                 {
2417                                         msg_print(_("動物は現れなかった。", "No animals arrive."));
2418                                 }
2419                                 break;
2420                         }
2421                 }
2422                 break;
2423
2424         case 15:
2425                 if (name) return _("薬草治療", "Herbal Healing");
2426                 if (desc) return _("体力を大幅に回復させ、負傷、朦朧状態、毒から全快する。", "Heals HP greatly. And heals cut, stun and poison completely.");
2427     
2428                 {
2429                         int heal = 500;
2430
2431                         if (info) return info_heal(0, 0, heal);
2432
2433                         if (cast)
2434                         {
2435                                 hp_player(heal);
2436                                 set_stun(0);
2437                                 set_cut(0);
2438                                 set_poisoned(0);
2439                         }
2440                 }
2441                 break;
2442
2443         case 16:
2444                 if (name) return _("階段生成", "Stair Building");
2445                 if (desc) return _("自分のいる位置に階段を作る。", "Creates a stair which goes down or up.");
2446     
2447                 {
2448                         if (cast)
2449                         {
2450                                 stair_creation();
2451                         }
2452                 }
2453                 break;
2454
2455         case 17:
2456                 if (name) return _("肌石化", "Stone Skin");
2457                 if (desc) return _("一定時間、ACを上昇させる。", "Gives bonus to AC for a while.");
2458     
2459                 {
2460                         int base = 20;
2461                         int sides = 30;
2462
2463                         if (info) return info_duration(base, sides);
2464
2465                         if (cast)
2466                         {
2467                                 set_shield(randint1(sides) + base, FALSE);
2468                         }
2469                 }
2470                 break;
2471
2472         case 18:
2473                 if (name) return _("真・耐性", "Resistance True");
2474                 if (desc) return _("一定時間、酸、電撃、炎、冷気、毒に対する耐性を得る。装備による耐性に累積する。", 
2475                         "Gives resistance to fire, cold, electricity, acid and poison for a while. These resistances can be added to which from equipment for more powerful resistances.");
2476     
2477                 {
2478                         int base = 20;
2479
2480                         if (info) return info_duration(base, base);
2481
2482                         if (cast)
2483                         {
2484                                 set_oppose_acid(randint1(base) + base, FALSE);
2485                                 set_oppose_elec(randint1(base) + base, FALSE);
2486                                 set_oppose_fire(randint1(base) + base, FALSE);
2487                                 set_oppose_cold(randint1(base) + base, FALSE);
2488                                 set_oppose_pois(randint1(base) + base, FALSE);
2489                         }
2490                 }
2491                 break;
2492
2493         case 19:
2494                 if (name) return _("森林創造", "Forest Creation");
2495                 if (desc) return _("周囲に木を作り出す。", "Creates trees in all adjacent squares.");
2496     
2497                 {
2498                         if (cast)
2499                         {
2500                                 tree_creation();
2501                         }
2502                 }
2503                 break;
2504
2505         case 20:
2506                 if (name) return _("動物友和", "Animal Friendship");
2507                 if (desc) return _("視界内の全ての動物を魅了する。抵抗されると無効。", "Attempts to charm all animals in sight.");
2508     
2509                 {
2510                         int power = plev * 2;
2511
2512                         if (info) return info_power(power);
2513
2514                         if (cast)
2515                         {
2516                                 charm_animals(power);
2517                         }
2518                 }
2519                 break;
2520
2521         case 21:
2522                 if (name) return _("試金石", "Stone Tell");
2523                 if (desc) return _("アイテムの持つ能力を完全に知る。", "*Identifies* an item.");
2524     
2525                 {
2526                         if (cast)
2527                         {
2528                                 if (!identify_fully(FALSE)) return NULL;
2529                         }
2530                 }
2531                 break;
2532
2533         case 22:
2534                 if (name) return _("石の壁", "Wall of Stone");
2535                 if (desc) return _("自分の周囲に花崗岩の壁を作る。", "Creates granite walls in all adjacent squares.");
2536     
2537                 {
2538                         if (cast)
2539                         {
2540                                 wall_stone();
2541                         }
2542                 }
2543                 break;
2544
2545         case 23:
2546                 if (name) return _("腐食防止", "Protect from Corrosion");
2547                 if (desc) return _("アイテムを酸で傷つかないよう加工する。", "Makes an equipment acid-proof.");
2548     
2549                 {
2550                         if (cast)
2551                         {
2552                                 if (!rustproof()) return NULL;
2553                         }
2554                 }
2555                 break;
2556
2557         case 24:
2558                 if (name) return _("地震", "Earthquake");
2559                 if (desc) return _("周囲のダンジョンを揺らし、壁と床をランダムに入れ変える。", 
2560                         "Shakes dungeon structure, and results in random swapping of floors and walls.");
2561     
2562                 {
2563                         int rad = 10;
2564
2565                         if (info) return info_radius(rad);
2566
2567                         if (cast)
2568                         {
2569                                 earthquake(p_ptr->y, p_ptr->x, rad);
2570                         }
2571                 }
2572                 break;
2573
2574         case 25:
2575                 if (name) return _("カマイタチ", "Cyclone");
2576                 if (desc) return _("全方向に向かって攻撃する。", "Attacks all adjacent monsters.");
2577     
2578                 {
2579                         if (cast)
2580                         {
2581                                 int y = 0, x = 0;
2582                                 cave_type       *c_ptr;
2583                                 monster_type    *m_ptr;
2584
2585                                 for (dir = 0; dir < 8; dir++)
2586                                 {
2587                                         y = p_ptr->y + ddy_ddd[dir];
2588                                         x = p_ptr->x + ddx_ddd[dir];
2589                                         c_ptr = &cave[y][x];
2590
2591                                         /* Get the monster */
2592                                         m_ptr = &m_list[c_ptr->m_idx];
2593
2594                                         /* Hack -- attack monsters */
2595                                         if (c_ptr->m_idx && (m_ptr->ml || cave_have_flag_bold(y, x, FF_PROJECT)))
2596                                                 py_attack(y, x, 0);
2597                                 }
2598                         }
2599                 }
2600                 break;
2601
2602         case 26:
2603                 if (name) return _("ブリザード", "Blizzard");
2604                 if (desc) return _("巨大な冷気の球を放つ。", "Fires a huge ball of cold.");
2605     
2606                 {
2607                         int dam = 70 + plev * 3 / 2;
2608                         int rad = plev / 12 + 1;
2609
2610                         if (info) return info_damage(0, 0, dam);
2611
2612                         if (cast)
2613                         {
2614                                 if (!get_aim_dir(&dir)) return NULL;
2615
2616                                 fire_ball(GF_COLD, dir, dam, rad);
2617                         }
2618                 }
2619                 break;
2620
2621         case 27:
2622                 if (name) return _("稲妻嵐", "Lightning Storm");
2623                 if (desc) return _("巨大な電撃の球を放つ。", "Fires a huge electric ball.");
2624     
2625                 {
2626                         int dam = 90 + plev * 3 / 2;
2627                         int rad = plev / 12 + 1;
2628
2629                         if (info) return info_damage(0, 0, dam);
2630
2631                         if (cast)
2632                         {
2633                                 if (!get_aim_dir(&dir)) return NULL;
2634                                 fire_ball(GF_ELEC, dir, dam, rad);
2635                                 break;
2636                         }
2637                 }
2638                 break;
2639
2640         case 28:
2641                 if (name) return _("渦潮", "Whirlpool");
2642                 if (desc) return _("巨大な水の球を放つ。", "Fires a huge ball of water.");
2643     
2644                 {
2645                         int dam = 100 + plev * 3 / 2;
2646                         int rad = plev / 12 + 1;
2647
2648                         if (info) return info_damage(0, 0, dam);
2649
2650                         if (cast)
2651                         {
2652                                 if (!get_aim_dir(&dir)) return NULL;
2653                                 fire_ball(GF_WATER, dir, dam, rad);
2654                         }
2655                 }
2656                 break;
2657
2658         case 29:
2659                 if (name) return _("陽光召喚", "Call Sunlight");
2660                 if (desc) return _("自分を中心とした光の球を発生させる。さらに、その階全体を永久に照らし、ダンジョン内すべてのアイテムを感知する。",
2661                         "Generates ball of light centered on you. Maps and lights whole dungeon level. Knows all objects location.");
2662     
2663                 {
2664                         int dam = 150;
2665                         int rad = 8;
2666
2667                         if (info) return info_damage(0, 0, dam/2);
2668
2669                         if (cast)
2670                         {
2671                                 fire_ball(GF_LITE, 0, dam, rad);
2672                                 chg_virtue(V_KNOWLEDGE, 1);
2673                                 chg_virtue(V_ENLIGHTEN, 1);
2674                                 wiz_lite(FALSE);
2675
2676                                 if ((prace_is_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE)) && !p_ptr->resist_lite)
2677                                 {
2678                                         msg_print(_("日光があなたの肉体を焦がした!", "The sunlight scorches your flesh!"));
2679                                         take_hit(DAMAGE_NOESCAPE, 50, _("日光", "sunlight"), -1);
2680                                 }
2681                         }
2682                 }
2683                 break;
2684
2685         case 30:
2686                 if (name) return _("精霊の刃", "Elemental Branding");
2687                 if (desc) return _("武器に炎か冷気の属性をつける。", "Makes current weapon fire or frost branded.");
2688     
2689                 {
2690                         if (cast)
2691                         {
2692                                 brand_weapon(randint0(2));
2693                         }
2694                 }
2695                 break;
2696
2697         case 31:
2698                 if (name) return _("自然の脅威", "Nature's Wrath");
2699                 if (desc) return _("近くの全てのモンスターにダメージを与え、地震を起こし、自分を中心とした分解の球を発生させる。", 
2700                         "Damages all monsters in sight. Makes quake. Generates disintegration ball centered on you.");
2701     
2702                 {
2703                         int d_dam = 4 * plev;
2704                         int b_dam = (100 + plev) * 2;
2705                         int b_rad = 1 + plev / 12;
2706                         int q_rad = 20 + plev / 2;
2707
2708                         if (info) return format("%s%d+%d", s_dam, d_dam, b_dam/2);
2709
2710                         if (cast)
2711                         {
2712                                 dispel_monsters(d_dam);
2713                                 earthquake(p_ptr->y, p_ptr->x, q_rad);
2714                                 project(0, b_rad, p_ptr->y, p_ptr->x, b_dam, GF_DISINTEGRATE, PROJECT_KILL | PROJECT_ITEM, -1);
2715                         }
2716                 }
2717                 break;
2718         }
2719
2720         return "";
2721 }
2722
2723
2724 /*!
2725  * @brief カオス領域魔法の各処理を行う
2726  * @param spell 魔法ID
2727  * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
2728  * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
2729  */
2730 static cptr do_chaos_spell(int spell, int mode)
2731 {
2732         bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
2733         bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
2734         bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
2735         bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
2736
2737         static const char s_dam[] = _("損傷:", "dam ");
2738         static const char s_random[] = _("ランダム", "random");
2739
2740         int dir;
2741         int plev = p_ptr->lev;
2742
2743         switch (spell)
2744         {
2745         case 0:
2746                 if (name) return _("マジック・ミサイル", "Magic Missile");
2747                 if (desc) return _("弱い魔法の矢を放つ。", "Fires a weak bolt of magic.");
2748     
2749                 {
2750                         int dice = 3 + ((plev - 1) / 5);
2751                         int sides = 4;
2752
2753                         if (info) return info_damage(dice, sides, 0);
2754
2755                         if (cast)
2756                         {
2757                                 if (!get_aim_dir(&dir)) return NULL;
2758
2759                                 fire_bolt_or_beam(beam_chance() - 10, GF_MISSILE, dir, damroll(dice, sides));
2760                         }
2761                 }
2762                 break;
2763
2764         case 1:
2765                 if (name) return _("トラップ/ドア破壊", "Trap / Door Destruction");
2766                 if (desc) return _("隣接する罠と扉を破壊する。", "Destroys all traps in adjacent squares.");
2767     
2768                 {
2769                         int rad = 1;
2770
2771                         if (info) return info_radius(rad);
2772
2773                         if (cast)
2774                         {
2775                                 destroy_doors_touch();
2776                         }
2777                 }
2778                 break;
2779
2780         case 2:
2781                 if (name) return _("閃光", "Flash of Light");
2782                 if (desc) return _("光源が照らしている範囲か部屋全体を永久に明るくする。", "Lights up nearby area and the inside of a room permanently.");
2783     
2784                 {
2785                         int dice = 2;
2786                         int sides = plev / 2;
2787                         int rad = (plev / 10) + 1;
2788
2789                         if (info) return info_damage(dice, sides, 0);
2790
2791                         if (cast)
2792                         {
2793                                 lite_area(damroll(dice, sides), rad);
2794                         }
2795                 }
2796                 break;
2797
2798         case 3:
2799                 if (name) return _("混乱の手", "Touch of Confusion");
2800                 if (desc) return _("相手を混乱させる攻撃をできるようにする。", "Attempts to confuse the next monster that you hit.");
2801     
2802                 {
2803                         if (cast)
2804                         {
2805                                 if (!(p_ptr->special_attack & ATTACK_CONFUSE))
2806                                 {
2807                                         msg_print(_("あなたの手は光り始めた。", "Your hands start glowing."));
2808                                         p_ptr->special_attack |= ATTACK_CONFUSE;
2809                                         p_ptr->redraw |= (PR_STATUS);
2810                                 }
2811                         }
2812                 }
2813                 break;
2814
2815         case 4:
2816                 if (name) return _("魔力炸裂", "Mana Burst");
2817                 if (desc) return _("魔法の球を放つ。", "Fires a ball of magic.");
2818     
2819                 {
2820                         int dice = 3;
2821                         int sides = 5;
2822                         int rad = (plev < 30) ? 2 : 3;
2823                         int base;
2824
2825                         if (p_ptr->pclass == CLASS_MAGE ||
2826                             p_ptr->pclass == CLASS_HIGH_MAGE ||
2827                             p_ptr->pclass == CLASS_SORCERER)
2828                                 base = plev + plev / 2;
2829                         else
2830                                 base = plev + plev / 4;
2831
2832
2833                         if (info) return info_damage(dice, sides, base);
2834
2835                         if (cast)
2836                         {
2837                                 if (!get_aim_dir(&dir)) return NULL;
2838
2839                                 fire_ball(GF_MISSILE, dir, damroll(dice, sides) + base, rad);
2840
2841                                 /*
2842                                  * Shouldn't actually use GF_MANA, as
2843                                  * it will destroy all items on the
2844                                  * floor
2845                                  */
2846                         }
2847                 }
2848                 break;
2849
2850         case 5:
2851                 if (name) return _("ファイア・ボルト", "Fire Bolt");
2852                 if (desc) return _("炎のボルトもしくはビームを放つ。", "Fires a bolt or beam of fire.");
2853     
2854                 {
2855                         int dice = 8 + (plev - 5) / 4;
2856                         int sides = 8;
2857
2858                         if (info) return info_damage(dice, sides, 0);
2859
2860                         if (cast)
2861                         {
2862                                 if (!get_aim_dir(&dir)) return NULL;
2863
2864                                 fire_bolt_or_beam(beam_chance(), GF_FIRE, dir, damroll(dice, sides));
2865                         }
2866                 }
2867                 break;
2868
2869         case 6:
2870                 if (name) return _("力の拳", "Fist of Force");
2871                 if (desc) return _("ごく小さな分解の球を放つ。", "Fires a tiny ball of disintegration.");
2872     
2873                 {
2874                         int dice = 8 + ((plev - 5) / 4);
2875                         int sides = 8;
2876
2877                         if (info) return info_damage(dice, sides, 0);
2878
2879                         if (cast)
2880                         {
2881                                 if (!get_aim_dir(&dir)) return NULL;
2882
2883                                 fire_ball(GF_DISINTEGRATE, dir,
2884                                         damroll(dice, sides), 0);
2885                         }
2886                 }
2887                 break;
2888
2889         case 7:
2890                 if (name) return _("テレポート", "Teleport Self");
2891                 if (desc) return _("遠距離のテレポートをする。", "Teleport long distance.");
2892     
2893                 {
2894                         int range = plev * 5;
2895
2896                         if (info) return info_range(range);
2897
2898                         if (cast)
2899                         {
2900                                 teleport_player(range, 0L);
2901                         }
2902                 }
2903                 break;
2904
2905         case 8:
2906                 if (name) return _("ワンダー", "Wonder");
2907                 if (desc) return _("モンスターにランダムな効果を与える。", "Fires something with random effects.");
2908     
2909                 {
2910                         if (info) return s_random;
2911
2912                         if (cast)
2913                         {
2914
2915                                 if (!get_aim_dir(&dir)) return NULL;
2916
2917                                 cast_wonder(dir);
2918                         }
2919                 }
2920                 break;
2921
2922         case 9:
2923                 if (name) return _("カオス・ボルト", "Chaos Bolt");
2924                 if (desc) return _("カオスのボルトもしくはビームを放つ。", "Fires a bolt or ball of chaos.");
2925     
2926                 {
2927                         int dice = 10 + (plev - 5) / 4;
2928                         int sides = 8;
2929
2930                         if (info) return info_damage(dice, sides, 0);
2931
2932                         if (cast)
2933                         {
2934                                 if (!get_aim_dir(&dir)) return NULL;
2935
2936                                 fire_bolt_or_beam(beam_chance(), GF_CHAOS, dir, damroll(dice, sides));
2937                         }
2938                 }
2939                 break;
2940
2941         case 10:
2942                 if (name) return _("ソニック・ブーム", "Sonic Boom");
2943                 if (desc) return _("自分を中心とした轟音の球を発生させる。", "Generates a ball of sound centered on you.");
2944     
2945                 {
2946                         int dam = 60 + plev;
2947                         int rad = plev / 10 + 2;
2948
2949                         if (info) return info_damage(0, 0, dam/2);
2950
2951                         if (cast)
2952                         {
2953                                 msg_print(_("ドーン!部屋が揺れた!", "BOOM! Shake the room!"));
2954                                 project(0, rad, p_ptr->y, p_ptr->x, dam, GF_SOUND, PROJECT_KILL | PROJECT_ITEM, -1);
2955                         }
2956                 }
2957                 break;
2958
2959         case 11:
2960                 if (name) return _("破滅の矢", "Doom Bolt");
2961                 if (desc) return _("純粋な魔力のビームを放つ。", "Fires a beam of pure mana.");
2962     
2963                 {
2964                         int dice = 11 + (plev - 5) / 4;
2965                         int sides = 8;
2966
2967                         if (info) return info_damage(dice, sides, 0);
2968
2969                         if (cast)
2970                         {
2971                                 if (!get_aim_dir(&dir)) return NULL;
2972
2973                                 fire_beam(GF_MANA, dir, damroll(dice, sides));
2974                         }
2975                 }
2976                 break;
2977
2978         case 12:
2979                 if (name) return _("ファイア・ボール", "Fire Ball");
2980                 if (desc) return _("炎の球を放つ。", "Fires a ball of fire.");
2981     
2982                 {
2983                         int dam = plev + 55;
2984                         int rad = 2;
2985
2986                         if (info) return info_damage(0, 0, dam);
2987
2988                         if (cast)
2989                         {
2990                                 if (!get_aim_dir(&dir)) return NULL;
2991
2992                                 fire_ball(GF_FIRE, dir, dam, rad);
2993                         }
2994                 }
2995                 break;
2996
2997         case 13:
2998                 if (name) return _("テレポート・アウェイ", "Teleport Other");
2999                 if (desc) return _("モンスターをテレポートさせるビームを放つ。抵抗されると無効。", "Teleports all monsters on the line away unless resisted.");
3000     
3001                 {
3002                         int power = plev;
3003
3004                         if (info) return info_power(power);
3005
3006                         if (cast)
3007                         {
3008                                 if (!get_aim_dir(&dir)) return NULL;
3009
3010                                 fire_beam(GF_AWAY_ALL, dir, power);
3011                         }
3012                 }
3013                 break;
3014
3015         case 14:
3016                 if (name) return _("破壊の言葉", "Word of Destruction");
3017                 if (desc) return _("周辺のアイテム、モンスター、地形を破壊する。", "Destroy everything in nearby area.");
3018     
3019                 {
3020                         int base = 12;
3021                         int sides = 4;
3022
3023                         if (cast)
3024                         {
3025                                 destroy_area(p_ptr->y, p_ptr->x, base + randint1(sides), FALSE);
3026                         }
3027                 }
3028                 break;
3029
3030         case 15:
3031                 if (name) return _("ログルス発動", "Invoke Logrus");
3032                 if (desc) return _("巨大なカオスの球を放つ。", "Fires a huge ball of chaos.");
3033     
3034                 {
3035                         int dam = plev * 2 + 99;
3036                         int rad = plev / 5;
3037
3038                         if (info) return info_damage(0, 0, dam);
3039
3040                         if (cast)
3041                         {
3042                                 if (!get_aim_dir(&dir)) return NULL;
3043
3044                                 fire_ball(GF_CHAOS, dir, dam, rad);
3045                         }
3046                 }
3047                 break;
3048
3049         case 16:
3050                 if (name) return _("他者変容", "Polymorph Other");
3051                 if (desc) return _("モンスター1体を変身させる。抵抗されると無効。", "Attempts to polymorph a monster.");
3052     
3053                 {
3054                         int power = plev;
3055
3056                         if (info) return info_power(power);
3057
3058                         if (cast)
3059                         {
3060                                 if (!get_aim_dir(&dir)) return NULL;
3061
3062                                 poly_monster(dir, plev);
3063                         }
3064                 }
3065                 break;
3066
3067         case 17:
3068                 if (name) return _("連鎖稲妻", "Chain Lightning");
3069                 if (desc) return _("全方向に対して電撃のビームを放つ。", "Fires lightning beams in all directions.");
3070     
3071                 {
3072                         int dice = 5 + plev / 10;
3073                         int sides = 8;
3074
3075                         if (info) return info_damage(dice, sides, 0);
3076
3077                         if (cast)
3078                         {
3079                                 for (dir = 0; dir <= 9; dir++)
3080                                         fire_beam(GF_ELEC, dir, damroll(dice, sides));
3081                         }
3082                 }
3083                 break;
3084
3085         case 18:
3086                 if (name) return _("魔力封入", "Arcane Binding");
3087                 if (desc) return _("杖/魔法棒の充填回数を増やすか、充填中のロッドの充填時間を減らす。", "Recharges staffs, wands or rods.");
3088     
3089                 {
3090                         int power = 90;
3091
3092                         if (info) return info_power(power);
3093
3094                         if (cast)
3095                         {
3096                                 if (!recharge(power)) return NULL;
3097                         }
3098                 }
3099                 break;
3100
3101         case 19:
3102                 if (name) return _("原子分解", "Disintegrate");
3103                 if (desc) return _("巨大な分解の球を放つ。", "Fires a huge ball of disintegration.");
3104     
3105                 {
3106                         int dam = plev + 70;
3107                         int rad = 3 + plev / 40;
3108
3109                         if (info) return info_damage(0, 0, dam);
3110
3111                         if (cast)
3112                         {
3113                                 if (!get_aim_dir(&dir)) return NULL;
3114
3115                                 fire_ball(GF_DISINTEGRATE, dir, dam, rad);
3116                         }
3117                 }
3118                 break;
3119
3120         case 20:
3121                 if (name) return _("現実変容", "Alter Reality");
3122                 if (desc) return _("現在の階を再構成する。", "Recreates current dungeon level.");
3123     
3124                 {
3125                         int base = 15;
3126                         int sides = 20;
3127
3128                         if (info) return info_delay(base, sides);
3129
3130                         if (cast)
3131                         {
3132                                 alter_reality();
3133                         }
3134                 }
3135                 break;
3136
3137         case 21:
3138                 if (name) return _("マジック・ロケット", "Magic Rocket");
3139                 if (desc) return _("ロケットを発射する。", "Fires a magic rocket.");
3140     
3141                 {
3142                         int dam = 120 + plev * 2;
3143                         int rad = 2;
3144
3145                         if (info) return info_damage(0, 0, dam);
3146
3147                         if (cast)
3148                         {
3149                                 if (!get_aim_dir(&dir)) return NULL;
3150
3151                                 msg_print(_("ロケット発射!", "You launch a rocket!"));
3152                                 fire_rocket(GF_ROCKET, dir, dam, rad);
3153                         }
3154                 }
3155                 break;
3156
3157         case 22:
3158                 if (name) return _("混沌の刃", "Chaos Branding");
3159                 if (desc) return _("武器にカオスの属性をつける。", "Makes current weapon a Chaotic weapon.");
3160     
3161                 {
3162                         if (cast)
3163                         {
3164                                 brand_weapon(2);
3165                         }
3166                 }
3167                 break;
3168
3169         case 23:
3170                 if (name) return _("悪魔召喚", "Summon Demon");
3171                 if (desc) return _("悪魔を1体召喚する。", "Summons a demon.");
3172     
3173                 {
3174                         if (cast)
3175                         {
3176                                 u32b flg = 0L;
3177                                 bool pet = !one_in_(3);
3178
3179                                 if (pet) flg |= PM_FORCE_PET;
3180                                 else flg |= PM_NO_PET;
3181                                 if (!(pet && (plev < 50))) flg |= PM_ALLOW_GROUP;
3182
3183                                 if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, (plev * 3) / 2, SUMMON_DEMON, flg))
3184                                 {
3185                                         msg_print(_("硫黄の悪臭が充満した。", "The area fills with a stench of sulphur and brimstone."));
3186                                         if (pet)
3187                                         {
3188                                                 msg_print(_("「ご用でございますか、ご主人様」", "'What is thy bidding... Master?'"));
3189                                         }
3190                                         else
3191                                         {
3192                                                 msg_print(_("「卑しき者よ、我は汝の下僕にあらず! お前の魂を頂くぞ!」",
3193                                                                         "'NON SERVIAM! Wretch! I shall feast on thy mortal soul!'"));
3194                                         }
3195                                 }
3196                         }
3197                 }
3198                 break;
3199
3200         case 24:
3201                 if (name) return _("重力光線", "Beam of Gravity");
3202                 if (desc) return _("重力のビームを放つ。", "Fires a beam of gravity.");
3203     
3204                 {
3205                         int dice = 9 + (plev - 5) / 4;
3206                         int sides = 8;
3207
3208                         if (info) return info_damage(dice, sides, 0);
3209
3210                         if (cast)
3211                         {
3212                                 if (!get_aim_dir(&dir)) return NULL;
3213
3214                                 fire_beam(GF_GRAVITY, dir, damroll(dice, sides));
3215                         }
3216                 }
3217                 break;
3218
3219         case 25:
3220                 if (name) return _("流星群", "Meteor Swarm");
3221                 if (desc) return _("自分の周辺に隕石を落とす。", "Makes meteor balls fall down to nearby random locations.");
3222     
3223                 {
3224                         int dam = plev * 2;
3225                         int rad = 2;
3226
3227                         if (info) return info_multi_damage(dam);
3228
3229                         if (cast)
3230                         {
3231                                 cast_meteor(dam, rad);
3232                         }
3233                 }
3234                 break;
3235
3236         case 26:
3237                 if (name) return _("焔の一撃", "Flame Strike");
3238                 if (desc) return _("自分を中心とした超巨大な炎の球を発生させる。", "Generate a huge ball of fire centered on you.");
3239     
3240                 {
3241                         int dam = 300 + 3 * plev;
3242                         int rad = 8;
3243
3244                         if (info) return info_damage(0, 0, dam/2);
3245
3246                         if (cast)
3247                         {
3248                                 fire_ball(GF_FIRE, 0, dam, rad);
3249                         }
3250                 }
3251                 break;
3252
3253         case 27:
3254                 if (name) return _("混沌召来", "Call Chaos");
3255                 if (desc) return _("ランダムな属性の球やビームを発生させる。", "Generate random kind of balls or beams.");
3256     
3257                 {
3258                         if (info) return format("%s150 / 250", s_dam);
3259
3260                         if (cast)
3261                         {
3262                                 call_chaos();
3263                         }
3264                 }
3265                 break;
3266
3267         case 28:
3268                 if (name) return _("自己変容", "Polymorph Self");
3269                 if (desc) return _("自分を変身させようとする。", "Polymorphs yourself.");
3270     
3271                 {
3272                         if (cast)
3273                         {
3274                                 if (!get_check(_("変身します。よろしいですか?", "You will polymorph yourself. Are you sure? "))) return NULL;
3275                                 do_poly_self();
3276                         }
3277                 }
3278                 break;
3279
3280         case 29:
3281                 if (name) return _("魔力の嵐", "Mana Storm");
3282                 if (desc) return _("非常に強力で巨大な純粋な魔力の球を放つ。", "Fires an extremely powerful huge ball of pure mana.");
3283     
3284                 {
3285                         int dam = 300 + plev * 4;
3286                         int rad = 4;
3287
3288                         if (info) return info_damage(0, 0, dam);
3289
3290                         if (cast)
3291                         {
3292                                 if (!get_aim_dir(&dir)) return NULL;
3293
3294                                 fire_ball(GF_MANA, dir, dam, rad);
3295                         }
3296                 }
3297                 break;
3298
3299         case 30:
3300                 if (name) return _("ログルスのブレス", "Breathe Logrus");
3301                 if (desc) return _("非常に強力なカオスの球を放つ。", "Fires an extremely powerful ball of chaos.");
3302     
3303                 {
3304                         int dam = p_ptr->chp;
3305                         int rad = 2;
3306
3307                         if (info) return info_damage(0, 0, dam);
3308
3309                         if (cast)
3310                         {
3311                                 if (!get_aim_dir(&dir)) return NULL;
3312
3313                                 fire_ball(GF_CHAOS, dir, dam, rad);
3314                         }
3315                 }
3316                 break;
3317
3318         case 31:
3319                 if (name) return _("虚無召来", "Call the Void");
3320                 if (desc) return _("自分に周囲に向かって、ロケット、純粋な魔力の球、放射性廃棄物の球を放つ。ただし、壁に隣接して使用すると広範囲を破壊する。", 
3321                         "Fires rockets, mana balls and nuclear waste balls in all directions each unless you are not adjacent to any walls. Otherwise *destroys* huge area.");
3322     
3323                 {
3324                         if (info) return format("%s3 * 175", s_dam);
3325
3326                         if (cast)
3327                         {
3328                                 call_the_();
3329                         }
3330                 }
3331                 break;
3332         }
3333
3334         return "";
3335 }
3336
3337 /*!
3338  * @brief 暗黒領域魔法の各処理を行う
3339  * @param spell 魔法ID
3340  * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
3341  * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
3342  */
3343 static cptr do_death_spell(int spell, int mode)
3344 {
3345         bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
3346         bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
3347         bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
3348         bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
3349
3350         static const char s_dam[] = _("損傷:", "dam ");
3351         static const char s_random[] = _("ランダム", "random");
3352
3353         int dir;
3354         int plev = p_ptr->lev;
3355
3356         switch (spell)
3357         {
3358         case 0:
3359                 if (name) return _("無生命感知", "Detect Unlife");
3360                 if (desc) return _("近くの生命のないモンスターを感知する。", "Detects all nonliving monsters in your vicinity.");
3361     
3362                 {
3363                         int rad = DETECT_RAD_DEFAULT;
3364
3365                         if (info) return info_radius(rad);
3366
3367                         if (cast)
3368                         {
3369                                 detect_monsters_nonliving(rad);
3370                         }
3371                 }
3372                 break;
3373
3374         case 1:
3375                 if (name) return _("呪殺弾", "Malediction");
3376                 if (desc) return _("ごく小さな邪悪な力を持つボールを放つ。善良なモンスターには大きなダメージを与える。", 
3377                         "Fires a tiny ball of evil power which hurts good monsters greatly.");
3378     
3379                 {
3380                         int dice = 3 + (plev - 1) / 5;
3381                         int sides = 4;
3382                         int rad = 0;
3383
3384                         if (info) return info_damage(dice, sides, 0);
3385
3386                         if (cast)
3387                         {
3388                                 if (!get_aim_dir(&dir)) return NULL;
3389
3390                                 /*
3391                                  * A radius-0 ball may (1) be aimed at
3392                                  * objects etc., and will affect them;
3393                                  * (2) may be aimed at ANY visible
3394                                  * monster, unlike a 'bolt' which must
3395                                  * travel to the monster.
3396                                  */
3397
3398                                 fire_ball(GF_HELL_FIRE, dir, damroll(dice, sides), rad);
3399
3400                                 if (one_in_(5))
3401                                 {
3402                                         /* Special effect first */
3403                                         int effect = randint1(1000);
3404
3405                                         if (effect == 666)
3406                                                 fire_ball_hide(GF_DEATH_RAY, dir, plev * 200, 0);
3407                                         else if (effect < 500)
3408                                                 fire_ball_hide(GF_TURN_ALL, dir, plev, 0);
3409                                         else if (effect < 800)
3410                                                 fire_ball_hide(GF_OLD_CONF, dir, plev, 0);
3411                                         else
3412                                                 fire_ball_hide(GF_STUN, dir, plev, 0);
3413                                 }
3414                         }
3415                 }
3416                 break;
3417
3418         case 2:
3419                 if (name) return _("邪悪感知", "Detect Evil");
3420                 if (desc) return _("近くの邪悪なモンスターを感知する。", "Detects all evil monsters in your vicinity.");
3421     
3422                 {
3423                         int rad = DETECT_RAD_DEFAULT;
3424
3425                         if (info) return info_radius(rad);
3426
3427                         if (cast)
3428                         {
3429                                 detect_monsters_evil(rad);
3430                         }
3431                 }
3432                 break;
3433
3434         case 3:
3435                 if (name) return _("悪臭雲", "Stinking Cloud");
3436                 if (desc) return _("毒の球を放つ。", "Fires a ball of poison.");
3437     
3438                 {
3439                         int dam = 10 + plev / 2;
3440                         int rad = 2;
3441
3442                         if (info) return info_damage(0, 0, dam);
3443
3444                         if (cast)
3445                         {
3446                                 if (!get_aim_dir(&dir)) return NULL;
3447
3448                                 fire_ball(GF_POIS, dir, dam, rad);
3449                         }
3450                 }
3451                 break;
3452
3453         case 4:
3454                 if (name) return _("黒い眠り", "Black Sleep");
3455                 if (desc) return _("1体のモンスターを眠らせる。抵抗されると無効。", "Attempts to sleep a monster.");
3456     
3457                 {
3458                         int power = plev;
3459
3460                         if (info) return info_power(power);
3461
3462                         if (cast)
3463                         {
3464                                 if (!get_aim_dir(&dir)) return NULL;
3465
3466                                 sleep_monster(dir, plev);
3467                         }
3468                 }
3469                 break;
3470
3471         case 5:
3472                 if (name) return _("耐毒", "Resist Poison");
3473                 if (desc) return _("一定時間、毒への耐性を得る。装備による耐性に累積する。", 
3474                         "Gives resistance to poison. This resistance can be added to which from equipment for more powerful resistance.");
3475     
3476                 {
3477                         int base = 20;
3478
3479                         if (info) return info_duration(base, base);
3480
3481                         if (cast)
3482                         {
3483                                 set_oppose_pois(randint1(base) + base, FALSE);
3484                         }
3485                 }
3486                 break;
3487
3488         case 6:
3489                 if (name) return _("恐慌", "Horrify");
3490                 if (desc) return _("モンスター1体を恐怖させ、朦朧させる。抵抗されると無効。", "Attempts to scare and stun a monster.");
3491     
3492                 {
3493                         int power = plev;
3494
3495                         if (info) return info_power(power);
3496
3497                         if (cast)
3498                         {
3499                                 if (!get_aim_dir(&dir)) return NULL;
3500
3501                                 fear_monster(dir, power);
3502                                 stun_monster(dir, power);
3503                         }
3504                 }
3505                 break;
3506
3507         case 7:
3508                 if (name) return _("アンデッド従属", "Enslave Undead");
3509                 if (desc) return _("アンデッド1体を魅了する。抵抗されると無効。", "Attempts to charm an undead monster.");
3510     
3511                 {
3512                         int power = plev;
3513
3514                         if (info) return info_power(power);
3515
3516                         if (cast)
3517                         {
3518                                 if (!get_aim_dir(&dir)) return NULL;
3519
3520                                 control_one_undead(dir, power);
3521                         }
3522                 }
3523                 break;
3524
3525         case 8:
3526                 if (name) return _("エントロピーの球", "Orb of Entropy");
3527                 if (desc) return _("生命のある者に効果のある球を放つ。", "Fires a ball which damages living monsters.");
3528     
3529                 {
3530                         int dice = 3;
3531                         int sides = 6;
3532                         int rad = (plev < 30) ? 2 : 3;
3533                         int base;
3534
3535                         if (p_ptr->pclass == CLASS_MAGE ||
3536                             p_ptr->pclass == CLASS_HIGH_MAGE ||
3537                             p_ptr->pclass == CLASS_SORCERER)
3538                                 base = plev + plev / 2;
3539                         else
3540                                 base = plev + plev / 4;
3541
3542
3543                         if (info) return info_damage(dice, sides, base);
3544
3545                         if (cast)
3546                         {
3547                                 if (!get_aim_dir(&dir)) return NULL;
3548
3549                                 fire_ball(GF_OLD_DRAIN, dir, damroll(dice, dice) + base, rad);
3550                         }
3551                 }
3552                 break;
3553
3554         case 9:
3555                 if (name) return _("地獄の矢", "Nether Bolt");
3556                 if (desc) return _("地獄のボルトもしくはビームを放つ。", "Fires a bolt or beam of nether.");
3557     
3558                 {
3559                         int dice = 8 + (plev - 5) / 4;
3560                         int sides = 8;
3561
3562                         if (info) return info_damage(dice, sides, 0);
3563
3564                         if (cast)
3565                         {
3566                                 if (!get_aim_dir(&dir)) return NULL;
3567
3568                                 fire_bolt_or_beam(beam_chance(), GF_NETHER, dir, damroll(dice, sides));
3569                         }
3570                 }
3571                 break;
3572
3573         case 10:
3574                 if (name) return _("殺戮雲", "Cloud kill");
3575                 if (desc) return _("自分を中心とした毒の球を発生させる。", "Generate a ball of poison centered on you.");
3576     
3577                 {
3578                         int dam = (30 + plev) * 2;
3579                         int rad = plev / 10 + 2;
3580
3581                         if (info) return info_damage(0, 0, dam/2);
3582
3583                         if (cast)
3584                         {
3585                                 project(0, rad, p_ptr->y, p_ptr->x, dam, GF_POIS, PROJECT_KILL | PROJECT_ITEM, -1);
3586                         }
3587                 }
3588                 break;
3589
3590         case 11:
3591                 if (name) return _("モンスター消滅", "Genocide One");
3592                 if (desc) return _("モンスター1体を消し去る。経験値やアイテムは手に入らない。抵抗されると無効。", "Attempts to vanish a monster.");
3593     
3594                 {
3595                         int power = plev + 50;
3596
3597                         if (info) return info_power(power);
3598
3599                         if (cast)
3600                         {
3601                                 if (!get_aim_dir(&dir)) return NULL;
3602
3603                                 fire_ball_hide(GF_GENOCIDE, dir, power, 0);
3604                         }
3605                 }
3606                 break;
3607
3608         case 12:
3609                 if (name) return _("毒の刃", "Poison Branding");
3610                 if (desc) return _("武器に毒の属性をつける。", "Makes current weapon poison branded.");
3611     
3612                 {
3613                         if (cast)
3614                         {
3615                                 brand_weapon(3);
3616                         }
3617                 }
3618                 break;
3619
3620         case 13:
3621                 if (name) return _("吸血ドレイン", "Vampiric Drain");
3622                 if (desc) return _("モンスター1体から生命力を吸いとる。吸いとった生命力によって満腹度が上がる。", 
3623                         "Absorbs some HP from a monster and gives them to you. You will also gain nutritional sustenance from this.");
3624     
3625                 {
3626                         int dice = 1;
3627                         int sides = plev * 2;
3628                         int base = plev * 2;
3629
3630                         if (info) return info_damage(dice, sides, base);
3631
3632                         if (cast)
3633                         {
3634                                 int dam = base + damroll(dice, sides);
3635
3636                                 if (!get_aim_dir(&dir)) return NULL;
3637
3638                                 if (drain_life(dir, dam))
3639                                 {
3640                                         chg_virtue(V_SACRIFICE, -1);
3641                                         chg_virtue(V_VITALITY, -1);
3642
3643                                         hp_player(dam);
3644
3645                                         /*
3646                                          * Gain nutritional sustenance:
3647                                          * 150/hp drained
3648                                          *
3649                                          * A Food ration gives 5000
3650                                          * food points (by contrast)
3651                                          * Don't ever get more than
3652                                          * "Full" this way But if we
3653                                          * ARE Gorged, it won't cure
3654                                          * us
3655                                          */
3656                                         dam = p_ptr->food + MIN(5000, 100 * dam);
3657
3658                                         /* Not gorged already */
3659                                         if (p_ptr->food < PY_FOOD_MAX)
3660                                                 set_food(dam >= PY_FOOD_MAX ? PY_FOOD_MAX - 1 : dam);
3661                                 }
3662                         }
3663                 }
3664                 break;
3665
3666         case 14:
3667                 if (name) return _("反魂の術", "Animate dead");
3668                 if (desc) return _("周囲の死体や骨を生き返す。", "Resurrects nearby corpse and skeletons. And makes these your pets.");
3669     
3670                 {
3671                         if (cast)
3672                         {
3673                                 animate_dead(0, p_ptr->y, p_ptr->x);
3674                         }
3675                 }
3676                 break;
3677
3678         case 15:
3679                 if (name) return _("抹殺", "Genocide");
3680                 if (desc) return _("指定した文字のモンスターを現在の階から消し去る。抵抗されると無効。", 
3681                         "Eliminates an entire class of monster, exhausting you.  Powerful or unique monsters may resist.");
3682     
3683                 {
3684                         int power = plev+50;
3685
3686                         if (info) return info_power(power);
3687
3688                         if (cast)
3689                         {
3690                                 symbol_genocide(power, TRUE);
3691                         }
3692                 }
3693                 break;
3694
3695         case 16:
3696                 if (name) return _("狂戦士化", "Berserk");
3697                 if (desc) return _("狂戦士化し、恐怖を除去する。", "Gives bonus to hit and HP, immunity to fear for a while. But decreases AC.");
3698     
3699                 {
3700                         int base = 25;
3701
3702                         if (info) return info_duration(base, base);
3703
3704                         if (cast)
3705                         {
3706                                 set_shero(randint1(base) + base, FALSE);
3707                                 hp_player(30);
3708                                 set_afraid(0);
3709                         }
3710                 }
3711                 break;
3712
3713         case 17:
3714                 if (name) return _("悪霊召喚", "Invoke Spirits");
3715                 if (desc) return _("ランダムで様々な効果が起こる。", "Causes random effects.");
3716     
3717                 {
3718                         if (info) return s_random;
3719
3720                         if (cast)
3721                         {
3722                                 if (!get_aim_dir(&dir)) return NULL;
3723
3724                                 cast_invoke_spirits(dir);
3725                         }
3726                 }
3727                 break;
3728
3729         case 18:
3730                 if (name) return _("暗黒の矢", "Dark Bolt");
3731                 if (desc) return _("暗黒のボルトもしくはビームを放つ。", "Fires a bolt or beam of darkness.");
3732     
3733                 {
3734                         int dice = 4 + (plev - 5) / 4;
3735                         int sides = 8;
3736
3737                         if (info) return info_damage(dice, sides, 0);
3738
3739                         if (cast)
3740                         {
3741                                 if (!get_aim_dir(&dir)) return NULL;
3742
3743                                 fire_bolt_or_beam(beam_chance(), GF_DARK, dir, damroll(dice, sides));
3744                         }
3745                 }
3746                 break;
3747
3748         case 19:
3749                 if (name) return _("狂乱戦士", "Battle Frenzy");
3750                 if (desc) return _("狂戦士化し、恐怖を除去し、加速する。", 
3751                         "Gives another bonus to hit and HP, immunity to fear for a while. Hastes you. But decreases AC.");
3752     
3753                 {
3754                         int b_base = 25;
3755                         int sp_base = plev / 2;
3756                         int sp_sides = 20 + plev / 2;
3757
3758                         if (info) return info_duration(b_base, b_base);
3759
3760                         if (cast)
3761                         {
3762                                 set_shero(randint1(25) + 25, FALSE);
3763                                 hp_player(30);
3764                                 set_afraid(0);
3765                                 set_fast(randint1(sp_sides) + sp_base, FALSE);
3766                         }
3767                 }
3768                 break;
3769
3770         case 20:
3771                 if (name) return _("吸血の刃", "Vampiric Branding");
3772                 if (desc) return _("武器に吸血の属性をつける。", "Makes current weapon Vampiric.");
3773     
3774                 {
3775                         if (cast)
3776                         {
3777                                 brand_weapon(4);
3778                         }
3779                 }
3780                 break;
3781
3782         case 21:
3783                 if (name) return _("真・吸血", "Vampirism True");
3784                 if (desc) return _("モンスター1体から生命力を吸いとる。吸いとった生命力によって体力が回復する。", 
3785                         "Fires 3 bolts. Each of the bolts absorbs some HP from a monster and gives them to you.");
3786     
3787                 {
3788                         int dam = 100;
3789
3790                         if (info) return format("%s3*%d", s_dam, dam);
3791
3792                         if (cast)
3793                         {
3794                                 int i;
3795
3796                                 if (!get_aim_dir(&dir)) return NULL;
3797
3798                                 chg_virtue(V_SACRIFICE, -1);
3799                                 chg_virtue(V_VITALITY, -1);
3800
3801                                 for (i = 0; i < 3; i++)
3802                                 {
3803                                         if (drain_life(dir, dam))
3804                                                 hp_player(dam);
3805                                 }
3806                         }
3807                 }
3808                 break;
3809
3810         case 22:
3811                 if (name) return _("死の言魂", "Nether Wave");
3812                 if (desc) return _("視界内の生命のあるモンスターにダメージを与える。", "Damages all living monsters in sight.");
3813     
3814                 {
3815                         int sides = plev * 3;
3816
3817                         if (info) return info_damage(1, sides, 0);
3818
3819                         if (cast)
3820                         {
3821                                 dispel_living(randint1(sides));
3822                         }
3823                 }
3824                 break;
3825
3826         case 23:
3827                 if (name) return _("暗黒の嵐", "Darkness Storm");
3828                 if (desc) return _("巨大な暗黒の球を放つ。", "Fires a huge ball of darkness.");
3829     
3830                 {
3831                         int dam = 100 + plev * 2;
3832                         int rad = 4;
3833
3834                         if (info) return info_damage(0, 0, dam);
3835
3836                         if (cast)
3837                         {
3838                                 if (!get_aim_dir(&dir)) return NULL;
3839
3840                                 fire_ball(GF_DARK, dir, dam, rad);
3841                         }
3842                 }
3843                 break;
3844
3845         case 24:
3846                 if (name) return _("死の光線", "Death Ray");
3847                 if (desc) return _("死の光線を放つ。", "Fires a beam of death.");
3848     
3849                 {
3850                         if (cast)
3851                         {
3852                                 if (!get_aim_dir(&dir)) return NULL;
3853
3854                                 death_ray(dir, plev);
3855                         }
3856                 }
3857                 break;
3858
3859         case 25:
3860                 if (name) return _("死者召喚", "Raise the Dead");
3861                 if (desc) return _("1体のアンデッドを召喚する。", "Summons an undead monster.");
3862     
3863                 {
3864                         if (cast)
3865                         {
3866                                 int type;
3867                                 bool pet = one_in_(3);
3868                                 u32b flg = 0L;
3869
3870                                 type = (plev > 47 ? SUMMON_HI_UNDEAD : SUMMON_UNDEAD);
3871
3872                                 if (!pet || (pet && (plev > 24) && one_in_(3)))
3873                                         flg |= PM_ALLOW_GROUP;
3874
3875                                 if (pet) flg |= PM_FORCE_PET;
3876                                 else flg |= (PM_ALLOW_UNIQUE | PM_NO_PET);
3877
3878                                 if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, (plev * 3) / 2, type, flg))
3879                                 {
3880                                         msg_print(_("冷たい風があなたの周りに吹き始めた。それは腐敗臭を運んでいる...",
3881                                                                 "Cold winds begin to blow around you, carrying with them the stench of decay..."));
3882
3883
3884                                         if (pet)
3885                                         {
3886                                                 msg_print(_("古えの死せる者共があなたに仕えるため土から甦った!",
3887                                                                         "Ancient, long-dead forms arise from the ground to serve you!"));
3888                                         }
3889                                         else
3890                                         {
3891                                                 msg_print(_("死者が甦った。眠りを妨げるあなたを罰するために!",
3892                                                                         "'The dead arise... to punish you for disturbing them!'"));
3893                                         }
3894
3895                                         chg_virtue(V_UNLIFE, 1);
3896                                 }
3897                         }
3898                 }
3899                 break;
3900
3901         case 26:
3902                 if (name) return _("死者の秘伝", "Esoteria");
3903                 if (desc) return _("アイテムを1つ識別する。レベルが高いとアイテムの能力を完全に知ることができる。",
3904                         "Identifies an item. Or *identifies* an item at higher level.");
3905     
3906                 {
3907                         if (cast)
3908                         {
3909                                 if (randint1(50) > plev)
3910                                 {
3911                                         if (!ident_spell(FALSE)) return NULL;
3912                                 }
3913                                 else
3914                                 {
3915                                         if (!identify_fully(FALSE)) return NULL;
3916                                 }
3917                         }
3918                 }
3919                 break;
3920
3921         case 27:
3922                 if (name) return _("吸血鬼変化", "Polymorph Vampire");
3923                 if (desc) return _("一定時間、吸血鬼に変化する。変化している間は本来の種族の能力を失い、代わりに吸血鬼としての能力を得る。", 
3924                         "Mimic a vampire for a while. Loses abilities of original race and gets abilities as a vampire.");
3925     
3926                 {
3927                         int base = 10 + plev / 2;
3928
3929                         if (info) return info_duration(base, base);
3930
3931                         if (cast)
3932                         {
3933                                 set_mimic(base + randint1(base), MIMIC_VAMPIRE, FALSE);
3934                         }
3935                 }
3936                 break;
3937
3938         case 28:
3939                 if (name) return _("経験値復活", "Restore Life");
3940                 if (desc) return _("失った経験値を回復する。", "Restore lost experience.");
3941     
3942                 {
3943                         if (cast)
3944                         {
3945                                 restore_level();
3946                         }
3947                 }
3948                 break;
3949
3950         case 29:
3951                 if (name) return _("周辺抹殺", "Mass Genocide");
3952                 if (desc) return _("自分の周囲にいるモンスターを現在の階から消し去る。抵抗されると無効。", 
3953                         "Eliminates all nearby monsters, exhausting you.  Powerful or unique monsters may be able to resist.");
3954     
3955                 {
3956                         int power = plev + 50;
3957
3958                         if (info) return info_power(power);
3959
3960                         if (cast)
3961                         {
3962                                 mass_genocide(power, TRUE);
3963                         }
3964                 }
3965                 break;
3966
3967         case 30:
3968                 if (name) return _("地獄の劫火", "Hellfire");
3969                 if (desc) return _("邪悪な力を持つ宝珠を放つ。善良なモンスターには大きなダメージを与える。", 
3970                         "Fires a powerful ball of evil power. Hurts good monsters greatly.");
3971     
3972                 {
3973                         int dam = 666;
3974                         int rad = 3;
3975
3976                         if (info) return info_damage(0, 0, dam);
3977
3978                         if (cast)
3979                         {
3980                                 if (!get_aim_dir(&dir)) return NULL;
3981
3982                                 fire_ball(GF_HELL_FIRE, dir, dam, rad);
3983                                 take_hit(DAMAGE_USELIFE, 20 + randint1(30), _("地獄の劫火の呪文を唱えた疲労", "the strain of casting Hellfire"), -1);
3984                         }
3985                 }
3986                 break;
3987
3988         case 31:
3989                 if (name) return _("幽体化", "Wraithform");
3990                 if (desc) return _("一定時間、壁を通り抜けることができ受けるダメージが軽減される幽体の状態に変身する。", 
3991                         "Becomes wraith form which gives ability to pass walls and makes all damages half.");
3992     
3993                 {
3994                         int base = plev / 2;
3995
3996                         if (info) return info_duration(base, base);
3997
3998                         if (cast)
3999                         {
4000                                 set_wraith_form(randint1(base) + base, FALSE);
4001                         }
4002                 }
4003                 break;
4004         }
4005
4006         return "";
4007 }
4008
4009
4010 /*!
4011  * @brief トランプ領域魔法の各処理を行う
4012  * @param spell 魔法ID
4013  * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
4014  * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
4015  */
4016 static cptr do_trump_spell(int spell, int mode)
4017 {
4018         bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
4019         bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
4020         bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
4021         bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
4022         bool fail = (mode == SPELL_FAIL) ? TRUE : FALSE;
4023         static const char s_random[] = _("ランダム", "random");
4024
4025         int dir;
4026         int plev = p_ptr->lev;
4027
4028         switch (spell)
4029         {
4030         case 0:
4031                 if (name) return _("ショート・テレポート", "Phase Door");
4032                 if (desc) return _("近距離のテレポートをする。", "Teleport short distance.");
4033     
4034                 {
4035                         int range = 10;
4036
4037                         if (info) return info_range(range);
4038
4039                         if (cast)
4040                         {
4041                                 teleport_player(range, 0L);
4042                         }
4043                 }
4044                 break;
4045
4046         case 1:
4047                 if (name) return _("蜘蛛のカード", "Trump Spiders");
4048                 if (desc) return _("蜘蛛を召喚する。", "Summons spiders.");
4049     
4050                 {
4051                         if (cast || fail)
4052                         {
4053                                 msg_print(_("あなたは蜘蛛のカードに集中する...", "You concentrate on the trump of an spider..."));
4054                                 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, SUMMON_SPIDER, PM_ALLOW_GROUP))
4055                                 {
4056                                         if (fail)
4057                                         {
4058                                                 msg_print(_("召喚された蜘蛛は怒っている!", "The summoned spiders get angry!"));
4059                                         }
4060                                 }
4061                         }
4062                 }
4063                 break;
4064
4065         case 2:
4066                 if (name) return _("シャッフル", "Shuffle");
4067                 if (desc) return _("カードの占いをする。", "Causes random effects.");
4068     
4069                 {
4070                         if (info) return s_random;
4071
4072                         if (cast)
4073                         {
4074                                 cast_shuffle();
4075                         }
4076                 }
4077                 break;
4078
4079         case 3:
4080                 if (name) return _("フロア・リセット", "Reset Recall");
4081                 if (desc) return _("最深階を変更する。", "Resets the 'deepest' level for recall spell.");
4082     
4083                 {
4084                         if (cast)
4085                         {
4086                                 if (!reset_recall()) return NULL;
4087                         }
4088                 }
4089                 break;
4090
4091         case 4:
4092                 if (name) return _("テレポート", "Teleport");
4093                 if (desc) return _("遠距離のテレポートをする。", "Teleport long distance.");
4094     
4095                 {
4096                         int range = plev * 4;
4097
4098                         if (info) return info_range(range);
4099
4100                         if (cast)
4101                         {
4102                                 teleport_player(range, 0L);
4103                         }
4104                 }
4105                 break;
4106
4107         case 5:
4108                 if (name) return _("感知のカード", "Trump Spying");
4109                 if (desc) return _("一定時間、テレパシー能力を得る。", "Gives telepathy for a while.");
4110     
4111                 {
4112                         int base = 25;
4113                         int sides = 30;
4114
4115                         if (info) return info_duration(base, sides);
4116
4117                         if (cast)
4118                         {
4119                                 set_tim_esp(randint1(sides) + base, FALSE);
4120                         }
4121                 }
4122                 break;
4123
4124         case 6:
4125                 if (name) return _("テレポート・モンスター", "Teleport Away");
4126                 if (desc) return _("モンスターをテレポートさせるビームを放つ。抵抗されると無効。", "Teleports all monsters on the line away unless resisted.");
4127     
4128                 {
4129                         int power = plev;
4130
4131                         if (info) return info_power(power);
4132
4133                         if (cast)
4134                         {
4135                                 if (!get_aim_dir(&dir)) return NULL;
4136
4137                                 fire_beam(GF_AWAY_ALL, dir, power);
4138                         }
4139                 }
4140                 break;
4141
4142         case 7:
4143                 if (name) return _("動物のカード", "Trump Animals");
4144                 if (desc) return _("1体の動物を召喚する。", "Summons an animal.");
4145     
4146                 {
4147                         if (cast || fail)
4148                         {
4149                                 int type = (!fail ? SUMMON_ANIMAL_RANGER : SUMMON_ANIMAL);
4150                                 msg_print(_("あなたは動物のカードに集中する...", "You concentrate on the trump of an animal..."));
4151                                 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, type, 0L))
4152                                 {
4153                                         if (fail)
4154                                         {
4155                                                 msg_print(_("召喚された動物は怒っている!", "The summoned animal gets angry!"));
4156                                         }
4157                                 }
4158                         }
4159                 }
4160                 break;
4161
4162         case 8:
4163                 if (name) return _("移動のカード", "Trump Reach");
4164                 if (desc) return _("アイテムを自分の足元へ移動させる。", "Pulls a distant item close to you.");
4165     
4166                 {
4167                         int weight = plev * 15;
4168
4169                         if (info) return info_weight(weight);
4170
4171                         if (cast)
4172                         {
4173                                 if (!get_aim_dir(&dir)) return NULL;
4174
4175                                 fetch(dir, weight, FALSE);
4176                         }
4177                 }
4178                 break;
4179
4180         case 9:
4181                 if (name) return _("カミカゼのカード", "Trump Kamikaze");
4182                 if (desc) return _("複数の爆発するモンスターを召喚する。", "Summons monsters which explode by itself.");
4183     
4184                 {
4185                         if (cast || fail)
4186                         {
4187                                 int x, y;
4188                                 int type;
4189
4190                                 if (cast)
4191                                 {
4192                                         if (!target_set(TARGET_KILL)) return NULL;
4193                                         x = target_col;
4194                                         y = target_row;
4195                                 }
4196                                 else
4197                                 {
4198                                         /* Summons near player when failed */
4199                                         x = p_ptr->x;
4200                                         y = p_ptr->y;
4201                                 }
4202
4203                                 if (p_ptr->pclass == CLASS_BEASTMASTER)
4204                                         type = SUMMON_KAMIKAZE_LIVING;
4205                                 else
4206                                         type = SUMMON_KAMIKAZE;
4207
4208                                 msg_print(_("あなたはカミカゼのカードに集中する...", "You concentrate on several trumps at once..."));
4209                                 if (trump_summoning(2 + randint0(plev / 7), !fail, y, x, 0, type, 0L))
4210                                 {
4211                                         if (fail)
4212                                         {
4213                                                 msg_print(_("召喚されたモンスターは怒っている!", "The summoned creatures get angry!"));
4214                                         }
4215                                 }
4216                         }
4217                 }
4218                 break;
4219
4220         case 10:
4221                 if (name) return _("幻霊召喚", "Phantasmal Servant");
4222                 if (desc) return _("1体の幽霊を召喚する。", "Summons a ghost.");
4223     
4224                 {
4225                         /* Phantasmal Servant is not summoned as enemy when failed */
4226                         if (cast)
4227                         {
4228                                 int summon_lev = plev * 2 / 3 + randint1(plev / 2);
4229
4230                                 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, (summon_lev * 3 / 2), SUMMON_PHANTOM, 0L))
4231                                 {
4232                                         msg_print(_("御用でございますか、御主人様?", "'Your wish, master?'"));
4233                                 }
4234                         }
4235                 }
4236                 break;
4237
4238         case 11:
4239                 if (name) return _("スピード・モンスター", "Haste Monster");
4240                 if (desc) return _("モンスター1体を加速させる。", "Hastes a monster.");
4241     
4242                 {
4243                         if (cast)
4244                         {
4245                                 bool result;
4246
4247                                 /* Temporary enable target_pet option */
4248                                 bool old_target_pet = target_pet;
4249                                 target_pet = TRUE;
4250
4251                                 result = get_aim_dir(&dir);
4252
4253                                 /* Restore target_pet option */
4254                                 target_pet = old_target_pet;
4255
4256                                 if (!result) return NULL;
4257
4258                                 speed_monster(dir, plev);
4259                         }
4260                 }
4261                 break;
4262
4263         case 12:
4264                 if (name) return _("テレポート・レベル", "Teleport Level");
4265                 if (desc) return _("瞬時に上か下の階にテレポートする。", "Teleport to up or down stairs in a moment.");
4266     
4267                 {
4268                         if (cast)
4269                         {
4270                                 if (!get_check(_("本当に他の階にテレポートしますか?", "Are you sure? (Teleport Level)"))) return NULL;
4271                                 teleport_level(0);
4272                         }
4273                 }
4274                 break;
4275
4276         case 13:
4277                 if (name) return _("次元の扉", "Dimension Door");
4278                 if (desc) return _("短距離内の指定した場所にテレポートする。", "Teleport to given location.");
4279     
4280                 {
4281                         int range = plev / 2 + 10;
4282
4283                         if (info) return info_range(range);
4284
4285                         if (cast)
4286                         {
4287                                 msg_print(_("次元の扉が開いた。目的地を選んで下さい。", "You open a dimensional gate. Choose a destination."));
4288                                 if (!dimension_door()) return NULL;
4289                         }
4290                 }
4291                 break;
4292
4293         case 14:
4294                 if (name) return _("帰還の呪文", "Word of Recall");
4295                 if (desc) return _("地上にいるときはダンジョンの最深階へ、ダンジョンにいるときは地上へと移動する。",
4296                         "Recalls player from dungeon to town, or from town to the deepest level of dungeon.");
4297     
4298                 {
4299                         int base = 15;
4300                         int sides = 20;
4301
4302                         if (info) return info_delay(base, sides);
4303
4304                         if (cast)
4305                         {
4306                                 if (!word_of_recall()) return NULL;
4307                         }
4308                 }
4309                 break;
4310
4311         case 15:
4312                 if (name) return _("怪物追放", "Banish");
4313                 if (desc) return _("視界内の全てのモンスターをテレポートさせる。抵抗されると無効。", "Teleports all monsters in sight away unless resisted.");
4314     
4315                 {
4316                         int power = plev * 4;
4317
4318                         if (info) return info_power(power);
4319
4320                         if (cast)
4321                         {
4322                                 banish_monsters(power);
4323                         }
4324                 }
4325                 break;
4326
4327         case 16:
4328                 if (name) return _("位置交換のカード", "Swap Position");
4329                 if (desc) return _("1体のモンスターと位置を交換する。", "Swap positions of you and a monster.");
4330     
4331                 {
4332                         if (cast)
4333                         {
4334                                 bool result;
4335
4336                                 /* HACK -- No range limit */
4337                                 project_length = -1;
4338
4339                                 result = get_aim_dir(&dir);
4340
4341                                 /* Restore range to default */
4342                                 project_length = 0;
4343
4344                                 if (!result) return NULL;
4345
4346                                 teleport_swap(dir);
4347                         }
4348                 }
4349                 break;
4350
4351         case 17:
4352                 if (name) return _("アンデッドのカード", "Trump Undead");
4353                 if (desc) return _("1体のアンデッドを召喚する。", "Summons an undead monster.");
4354     
4355                 {
4356                         if (cast || fail)
4357                         {
4358                                 msg_print(_("あなたはアンデッドのカードに集中する...", "You concentrate on the trump of an undead creature..."));
4359                                 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, SUMMON_UNDEAD, 0L))
4360                                 {
4361                                         if (fail)
4362                                         {
4363                                                 msg_print(_("召喚されたアンデッドは怒っている!", "The summoned undead creature gets angry!"));
4364                                         }
4365                                 }
4366                         }
4367                 }
4368                 break;
4369
4370         case 18:
4371                 if (name) return _("爬虫類のカード", "Trump Reptiles");
4372                 if (desc) return _("1体のヒドラを召喚する。", "Summons a hydra.");
4373     
4374                 {
4375                         if (cast || fail)
4376                         {
4377                                 msg_print(_("あなたは爬虫類のカードに集中する...", "You concentrate on the trump of a reptile..."));
4378                                 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, SUMMON_HYDRA, 0L))
4379                                 {
4380                                         if (fail)
4381                                         {
4382                                                 msg_print(_("召喚された爬虫類は怒っている!", "The summoned reptile gets angry!"));
4383                                         }
4384                                 }
4385                         }
4386                 }
4387                 break;
4388
4389         case 19:
4390                 if (name) return _("モンスターのカード", "Trump Monsters");
4391                 if (desc) return _("複数のモンスターを召喚する。", "Summons some monsters.");
4392     
4393                 {
4394                         if (cast || fail)
4395                         {
4396                                 int type;
4397                                 msg_print(_("あなたはモンスターのカードに集中する...", "You concentrate on several trumps at once..."));
4398                                 if (p_ptr->pclass == CLASS_BEASTMASTER)
4399                                         type = SUMMON_LIVING;
4400                                 else
4401                                         type = 0;
4402
4403                                 if (trump_summoning((1 + (plev - 15)/ 10), !fail, p_ptr->y, p_ptr->x, 0, type, 0L))
4404                                 {
4405                                         if (fail)
4406                                         {
4407                                                 msg_print(_("召喚されたモンスターは怒っている!", "The summoned creatures get angry!"));
4408                                         }
4409                                 }
4410
4411                         }
4412                 }
4413                 break;
4414
4415         case 20:
4416                 if (name) return _("ハウンドのカード", "Trump Hounds");
4417                 if (desc) return _("1グループのハウンドを召喚する。", "Summons a group of hounds.");
4418     
4419                 {
4420                         if (cast || fail)
4421                         {
4422                                 msg_print(_("あなたはハウンドのカードに集中する...", "You concentrate on the trump of a hound..."));
4423                                 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, SUMMON_HOUND, PM_ALLOW_GROUP))
4424                                 {
4425                                         if (fail)
4426                                         {
4427                                                 msg_print(_("召喚されたハウンドは怒っている!", "The summoned hounds get angry!"));
4428                                         }
4429                                 }
4430                         }
4431                 }
4432                 break;
4433
4434         case 21:
4435                 if (name) return _("トランプの刃", "Trump Branding");
4436                 if (desc) return _("武器にトランプの属性をつける。", "Makes current weapon a Trump weapon.");
4437     
4438                 {
4439                         if (cast)
4440                         {
4441                                 brand_weapon(5);
4442                         }
4443                 }
4444                 break;
4445
4446         case 22:
4447                 if (name) return _("人間トランプ", "Living Trump");
4448                 if (desc) return _("ランダムにテレポートする突然変異か、自分の意思でテレポートする突然変異が身につく。", 
4449                         "Gives mutation which makes you teleport randomly or makes you able to teleport at will.");
4450     
4451                 {
4452                         if (cast)
4453                         {
4454                                 int mutation;
4455
4456                                 if (one_in_(7))
4457                                         /* Teleport control */
4458                                         mutation = 12;
4459                                 else
4460                                         /* Random teleportation (uncontrolled) */
4461                                         mutation = 77;
4462
4463                                 /* Gain the mutation */
4464                                 if (gain_random_mutation(mutation))
4465                                 {
4466                                         msg_print(_("あなたは生きているカードに変わった。", "You have turned into a Living Trump."));
4467                                 }
4468                         }
4469                 }
4470                 break;
4471
4472         case 23:
4473                 if (name) return _("サイバーデーモンのカード", "Trump Cyberdemon");
4474                 if (desc) return _("1体のサイバーデーモンを召喚する。", "Summons a cyber demon.");
4475     
4476                 {
4477                         if (cast || fail)
4478                         {
4479                                 msg_print(_("あなたはサイバーデーモンのカードに集中する...", "You concentrate on the trump of a Cyberdemon..."));
4480                                 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, SUMMON_CYBER, 0L))
4481                                 {
4482                                         if (fail)
4483                                         {
4484                                                 msg_print(_("召喚されたサイバーデーモンは怒っている!", "The summoned Cyberdemon gets angry!"));
4485                                         }
4486                                 }
4487                         }
4488                 }
4489                 break;
4490
4491         case 24:
4492                 if (name) return _("予見のカード", "Trump Divination");
4493                 if (desc) return _("近くの全てのモンスター、罠、扉、階段、財宝、そしてアイテムを感知する。",
4494                         "Detects all monsters, traps, doors, stairs, treasures and items in your vicinity.");
4495     
4496                 {
4497                         int rad = DETECT_RAD_DEFAULT;
4498
4499                         if (info) return info_radius(rad);
4500
4501                         if (cast)
4502                         {
4503                                 detect_all(rad);
4504                         }
4505                 }
4506                 break;
4507
4508         case 25:
4509                 if (name) return _("知識のカード", "Trump Lore");
4510                 if (desc) return _("アイテムの持つ能力を完全に知る。", "*Identifies* an item.");
4511     
4512                 {
4513                         if (cast)
4514                         {
4515                                 if (!identify_fully(FALSE)) return NULL;
4516                         }
4517                 }
4518                 break;
4519
4520         case 26:
4521                 if (name) return _("回復モンスター", "Heal Monster");
4522                 if (desc) return _("モンスター1体の体力を回復させる。", "Heal a monster.");
4523     
4524                 {
4525                         int heal = plev * 10 + 200;
4526
4527                         if (info) return info_heal(0, 0, heal);
4528
4529                         if (cast)
4530                         {
4531                                 bool result;
4532
4533                                 /* Temporary enable target_pet option */
4534                                 bool old_target_pet = target_pet;
4535                                 target_pet = TRUE;
4536
4537                                 result = get_aim_dir(&dir);
4538
4539                                 /* Restore target_pet option */
4540                                 target_pet = old_target_pet;
4541
4542                                 if (!result) return NULL;
4543
4544                                 heal_monster(dir, heal);
4545                         }
4546                 }
4547                 break;
4548
4549         case 27:
4550                 if (name) return _("ドラゴンのカード", "Trump Dragon");
4551                 if (desc) return _("1体のドラゴンを召喚する。", "Summons a dragon.");
4552     
4553                 {
4554                         if (cast || fail)
4555                         {
4556                                 msg_print(_("あなたはドラゴンのカードに集中する...", "You concentrate on the trump of a dragon..."));
4557                                 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, SUMMON_DRAGON, 0L))
4558                                 {
4559                                         if (fail)
4560                                         {
4561                                                 msg_print(_("召喚されたドラゴンは怒っている!", "The summoned dragon gets angry!"));
4562                                         }
4563                                 }
4564                         }
4565                 }
4566                 break;
4567
4568         case 28:
4569                 if (name) return _("隕石のカード", "Trump Meteor");
4570                 if (desc) return _("自分の周辺に隕石を落とす。", "Makes meteor balls fall down to nearby random locations.");
4571     
4572                 {
4573                         int dam = plev * 2;
4574                         int rad = 2;
4575
4576                         if (info) return info_multi_damage(dam);
4577
4578                         if (cast)
4579                         {
4580                                 cast_meteor(dam, rad);
4581                         }
4582                 }
4583                 break;
4584
4585         case 29:
4586                 if (name) return _("デーモンのカード", "Trump Demon");
4587                 if (desc) return _("1体の悪魔を召喚する。", "Summons a demon.");
4588     
4589                 {
4590                         if (cast || fail)
4591                         {
4592                                 msg_print(_("あなたはデーモンのカードに集中する...", "You concentrate on the trump of a demon..."));
4593                                 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, SUMMON_DEMON, 0L))
4594                                 {
4595                                         if (fail)
4596                                         {
4597                                                 msg_print(_("召喚されたデーモンは怒っている!", "The summoned demon gets angry!"));
4598                                         }
4599                                 }
4600                         }
4601                 }
4602                 break;
4603
4604         case 30:
4605                 if (name) return _("地獄のカード", "Trump Greater Undead");
4606                 if (desc) return _("1体の上級アンデッドを召喚する。", "Summons a greater undead.");
4607     
4608                 {
4609                         if (cast || fail)
4610                         {
4611                                 msg_print(_("あなたは強力なアンデッドのカードに集中する...", "You concentrate on the trump of a greater undead being..."));
4612                                 /* May allow unique depend on level and dice roll */
4613                                 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, SUMMON_HI_UNDEAD, PM_ALLOW_UNIQUE))
4614                                 {
4615                                         if (fail)
4616                                         {
4617                                                 msg_print(_("召喚された上級アンデッドは怒っている!", "The summoned greater undead creature gets angry!"));
4618                                         }
4619                                 }
4620                         }
4621                 }
4622                 break;
4623
4624         case 31:
4625                 if (name) return _("古代ドラゴンのカード", "Trump Ancient Dragon");
4626                 if (desc) return _("1体の古代ドラゴンを召喚する。", "Summons an ancient dragon.");
4627     
4628                 {
4629                         if (cast)
4630                         {
4631                                 int type;
4632
4633                                 if (p_ptr->pclass == CLASS_BEASTMASTER)
4634                                         type = SUMMON_HI_DRAGON_LIVING;
4635                                 else
4636                                         type = SUMMON_HI_DRAGON;
4637
4638                                 msg_print(_("あなたは古代ドラゴンのカードに集中する...", "You concentrate on the trump of an ancient dragon..."));
4639                                 /* May allow unique depend on level and dice roll */
4640                                 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, type, PM_ALLOW_UNIQUE))
4641                                 {
4642                                         if (fail)
4643                                         {
4644                                                 msg_print(_("召喚された古代ドラゴンは怒っている!", "The summoned ancient dragon gets angry!"));
4645                                         }
4646                                 }
4647                         }
4648                 }
4649                 break;
4650         }
4651
4652         return "";
4653 }
4654
4655
4656 /*!
4657  * @brief 秘術領域魔法の各処理を行う
4658  * @param spell 魔法ID
4659  * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
4660  * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
4661  */
4662 static cptr do_arcane_spell(int spell, int mode)
4663 {
4664         bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
4665         bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
4666         bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
4667         bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
4668
4669         int dir;
4670         int plev = p_ptr->lev;
4671
4672         switch (spell)
4673         {
4674         case 0:
4675                 if (name) return _("電撃", "Zap");
4676                 if (desc) return _("電撃のボルトもしくはビームを放つ。", "Fires a bolt or beam of lightning.");
4677     
4678                 {
4679                         int dice = 3 + (plev - 1) / 5;
4680                         int sides = 3;
4681
4682                         if (info) return info_damage(dice, sides, 0);
4683
4684                         if (cast)
4685                         {
4686                                 if (!get_aim_dir(&dir)) return NULL;
4687
4688                                 fire_bolt_or_beam(beam_chance() - 10, GF_ELEC, dir, damroll(dice, sides));
4689                         }
4690                 }
4691                 break;
4692
4693         case 1:
4694                 if (name) return _("魔法の施錠", "Wizard Lock");
4695                 if (desc) return _("扉に鍵をかける。", "Locks a door.");
4696     
4697                 {
4698                         if (cast)
4699                         {
4700                                 if (!get_aim_dir(&dir)) return NULL;
4701
4702                                 wizard_lock(dir);
4703                         }
4704                 }
4705                 break;
4706
4707         case 2:
4708                 if (name) return _("透明体感知", "Detect Invisibility");
4709                 if (desc) return _("近くの透明なモンスターを感知する。", "Detects all invisible monsters in your vicinity.");
4710     
4711                 {
4712                         int rad = DETECT_RAD_DEFAULT;
4713
4714                         if (info) return info_radius(rad);
4715
4716                         if (cast)
4717                         {
4718                                 detect_monsters_invis(rad);
4719                         }
4720                 }
4721                 break;
4722
4723         case 3:
4724                 if (name) return _("モンスター感知", "Detect Monsters");
4725                 if (desc) return _("近くの全ての見えるモンスターを感知する。", "Detects all monsters in your vicinity unless invisible.");
4726     
4727                 {
4728                         int rad = DETECT_RAD_DEFAULT;
4729
4730                         if (info) return info_radius(rad);
4731
4732                         if (cast)
4733                         {
4734                                 detect_monsters_normal(rad);
4735                         }
4736                 }
4737                 break;
4738
4739         case 4:
4740                 if (name) return _("ショート・テレポート", "Blink");
4741                 if (desc) return _("近距離のテレポートをする。", "Teleport short distance.");
4742     
4743                 {
4744                         int range = 10;
4745
4746                         if (info) return info_range(range);
4747
4748                         if (cast)
4749                         {
4750                                 teleport_player(range, 0L);
4751                         }
4752                 }
4753                 break;
4754
4755         case 5:
4756                 if (name) return _("ライト・エリア", "Light Area");
4757                 if (desc) return _("光源が照らしている範囲か部屋全体を永久に明るくする。", "Lights up nearby area and the inside of a room permanently.");
4758     
4759                 {
4760                         int dice = 2;
4761                         int sides = plev / 2;
4762                         int rad = plev / 10 + 1;
4763
4764                         if (info) return info_damage(dice, sides, 0);
4765
4766                         if (cast)
4767                         {
4768                                 lite_area(damroll(dice, sides), rad);
4769                         }
4770                 }
4771                 break;
4772
4773         case 6:
4774                 if (name) return _("罠と扉 破壊", "Trap & Door Destruction");
4775                 if (desc) return _("一直線上の全ての罠と扉を破壊する。", "Fires a beam which destroy traps and doors.");
4776     
4777                 {
4778                         if (cast)
4779                         {
4780                                 if (!get_aim_dir(&dir)) return NULL;
4781
4782                                 destroy_door(dir);
4783                         }
4784                 }
4785                 break;
4786
4787         case 7:
4788                 if (name) return _("軽傷の治癒", "Cure Light Wounds");
4789                 if (desc) return _("怪我と体力を少し回復させる。", "Heals cut and HP a little.");
4790     
4791                 {
4792                         int dice = 2;
4793                         int sides = 8;
4794
4795                         if (info) return info_heal(dice, sides, 0);
4796
4797                         if (cast)
4798                         {
4799                                 hp_player(damroll(dice, sides));
4800                                 set_cut(p_ptr->cut - 10);
4801                         }
4802                 }
4803                 break;
4804
4805         case 8:
4806                 if (name) return _("罠と扉 感知", "Detect Doors & Traps");
4807                 if (desc) return _("近くの全ての罠と扉と階段を感知する。", "Detects traps, doors, and stairs in your vicinity.");
4808     
4809                 {
4810                         int rad = DETECT_RAD_DEFAULT;
4811
4812                         if (info) return info_radius(rad);
4813
4814                         if (cast)
4815                         {
4816                                 detect_traps(rad, TRUE);
4817                                 detect_doors(rad);
4818                                 detect_stairs(rad);
4819                         }
4820                 }
4821                 break;
4822
4823         case 9:
4824                 if (name) return _("燃素", "Phlogiston");
4825                 if (desc) return _("光源に燃料を補給する。", "Adds more turns of light to a lantern or torch.");
4826     
4827                 {
4828                         if (cast)
4829                         {
4830                                 phlogiston();
4831                         }
4832                 }
4833                 break;
4834
4835         case 10:
4836                 if (name) return _("財宝感知", "Detect Treasure");
4837                 if (desc) return _("近くの財宝を感知する。", "Detects all treasures in your vicinity.");
4838     
4839                 {
4840                         int rad = DETECT_RAD_DEFAULT;
4841
4842                         if (info) return info_radius(rad);
4843
4844                         if (cast)
4845                         {
4846                                 detect_treasure(rad);
4847                                 detect_objects_gold(rad);
4848                         }
4849                 }
4850                 break;
4851
4852         case 11:
4853                 if (name) return _("魔法 感知", "Detect Enchantment");
4854                 if (desc) return _("近くの魔法がかかったアイテムを感知する。", "Detects all magical items in your vicinity.");
4855     
4856                 {
4857                         int rad = DETECT_RAD_DEFAULT;
4858
4859                         if (info) return info_radius(rad);
4860
4861                         if (cast)
4862                         {
4863                                 detect_objects_magic(rad);
4864                         }
4865                 }
4866                 break;
4867
4868         case 12:
4869                 if (name) return _("アイテム感知", "Detect Objects");
4870                 if (desc) return _("近くの全てのアイテムを感知する。", "Detects all items in your vicinity.");
4871     
4872                 {
4873                         int rad = DETECT_RAD_DEFAULT;
4874
4875                         if (info) return info_radius(rad);
4876
4877                         if (cast)
4878                         {
4879                                 detect_objects_normal(rad);
4880                         }
4881                 }
4882                 break;
4883
4884         case 13:
4885                 if (name) return _("解毒", "Cure Poison");
4886                 if (desc) return _("毒を体内から完全に取り除く。", "Cures poison status.");
4887     
4888                 {
4889                         if (cast)
4890                         {
4891                                 set_poisoned(0);
4892                         }
4893                 }
4894                 break;
4895
4896         case 14:
4897                 if (name) return _("耐冷", "Resist Cold");
4898                 if (desc) return _("一定時間、冷気への耐性を得る。装備による耐性に累積する。", "Gives resistance to cold. This resistance can be added to which from equipment for more powerful resistance.");
4899     
4900                 {
4901                         int base = 20;
4902
4903                         if (info) return info_duration(base, base);
4904
4905                         if (cast)
4906                         {
4907                                 set_oppose_cold(randint1(base) + base, FALSE);
4908                         }
4909                 }
4910                 break;
4911
4912         case 15:
4913                 if (name) return _("耐火", "Resist Fire");
4914                 if (desc) return _("一定時間、炎への耐性を得る。装備による耐性に累積する。", 
4915                         "Gives resistance to fire. This resistance can be added to which from equipment for more powerful resistance.");
4916     
4917                 {
4918                         int base = 20;
4919
4920                         if (info) return info_duration(base, base);
4921
4922                         if (cast)
4923                         {
4924                                 set_oppose_fire(randint1(base) + base, FALSE);
4925                         }
4926                 }
4927                 break;
4928
4929         case 16:
4930                 if (name) return _("耐電", "Resist Lightning");
4931                 if (desc) return _("一定時間、電撃への耐性を得る。装備による耐性に累積する。", 
4932                         "Gives resistance to electricity. This resistance can be added to which from equipment for more powerful resistance.");
4933     
4934                 {
4935                         int base = 20;
4936
4937                         if (info) return info_duration(base, base);
4938
4939                         if (cast)
4940                         {
4941                                 set_oppose_elec(randint1(base) + base, FALSE);
4942                         }
4943                 }
4944                 break;
4945
4946         case 17:
4947                 if (name) return _("耐酸", "Resist Acid");
4948                 if (desc) return _("一定時間、酸への耐性を得る。装備による耐性に累積する。", 
4949                         "Gives resistance to acid. This resistance can be added to which from equipment for more powerful resistance.");
4950     
4951                 {
4952                         int base = 20;
4953
4954                         if (info) return info_duration(base, base);
4955
4956                         if (cast)
4957                         {
4958                                 set_oppose_acid(randint1(base) + base, FALSE);
4959                         }
4960                 }
4961                 break;
4962
4963         case 18:
4964                 if (name) return _("重傷の治癒", "Cure Medium Wounds");
4965                 if (desc) return _("怪我と体力を中程度回復させる。", "Heals cut and HP more.");
4966     
4967                 {
4968                         int dice = 4;
4969                         int sides = 8;
4970
4971                         if (info) return info_heal(dice, sides, 0);
4972
4973                         if (cast)
4974                         {
4975                                 hp_player(damroll(dice, sides));
4976                                 set_cut((p_ptr->cut / 2) - 50);
4977                         }
4978                 }
4979                 break;
4980
4981         case 19:
4982                 if (name) return _("テレポート", "Teleport");
4983                 if (desc) return _("遠距離のテレポートをする。", "Teleport long distance.");
4984     
4985                 {
4986                         int range = plev * 5;
4987
4988                         if (info) return info_range(range);
4989
4990                         if (cast)
4991                         {
4992                                 teleport_player(range, 0L);
4993                         }
4994                 }
4995                 break;
4996
4997         case 20:
4998                 if (name) return _("鑑定", "Identify");
4999                 if (desc) return _("アイテムを識別する。", "Identifies an item.");
5000     
5001                 {
5002                         if (cast)
5003                         {
5004                                 if (!ident_spell(FALSE)) return NULL;
5005                         }
5006                 }
5007                 break;
5008
5009         case 21:
5010                 if (name) return _("岩石溶解", "Stone to Mud");
5011                 if (desc) return _("壁を溶かして床にする。", "Turns one rock square to mud.");
5012     
5013                 {
5014                         int dice = 1;
5015                         int sides = 30;
5016                         int base = 20;
5017
5018                         if (info) return info_damage(dice, sides, base);
5019
5020                         if (cast)
5021                         {
5022                                 if (!get_aim_dir(&dir)) return NULL;
5023
5024                                 wall_to_mud(dir, 20 + randint1(30));
5025                         }
5026                 }
5027                 break;
5028
5029         case 22:
5030                 if (name) return _("閃光", "Ray of Light");
5031                 if (desc) return _("光線を放つ。光りを嫌うモンスターに効果がある。", "Fires a beam of light which damages to light-sensitive monsters.");
5032     
5033                 {
5034                         int dice = 6;
5035                         int sides = 8;
5036
5037                         if (info) return info_damage(dice, sides, 0);
5038
5039                         if (cast)
5040                         {
5041                                 if (!get_aim_dir(&dir)) return NULL;
5042
5043                                 msg_print(_("光線が放たれた。", "A line of light appears."));
5044                                 lite_line(dir, damroll(6, 8));
5045                         }
5046                 }
5047                 break;
5048
5049         case 23:
5050                 if (name) return _("空腹充足", "Satisfy Hunger");
5051                 if (desc) return _("満腹にする。", "Satisfies hunger.");
5052     
5053                 {
5054                         if (cast)
5055                         {
5056                                 set_food(PY_FOOD_MAX - 1);
5057                         }
5058                 }
5059                 break;
5060
5061         case 24:
5062                 if (name) return _("透明視認", "See Invisible");
5063                 if (desc) return _("一定時間、透明なものが見えるようになる。", "Gives see invisible for a while.");
5064     
5065                 {
5066                         int base = 24;
5067
5068                         if (info) return info_duration(base, base);
5069
5070                         if (cast)
5071                         {
5072                                 set_tim_invis(randint1(base) + base, FALSE);
5073                         }
5074                 }
5075                 break;
5076
5077         case 25:
5078                 if (name) return _("エレメンタル召喚", "Conjure Elemental");
5079                 if (desc) return _("1体のエレメンタルを召喚する。", "Summons an elemental.");
5080     
5081                 {
5082                         if (cast)
5083                         {
5084                                 if (!summon_specific(-1, p_ptr->y, p_ptr->x, plev, SUMMON_ELEMENTAL, (PM_ALLOW_GROUP | PM_FORCE_PET)))
5085                                 {
5086                                         msg_print(_("エレメンタルは現れなかった。", "No Elementals arrive."));
5087                                 }
5088                         }
5089                 }
5090                 break;
5091
5092         case 26:
5093                 if (name) return _("テレポート・レベル", "Teleport Level");
5094                 if (desc) return _("瞬時に上か下の階にテレポートする。", "Teleport to up or down stairs in a moment.");
5095     
5096                 {
5097                         if (cast)
5098                         {
5099                                 if (!get_check(_("本当に他の階にテレポートしますか?", "Are you sure? (Teleport Level)"))) return NULL;
5100                                 teleport_level(0);
5101                         }
5102                 }
5103                 break;
5104
5105         case 27:
5106                 if (name) return _("テレポート・モンスター", "Teleport Away");
5107                 if (desc) return _("モンスターをテレポートさせるビームを放つ。抵抗されると無効。", "Teleports all monsters on the line away unless resisted.");
5108     
5109                 {
5110                         int power = plev;
5111
5112                         if (info) return info_power(power);
5113
5114                         if (cast)
5115                         {
5116                                 if (!get_aim_dir(&dir)) return NULL;
5117
5118                                 fire_beam(GF_AWAY_ALL, dir, power);
5119                         }
5120                 }
5121                 break;
5122
5123         case 28:
5124                 if (name) return _("元素の球", "Elemental Ball");
5125                 if (desc) return _("炎、電撃、冷気、酸のどれかの球を放つ。", "Fires a ball of some elements.");
5126     
5127                 {
5128                         int dam = 75 + plev;
5129                         int rad = 2;
5130
5131                         if (info) return info_damage(0, 0, dam);
5132
5133                         if (cast)
5134                         {
5135                                 int type;
5136
5137                                 if (!get_aim_dir(&dir)) return NULL;
5138
5139                                 switch (randint1(4))
5140                                 {
5141                                         case 1:  type = GF_FIRE;break;
5142                                         case 2:  type = GF_ELEC;break;
5143                                         case 3:  type = GF_COLD;break;
5144                                         default: type = GF_ACID;break;
5145                                 }
5146
5147                                 fire_ball(type, dir, dam, rad);
5148                         }
5149                 }
5150                 break;
5151
5152         case 29:
5153                 if (name) return _("全感知", "Detection");
5154                 if (desc) return _("近くの全てのモンスター、罠、扉、階段、財宝、そしてアイテムを感知する。", 
5155                         "Detects all monsters, traps, doors, stairs, treasures and items in your vicinity.");
5156     
5157                 {
5158                         int rad = DETECT_RAD_DEFAULT;
5159
5160                         if (info) return info_radius(rad);
5161
5162                         if (cast)
5163                         {
5164                                 detect_all(rad);
5165                         }
5166                 }
5167                 break;
5168
5169         case 30:
5170                 if (name) return _("帰還の呪文", "Word of Recall");
5171                 if (desc) return _("地上にいるときはダンジョンの最深階へ、ダンジョンにいるときは地上へと移動する。", 
5172                         "Recalls player from dungeon to town, or from town to the deepest level of dungeon.");
5173     
5174                 {
5175                         int base = 15;
5176                         int sides = 20;
5177
5178                         if (info) return info_delay(base, sides);
5179
5180                         if (cast)
5181                         {
5182                                 if (!word_of_recall()) return NULL;
5183                         }
5184                 }
5185                 break;
5186
5187         case 31:
5188                 if (name) return _("千里眼", "Clairvoyance");
5189                 if (desc) return _("その階全体を永久に照らし、ダンジョン内すべてのアイテムを感知する。さらに、一定時間テレパシー能力を得る。", 
5190                         "Maps and lights whole dungeon level. Knows all objects location. And gives telepathy for a while.");
5191     
5192                 {
5193                         int base = 25;
5194                         int sides = 30;
5195
5196                         if (info) return info_duration(base, sides);
5197
5198                         if (cast)
5199                         {
5200                                 chg_virtue(V_KNOWLEDGE, 1);
5201                                 chg_virtue(V_ENLIGHTEN, 1);
5202
5203                                 wiz_lite(FALSE);
5204
5205                                 if (!p_ptr->telepathy)
5206                                 {
5207                                         set_tim_esp(randint1(sides) + base, FALSE);
5208                                 }
5209                         }
5210                 }
5211                 break;
5212         }
5213
5214         return "";
5215 }
5216
5217 /*!
5218  * @brief 匠領域魔法の各処理を行う
5219  * @param spell 魔法ID
5220  * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
5221  * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
5222  */
5223 static cptr do_craft_spell(int spell, int mode)
5224 {
5225         bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
5226         bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
5227         bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
5228         bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
5229
5230         int plev = p_ptr->lev;
5231
5232         switch (spell)
5233         {
5234         case 0:
5235                 if (name) return _("赤外線視力", "Infravision");
5236                 if (desc) return _("一定時間、赤外線視力が増強される。", "Gives infravision for a while.");
5237     
5238                 {
5239                         int base = 100;
5240
5241                         if (info) return info_duration(base, base);
5242
5243                         if (cast)
5244                         {
5245                                 set_tim_infra(base + randint1(base), FALSE);
5246                         }
5247                 }
5248                 break;
5249
5250         case 1:
5251                 if (name) return _("回復力強化", "Regeneration");
5252                 if (desc) return _("一定時間、回復力が増強される。", "Gives regeneration ability for a while.");
5253     
5254                 {
5255                         int base = 80;
5256
5257                         if (info) return info_duration(base, base);
5258
5259                         if (cast)
5260                         {
5261                                 set_tim_regen(base + randint1(base), FALSE);
5262                         }
5263                 }
5264                 break;
5265
5266         case 2:
5267                 if (name) return _("空腹充足", "Satisfy Hunger");
5268                 if (desc) return _("満腹になる。", "Satisfies hunger.");
5269     
5270                 {
5271                         if (cast)
5272                         {
5273                                 set_food(PY_FOOD_MAX - 1);
5274                         }
5275                 }
5276                 break;
5277
5278         case 3:
5279                 if (name) return _("耐冷気", "Resist Cold");
5280                 if (desc) return _("一定時間、冷気への耐性を得る。装備による耐性に累積する。", 
5281                         "Gives resistance to cold. This resistance can be added to which from equipment for more powerful resistance.");
5282     
5283                 {
5284                         int base = 20;
5285
5286                         if (info) return info_duration(base, base);
5287
5288                         if (cast)
5289                         {
5290                                 set_oppose_cold(randint1(base) + base, FALSE);
5291                         }
5292                 }
5293                 break;
5294
5295         case 4:
5296                 if (name) return _("耐火炎", "Resist Fire");
5297                 if (desc) return _("一定時間、炎への耐性を得る。装備による耐性に累積する。", 
5298                         "Gives resistance to fire. This resistance can be added to which from equipment for more powerful resistance.");
5299     
5300                 {
5301                         int base = 20;
5302
5303                         if (info) return info_duration(base, base);
5304
5305                         if (cast)
5306                         {
5307                                 set_oppose_fire(randint1(base) + base, FALSE);
5308                         }
5309                 }
5310                 break;
5311
5312         case 5:
5313                 if (name) return _("士気高揚", "Heroism");
5314                 if (desc) return _("一定時間、ヒーロー気分になる。", "Removes fear, and gives bonus to hit and 10 more HP for a while.");
5315     
5316                 {
5317                         int base = 25;
5318
5319                         if (info) return info_duration(base, base);
5320
5321                         if (cast)
5322                         {
5323                                 set_hero(randint1(base) + base, FALSE);
5324                                 hp_player(10);
5325                                 set_afraid(0);
5326                         }
5327                 }
5328                 break;
5329
5330         case 6:
5331                 if (name) return _("耐電撃", "Resist Lightning");
5332                 if (desc) return _("一定時間、電撃への耐性を得る。装備による耐性に累積する。",
5333                         "Gives resistance to electricity. This resistance can be added to which from equipment for more powerful resistance.");
5334     
5335                 {
5336                         int base = 20;
5337
5338                         if (info) return info_duration(base, base);
5339
5340                         if (cast)
5341                         {
5342                                 set_oppose_elec(randint1(base) + base, FALSE);
5343                         }
5344                 }
5345                 break;
5346
5347         case 7:
5348                 if (name) return _("耐酸", "Resist Acid");
5349                 if (desc) return _("一定時間、酸への耐性を得る。装備による耐性に累積する。",
5350                         "Gives resistance to acid. This resistance can be added to which from equipment for more powerful resistance.");
5351     
5352                 {
5353                         int base = 20;
5354
5355                         if (info) return info_duration(base, base);
5356
5357                         if (cast)
5358                         {
5359                                 set_oppose_acid(randint1(base) + base, FALSE);
5360                         }
5361                 }
5362                 break;
5363
5364         case 8:
5365                 if (name) return _("透明視認", "See Invisibility");
5366                 if (desc) return _("一定時間、透明なものが見えるようになる。", "Gives see invisible for a while.");
5367     
5368                 {
5369                         int base = 24;
5370
5371                         if (info) return info_duration(base, base);
5372
5373                         if (cast)
5374                         {
5375                                 set_tim_invis(randint1(base) + base, FALSE);
5376                         }
5377                 }
5378                 break;
5379
5380         case 9:
5381                 if (name) return _("解呪", "Remove Curse");
5382                 if (desc) return _("アイテムにかかった弱い呪いを解除する。", "Removes normal curses from equipped items.");
5383     
5384                 {
5385                         if (cast)
5386                         {
5387                                 if (remove_curse())
5388                                 {
5389                                         msg_print(_("誰かに見守られているような気がする。", "You feel as if someone is watching over you."));
5390                                 }
5391                         }
5392                 }
5393                 break;
5394
5395         case 10:
5396                 if (name) return _("耐毒", "Resist Poison");
5397                 if (desc) return _("一定時間、毒への耐性を得る。装備による耐性に累積する。",
5398                         "Gives resistance to poison. This resistance can be added to which from equipment for more powerful resistance.");
5399     
5400                 {
5401                         int base = 20;
5402
5403                         if (info) return info_duration(base, base);
5404
5405                         if (cast)
5406                         {
5407                                 set_oppose_pois(randint1(base) + base, FALSE);
5408                         }
5409                 }
5410                 break;
5411
5412         case 11:
5413                 if (name) return _("狂戦士化", "Berserk");
5414                 if (desc) return _("狂戦士化し、恐怖を除去する。", "Gives bonus to hit and HP, immunity to fear for a while. But decreases AC.");
5415     
5416                 {
5417                         int base = 25;
5418
5419                         if (info) return info_duration(base, base);
5420
5421                         if (cast)
5422                         {
5423                                 set_shero(randint1(base) + base, FALSE);
5424                                 hp_player(30);
5425                                 set_afraid(0);
5426                         }
5427                 }
5428                 break;
5429
5430         case 12:
5431                 if (name) return _("自己分析", "Self Knowledge");
5432                 if (desc) return _("現在の自分の状態を完全に知る。",
5433                         "Gives you useful info regarding your current resistances, the powers of your weapon and maximum limits of your stats.");
5434     
5435                 {
5436                         if (cast)
5437                         {
5438                                 self_knowledge();
5439                         }
5440                 }
5441                 break;
5442
5443         case 13:
5444                 if (name) return _("対邪悪結界", "Protection from Evil");
5445                 if (desc) return _("邪悪なモンスターの攻撃を防ぐバリアを張る。", "Gives aura which protect you from evil monster's physical attack.");
5446     
5447                 {
5448                         int base = 3 * plev;
5449                         int sides = 25;
5450
5451                         if (info) return info_duration(base, sides);
5452
5453                         if (cast)
5454                         {
5455                                 set_protevil(randint1(sides) + base, FALSE);
5456                         }
5457                 }
5458                 break;
5459
5460         case 14:
5461                 if (name) return _("癒し", "Cure");
5462                 if (desc) return _("毒、朦朧状態、負傷を全快させ、幻覚を直す。", "Heals poison, stun, cut and hallucination completely.");
5463     
5464                 {
5465                         if (cast)
5466                         {
5467                                 set_poisoned(0);
5468                                 set_stun(0);
5469                                 set_cut(0);
5470                                 set_image(0);
5471                         }
5472                 }
5473                 break;
5474
5475         case 15:
5476                 if (name) return _("魔法剣", "Mana Branding");
5477                 if (desc) return _("一定時間、武器に冷気、炎、電撃、酸、毒のいずれかの属性をつける。武器を持たないと使えない。",
5478                         "Makes current weapon some elemental branded. You must wield weapons.");
5479     
5480                 {
5481                         int base = plev / 2;
5482
5483                         if (info) return info_duration(base, base);
5484
5485                         if (cast)
5486                         {
5487                                 if (!choose_ele_attack()) return NULL;
5488                         }
5489                 }
5490                 break;
5491
5492         case 16:
5493                 if (name) return _("テレパシー", "Telepathy");
5494                 if (desc) return _("一定時間、テレパシー能力を得る。", "Gives telepathy for a while.");
5495     
5496                 {
5497                         int base = 25;
5498                         int sides = 30;
5499
5500                         if (info) return info_duration(base, sides);
5501
5502                         if (cast)
5503                         {
5504                                 set_tim_esp(randint1(sides) + base, FALSE);
5505                         }
5506                 }
5507                 break;
5508
5509         case 17:
5510                 if (name) return _("肌石化", "Stone Skin");
5511                 if (desc) return _("一定時間、ACを上昇させる。", "Gives bonus to AC for a while.");
5512     
5513                 {
5514                         int base = 30;
5515                         int sides = 20;
5516
5517                         if (info) return info_duration(base, sides);
5518
5519                         if (cast)
5520                         {
5521                                 set_shield(randint1(sides) + base, FALSE);
5522                         }
5523                 }
5524                 break;
5525
5526         case 18:
5527                 if (name) return _("全耐性", "Resistance");
5528                 if (desc) return _("一定時間、酸、電撃、炎、冷気、毒に対する耐性を得る。装備による耐性に累積する。", 
5529                         "Gives resistance to fire, cold, electricity, acid and poison for a while. These resistances can be added to which from equipment for more powerful resistances.");
5530     
5531                 {
5532                         int base = 20;
5533
5534                         if (info) return info_duration(base, base);
5535
5536                         if (cast)
5537                         {
5538                                 set_oppose_acid(randint1(base) + base, FALSE);
5539                                 set_oppose_elec(randint1(base) + base, FALSE);
5540                                 set_oppose_fire(randint1(base) + base, FALSE);
5541                                 set_oppose_cold(randint1(base) + base, FALSE);
5542                                 set_oppose_pois(randint1(base) + base, FALSE);
5543                         }
5544                 }
5545                 break;
5546
5547         case 19:
5548                 if (name) return _("スピード", "Haste Self");
5549                 if (desc) return _("一定時間、加速する。", "Hastes you for a while.");
5550     
5551                 {
5552                         int base = plev;
5553                         int sides = 20 + plev;
5554
5555                         if (info) return info_duration(base, sides);
5556
5557                         if (cast)
5558                         {
5559                                 set_fast(randint1(sides) + base, FALSE);
5560                         }
5561                 }
5562                 break;
5563
5564         case 20:
5565                 if (name) return _("壁抜け", "Walk through Wall");
5566                 if (desc) return _("一定時間、半物質化し壁を通り抜けられるようになる。", "Gives ability to pass walls for a while.");
5567     
5568                 {
5569                         int base = plev / 2;
5570
5571                         if (info) return info_duration(base, base);
5572
5573                         if (cast)
5574                         {
5575                                 set_kabenuke(randint1(base) + base, FALSE);
5576                         }
5577                 }
5578                 break;
5579
5580         case 21:
5581                 if (name) return _("盾磨き", "Polish Shield");
5582                 if (desc) return _("盾に反射の属性をつける。", "Makes a shield a shield of reflection.");
5583     
5584                 {
5585                         if (cast)
5586                         {
5587                                 pulish_shield();
5588                         }
5589                 }
5590                 break;
5591
5592         case 22:
5593                 if (name) return _("ゴーレム製造", "Create Golem");
5594                 if (desc) return _("1体のゴーレムを製造する。", "Creates a golem.");
5595     
5596                 {
5597                         if (cast)
5598                         {
5599                                 if (summon_specific(-1, p_ptr->y, p_ptr->x, plev, SUMMON_GOLEM, PM_FORCE_PET))
5600                                 {
5601                                         msg_print(_("ゴーレムを作った。", "You make a golem."));
5602                                 }
5603                                 else
5604                                 {
5605                                         msg_print(_("うまくゴーレムを作れなかった。", "No Golems arrive."));
5606                                 }
5607                         }
5608                 }
5609                 break;
5610
5611         case 23:
5612                 if (name) return _("魔法の鎧", "Magical armor");
5613                 if (desc) return _("一定時間、魔法防御力とACが上がり、混乱と盲目の耐性、反射能力、麻痺知らず、浮遊を得る。",
5614                         "Gives resistance to magic, bonus to AC, resistance to confusion, blindness, reflection, free action and levitation for a while.");
5615     
5616                 {
5617                         int base = 20;
5618
5619                         if (info) return info_duration(base, base);
5620
5621                         if (cast)
5622                         {
5623                                 set_magicdef(randint1(base) + base, FALSE);
5624                         }
5625                 }
5626                 break;
5627
5628         case 24:
5629                 if (name) return _("装備無力化", "Remove Enchantment");
5630                 if (desc) return _("武器・防具にかけられたあらゆる魔力を完全に解除する。", "Removes all magics completely from any weapon or armor.");
5631     
5632                 {
5633                         if (cast)
5634                         {
5635                                 if (!mundane_spell(TRUE)) return NULL;
5636                         }
5637                 }
5638                 break;
5639
5640         case 25:
5641                 if (name) return _("呪い粉砕", "Remove All Curse");
5642                 if (desc) return _("アイテムにかかった強力な呪いを解除する。", "Removes normal and heavy curse from equipped items.");
5643     
5644                 {
5645                         if (cast)
5646                         {
5647                                 if (remove_all_curse())
5648                                 {
5649                                         msg_print(_("誰かに見守られているような気がする。", "You feel as if someone is watching over you."));
5650                                 }
5651                         }
5652                 }
5653                 break;
5654
5655         case 26:
5656                 if (name) return _("完全なる知識", "Knowledge True");
5657                 if (desc) return _("アイテムの持つ能力を完全に知る。", "*Identifies* an item.");
5658     
5659                 {
5660                         if (cast)
5661                         {
5662                                 if (!identify_fully(FALSE)) return NULL;
5663                         }
5664                 }
5665                 break;
5666
5667         case 27:
5668                 if (name) return _("武器強化", "Enchant Weapon");
5669                 if (desc) return _("武器の命中率修正とダメージ修正を強化する。", "Attempts to increase +to-hit, +to-dam of a weapon.");
5670     
5671                 {
5672                         if (cast)
5673                         {
5674                                 if (!enchant_spell(randint0(4) + 1, randint0(4) + 1, 0)) return NULL;
5675                         }
5676                 }
5677                 break;
5678
5679         case 28:
5680                 if (name) return _("防具強化", "Enchant Armor");
5681                 if (desc) return _("鎧の防御修正を強化する。", "Attempts to increase +AC of an armor.");
5682     
5683                 {
5684                         if (cast)
5685                         {
5686                                 if (!enchant_spell(0, 0, randint0(3) + 2)) return NULL;
5687                         }
5688                 }
5689                 break;
5690
5691         case 29:
5692                 if (name) return _("武器属性付与", "Brand Weapon");
5693                 if (desc) return _("武器にランダムに属性をつける。", "Makes current weapon a random ego weapon.");
5694     
5695                 {
5696                         if (cast)
5697                         {
5698                                 brand_weapon(randint0(18));
5699                         }
5700                 }
5701                 break;
5702
5703         case 30:
5704                 if (name) return _("人間トランプ", "Living Trump");
5705                 if (desc) return _("ランダムにテレポートする突然変異か、自分の意思でテレポートする突然変異が身につく。",
5706                         "Gives mutation which makes you teleport randomly or makes you able to teleport at will.");
5707     
5708                 {
5709                         if (cast)
5710                         {
5711                                 int mutation;
5712
5713                                 if (one_in_(7))
5714                                         /* Teleport control */
5715                                         mutation = 12;
5716                                 else
5717                                         /* Random teleportation (uncontrolled) */
5718                                         mutation = 77;
5719
5720                                 /* Gain the mutation */
5721                                 if (gain_random_mutation(mutation))
5722                                 {
5723                                         msg_print(_("あなたは生きているカードに変わった。", "You have turned into a Living Trump."));
5724                                 }
5725                         }
5726                 }
5727                 break;
5728
5729         case 31:
5730                 if (name) return _("属性への免疫", "Immunity");
5731                 if (desc) return _("一定時間、冷気、炎、電撃、酸のいずれかに対する免疫を得る。",
5732                         "Gives an immunity to fire, cold, electricity or acid for a while.");
5733     
5734                 {
5735                         int base = 13;
5736
5737                         if (info) return info_duration(base, base);
5738
5739                         if (cast)
5740                         {
5741                                 if (!choose_ele_immune(base + randint1(base))) return NULL;
5742                         }
5743                 }
5744                 break;
5745         }
5746
5747         return "";
5748 }
5749
5750 /*!
5751  * @brief 悪魔領域魔法の各処理を行う
5752  * @param spell 魔法ID
5753  * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
5754  * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
5755  */
5756 static cptr do_daemon_spell(int spell, int mode)
5757 {
5758         bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
5759         bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
5760         bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
5761         bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
5762         static const char s_dam[] = _("損傷:", "dam ");
5763
5764         int dir;
5765         int plev = p_ptr->lev;
5766
5767         switch (spell)
5768         {
5769         case 0:
5770                 if (name) return _("マジック・ミサイル", "Magic Missile");
5771                 if (desc) return _("弱い魔法の矢を放つ。", "Fires a weak bolt of magic.");
5772     
5773                 {
5774                         int dice = 3 + (plev - 1) / 5;
5775                         int sides = 4;
5776
5777                         if (info) return info_damage(dice, sides, 0);
5778
5779                         if (cast)
5780                         {
5781                                 if (!get_aim_dir(&dir)) return NULL;
5782
5783                                 fire_bolt_or_beam(beam_chance() - 10, GF_MISSILE, dir, damroll(dice, sides));
5784                         }
5785                 }
5786                 break;
5787
5788         case 1:
5789                 if (name) return _("無生命感知", "Detect Unlife");
5790                 if (desc) return _("近くの生命のないモンスターを感知する。", "Detects all nonliving monsters in your vicinity.");
5791     
5792                 {
5793                         int rad = DETECT_RAD_DEFAULT;
5794
5795                         if (info) return info_radius(rad);
5796
5797                         if (cast)
5798                         {
5799                                 detect_monsters_nonliving(rad);
5800                         }
5801                 }
5802                 break;
5803
5804         case 2:
5805                 if (name) return _("邪なる祝福", "Evil Bless");
5806                 if (desc) return _("一定時間、命中率とACにボーナスを得る。", "Gives bonus to hit and AC for a few turns.");
5807     
5808                 {
5809                         int base = 12;
5810
5811                         if (info) return info_duration(base, base);
5812
5813                         if (cast)
5814                         {
5815                                 set_blessed(randint1(base) + base, FALSE);
5816                         }
5817                 }
5818                 break;
5819
5820         case 3:
5821                 if (name) return _("耐火炎", "Resist Fire");
5822                 if (desc) return _("一定時間、炎への耐性を得る。装備による耐性に累積する。", 
5823                         "Gives resistance to fire, cold and electricity for a while. These resistances can be added to which from equipment for more powerful resistances.");
5824     
5825                 {
5826                         int base = 20;
5827
5828                         if (info) return info_duration(base, base);
5829
5830                         if (cast)
5831                         {
5832                                 set_oppose_fire(randint1(base) + base, FALSE);
5833                         }
5834                 }
5835                 break;
5836
5837         case 4:
5838                 if (name) return _("恐慌", "Horrify");
5839                 if (desc) return _("モンスター1体を恐怖させ、朦朧させる。抵抗されると無効。", "Attempts to scare and stun a monster.");
5840     
5841                 {
5842                         int power = plev;
5843
5844                         if (info) return info_power(power);
5845
5846                         if (cast)
5847                         {
5848                                 if (!get_aim_dir(&dir)) return NULL;
5849
5850                                 fear_monster(dir, power);
5851                                 stun_monster(dir, power);
5852                         }
5853                 }
5854                 break;
5855
5856         case 5:
5857                 if (name) return _("地獄の矢", "Nether Bolt");
5858                 if (desc) return _("地獄のボルトもしくはビームを放つ。", "Fires a bolt or beam of nether.");
5859     
5860                 {
5861                         int dice = 6 + (plev - 5) / 4;
5862                         int sides = 8;
5863
5864                         if (info) return info_damage(dice, sides, 0);
5865
5866                         if (cast)
5867                         {
5868                                 if (!get_aim_dir(&dir)) return NULL;
5869
5870                                 fire_bolt_or_beam(beam_chance(), GF_NETHER, dir, damroll(dice, sides));
5871                         }
5872                 }
5873                 break;
5874
5875         case 6:
5876                 if (name) return _("古代の死霊召喚", "Summon Manes");
5877                 if (desc) return _("古代の死霊を召喚する。", "Summons a manes.");
5878     
5879                 {
5880                         if (cast)
5881                         {
5882                                 if (!summon_specific(-1, p_ptr->y, p_ptr->x, (plev * 3) / 2, SUMMON_MANES, (PM_ALLOW_GROUP | PM_FORCE_PET)))
5883                                 {
5884                                         msg_print(_("古代の死霊は現れなかった。", "No Manes arrive."));
5885                                 }
5886                         }
5887                 }
5888                 break;
5889
5890         case 7:
5891                 if (name) return _("地獄の焔", "Hellish Flame");
5892                 if (desc) return _("邪悪な力を持つボールを放つ。善良なモンスターには大きなダメージを与える。",
5893                         "Fires a ball of evil power. Hurts good monsters greatly.");
5894     
5895                 {
5896                         int dice = 3;
5897                         int sides = 6;
5898                         int rad = (plev < 30) ? 2 : 3;
5899                         int base;
5900
5901                         if (p_ptr->pclass == CLASS_MAGE ||
5902                             p_ptr->pclass == CLASS_HIGH_MAGE ||
5903                             p_ptr->pclass == CLASS_SORCERER)
5904                                 base = plev + plev / 2;
5905                         else
5906                                 base = plev + plev / 4;
5907
5908
5909                         if (info) return info_damage(dice, sides, base);
5910
5911                         if (cast)
5912                         {
5913                                 if (!get_aim_dir(&dir)) return NULL;
5914
5915                                 fire_ball(GF_HELL_FIRE, dir, damroll(dice, sides) + base, rad);
5916                         }
5917                 }
5918                 break;
5919
5920         case 8:
5921                 if (name) return _("デーモン支配", "Dominate Demon");
5922                 if (desc) return _("悪魔1体を魅了する。抵抗されると無効", "Attempts to charm a demon.");
5923     
5924                 {
5925                         int power = plev;
5926
5927                         if (info) return info_power(power);
5928
5929                         if (cast)
5930                         {
5931                                 if (!get_aim_dir(&dir)) return NULL;
5932
5933                                 control_one_demon(dir, power);
5934                         }
5935                 }
5936                 break;
5937
5938         case 9:
5939                 if (name) return _("ビジョン", "Vision");
5940                 if (desc) return _("周辺の地形を感知する。", "Maps nearby area.");
5941     
5942                 {
5943                         int rad = DETECT_RAD_MAP;
5944
5945                         if (info) return info_radius(rad);
5946
5947                         if (cast)
5948                         {
5949                                 map_area(rad);
5950                         }
5951                 }
5952                 break;
5953
5954         case 10:
5955                 if (name) return _("耐地獄", "Resist Nether");
5956                 if (desc) return _("一定時間、地獄への耐性を得る。", "Gives resistance to nether for a while.");
5957     
5958                 {
5959                         int base = 20;
5960
5961                         if (info) return info_duration(base, base);
5962
5963                         if (cast)
5964                         {
5965                                 set_tim_res_nether(randint1(base) + base, FALSE);
5966                         }
5967                 }
5968                 break;
5969
5970         case 11:
5971                 if (name) return _("プラズマ・ボルト", "Plasma bolt");
5972                 if (desc) return _("プラズマのボルトもしくはビームを放つ。", "Fires a bolt or beam of plasma.");
5973     
5974                 {
5975                         int dice = 11 + (plev - 5) / 4;
5976                         int sides = 8;
5977
5978                         if (info) return info_damage(dice, sides, 0);
5979
5980                         if (cast)
5981                         {
5982                                 if (!get_aim_dir(&dir)) return NULL;
5983
5984                                 fire_bolt_or_beam(beam_chance(), GF_PLASMA, dir, damroll(dice, sides));
5985                         }
5986                 }
5987                 break;
5988
5989         case 12:
5990                 if (name) return _("ファイア・ボール", "Fire Ball");
5991                 if (desc) return _("炎の球を放つ。", "Fires a ball of fire.");
5992     
5993                 {
5994                         int dam = plev + 55;
5995                         int rad = 2;
5996
5997                         if (info) return info_damage(0, 0, dam);
5998
5999                         if (cast)
6000                         {
6001                                 if (!get_aim_dir(&dir)) return NULL;
6002
6003                                 fire_ball(GF_FIRE, dir, dam, rad);
6004                         }
6005                 }
6006                 break;
6007
6008         case 13:
6009                 if (name) return _("炎の刃", "Fire Branding");
6010                 if (desc) return _("武器に炎の属性をつける。", "Makes current weapon fire branded.");
6011     
6012                 {
6013                         if (cast)
6014                         {
6015                                 brand_weapon(1);
6016                         }
6017                 }
6018                 break;
6019
6020         case 14:
6021                 if (name) return _("地獄球", "Nether Ball");
6022                 if (desc) return _("大きな地獄の球を放つ。", "Fires a huge ball of nether.");
6023     
6024                 {
6025                         int dam = plev * 3 / 2 + 100;
6026                         int rad = plev / 20 + 2;
6027
6028                         if (info) return info_damage(0, 0, dam);
6029
6030                         if (cast)
6031                         {
6032                                 if (!get_aim_dir(&dir)) return NULL;
6033
6034                                 fire_ball(GF_NETHER, dir, dam, rad);
6035                         }
6036                 }
6037                 break;
6038
6039         case 15:
6040                 if (name) return _("デーモン召喚", "Summon Demon");
6041                 if (desc) return _("悪魔1体を召喚する。", "Summons a demon.");
6042     
6043                 {
6044                         if (cast)
6045                         {
6046                                 bool pet = !one_in_(3);
6047                                 u32b flg = 0L;
6048
6049                                 if (pet) flg |= PM_FORCE_PET;
6050                                 else flg |= PM_NO_PET;
6051                                 if (!(pet && (plev < 50))) flg |= PM_ALLOW_GROUP;
6052
6053                                 if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, plev*2/3+randint1(plev/2), SUMMON_DEMON, flg))
6054                                 {
6055                                         msg_print(_("硫黄の悪臭が充満した。", "The area fills with a stench of sulphur and brimstone."));
6056
6057                                         if (pet)
6058                                         {
6059                                                 msg_print(_("「ご用でございますか、ご主人様」", "'What is thy bidding... Master?'"));
6060                                         }
6061                                         else
6062                                         {
6063                                                 msg_print(_("「卑しき者よ、我は汝の下僕にあらず! お前の魂を頂くぞ!」",
6064                                                                         "'NON SERVIAM! Wretch! I shall feast on thy mortal soul!'"));
6065                                         }
6066                                 }
6067                                 else
6068                                 {
6069                                         msg_print(_("悪魔は現れなかった。", "No demons arrive."));
6070                                 }
6071                                 break;
6072                         }
6073                 }
6074                 break;
6075
6076         case 16:
6077                 if (name) return _("悪魔の目", "Devilish Eye");
6078                 if (desc) return _("一定時間、テレパシー能力を得る。", "Gives telepathy for a while.");
6079     
6080                 {
6081                         int base = 30;
6082                         int sides = 25;
6083
6084                         if (info) return info_duration(base, sides);
6085
6086                         if (cast)
6087                         {
6088                                 set_tim_esp(randint1(base) + sides, FALSE);
6089                         }
6090                 }
6091                 break;
6092
6093         case 17:
6094                 if (name) return _("悪魔のクローク", "Devil Cloak");
6095                 if (desc) return _("恐怖を取り除き、一定時間、炎と冷気の耐性、炎のオーラを得る。耐性は装備による耐性に累積する。", 
6096                         "Removes fear. Gives resistance to fire and cold, and aura of fire. These resistances can be added to which from equipment for more powerful resistances.");
6097     
6098                 {
6099                         int base = 20;
6100
6101                         if (info) return info_duration(base, base);
6102
6103                         if (cast)
6104                         {
6105                                 int dur = randint1(base) + base;
6106                                         
6107                                 set_oppose_fire(dur, FALSE);
6108                                 set_oppose_cold(dur, FALSE);
6109                                 set_tim_sh_fire(dur, FALSE);
6110                                 set_afraid(0);
6111                                 break;
6112                         }
6113                 }
6114                 break;
6115
6116         case 18:
6117                 if (name) return _("溶岩流", "The Flow of Lava");
6118                 if (desc) return _("自分を中心とした炎の球を作り出し、床を溶岩に変える。", 
6119                         "Generates a ball of fire centered on you which transforms floors to magma.");
6120     
6121                 {
6122                         int dam = (55 + plev) * 2;
6123                         int rad = 3;
6124
6125                         if (info) return info_damage(0, 0, dam/2);
6126
6127                         if (cast)
6128                         {
6129                                 fire_ball(GF_FIRE, 0, dam, rad);
6130                                 fire_ball_hide(GF_LAVA_FLOW, 0, 2 + randint1(2), rad);
6131                         }
6132                 }
6133                 break;
6134
6135         case 19:
6136                 if (name) return _("プラズマ球", "Plasma Ball");
6137                 if (desc) return _("プラズマの球を放つ。", "Fires a ball of plasma.");
6138     
6139                 {
6140                         int dam = plev * 3 / 2 + 80;
6141                         int rad = 2 + plev / 40;
6142
6143                         if (info) return info_damage(0, 0, dam);
6144
6145                         if (cast)
6146                         {
6147                                 if (!get_aim_dir(&dir)) return NULL;
6148
6149                                 fire_ball(GF_PLASMA, dir, dam, rad);
6150                         }
6151                 }
6152                 break;
6153
6154         case 20:
6155                 if (name) return _("悪魔変化", "Polymorph Demon");
6156                 if (desc) return _("一定時間、悪魔に変化する。変化している間は本来の種族の能力を失い、代わりに悪魔としての能力を得る。", 
6157                         "Mimic a demon for a while. Loses abilities of original race and gets abilities as a demon.");
6158     
6159                 {
6160                         int base = 10 + plev / 2;
6161
6162                         if (info) return info_duration(base, base);
6163
6164                         if (cast)
6165                         {
6166                                 set_mimic(base + randint1(base), MIMIC_DEMON, FALSE);
6167                         }
6168                 }
6169                 break;
6170
6171         case 21:
6172                 if (name) return _("地獄の波動", "Nather Wave");
6173                 if (desc) return _("視界内の全てのモンスターにダメージを与える。善良なモンスターに特に大きなダメージを与える。", 
6174                         "Damages all monsters in sight. Hurts good monsters greatly.");
6175     
6176                 {
6177                         int sides1 = plev * 2;
6178                         int sides2 = plev * 2;
6179
6180                         if (info) return format("%sd%d+d%d", s_dam, sides1, sides2);
6181
6182                         if (cast)
6183                         {
6184                                 dispel_monsters(randint1(sides1));
6185                                 dispel_good(randint1(sides2));
6186                         }
6187                 }
6188                 break;
6189
6190         case 22:
6191                 if (name) return _("サキュバスの接吻", "Kiss of Succubus");
6192                 if (desc) return _("因果混乱の球を放つ。", "Fires a ball of nexus.");
6193     
6194                 {
6195                         int dam = 100 + plev * 2;
6196                         int rad = 4;
6197
6198                         if (info) return info_damage(0, 0, dam);
6199
6200                         if (cast)
6201                         {
6202                                 if (!get_aim_dir(&dir)) return NULL;
6203                                 fire_ball(GF_NEXUS, dir, dam, rad);
6204                         }
6205                 }
6206                 break;
6207
6208         case 23:
6209                 if (name) return _("破滅の手", "Doom Hand");
6210                 if (desc) return _("破滅の手を放つ。食らったモンスターはそのときのHPの半分前後のダメージを受ける。", "Attempts to make a monster's HP almost half.");
6211     
6212                 {
6213                         if (cast)
6214                         {
6215                                 if (!get_aim_dir(&dir))
6216                                         return NULL;
6217                                 else 
6218                                         msg_print(_("<破滅の手>を放った!", "You invoke the Hand of Doom!"));
6219                                 
6220                                 fire_ball_hide(GF_HAND_DOOM, dir, plev * 2, 0);
6221                         }
6222                 }
6223                 break;
6224
6225         case 24:
6226                 if (name) return _("士気高揚", "Raise the Morale");
6227                 if (desc) return _("一定時間、ヒーロー気分になる。", "Removes fear, and gives bonus to hit and 10 more HP for a while.");
6228     
6229                 {
6230                         int base = 25;
6231
6232                         if (info) return info_duration(base, base);
6233
6234                         if (cast)
6235                         {
6236                                 set_hero(randint1(base) + base, FALSE);
6237                                 hp_player(10);
6238                                 set_afraid(0);
6239                         }
6240                 }
6241                 break;
6242
6243         case 25:
6244                 if (name) return _("不滅の肉体", "Immortal Body");
6245                 if (desc) return _("一定時間、時間逆転への耐性を得る。", "Gives resistance to time for a while.");
6246     
6247                 {
6248                         int base = 20;
6249
6250                         if (info) return info_duration(base, base);
6251
6252                         if (cast)
6253                         {
6254                                 set_tim_res_time(randint1(base)+base, FALSE);
6255                         }
6256                 }
6257                 break;
6258
6259         case 26:
6260                 if (name) return _("狂気の円環", "Insanity Circle");
6261                 if (desc) return _("自分を中心としたカオスの球、混乱の球を発生させ、近くのモンスターを魅了する。", 
6262                         "Generate balls of chaos, confusion and charm centered on you.");
6263     
6264                 {
6265                         int dam = 50 + plev;
6266                         int power = 20 + plev;
6267                         int rad = 3 + plev / 20;
6268
6269                         if (info) return format("%s%d+%d", s_dam, dam/2, dam/2);
6270
6271                         if (cast)
6272                         {
6273                                 fire_ball(GF_CHAOS, 0, dam, rad);
6274                                 fire_ball(GF_CONFUSION, 0, dam, rad);
6275                                 fire_ball(GF_CHARM, 0, power, rad);
6276                         }
6277                 }
6278                 break;
6279
6280         case 27:
6281                 if (name) return _("ペット爆破", "Explode Pets");
6282                 if (desc) return _("全てのペットを強制的に爆破させる。", "Makes all pets explode.");
6283     
6284                 {
6285                         if (cast)
6286                         {
6287                                 discharge_minion();
6288                         }
6289                 }
6290                 break;
6291
6292         case 28:
6293                 if (name) return _("グレーターデーモン召喚", "Summon Greater Demon");
6294                 if (desc) return _("上級デーモンを召喚する。召喚するには人間('p','h','t'で表されるモンスター)の死体を捧げなければならない。", 
6295                         "Summons greater demon. It need to sacrifice a corpse of human ('p','h' or 't').");
6296     
6297                 {
6298                         if (cast)
6299                         {
6300                                 if (!cast_summon_greater_demon()) return NULL;
6301                         }
6302                 }
6303                 break;
6304
6305         case 29:
6306                 if (name) return _("地獄嵐", "Nether Storm");
6307                 if (desc) return _("超巨大な地獄の球を放つ。", "Generate a huge ball of nether.");
6308     
6309                 {
6310                         int dam = plev * 15;
6311                         int rad = plev / 5;
6312
6313                         if (info) return info_damage(0, 0, dam);
6314
6315                         if (cast)
6316                         {
6317                                 if (!get_aim_dir(&dir)) return NULL;
6318
6319                                 fire_ball(GF_NETHER, dir, dam, rad);
6320                         }
6321                 }
6322                 break;
6323
6324         case 30:
6325                 if (name) return _("血の呪い", "Bloody Curse");
6326                 if (desc) return _("自分がダメージを受けることによって対象に呪いをかけ、ダメージを与え様々な効果を引き起こす。",
6327                         "Puts blood curse which damages and causes various effects on a monster. You also take damage.");
6328     
6329                 {
6330                         int dam = 600;
6331                         int rad = 0;
6332
6333                         if (info) return info_damage(0, 0, dam);
6334
6335                         if (cast)
6336                         {
6337                                 if (!get_aim_dir(&dir)) return NULL;
6338
6339                                 fire_ball_hide(GF_BLOOD_CURSE, dir, dam, rad);
6340                                 take_hit(DAMAGE_USELIFE, 20 + randint1(30), _("血の呪い", "Blood curse"), -1);
6341                         }
6342                 }
6343                 break;
6344
6345         case 31:
6346                 if (name) return _("魔王変化", "Polymorph Demonlord");
6347                 if (desc) return _("悪魔の王に変化する。変化している間は本来の種族の能力を失い、代わりに悪魔の王としての能力を得、壁を破壊しながら歩く。",
6348                         "Mimic a demon lord for a while. Loses abilities of original race and gets great abilities as a demon lord. Even hard walls can't stop your walking.");
6349     
6350                 {
6351                         int base = 15;
6352
6353                         if (info) return info_duration(base, base);
6354
6355                         if (cast)
6356                         {
6357                                 set_mimic(base + randint1(base), MIMIC_DEMON_LORD, FALSE);
6358                         }
6359                 }
6360                 break;
6361         }
6362
6363         return "";
6364 }
6365
6366 /*!
6367  * @brief 破邪領域魔法の各処理を行う
6368  * @param spell 魔法ID
6369  * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
6370  * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
6371  */
6372 static cptr do_crusade_spell(int spell, int mode)
6373 {
6374         bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
6375         bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
6376         bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
6377         bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
6378
6379         int dir;
6380         int plev = p_ptr->lev;
6381
6382         switch (spell)
6383         {
6384         case 0:
6385                 if (name) return _("懲罰", "Punishment");
6386                 if (desc) return _("電撃のボルトもしくはビームを放つ。", "Fires a bolt or beam of lightning.");
6387     
6388                 {
6389                         int dice = 3 + (plev - 1) / 5;
6390                         int sides = 4;
6391
6392                         if (info) return info_damage(dice, sides, 0);
6393
6394                         if (cast)
6395                         {
6396                                 if (!get_aim_dir(&dir)) return NULL;
6397
6398                                 fire_bolt_or_beam(beam_chance() - 10, GF_ELEC, dir, damroll(dice, sides));
6399                         }
6400                 }
6401                 break;
6402
6403         case 1:
6404                 if (name) return _("邪悪存在感知", "Detect Evil");
6405                 if (desc) return _("近くの邪悪なモンスターを感知する。", "Detects all evil monsters in your vicinity.");
6406     
6407                 {
6408                         int rad = DETECT_RAD_DEFAULT;
6409
6410                         if (info) return info_radius(rad);
6411
6412                         if (cast)
6413                         {
6414                                 detect_monsters_evil(rad);
6415                         }
6416                 }
6417                 break;
6418
6419         case 2:
6420                 if (name) return _("恐怖除去", "Remove Fear");
6421                 if (desc) return _("恐怖を取り除く。", "Removes fear.");
6422     
6423                 {
6424                         if (cast)
6425                         {
6426                                 set_afraid(0);
6427                         }
6428                 }
6429                 break;
6430
6431         case 3:
6432                 if (name) return _("威圧", "Scare Monster");
6433                 if (desc) return _("モンスター1体を恐怖させる。抵抗されると無効。", "Attempts to scare a monster.");
6434     
6435                 {
6436                         int power = plev;
6437
6438                         if (info) return info_power(power);
6439
6440                         if (cast)
6441                         {
6442                                 if (!get_aim_dir(&dir)) return NULL;
6443
6444                                 fear_monster(dir, power);
6445                         }
6446                 }
6447                 break;
6448
6449         case 4:
6450                 if (name) return _("聖域", "Sanctuary");
6451                 if (desc) return _("隣接した全てのモンスターを眠らせる。抵抗されると無効。", "Attempts to sleep monsters in the adjacent squares.");
6452     
6453                 {
6454                         int power = plev;
6455
6456                         if (info) return info_power(power);
6457
6458                         if (cast)
6459                         {
6460                                 sleep_monsters_touch();
6461                         }
6462                 }
6463                 break;
6464
6465         case 5:
6466                 if (name) return _("入口", "Portal");
6467                 if (desc) return _("中距離のテレポートをする。", "Teleport medium distance.");
6468     
6469                 {
6470                         int range = 25 + plev / 2;
6471
6472                         if (info) return info_range(range);
6473
6474                         if (cast)
6475                         {
6476                                 teleport_player(range, 0L);
6477                         }
6478                 }
6479                 break;
6480
6481         case 6:
6482                 if (name) return _("スターダスト", "Star Dust");
6483                 if (desc) return _("ターゲット付近に閃光のボルトを連射する。", "Fires many bolts of light near the target.");
6484     
6485                 {
6486                         int dice = 3 + (plev - 1) / 9;
6487                         int sides = 2;
6488
6489                         if (info) return info_multi_damage_dice(dice, sides);
6490
6491                         if (cast)
6492                         {
6493                                 if (!get_aim_dir(&dir)) return NULL;
6494                                 fire_blast(GF_LITE, dir, dice, sides, 10, 3);
6495                         }
6496                 }
6497                 break;
6498
6499         case 7:
6500                 if (name) return _("身体浄化", "Purify");
6501                 if (desc) return _("傷、毒、朦朧から全快する。", "Heals all cut, stun and poison status.");
6502     
6503                 {
6504                         if (cast)
6505                         {
6506                                 set_cut(0);
6507                                 set_poisoned(0);
6508                                 set_stun(0);
6509                         }
6510                 }
6511                 break;
6512
6513         case 8:
6514                 if (name) return _("邪悪飛ばし", "Scatter Evil");
6515                 if (desc) return _("邪悪なモンスター1体をテレポートさせる。抵抗されると無効。", "Attempts to teleport an evil monster away.");
6516     
6517                 {
6518                         int power = MAX_SIGHT * 5;
6519
6520                         if (info) return info_power(power);
6521
6522                         if (cast)
6523                         {
6524                                 if (!get_aim_dir(&dir)) return NULL;
6525                                 fire_ball(GF_AWAY_EVIL, dir, power, 0);
6526                         }
6527                 }
6528                 break;
6529
6530         case 9:
6531                 if (name) return _("聖なる光球", "Holy Orb");
6532                 if (desc) return _("聖なる力をもつ宝珠を放つ。邪悪なモンスターに対して大きなダメージを与えるが、善良なモンスターには効果がない。", 
6533                         "Fires a ball with holy power. Hurts evil monsters greatly, but don't effect good monsters.");
6534     
6535                 {
6536                         int dice = 3;
6537                         int sides = 6;
6538                         int rad = (plev < 30) ? 2 : 3;
6539                         int base;
6540
6541                         if (p_ptr->pclass == CLASS_PRIEST ||
6542                             p_ptr->pclass == CLASS_HIGH_MAGE ||
6543                             p_ptr->pclass == CLASS_SORCERER)
6544                                 base = plev + plev / 2;
6545                         else
6546                                 base = plev + plev / 4;
6547
6548
6549                         if (info) return info_damage(dice, sides, base);
6550
6551                         if (cast)
6552                         {
6553                                 if (!get_aim_dir(&dir)) return NULL;
6554
6555                                 fire_ball(GF_HOLY_FIRE, dir, damroll(dice, sides) + base, rad);
6556                         }
6557                 }
6558                 break;
6559
6560         case 10:
6561                 if (name) return _("悪魔払い", "Exorcism");
6562                 if (desc) return _("視界内の全てのアンデッド及び悪魔にダメージを与え、邪悪なモンスターを恐怖させる。", 
6563                         "Damages all undead and demons in sight, and scares all evil monsters in sight.");
6564     
6565                 {
6566                         int sides = plev;
6567                         int power = plev;
6568
6569                         if (info) return info_damage(1, sides, 0);
6570
6571                         if (cast)
6572                         {
6573                                 dispel_undead(randint1(sides));
6574                                 dispel_demons(randint1(sides));
6575                                 turn_evil(power);
6576                         }
6577                 }
6578                 break;
6579
6580         case 11:
6581                 if (name) return _("解呪", "Remove Curse");
6582                 if (desc) return _("アイテムにかかった弱い呪いを解除する。", "Removes normal curses from equipped items.");
6583     
6584                 {
6585                         if (cast)
6586                         {
6587                                 if (remove_curse())
6588                                 {
6589                                         msg_print(_("誰かに見守られているような気がする。", "You feel as if someone is watching over you."));
6590                                 }
6591                         }
6592                 }
6593                 break;
6594
6595         case 12:
6596                 if (name) return _("透明視認", "Sense Unseen");
6597                 if (desc) return _("一定時間、透明なものが見えるようになる。", "Gives see invisible for a while.");
6598     
6599                 {
6600                         int base = 24;
6601
6602                         if (info) return info_duration(base, base);
6603
6604                         if (cast)
6605                         {
6606                                 set_tim_invis(randint1(base) + base, FALSE);
6607                         }
6608                 }
6609                 break;
6610
6611         case 13:
6612                 if (name) return _("対邪悪結界", "Protection from Evil");
6613                 if (desc) return _("邪悪なモンスターの攻撃を防ぐバリアを張る。", "Gives aura which protect you from evil monster's physical attack.");
6614     
6615                 {
6616                         int base = 25;
6617                         int sides = 3 * plev;
6618
6619                         if (info) return info_duration(base, sides);
6620
6621                         if (cast)
6622                         {
6623                                 set_protevil(randint1(sides) + sides, FALSE);
6624                         }
6625                 }
6626                 break;
6627
6628         case 14:
6629                 if (name) return _("裁きの雷", "Judgment Thunder");
6630                 if (desc) return _("強力な電撃のボルトを放つ。", "Fires a powerful bolt of lightning.");
6631     
6632                 {
6633                         int dam = plev * 5;
6634
6635                         if (info) return info_damage(0, 0, dam);
6636
6637                         if (cast)
6638                         {
6639                                 if (!get_aim_dir(&dir)) return NULL;
6640                                 fire_bolt(GF_ELEC, dir, dam);
6641                         }
6642                 }
6643                 break;
6644
6645         case 15:
6646                 if (name) return _("聖なる御言葉", "Holy Word");
6647                 if (desc) return _("視界内の邪悪な存在に大きなダメージを与え、体力を回復し、毒、恐怖、朦朧状態、負傷から全快する。",
6648                         "Damages all evil monsters in sight, heals HP somewhat, and completely heals poison, fear, stun and cut status.");
6649     
6650                 {
6651                         int dam_sides = plev * 6;
6652                         int heal = 100;
6653
6654                         if (info) return format(_("損:1d%d/回%d", "dam:d%d/h%d"), dam_sides, heal);
6655                         if (cast)
6656                         {
6657                                 dispel_evil(randint1(dam_sides));
6658                                 hp_player(heal);
6659                                 set_afraid(0);
6660                                 set_poisoned(0);
6661                                 set_stun(0);
6662                                 set_cut(0);
6663                         }
6664                 }
6665                 break;
6666
6667         case 16:
6668                 if (name) return _("開かれた道", "Unbarring Ways");
6669                 if (desc) return _("一直線上の全ての罠と扉を破壊する。", "Fires a beam which destroy traps and doors.");
6670     
6671                 {
6672                         if (cast)
6673                         {
6674                                 if (!get_aim_dir(&dir)) return NULL;
6675
6676                                 destroy_door(dir);
6677                         }
6678                 }
6679                 break;
6680
6681         case 17:
6682                 if (name) return _("封魔", "Arrest");
6683                 if (desc) return _("邪悪なモンスターの動きを止める。", "Attempts to paralyze an evil monster.");
6684     
6685                 {
6686                         int power = plev * 2;
6687
6688                         if (info) return info_power(power);
6689
6690                         if (cast)
6691                         {
6692                                 if (!get_aim_dir(&dir)) return NULL;
6693                                 stasis_evil(dir);
6694                         }
6695                 }
6696                 break;
6697
6698         case 18:
6699                 if (name) return _("聖なるオーラ", "Holy Aura");
6700                 if (desc) return _("一定時間、邪悪なモンスターを傷つける聖なるオーラを得る。",
6701                         "Gives aura of holy power which injures evil monsters which attacked you for a while.");
6702     
6703                 {
6704                         int base = 20;
6705
6706                         if (info) return info_duration(base, base);
6707
6708                         if (cast)
6709                         {
6710                                 set_tim_sh_holy(randint1(base) + base, FALSE);
6711                         }
6712                 }
6713                 break;
6714
6715         case 19:
6716                 if (name) return _("アンデッド&悪魔退散", "Dispel Undead & Demons");
6717                 if (desc) return _("視界内の全てのアンデッド及び悪魔にダメージを与える。", "Damages all undead and demons in sight.");
6718     
6719                 {
6720                         int sides = plev * 4;
6721
6722                         if (info) return info_damage(1, sides, 0);
6723
6724                         if (cast)
6725                         {
6726                                 dispel_undead(randint1(sides));
6727                                 dispel_demons(randint1(sides));
6728                         }
6729                 }
6730                 break;
6731
6732         case 20:
6733                 if (name) return _("邪悪退散", "Dispel Evil");
6734                 if (desc) return _("視界内の全ての邪悪なモンスターにダメージを与える。", "Damages all evil monsters in sight.");
6735     
6736                 {
6737                         int sides = plev * 4;
6738
6739                         if (info) return info_damage(1, sides, 0);
6740
6741                         if (cast)
6742                         {
6743                                 dispel_evil(randint1(sides));
6744                         }
6745                 }
6746                 break;
6747
6748         case 21:
6749                 if (name) return _("聖なる刃", "Holy Blade");
6750                 if (desc) return _("通常の武器に滅邪の属性をつける。", "Makes current weapon especially deadly against evil monsters.");
6751     
6752                 {
6753                         if (cast)
6754                         {
6755                                 brand_weapon(13);
6756                         }
6757                 }
6758                 break;
6759
6760         case 22:
6761                 if (name) return _("スターバースト", "Star Burst");
6762                 if (desc) return _("巨大な閃光の球を放つ。", "Fires a huge ball of powerful light.");
6763     
6764                 {
6765                         int dam = 100 + plev * 2;
6766                         int rad = 4;
6767
6768                         if (info) return info_damage(0, 0, dam);
6769
6770                         if (cast)
6771                         {
6772                                 if (!get_aim_dir(&dir)) return NULL;
6773
6774                                 fire_ball(GF_LITE, dir, dam, rad);
6775                         }
6776                 }
6777                 break;
6778
6779         case 23:
6780                 if (name) return _("天使召喚", "Summon Angel");
6781                 if (desc) return _("天使を1体召喚する。", "Summons an angel.");
6782     
6783                 {
6784                         if (cast)
6785                         {
6786                                 bool pet = !one_in_(3);
6787                                 u32b flg = 0L;
6788
6789                                 if (pet) flg |= PM_FORCE_PET;
6790                                 else flg |= PM_NO_PET;
6791                                 if (!(pet && (plev < 50))) flg |= PM_ALLOW_GROUP;
6792
6793                                 if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, (plev * 3) / 2, SUMMON_ANGEL, flg))
6794                                 {
6795                                         if (pet)
6796                                         {
6797                                                 msg_print(_("「ご用でございますか、ご主人様」", "'What is thy bidding... Master?'"));
6798                                         }
6799                                         else
6800                                         {
6801                                                 msg_print(_("「我は汝の下僕にあらず! 悪行者よ、悔い改めよ!」", "Mortal! Repent of thy impiousness."));
6802                                         }
6803                                 }
6804                         }
6805                 }
6806                 break;
6807
6808         case 24:
6809                 if (name) return _("士気高揚", "Heroism");
6810                 if (desc) return _("一定時間、ヒーロー気分になる。", "Removes fear, and gives bonus to hit and 10 more HP for a while.");
6811     
6812                 {
6813                         int base = 25;
6814
6815                         if (info) return info_duration(base, base);
6816
6817                         if (cast)
6818                         {
6819                                 set_hero(randint1(base) + base, FALSE);
6820                                 hp_player(10);
6821                                 set_afraid(0);
6822                         }
6823                 }
6824                 break;
6825
6826         case 25:
6827                 if (name) return _("呪い退散", "Dispel Curse");
6828                 if (desc) return _("アイテムにかかった強力な呪いを解除する。", "Removes normal and heavy curse from equipped items.");
6829     
6830                 {
6831                         if (cast)
6832                         {
6833                                 if (remove_all_curse())
6834                                 {
6835                                         msg_print(_("誰かに見守られているような気がする。", "You feel as if someone is watching over you."));
6836                                 }
6837                         }
6838                 }
6839                 break;
6840
6841         case 26:
6842                 if (name) return _("邪悪追放", "Banish Evil");
6843                 if (desc) return _("視界内の全ての邪悪なモンスターをテレポートさせる。抵抗されると無効。", 
6844                         "Teleports all evil monsters in sight away unless resisted.");
6845     
6846                 {
6847                         int power = 100;
6848
6849                         if (info) return info_power(power);
6850
6851                         if (cast)
6852                         {
6853                                 if (banish_evil(power))
6854                                 {
6855                                         msg_print(_("神聖な力が邪悪を打ち払った!", "The holy power banishes evil!"));
6856                                 }
6857                         }
6858                 }
6859                 break;
6860
6861         case 27:
6862                 if (name) return _("ハルマゲドン", "Armageddon");
6863                 if (desc) return _("周辺のアイテム、モンスター、地形を破壊する。", "Destroy everything in nearby area.");
6864     
6865                 {
6866                         int base = 12;
6867                         int sides = 4;
6868
6869                         if (cast)
6870                         {
6871                                 destroy_area(p_ptr->y, p_ptr->x, base + randint1(sides), FALSE);
6872                         }
6873                 }
6874                 break;
6875
6876         case 28:
6877                 if (name) return _("目には目を", "An Eye for an Eye");
6878                 if (desc) return _("一定時間、自分がダメージを受けたときに攻撃を行ったモンスターに対して同等のダメージを与える。", 
6879                         "Gives special aura for a while. When you are attacked by a monster, the monster are injured with same amount of damage as you take.");
6880     
6881                 {
6882                         int base = 10;
6883
6884                         if (info) return info_duration(base, base);
6885
6886                         if (cast)
6887                         {
6888                                 set_tim_eyeeye(randint1(base) + base, FALSE);
6889                         }
6890                 }
6891                 break;
6892
6893         case 29:
6894                 if (name) return _("神の怒り", "Wrath of the God");
6895                 if (desc) return _("ターゲットの周囲に分解の球を多数落とす。", "Drops many balls of disintegration near the target.");
6896     
6897                 {
6898                         int dam = plev * 3 + 25;
6899                         int rad = 2;
6900
6901                         if (info) return info_multi_damage(dam);
6902
6903                         if (cast)
6904                         {
6905                                 if (!cast_wrath_of_the_god(dam, rad)) return NULL;
6906                         }
6907                 }
6908                 break;
6909
6910         case 30:
6911                 if (name) return _("神威", "Divine Intervention");
6912                 if (desc) return _("隣接するモンスターに聖なるダメージを与え、視界内のモンスターにダメージ、減速、朦朧、混乱、恐怖、眠りを与える。さらに体力を回復する。", 
6913                         "Damages all adjacent monsters with holy power. Damages and attempt to slow, stun, confuse, scare and freeze all monsters in sight. And heals HP.");
6914     
6915                 {
6916                         int b_dam = plev * 11;
6917                         int d_dam = plev * 4;
6918                         int heal = 100;
6919                         int power = plev * 4;
6920
6921                         if (info) return format(_("回%d/損%d+%d", "h%d/dm%d+%d"), heal, d_dam, b_dam/2);
6922                         if (cast)
6923                         {
6924                                 project(0, 1, p_ptr->y, p_ptr->x, b_dam, GF_HOLY_FIRE, PROJECT_KILL, -1);
6925                                 dispel_monsters(d_dam);
6926                                 slow_monsters(plev);
6927                                 stun_monsters(power);
6928                                 confuse_monsters(power);
6929                                 turn_monsters(power);
6930                                 stasis_monsters(power);
6931                                 hp_player(heal);
6932                         }
6933                 }
6934                 break;
6935
6936         case 31:
6937                 if (name) return _("聖戦", "Crusade");
6938                 if (desc) return _("視界内の善良なモンスターをペットにしようとし、ならなかった場合及び善良でないモンスターを恐怖させる。さらに多数の加速された騎士を召喚し、ヒーロー、祝福、加速、対邪悪結界を得る。", 
6939                         "Attempts to charm all good monsters in sight, and scare all non-charmed monsters, and summons great number of knights, and gives heroism, bless, speed and protection from evil.");
6940     
6941                 {
6942                         if (cast)
6943                         {
6944                                 int base = 25;
6945                                 int sp_sides = 20 + plev;
6946                                 int sp_base = plev;
6947
6948                                 int i;
6949                                 crusade();
6950                                 for (i = 0; i < 12; i++)
6951                                 {
6952                                         int attempt = 10;
6953                                         int my = 0, mx = 0;
6954
6955                                         while (attempt--)
6956                                         {
6957                                                 scatter(&my, &mx, p_ptr->y, p_ptr->x, 4, 0);
6958
6959                                                 /* Require empty grids */
6960                                                 if (cave_empty_bold2(my, mx)) break;
6961                                         }
6962                                         if (attempt < 0) continue;
6963                                         summon_specific(-1, my, mx, plev, SUMMON_KNIGHTS, (PM_ALLOW_GROUP | PM_FORCE_PET | PM_HASTE));
6964                                 }
6965                                 set_hero(randint1(base) + base, FALSE);
6966                                 set_blessed(randint1(base) + base, FALSE);
6967                                 set_fast(randint1(sp_sides) + sp_base, FALSE);
6968                                 set_protevil(randint1(base) + base, FALSE);
6969                                 set_afraid(0);
6970                         }
6971                 }
6972                 break;
6973         }
6974
6975         return "";
6976 }
6977
6978
6979 /*!
6980  * @brief 歌の各処理を行う
6981  * @param spell 歌ID
6982  * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST / SPELL_FAIL / SPELL_CONT / SPELL_STOP)
6983  * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST / SPELL_FAIL / SPELL_CONT / SPELL_STOP 時はNULL文字列を返す。
6984  */
6985 static cptr do_music_spell(int spell, int mode)
6986 {
6987         bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
6988         bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
6989         bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
6990         bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
6991         bool fail = (mode == SPELL_FAIL) ? TRUE : FALSE;
6992         bool cont = (mode == SPELL_CONT) ? TRUE : FALSE;
6993         bool stop = (mode == SPELL_STOP) ? TRUE : FALSE;
6994         static const char s_dam[] = _("損傷:", "dam ");
6995
6996         int dir;
6997         int plev = p_ptr->lev;
6998
6999         switch (spell)
7000         {
7001         case 0:
7002                 if (name) return _("遅鈍の歌", "Song of Holding");
7003                 if (desc) return _("視界内の全てのモンスターを減速させる。抵抗されると無効。", "Attempts to slow all monsters in sight.");
7004     
7005                 /* Stop singing before start another */
7006                 if (cast || fail) stop_singing();
7007
7008                 if (cast)
7009                 {
7010                         msg_print(_("ゆっくりとしたメロディを口ずさみ始めた...", "You start humming a slow, steady melody..."));
7011                         start_singing(spell, MUSIC_SLOW);
7012                 }
7013
7014                 {
7015                         int power = plev;
7016
7017                         if (info) return info_power(power);
7018
7019                         if (cont)
7020                         {
7021                                 slow_monsters(plev);
7022                         }
7023                 }
7024                 break;
7025
7026         case 1:
7027                 if (name) return _("祝福の歌", "Song of Blessing");
7028                 if (desc) return _("命中率とACのボーナスを得る。", "Gives bonus to hit and AC for a few turns.");
7029     
7030                 /* Stop singing before start another */
7031                 if (cast || fail) stop_singing();
7032
7033                 if (cast)
7034                 {
7035                         msg_print(_("厳かなメロディを奏で始めた...", "The holy power of the Music of the Ainur enters you..."));
7036                         start_singing(spell, MUSIC_BLESS);
7037                 }
7038
7039                 if (stop)
7040                 {
7041                         if (!p_ptr->blessed)
7042                         {
7043                                 msg_print(_("高潔な気分が消え失せた。", "The prayer has expired."));
7044                         }
7045                 }
7046
7047                 break;
7048
7049         case 2:
7050                 if (name) return _("崩壊の音色", "Wrecking Note");
7051                 if (desc) return _("轟音のボルトを放つ。", "Fires a bolt of sound.");
7052     
7053                 /* Stop singing before start another */
7054                 if (cast || fail) stop_singing();
7055
7056                 {
7057                         int dice = 4 + (plev - 1) / 5;
7058                         int sides = 4;
7059
7060                         if (info) return info_damage(dice, sides, 0);
7061
7062                         if (cast)
7063                         {
7064                                 if (!get_aim_dir(&dir)) return NULL;
7065
7066                                 fire_bolt(GF_SOUND, dir, damroll(dice, sides));
7067                         }
7068                 }
7069                 break;
7070
7071         case 3:
7072                 if (name) return _("朦朧の旋律", "Stun Pattern");
7073                 if (desc) return _("視界内の全てのモンスターを朦朧させる。抵抗されると無効。", "Attempts to stun all monsters in sight.");
7074     
7075                 /* Stop singing before start another */
7076                 if (cast || fail) stop_singing();
7077
7078                 if (cast)
7079                 {
7080                         msg_print(_("眩惑させるメロディを奏で始めた...", "You weave a pattern of sounds to bewilder and daze..."));
7081                         start_singing(spell, MUSIC_STUN);
7082                 }
7083
7084                 {
7085                         int dice = plev / 10;
7086                         int sides = 2;
7087
7088                         if (info) return info_power_dice(dice, sides);
7089
7090                         if (cont)
7091                         {
7092                                 stun_monsters(damroll(dice, sides));
7093                         }
7094                 }
7095
7096                 break;
7097
7098         case 4:
7099                 if (name) return _("生命の流れ", "Flow of Life");
7100                 if (desc) return _("体力を少し回復させる。", "Heals HP a little.");
7101     
7102                 /* Stop singing before start another */
7103                 if (cast || fail) stop_singing();
7104
7105                 if (cast)
7106                 {
7107                         msg_print(_("歌を通して体に活気が戻ってきた...", "Life flows through you as you sing a song of healing..."));
7108                         start_singing(spell, MUSIC_L_LIFE);
7109                 }
7110
7111                 {
7112                         int dice = 2;
7113                         int sides = 6;
7114
7115                         if (info) return info_heal(dice, sides, 0);
7116
7117                         if (cont)
7118                         {
7119                                 hp_player(damroll(dice, sides));
7120                         }
7121                 }
7122
7123                 break;
7124
7125         case 5:
7126                 if (name) return _("太陽の歌", "Song of the Sun");
7127                 if (desc) return _("光源が照らしている範囲か部屋全体を永久に明るくする。", "Lights up nearby area and the inside of a room permanently.");
7128     
7129                 /* Stop singing before start another */
7130                 if (cast || fail) stop_singing();
7131
7132                 {
7133                         int dice = 2;
7134                         int sides = plev / 2;
7135                         int rad = plev / 10 + 1;
7136
7137                         if (info) return info_damage(dice, sides, 0);
7138
7139                         if (cast)
7140                         {
7141                                 msg_print(_("光り輝く歌が辺りを照らした。", "Your uplifting song brings brightness to dark places..."));
7142                                 lite_area(damroll(dice, sides), rad);
7143                         }
7144                 }
7145                 break;
7146
7147         case 6:
7148                 if (name) return _("恐怖の歌", "Song of Fear");
7149                 if (desc) return _("視界内の全てのモンスターを恐怖させる。抵抗されると無効。", "Attempts to scare all monsters in sight.");
7150     
7151                 /* Stop singing before start another */
7152                 if (cast || fail) stop_singing();
7153
7154                 if (cast)
7155                 {
7156                         msg_print(_("おどろおどろしいメロディを奏で始めた...", "You start weaving a fearful pattern..."));
7157                         start_singing(spell, MUSIC_FEAR);                       
7158                 }
7159
7160                 {
7161                         int power = plev;
7162
7163                         if (info) return info_power(power);
7164
7165                         if (cont)
7166                         {
7167                                 project_hack(GF_TURN_ALL, power);
7168                         }
7169                 }
7170
7171                 break;
7172
7173         case 7:
7174                 if (name) return _("戦いの歌", "Heroic Ballad");
7175                 if (desc) return _("ヒーロー気分になる。", "Removes fear, and gives bonus to hit and 10 more HP for a while.");
7176
7177                 /* Stop singing before start another */
7178                 if (cast || fail) stop_singing();
7179
7180                 if (cast)
7181                 {
7182                         msg_print(_("激しい戦いの歌を歌った...", "You start singing a song of intense fighting..."));
7183
7184                         (void)hp_player(10);
7185                         (void)set_afraid(0);
7186
7187                         /* Recalculate hitpoints */
7188                         p_ptr->update |= (PU_HP);
7189
7190                         start_singing(spell, MUSIC_HERO);
7191                 }
7192
7193                 if (stop)
7194                 {
7195                         if (!p_ptr->hero)
7196                         {
7197                                 msg_print(_("ヒーローの気分が消え失せた。", "The heroism wears off."));
7198                                 /* Recalculate hitpoints */
7199                                 p_ptr->update |= (PU_HP);
7200                         }
7201                 }
7202
7203                 break;
7204
7205         case 8:
7206                 if (name) return _("霊的知覚", "Clairaudience");
7207                 if (desc) return _("近くの罠/扉/階段を感知する。レベル15で全てのモンスター、20で財宝とアイテムを感知できるようになる。レベル25で周辺の地形を感知し、40でその階全体を永久に照らし、ダンジョン内のすべてのアイテムを感知する。この効果は歌い続けることで順に起こる。", 
7208                         "Detects traps, doors and stairs in your vicinity. And detects all monsters at level 15, treasures and items at level 20. Maps nearby area at level 25. Lights and know the whole level at level 40. These effects occurs by turns while this song continues.");
7209     
7210                 /* Stop singing before start another */
7211                 if (cast || fail) stop_singing();
7212
7213                 if (cast)
7214                 {
7215                         msg_print(_("静かな音楽が感覚を研ぎ澄まさせた...", "Your quiet music sharpens your sense of hearing..."));
7216                         /* Hack -- Initialize the turn count */
7217                         p_ptr->magic_num1[2] = 0;
7218
7219                         start_singing(spell, MUSIC_DETECT);
7220                 }
7221
7222                 {
7223                         int rad = DETECT_RAD_DEFAULT;
7224
7225                         if (info) return info_radius(rad);
7226
7227                         if (cont)
7228                         {
7229                                 int count = p_ptr->magic_num1[2];
7230
7231                                 if (count >= 19) wiz_lite(FALSE);
7232                                 if (count >= 11)
7233                                 {
7234                                         map_area(rad);
7235                                         if (plev > 39 && count < 19)
7236                                                 p_ptr->magic_num1[2] = count + 1;
7237                                 }
7238                                 if (count >= 6)
7239                                 {
7240                                         /* There are too many hidden treasure.  So... */
7241                                         /* detect_treasure(rad); */
7242                                         detect_objects_gold(rad);
7243                                         detect_objects_normal(rad);
7244
7245                                         if (plev > 24 && count < 11)
7246                                                 p_ptr->magic_num1[2] = count + 1;
7247                                 }
7248                                 if (count >= 3)
7249                                 {
7250                                         detect_monsters_invis(rad);
7251                                         detect_monsters_normal(rad);
7252
7253                                         if (plev > 19 && count < 6)
7254                                                 p_ptr->magic_num1[2] = count + 1;
7255                                 }
7256                                 detect_traps(rad, TRUE);
7257                                 detect_doors(rad);
7258                                 detect_stairs(rad);
7259
7260                                 if (plev > 14 && count < 3)
7261                                         p_ptr->magic_num1[2] = count + 1;
7262                         }
7263                 }
7264
7265                 break;
7266
7267         case 9:
7268                 if (name) return _("魂の歌", "Soul Shriek");
7269                 if (desc) return _("視界内の全てのモンスターに対して精神攻撃を行う。", "Damages all monsters in sight with PSI damages.");
7270
7271                 /* Stop singing before start another */
7272                 if (cast || fail) stop_singing();
7273
7274                 if (cast)
7275                 {
7276                         msg_print(_("精神を捻じ曲げる歌を歌った...", "You start singing a song of soul in pain..."));
7277                         start_singing(spell, MUSIC_PSI);
7278                 }
7279
7280                 {
7281                         int dice = 1;
7282                         int sides = plev * 3 / 2;
7283
7284                         if (info) return info_damage(dice, sides, 0);
7285
7286                         if (cont)
7287                         {
7288                                 project_hack(GF_PSI, damroll(dice, sides));
7289                         }
7290                 }
7291
7292                 break;
7293
7294         case 10:
7295                 if (name) return _("知識の歌", "Song of Lore");
7296                 if (desc) return _("自分のいるマスと隣りのマスに落ちているアイテムを鑑定する。", "Identifies all items which are in the adjacent squares.");
7297     
7298                 /* Stop singing before start another */
7299                 if (cast || fail) stop_singing();
7300
7301                 if (cast)
7302                 {
7303                         msg_print(_("この世界の知識が流れ込んできた...", "You recall the rich lore of the world..."));
7304                         start_singing(spell, MUSIC_ID);
7305                 }
7306
7307                 {
7308                         int rad = 1;
7309
7310                         if (info) return info_radius(rad);
7311
7312                         /*
7313                          * 歌の開始時にも効果発動:
7314                          * MP不足で鑑定が発動される前に歌が中断してしまうのを防止。
7315                          */
7316                         if (cont || cast)
7317                         {
7318                                 project(0, rad, p_ptr->y, p_ptr->x, 0, GF_IDENTIFY, PROJECT_ITEM, -1);
7319                         }
7320                 }
7321
7322                 break;
7323
7324         case 11:
7325                 if (name) return _("隠遁の歌", "Hiding Tune");
7326                 if (desc) return _("隠密行動能力を上昇させる。", "Gives improved stealth.");
7327
7328                 /* Stop singing before start another */
7329                 if (cast || fail) stop_singing();
7330
7331                 if (cast)
7332                 {
7333                         msg_print(_("あなたの姿が景色にとけこんでいった...", "Your song carries you beyond the sight of mortal eyes..."));
7334                         start_singing(spell, MUSIC_STEALTH);
7335                 }
7336
7337                 if (stop)
7338                 {
7339                         if (!p_ptr->tim_stealth)
7340                         {
7341                                 msg_print(_("姿がはっきりと見えるようになった。", "You are no longer hided."));
7342                         }
7343                 }
7344
7345                 break;
7346
7347         case 12:
7348                 if (name) return _("幻影の旋律", "Illusion Pattern");
7349                 if (desc) return _("視界内の全てのモンスターを混乱させる。抵抗されると無効。", "Attempts to confuse all monsters in sight.");
7350     
7351                 /* Stop singing before start another */
7352                 if (cast || fail) stop_singing();
7353
7354                 if (cast)
7355                 {
7356                         msg_print(_("辺り一面に幻影が現れた...", "You weave a pattern of sounds to beguile and confuse..."));
7357                         start_singing(spell, MUSIC_CONF);
7358                 }
7359
7360                 {
7361                         int power = plev * 2;
7362
7363                         if (info) return info_power(power);
7364
7365                         if (cont)
7366                         {
7367                                 confuse_monsters(power);
7368                         }
7369                 }
7370
7371                 break;
7372
7373         case 13:
7374                 if (name) return _("破滅の叫び", "Doomcall");
7375                 if (desc) return _("視界内の全てのモンスターに対して轟音攻撃を行う。", "Damages all monsters in sight with booming sound.");
7376     
7377                 /* Stop singing before start another */
7378                 if (cast || fail) stop_singing();
7379
7380                 if (cast)
7381                 {
7382                         msg_print(_("轟音が響いた...", "The fury of the Downfall of Numenor lashes out..."));
7383                         start_singing(spell, MUSIC_SOUND);
7384                 }
7385
7386                 {
7387                         int dice = 10 + plev / 5;
7388                         int sides = 7;
7389
7390                         if (info) return info_damage(dice, sides, 0);
7391
7392                         if (cont)
7393                         {
7394                                 project_hack(GF_SOUND, damroll(dice, sides));
7395                         }
7396                 }
7397
7398                 break;
7399
7400         case 14:
7401                 if (name) return _("フィリエルの歌", "Firiel's Song");
7402                 if (desc) return _("周囲の死体や骨を生き返す。", "Resurrects nearby corpse and skeletons. And makes these your pets.");
7403     
7404                 {
7405                         /* Stop singing before start another */
7406                         if (cast || fail) stop_singing();
7407
7408                         if (cast)
7409                         {
7410                                 msg_print(_("生命と復活のテーマを奏で始めた...", "The themes of life and revival are woven into your song..."));
7411                                 animate_dead(0, p_ptr->y, p_ptr->x);
7412                         }
7413                 }
7414                 break;
7415
7416         case 15:
7417                 if (name) return _("旅の仲間", "Fellowship Chant");
7418                 if (desc) return _("視界内の全てのモンスターを魅了する。抵抗されると無効。", "Attempts to charm all monsters in sight.");
7419
7420                 /* Stop singing before start another */
7421                 if (cast || fail) stop_singing();
7422
7423                 if (cast)
7424                 {
7425                         msg_print(_("安らかなメロディを奏で始めた...", "You weave a slow, soothing melody of imploration..."));
7426                         start_singing(spell, MUSIC_CHARM);
7427                 }
7428
7429                 {
7430                         int dice = 10 + plev / 15;
7431                         int sides = 6;
7432
7433                         if (info) return info_power_dice(dice, sides);
7434
7435                         if (cont)
7436                         {
7437                                 charm_monsters(damroll(dice, sides));
7438                         }
7439                 }
7440
7441                 break;
7442
7443         case 16:
7444                 if (name) return _("分解音波", "Sound of disintegration");
7445                 if (desc) return _("壁を掘り進む。自分の足元のアイテムは蒸発する。", "Makes you be able to burrow into walls. Objects under your feet evaporate.");
7446
7447                 /* Stop singing before start another */
7448                 if (cast || fail) stop_singing();
7449
7450                 if (cast)
7451                 {
7452                         msg_print(_("粉砕するメロディを奏で始めた...", "You weave a violent pattern of sounds to break wall."));
7453                         start_singing(spell, MUSIC_WALL);
7454                 }
7455
7456                 {
7457                         /*
7458                          * 歌の開始時にも効果発動:
7459                          * MP不足で効果が発動される前に歌が中断してしまうのを防止。
7460                          */
7461                         if (cont || cast)
7462                         {
7463                                 project(0, 0, p_ptr->y, p_ptr->x,
7464                                         0, GF_DISINTEGRATE, PROJECT_KILL | PROJECT_ITEM | PROJECT_HIDE, -1);
7465                         }
7466                 }
7467                 break;
7468
7469         case 17:
7470                 if (name) return _("元素耐性", "Finrod's Resistance");
7471                 if (desc) return _("酸、電撃、炎、冷気、毒に対する耐性を得る。装備による耐性に累積する。", 
7472                         "Gives resistance to fire, cold, electricity, acid and poison. These resistances can be added to which from equipment for more powerful resistances.");
7473     
7474                 /* Stop singing before start another */
7475                 if (cast || fail) stop_singing();
7476
7477                 if (cast)
7478                 {
7479                         msg_print(_("元素の力に対する忍耐の歌を歌った。", "You sing a song of perseverance against powers..."));
7480                         start_singing(spell, MUSIC_RESIST);
7481                 }
7482
7483                 if (stop)
7484                 {
7485                         if (!p_ptr->oppose_acid)
7486                         {
7487                                 msg_print(_("酸への耐性が薄れた気がする。", "You feel less resistant to acid."));
7488                         }
7489
7490                         if (!p_ptr->oppose_elec)
7491                         {
7492                                 msg_print(_("電撃への耐性が薄れた気がする。", "You feel less resistant to elec."));
7493                         }
7494
7495                         if (!p_ptr->oppose_fire)
7496                         {
7497                                 msg_print(_("火への耐性が薄れた気がする。", "You feel less resistant to fire."));
7498                         }
7499
7500                         if (!p_ptr->oppose_cold)
7501                         {
7502                                 msg_print(_("冷気への耐性が薄れた気がする。", "You feel less resistant to cold."));
7503                         }
7504
7505                         if (!p_ptr->oppose_pois)
7506                         {
7507                                 msg_print(_("毒への耐性が薄れた気がする。", "You feel less resistant to pois."));
7508                         }
7509                 }
7510
7511                 break;
7512
7513         case 18:
7514                 if (name) return _("ホビットのメロディ", "Hobbit Melodies");
7515                 if (desc) return _("加速する。", "Hastes you.");
7516
7517                 /* Stop singing before start another */
7518                 if (cast || fail) stop_singing();
7519
7520                 if (cast)
7521                 {
7522                         msg_print(_("軽快な歌を口ずさみ始めた...", "You start singing joyful pop song..."));
7523                         start_singing(spell, MUSIC_SPEED);
7524                 }
7525
7526                 if (stop)
7527                 {
7528                         if (!p_ptr->fast)
7529                         {
7530                                 msg_print(_("動きの素早さがなくなったようだ。", "You feel yourself slow down."));
7531                         }
7532                 }
7533
7534                 break;
7535
7536         case 19:
7537                 if (name) return _("歪んだ世界", "World Contortion");
7538                 if (desc) return _("近くのモンスターをテレポートさせる。抵抗されると無効。", "Teleports all nearby monsters away unless resisted.");
7539     
7540                 {
7541                         int rad = plev / 15 + 1;
7542                         int power = plev * 3 + 1;
7543
7544                         if (info) return info_radius(rad);
7545
7546                         /* Stop singing before start another */
7547                         if (cast || fail) stop_singing();
7548
7549                         if (cast)
7550                         {
7551                                 msg_print(_("歌が空間を歪めた...", "Reality whirls wildly as you sing a dizzying melody..."));
7552                                 project(0, rad, p_ptr->y, p_ptr->x, power, GF_AWAY_ALL, PROJECT_KILL, -1);
7553                         }
7554                 }
7555                 break;
7556
7557         case 20:
7558                 if (name) return _("退散の歌", "Dispelling chant");
7559                 if (desc) return _("視界内の全てのモンスターにダメージを与える。邪悪なモンスターに特に大きなダメージを与える。", 
7560                         "Damages all monsters in sight. Hurts evil monsters greatly.");
7561     
7562                 /* Stop singing before start another */
7563                 if (cast || fail) stop_singing();
7564
7565                 if (cast)
7566                 {
7567                         msg_print(_("耐えられない不協和音が敵を責め立てた...", "You cry out in an ear-wracking voice..."));
7568                         start_singing(spell, MUSIC_DISPEL);
7569                 }
7570
7571                 {
7572                         int m_sides = plev * 3;
7573                         int e_sides = plev * 3;
7574
7575                         if (info) return format("%s1d%d+1d%d", s_dam, m_sides, e_sides);
7576
7577                         if (cont)
7578                         {
7579                                 dispel_monsters(randint1(m_sides));
7580                                 dispel_evil(randint1(e_sides));
7581                         }
7582                 }
7583                 break;
7584
7585         case 21:
7586                 if (name) return _("サルマンの甘言", "The Voice of Saruman");
7587                 if (desc) return _("視界内の全てのモンスターを減速させ、眠らせようとする。抵抗されると無効。", "Attempts to slow and sleep all monsters in sight.");
7588     
7589                 /* Stop singing before start another */
7590                 if (cast || fail) stop_singing();
7591
7592                 if (cast)
7593                 {
7594                         msg_print(_("優しく、魅力的な歌を口ずさみ始めた...", "You start humming a gentle and attractive song..."));
7595                         start_singing(spell, MUSIC_SARUMAN);
7596                 }
7597
7598                 {
7599                         int power = plev;
7600
7601                         if (info) return info_power(power);
7602
7603                         if (cont)
7604                         {
7605                                 slow_monsters(plev);
7606                                 sleep_monsters(plev);
7607                         }
7608                 }
7609
7610                 break;
7611
7612         case 22:
7613                 if (name) return _("嵐の音色", "Song of the Tempest");
7614                 if (desc) return _("轟音のビームを放つ。", "Fires a beam of sound.");
7615     
7616                 {
7617                         int dice = 15 + (plev - 1) / 2;
7618                         int sides = 10;
7619
7620                         if (info) return info_damage(dice, sides, 0);
7621
7622                         /* Stop singing before start another */
7623                         if (cast || fail) stop_singing();
7624
7625                         if (cast)
7626                         {
7627                                 if (!get_aim_dir(&dir)) return NULL;
7628
7629                                 fire_beam(GF_SOUND, dir, damroll(dice, sides));
7630                         }
7631                 }
7632                 break;
7633
7634         case 23:
7635                 if (name) return _("もう一つの世界", "Ambarkanta");
7636                 if (desc) return _("現在の階を再構成する。", "Recreates current dungeon level.");
7637     
7638                 {
7639                         int base = 15;
7640                         int sides = 20;
7641
7642                         if (info) return info_delay(base, sides);
7643
7644                         /* Stop singing before start another */
7645                         if (cast || fail) stop_singing();
7646
7647                         if (cast)
7648                         {
7649                                 msg_print(_("周囲が変化し始めた...", "You sing of the primeval shaping of Middle-earth..."));
7650                                 alter_reality();
7651                         }
7652                 }
7653                 break;
7654
7655         case 24:
7656                 if (name) return _("破壊の旋律", "Wrecking Pattern");
7657                 if (desc) return _("周囲のダンジョンを揺らし、壁と床をランダムに入れ変える。", 
7658                         "Shakes dungeon structure, and results in random swapping of floors and walls.");
7659
7660                 /* Stop singing before start another */
7661                 if (cast || fail) stop_singing();
7662
7663                 if (cast)
7664                 {
7665                         msg_print(_("破壊的な歌が響きわたった...", "You weave a pattern of sounds to contort and shatter..."));
7666                         start_singing(spell, MUSIC_QUAKE);
7667                 }
7668
7669                 {
7670                         int rad = 10;
7671
7672                         if (info) return info_radius(rad);
7673
7674                         if (cont)
7675                         {
7676                                 earthquake(p_ptr->y, p_ptr->x, 10);
7677                         }
7678                 }
7679
7680                 break;
7681
7682
7683         case 25:
7684                 if (name) return _("停滞の歌", "Stationary Shriek");
7685                 if (desc) return _("視界内の全てのモンスターを麻痺させようとする。抵抗されると無効。", "Attempts to freeze all monsters in sight.");
7686     
7687                 /* Stop singing before start another */
7688                 if (cast || fail) stop_singing();
7689
7690                 if (cast)
7691                 {
7692                         msg_print(_("ゆっくりとしたメロディを奏で始めた...", "You weave a very slow pattern which is almost likely to stop..."));
7693                         start_singing(spell, MUSIC_STASIS);
7694                 }
7695
7696                 {
7697                         int power = plev * 4;
7698
7699                         if (info) return info_power(power);
7700
7701                         if (cont)
7702                         {
7703                                 stasis_monsters(power);
7704                         }
7705                 }
7706
7707                 break;
7708
7709         case 26:
7710                 if (name) return _("守りの歌", "Endurance");
7711                 if (desc) return _("自分のいる床の上に、モンスターが通り抜けたり召喚されたりすることができなくなるルーンを描く。", 
7712                         "Sets a glyph on the floor beneath you. Monsters cannot attack you if you are on a glyph, but can try to break glyph.");
7713     
7714                 {
7715                         /* Stop singing before start another */
7716                         if (cast || fail) stop_singing();
7717
7718                         if (cast)
7719                         {
7720                                 msg_print(_("歌が神聖な場を作り出した...", "The holy power of the Music is creating sacred field..."));
7721                                 warding_glyph();
7722                         }
7723                 }
7724                 break;
7725
7726         case 27:
7727                 if (name) return _("英雄の詩", "The Hero's Poem");
7728                 if (desc) return _("加速し、ヒーロー気分になり、視界内の全てのモンスターにダメージを与える。", 
7729                         "Hastes you. Gives heroism. Damages all monsters in sight.");
7730     
7731                 /* Stop singing before start another */
7732                 if (cast || fail) stop_singing();
7733
7734                 if (cast)
7735                 {
7736                         msg_print(_("英雄の歌を口ずさんだ...", "You chant a powerful, heroic call to arms..."));
7737                         (void)hp_player(10);
7738                         (void)set_afraid(0);
7739
7740                         /* Recalculate hitpoints */
7741                         p_ptr->update |= (PU_HP);
7742
7743                         start_singing(spell, MUSIC_SHERO);
7744                 }
7745
7746                 if (stop)
7747                 {
7748                         if (!p_ptr->hero)
7749                         {
7750                                 msg_print(_("ヒーローの気分が消え失せた。", "The heroism wears off."));
7751                                 /* Recalculate hitpoints */
7752                                 p_ptr->update |= (PU_HP);
7753                         }
7754
7755                         if (!p_ptr->fast)
7756                         {
7757                                 msg_print(_("動きの素早さがなくなったようだ。", "You feel yourself slow down."));
7758                         }
7759                 }
7760
7761                 {
7762                         int dice = 1;
7763                         int sides = plev * 3;
7764
7765                         if (info) return info_damage(dice, sides, 0);
7766
7767                         if (cont)
7768                         {
7769                                 dispel_monsters(damroll(dice, sides));
7770                         }
7771                 }
7772                 break;
7773
7774         case 28:
7775                 if (name) return _("ヤヴァンナの助け", "Relief of Yavanna");
7776                 if (desc) return _("強力な回復の歌で、負傷と朦朧状態も全快する。", "Powerful healing song. Also heals cut and stun completely.");
7777     
7778                 /* Stop singing before start another */
7779                 if (cast || fail) stop_singing();
7780
7781                 if (cast)
7782                 {
7783                         msg_print(_("歌を通して体に活気が戻ってきた...", "Life flows through you as you sing the song..."));
7784                         start_singing(spell, MUSIC_H_LIFE);
7785                 }
7786
7787                 {
7788                         int dice = 15;
7789                         int sides = 10;
7790
7791                         if (info) return info_heal(dice, sides, 0);
7792
7793                         if (cont)
7794                         {
7795                                 hp_player(damroll(dice, sides));
7796                                 set_stun(0);
7797                                 set_cut(0);
7798                         }
7799                 }
7800
7801                 break;
7802
7803         case 29:
7804                 if (name) return _("再生の歌", "Goddess' rebirth");
7805                 if (desc) return _("すべてのステータスと経験値を回復する。", "Restores all stats and experience.");
7806     
7807                 {
7808                         /* Stop singing before start another */
7809                         if (cast || fail) stop_singing();
7810
7811                         if (cast)
7812                         {
7813                                 msg_print(_("暗黒の中に光と美をふりまいた。体が元の活力を取り戻した。",
7814                                                         "You strewed light and beauty in the dark as you sing. You feel refreshed."));
7815                                 (void)do_res_stat(A_STR);
7816                                 (void)do_res_stat(A_INT);
7817                                 (void)do_res_stat(A_WIS);
7818                                 (void)do_res_stat(A_DEX);
7819                                 (void)do_res_stat(A_CON);
7820                                 (void)do_res_stat(A_CHR);
7821                                 (void)restore_level();
7822                         }
7823                 }
7824                 break;
7825
7826         case 30:
7827                 if (name) return _("サウロンの魔術", "Wizardry of Sauron");
7828                 if (desc) return _("非常に強力でごく小さい轟音の球を放つ。", "Fires an extremely powerful tiny ball of sound.");
7829     
7830                 {
7831                         int dice = 50 + plev;
7832                         int sides = 10;
7833                         int rad = 0;
7834
7835                         if (info) return info_damage(dice, sides, 0);
7836
7837                         /* Stop singing before start another */
7838                         if (cast || fail) stop_singing();
7839
7840                         if (cast)
7841                         {
7842                                 if (!get_aim_dir(&dir)) return NULL;
7843
7844                                 fire_ball(GF_SOUND, dir, damroll(dice, sides), rad);
7845                         }
7846                 }
7847                 break;
7848
7849         case 31:
7850                 if (name) return _("フィンゴルフィンの挑戦", "Fingolfin's Challenge");
7851                 if (desc) return _("ダメージを受けなくなるバリアを張る。", 
7852                         "Generates barrier which completely protect you from almost all damages. Takes a few your turns when the barrier breaks.");
7853     
7854                 /* Stop singing before start another */
7855                 if (cast || fail) stop_singing();
7856
7857                 if (cast)
7858                 {
7859                         msg_print(_("フィンゴルフィンの冥王への挑戦を歌った...",
7860                                                 "You recall the valor of Fingolfin's challenge to the Dark Lord..."));
7861
7862                         /* Redraw map */
7863                         p_ptr->redraw |= (PR_MAP);
7864                 
7865                         /* Update monsters */
7866                         p_ptr->update |= (PU_MONSTERS);
7867                 
7868                         /* Window stuff */
7869                         p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
7870
7871                         start_singing(spell, MUSIC_INVULN);
7872                 }
7873
7874                 if (stop)
7875                 {
7876                         if (!p_ptr->invuln)
7877                         {
7878                                 msg_print(_("無敵ではなくなった。", "The invulnerability wears off."));
7879                                 /* Redraw map */
7880                                 p_ptr->redraw |= (PR_MAP);
7881
7882                                 /* Update monsters */
7883                                 p_ptr->update |= (PU_MONSTERS);
7884
7885                                 /* Window stuff */
7886                                 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
7887                         }
7888                 }
7889
7890                 break;
7891         }
7892
7893         return "";
7894 }
7895
7896 /*!
7897  * @brief 剣術の各処理を行う
7898  * @param spell 剣術ID
7899  * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_CAST)
7900  * @return SPELL_NAME / SPELL_DESC 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
7901  */
7902 static cptr do_hissatsu_spell(int spell, int mode)
7903 {
7904         bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
7905         bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
7906         bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
7907
7908         int dir;
7909         int plev = p_ptr->lev;
7910
7911         switch (spell)
7912         {
7913         case 0:
7914                 if (name) return _("飛飯綱", "Tobi-Izuna");
7915                 if (desc) return _("2マス離れたところにいるモンスターを攻撃する。", "Attacks a two squares distant monster.");
7916     
7917                 if (cast)
7918                 {
7919                         project_length = 2;
7920                         if (!get_aim_dir(&dir)) return NULL;
7921
7922                         project_hook(GF_ATTACK, dir, HISSATSU_2, PROJECT_STOP | PROJECT_KILL);
7923                 }
7924                 break;
7925
7926         case 1:
7927                 if (name) return _("五月雨斬り", "3-Way Attack");
7928                 if (desc) return _("3方向に対して攻撃する。", "Attacks in 3 directions in one time.");
7929     
7930                 if (cast)
7931                 {
7932                         int cdir;
7933                         int y, x;
7934
7935                         if (!get_rep_dir2(&dir)) return NULL;
7936                         if (dir == 5) return NULL;
7937
7938                         for (cdir = 0;cdir < 8; cdir++)
7939                         {
7940                                 if (cdd[cdir] == dir) break;
7941                         }
7942
7943                         if (cdir == 8) return NULL;
7944
7945                         y = p_ptr->y + ddy_cdd[cdir];
7946                         x = p_ptr->x + ddx_cdd[cdir];
7947                         if (cave[y][x].m_idx)
7948                                 py_attack(y, x, 0);
7949                         else
7950                                 msg_print(_("攻撃は空を切った。", "You attack the empty air."));
7951                         
7952                         y = p_ptr->y + ddy_cdd[(cdir + 7) % 8];
7953                         x = p_ptr->x + ddx_cdd[(cdir + 7) % 8];
7954                         if (cave[y][x].m_idx)
7955                                 py_attack(y, x, 0);
7956                         else
7957                                 msg_print(_("攻撃は空を切った。", "You attack the empty air."));
7958                         
7959                         y = p_ptr->y + ddy_cdd[(cdir + 1) % 8];
7960                         x = p_ptr->x + ddx_cdd[(cdir + 1) % 8];
7961                         if (cave[y][x].m_idx)
7962                                 py_attack(y, x, 0);
7963                         else
7964                                 msg_print(_("攻撃は空を切った。", "You attack the empty air."));
7965                 }
7966                 break;
7967
7968         case 2:
7969                 if (name) return _("ブーメラン", "Boomerang");
7970                 if (desc) return _("武器を手元に戻ってくるように投げる。戻ってこないこともある。", 
7971                         "Throws current weapon. And it'll return to your hand unless failed.");
7972     
7973                 if (cast)
7974                 {
7975                         if (!do_cmd_throw_aux(1, TRUE, -1)) return NULL;
7976                 }
7977                 break;
7978
7979         case 3:
7980                 if (name) return _("焔霊", "Burning Strike");
7981                 if (desc) return _("火炎耐性のないモンスターに大ダメージを与える。", "Attacks a monster with more damage unless it has resistance to fire.");
7982     
7983                 if (cast)
7984                 {
7985                         int y, x;
7986
7987                         if (!get_rep_dir2(&dir)) return NULL;
7988                         if (dir == 5) return NULL;
7989
7990                         y = p_ptr->y + ddy[dir];
7991                         x = p_ptr->x + ddx[dir];
7992
7993                         if (cave[y][x].m_idx)
7994                                 py_attack(y, x, HISSATSU_FIRE);
7995                         else
7996                         {
7997                                 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
7998                                 return NULL;
7999                         }
8000                 }
8001                 break;
8002
8003         case 4:
8004                 if (name) return _("殺気感知", "Detect Ferocity");
8005                 if (desc) return _("近くの思考することができるモンスターを感知する。", "Detects all monsters except mindless in your vicinity.");
8006     
8007                 if (cast)
8008                 {
8009                         detect_monsters_mind(DETECT_RAD_DEFAULT);
8010                 }
8011                 break;
8012
8013         case 5:
8014                 if (name) return _("みね打ち", "Strike to Stun");
8015                 if (desc) return _("相手にダメージを与えないが、朦朧とさせる。", "Attempts to stun a monster in the adjacent.");
8016     
8017                 if (cast)
8018                 {
8019                         int y, x;
8020
8021                         if (!get_rep_dir2(&dir)) return NULL;
8022                         if (dir == 5) return NULL;
8023
8024                         y = p_ptr->y + ddy[dir];
8025                         x = p_ptr->x + ddx[dir];
8026
8027                         if (cave[y][x].m_idx)
8028                                 py_attack(y, x, HISSATSU_MINEUCHI);
8029                         else
8030                         {
8031                                 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
8032                                 return NULL;
8033                         }
8034                 }
8035                 break;
8036
8037         case 6:
8038                 if (name) return _("カウンター", "Counter");
8039                 if (desc) return _("相手に攻撃されたときに反撃する。反撃するたびにMPを消費。", 
8040                         "Prepares to counterattack. When attack by a monster, strikes back using SP each time.");
8041     
8042                 if (cast)
8043                 {
8044                         if (p_ptr->riding)
8045                         {
8046                                 msg_print(_("乗馬中には無理だ。", "You cannot do it when riding."));
8047                                 return NULL;
8048                         }
8049                         msg_print(_("相手の攻撃に対して身構えた。", "You prepare to counter blow."));
8050                         p_ptr->counter = TRUE;
8051                 }
8052                 break;
8053
8054         case 7:
8055                 if (name) return _("払い抜け", "Harainuke");
8056                 if (desc) return _("攻撃した後、反対側に抜ける。", 
8057                         "Attacks monster with your weapons normally, then move through counter side of the monster.");
8058     
8059                 if (cast)
8060                 {
8061                         int y, x;
8062
8063                         if (p_ptr->riding)
8064                         {
8065                                 msg_print(_("乗馬中には無理だ。", "You cannot do it when riding."));
8066                                 return NULL;
8067                         }
8068         
8069                         if (!get_rep_dir2(&dir)) return NULL;
8070         
8071                         if (dir == 5) return NULL;
8072                         y = p_ptr->y + ddy[dir];
8073                         x = p_ptr->x + ddx[dir];
8074         
8075                         if (!cave[y][x].m_idx)
8076                         {
8077                                 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
8078                                 return NULL;
8079                         }
8080         
8081                         py_attack(y, x, 0);
8082         
8083                         if (!player_can_enter(cave[y][x].feat, 0) || is_trap(cave[y][x].feat))
8084                                 break;
8085         
8086                         y += ddy[dir];
8087                         x += ddx[dir];
8088         
8089                         if (player_can_enter(cave[y][x].feat, 0) && !is_trap(cave[y][x].feat) && !cave[y][x].m_idx)
8090                         {
8091                                 msg_print(NULL);
8092         
8093                                 /* Move the player */
8094                                 (void)move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
8095                         }
8096                 }
8097                 break;
8098
8099         case 8:
8100                 if (name) return _("サーペンツタン", "Serpent's Tongue");
8101                 if (desc) return _("毒耐性のないモンスターに大ダメージを与える。", "Attacks a monster with more damage unless it has resistance to poison.");
8102     
8103                 if (cast)
8104                 {
8105                         int y, x;
8106
8107                         if (!get_rep_dir2(&dir)) return NULL;
8108                         if (dir == 5) return NULL;
8109
8110                         y = p_ptr->y + ddy[dir];
8111                         x = p_ptr->x + ddx[dir];
8112
8113                         if (cave[y][x].m_idx)
8114                                 py_attack(y, x, HISSATSU_POISON);
8115                         else
8116                         {
8117                                 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
8118                                 return NULL;
8119                         }
8120                 }
8121                 break;
8122
8123         case 9:
8124                 if (name) return _("斬魔剣弐の太刀", "Zammaken");
8125                 if (desc) return _("生命のない邪悪なモンスターに大ダメージを与えるが、他のモンスターには全く効果がない。", 
8126                         "Attacks an evil unliving monster with great damage. No effect to other  monsters.");
8127     
8128                 if (cast)
8129                 {
8130                         int y, x;
8131
8132                         if (!get_rep_dir2(&dir)) return NULL;
8133                         if (dir == 5) return NULL;
8134
8135                         y = p_ptr->y + ddy[dir];
8136                         x = p_ptr->x + ddx[dir];
8137
8138                         if (cave[y][x].m_idx)
8139                                 py_attack(y, x, HISSATSU_ZANMA);
8140                         else
8141                         {
8142                                 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
8143                                 return NULL;
8144                         }
8145                 }
8146                 break;
8147
8148         case 10:
8149                 if (name) return _("裂風剣", "Wind Blast");
8150                 if (desc) return _("攻撃した相手を後方へ吹き飛ばす。", "Attacks an adjacent monster, and blow it away.");
8151     
8152                 if (cast)
8153                 {
8154                         int y, x;
8155
8156                         if (!get_rep_dir2(&dir)) return NULL;
8157                         if (dir == 5) return NULL;
8158
8159                         y = p_ptr->y + ddy[dir];
8160                         x = p_ptr->x + ddx[dir];
8161
8162                         if (cave[y][x].m_idx)
8163                                 py_attack(y, x, 0);
8164                         else
8165                         {
8166                                 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
8167                                 return NULL;
8168                         }
8169                         if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
8170                         {
8171                                 return "";
8172                         }
8173                         if (cave[y][x].m_idx)
8174                         {
8175                                 int i;
8176                                 int ty = y, tx = x;
8177                                 int oy = y, ox = x;
8178                                 int m_idx = cave[y][x].m_idx;
8179                                 monster_type *m_ptr = &m_list[m_idx];
8180                                 char m_name[80];
8181         
8182                                 monster_desc(m_name, m_ptr, 0);
8183         
8184                                 for (i = 0; i < 5; i++)
8185                                 {
8186                                         y += ddy[dir];
8187                                         x += ddx[dir];
8188                                         if (cave_empty_bold(y, x))
8189                                         {
8190                                                 ty = y;
8191                                                 tx = x;
8192                                         }
8193                                         else break;
8194                                 }
8195                                 if ((ty != oy) || (tx != ox))
8196                                 {
8197                                         msg_format(_("%sを吹き飛ばした!", "You blow %s away!"), m_name);
8198                                         cave[oy][ox].m_idx = 0;
8199                                         cave[ty][tx].m_idx = m_idx;
8200                                         m_ptr->fy = ty;
8201                                         m_ptr->fx = tx;
8202         
8203                                         update_mon(m_idx, TRUE);
8204                                         lite_spot(oy, ox);
8205                                         lite_spot(ty, tx);
8206         
8207                                         if (r_info[m_ptr->r_idx].flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
8208                                                 p_ptr->update |= (PU_MON_LITE);
8209                                 }
8210                         }
8211                 }
8212                 break;
8213
8214         case 11:
8215                 if (name) return _("刀匠の目利き", "Judge");
8216                 if (desc) return _("武器・防具を1つ識別する。レベル45以上で武器・防具の能力を完全に知ることができる。", 
8217                         "Identifies a weapon or armor. Or *identifies* these at level 45.");
8218     
8219                 if (cast)
8220                 {
8221                         if (plev > 44)
8222                         {
8223                                 if (!identify_fully(TRUE)) return NULL;
8224                         }
8225                         else
8226                         {
8227                                 if (!ident_spell(TRUE)) return NULL;
8228                         }
8229                 }
8230                 break;
8231
8232         case 12:
8233                 if (name) return _("破岩斬", "Rock Smash");
8234                 if (desc) return _("岩を壊し、岩石系のモンスターに大ダメージを与える。", "Breaks rock. Or greatly damage a monster made by rocks.");
8235     
8236                 if (cast)
8237                 {
8238                         int y, x;
8239
8240                         if (!get_rep_dir2(&dir)) return NULL;
8241                         if (dir == 5) return NULL;
8242
8243                         y = p_ptr->y + ddy[dir];
8244                         x = p_ptr->x + ddx[dir];
8245
8246                         if (cave[y][x].m_idx)
8247                                 py_attack(y, x, HISSATSU_HAGAN);
8248         
8249                         if (!cave_have_flag_bold(y, x, FF_HURT_ROCK)) break;
8250         
8251                         /* Destroy the feature */
8252                         cave_alter_feat(y, x, FF_HURT_ROCK);
8253         
8254                         /* Update some things */
8255                         p_ptr->update |= (PU_FLOW);
8256                 }
8257                 break;
8258
8259         case 13:
8260                 if (name) return _("乱れ雪月花", "Midare-Setsugekka");
8261                 if (desc) return _("攻撃回数が増え、冷気耐性のないモンスターに大ダメージを与える。", 
8262                         "Attacks a monster with increased number of attacks and more damage unless it has resistance to cold.");
8263     
8264                 if (cast)
8265                 {
8266                         int y, x;
8267
8268                         if (!get_rep_dir2(&dir)) return NULL;
8269                         if (dir == 5) return NULL;
8270
8271                         y = p_ptr->y + ddy[dir];
8272                         x = p_ptr->x + ddx[dir];
8273
8274                         if (cave[y][x].m_idx)
8275                                 py_attack(y, x, HISSATSU_COLD);
8276                         else
8277                         {
8278                                 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
8279                                 return NULL;
8280                         }
8281                 }
8282                 break;
8283
8284         case 14:
8285                 if (name) return _("急所突き", "Spot Aiming");
8286                 if (desc) return _("モンスターを一撃で倒す攻撃を繰り出す。失敗すると1点しかダメージを与えられない。", 
8287                         "Attempts to kill a monster instantly. If failed cause only 1HP of damage.");
8288     
8289                 if (cast)
8290                 {
8291                         int y, x;
8292
8293                         if (!get_rep_dir2(&dir)) return NULL;
8294                         if (dir == 5) return NULL;
8295
8296                         y = p_ptr->y + ddy[dir];
8297                         x = p_ptr->x + ddx[dir];
8298
8299                         if (cave[y][x].m_idx)
8300                                 py_attack(y, x, HISSATSU_KYUSHO);
8301                         else
8302                         {
8303                                 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
8304                                 return NULL;
8305                         }
8306                 }
8307                 break;
8308
8309         case 15:
8310                 if (name) return _("魔神斬り", "Majingiri");
8311                 if (desc) return _("会心の一撃で攻撃する。攻撃がかわされやすい。", 
8312                         "Attempts to attack with critical hit. But this attack is easy to evade for a monster.");
8313     
8314                 if (cast)
8315                 {
8316                         int y, x;
8317
8318                         if (!get_rep_dir2(&dir)) return NULL;
8319                         if (dir == 5) return NULL;
8320
8321                         y = p_ptr->y + ddy[dir];
8322                         x = p_ptr->x + ddx[dir];
8323
8324                         if (cave[y][x].m_idx)
8325                                 py_attack(y, x, HISSATSU_MAJIN);
8326                         else
8327                         {
8328                                 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
8329                                 return NULL;
8330                         }
8331                 }
8332                 break;
8333
8334         case 16:
8335                 if (name) return _("捨て身", "Desperate Attack");
8336                 if (desc) return _("強力な攻撃を繰り出す。次のターンまでの間、食らうダメージが増える。", 
8337                         "Attacks with all of your power. But all damages you take will be doubled for one turn.");
8338     
8339                 if (cast)
8340                 {
8341                         int y, x;
8342
8343                         if (!get_rep_dir2(&dir)) return NULL;
8344                         if (dir == 5) return NULL;
8345
8346                         y = p_ptr->y + ddy[dir];
8347                         x = p_ptr->x + ddx[dir];
8348
8349                         if (cave[y][x].m_idx)
8350                                 py_attack(y, x, HISSATSU_SUTEMI);
8351                         else
8352                         {
8353                                 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
8354                                 return NULL;
8355                         }
8356                         p_ptr->sutemi = TRUE;
8357                 }
8358                 break;
8359
8360         case 17:
8361                 if (name) return _("雷撃鷲爪斬", "Lightning Eagle");
8362                 if (desc) return _("電撃耐性のないモンスターに非常に大きいダメージを与える。", 
8363                         "Attacks a monster with more damage unless it has resistance to electricity.");
8364     
8365                 if (cast)
8366                 {
8367                         int y, x;
8368
8369                         if (!get_rep_dir2(&dir)) return NULL;
8370                         if (dir == 5) return NULL;
8371
8372                         y = p_ptr->y + ddy[dir];
8373                         x = p_ptr->x + ddx[dir];
8374
8375                         if (cave[y][x].m_idx)
8376                                 py_attack(y, x, HISSATSU_ELEC);
8377                         else
8378                         {
8379                                 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
8380                                 return NULL;
8381                         }
8382                 }
8383                 break;
8384
8385         case 18:
8386                 if (name) return _("入身", "Rush Attack");
8387                 if (desc) return _("素早く相手に近寄り攻撃する。", "Steps close to a monster and attacks at a time.");
8388     
8389                 if (cast)
8390                 {
8391                         if (!rush_attack(NULL)) return NULL;
8392                 }
8393                 break;
8394
8395         case 19:
8396                 if (name) return _("赤流渦", "Bloody Maelstrom");
8397                 if (desc) return _("自分自身も傷を作りつつ、その傷が深いほど大きい威力で全方向の敵を攻撃できる。生きていないモンスターには効果がない。", 
8398                         "Attacks all adjacent monsters with power corresponding to your cut status. Then increases your cut status. No effect to unliving monsters.");
8399     
8400                 if (cast)
8401                 {
8402                         int y = 0, x = 0;
8403
8404                         cave_type       *c_ptr;
8405                         monster_type    *m_ptr;
8406         
8407                         if (p_ptr->cut < 300)
8408                                 set_cut(p_ptr->cut + 300);
8409                         else
8410                                 set_cut(p_ptr->cut * 2);
8411         
8412                         for (dir = 0; dir < 8; dir++)
8413                         {
8414                                 y = p_ptr->y + ddy_ddd[dir];
8415                                 x = p_ptr->x + ddx_ddd[dir];
8416                                 c_ptr = &cave[y][x];
8417         
8418                                 /* Get the monster */
8419                                 m_ptr = &m_list[c_ptr->m_idx];
8420         
8421                                 /* Hack -- attack monsters */
8422                                 if (c_ptr->m_idx && (m_ptr->ml || cave_have_flag_bold(y, x, FF_PROJECT)))
8423                                 {
8424                                         if (!monster_living(&r_info[m_ptr->r_idx]))
8425                                         {
8426                                                 char m_name[80];
8427         
8428                                                 monster_desc(m_name, m_ptr, 0);
8429                                                 msg_format(_("%sには効果がない!", "%s is unharmed!"), m_name);
8430                                         }
8431                                         else py_attack(y, x, HISSATSU_SEKIRYUKA);
8432                                 }
8433                         }
8434                 }
8435                 break;
8436
8437         case 20:
8438                 if (name) return _("激震撃", "Earthquake Blow");
8439                 if (desc) return _("地震を起こす。", "Shakes dungeon structure, and results in random swapping of floors and walls.");
8440     
8441                 if (cast)
8442                 {
8443                         int y,x;
8444
8445                         if (!get_rep_dir2(&dir)) return NULL;
8446                         if (dir == 5) return NULL;
8447
8448                         y = p_ptr->y + ddy[dir];
8449                         x = p_ptr->x + ddx[dir];
8450
8451                         if (cave[y][x].m_idx)
8452                                 py_attack(y, x, HISSATSU_QUAKE);
8453                         else
8454                                 earthquake(p_ptr->y, p_ptr->x, 10);
8455                 }
8456                 break;
8457
8458         case 21:
8459                 if (name) return _("地走り", "Crack");
8460                 if (desc) return _("衝撃波のビームを放つ。", "Fires a beam of shock wave.");
8461     
8462                 if (cast)
8463                 {
8464                         int total_damage = 0, basedam, i;
8465                         u32b flgs[TR_FLAG_SIZE];
8466                         object_type *o_ptr;
8467                         if (!get_aim_dir(&dir)) return NULL;
8468                         msg_print(_("武器を大きく振り下ろした。", "You swing your weapon downward."));
8469                         for (i = 0; i < 2; i++)
8470                         {
8471                                 int damage;
8472         
8473                                 if (!buki_motteruka(INVEN_RARM+i)) break;
8474                                 o_ptr = &inventory[INVEN_RARM+i];
8475                                 basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
8476                                 damage = o_ptr->to_d * 100;
8477                                 object_flags(o_ptr, flgs);
8478                                 if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD))
8479                                 {
8480                                         /* vorpal blade */
8481                                         basedam *= 5;
8482                                         basedam /= 3;
8483                                 }
8484                                 else if (have_flag(flgs, TR_VORPAL))
8485                                 {
8486                                         /* vorpal flag only */
8487                                         basedam *= 11;
8488                                         basedam /= 9;
8489                                 }
8490                                 damage += basedam;
8491                                 damage *= p_ptr->num_blow[i];
8492                                 total_damage += damage / 200;
8493                                 if (i) total_damage = total_damage*7/10;
8494                         }
8495                         fire_beam(GF_FORCE, dir, total_damage);
8496                 }
8497                 break;
8498
8499         case 22:
8500                 if (name) return _("気迫の雄叫び", "War Cry");
8501                 if (desc) return _("視界内の全モンスターに対して轟音の攻撃を行う。さらに、近くにいるモンスターを怒らせる。", 
8502                         "Damages all monsters in sight with sound. Aggravate nearby monsters.");
8503     
8504                 if (cast)
8505                 {
8506                         msg_print(_("雄叫びをあげた!", "You roar out!"));
8507                         project_hack(GF_SOUND, randint1(plev * 3));
8508                         aggravate_monsters(0);
8509                 }
8510                 break;
8511
8512         case 23:
8513                 if (name) return _("無双三段", "Musou-Sandan");
8514                 if (desc) return _("強力な3段攻撃を繰り出す。", "Attacks with powerful 3 strikes.");
8515     
8516                 if (cast)
8517                 {
8518                         int i;
8519
8520                         if (!get_rep_dir2(&dir)) return NULL;
8521                         if (dir == 5) return NULL;
8522
8523                         for (i = 0; i < 3; i++)
8524                         {
8525                                 int y, x;
8526                                 int ny, nx;
8527                                 int m_idx;
8528                                 cave_type *c_ptr;
8529                                 monster_type *m_ptr;
8530         
8531                                 y = p_ptr->y + ddy[dir];
8532                                 x = p_ptr->x + ddx[dir];
8533                                 c_ptr = &cave[y][x];
8534         
8535                                 if (c_ptr->m_idx)
8536                                         py_attack(y, x, HISSATSU_3DAN);
8537                                 else
8538                                 {
8539                                         msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
8540                                         return NULL;
8541                                 }
8542         
8543                                 if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
8544                                 {
8545                                         return "";
8546                                 }
8547         
8548                                 /* Monster is dead? */
8549                                 if (!c_ptr->m_idx) break;
8550         
8551                                 ny = y + ddy[dir];
8552                                 nx = x + ddx[dir];
8553                                 m_idx = c_ptr->m_idx;
8554                                 m_ptr = &m_list[m_idx];
8555         
8556                                 /* Monster cannot move back? */
8557                                 if (!monster_can_enter(ny, nx, &r_info[m_ptr->r_idx], 0))
8558                                 {
8559                                         /* -more- */
8560                                         if (i < 2) msg_print(NULL);
8561                                         continue;
8562                                 }
8563         
8564                                 c_ptr->m_idx = 0;
8565                                 cave[ny][nx].m_idx = m_idx;
8566                                 m_ptr->fy = ny;
8567                                 m_ptr->fx = nx;
8568         
8569                                 update_mon(m_idx, TRUE);
8570         
8571                                 /* Redraw the old spot */
8572                                 lite_spot(y, x);
8573         
8574                                 /* Redraw the new spot */
8575                                 lite_spot(ny, nx);
8576         
8577                                 /* Player can move forward? */
8578                                 if (player_can_enter(c_ptr->feat, 0))
8579                                 {
8580                                         /* Move the player */
8581                                         if (!move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP)) break;
8582                                 }
8583                                 else
8584                                 {
8585                                         break;
8586                                 }
8587
8588                                 /* -more- */
8589                                 if (i < 2) msg_print(NULL);
8590                         }
8591                 }
8592                 break;
8593
8594         case 24:
8595                 if (name) return _("吸血鬼の牙", "Vampire's Fang");
8596                 if (desc) return _("攻撃した相手の体力を吸いとり、自分の体力を回復させる。生命を持たないモンスターには通じない。", 
8597                         "Attacks with vampiric strikes which absorbs HP from a monster and gives them to you. No effect to unliving monsters.");
8598     
8599                 if (cast)
8600                 {
8601                         int y, x;
8602
8603                         if (!get_rep_dir2(&dir)) return NULL;
8604                         if (dir == 5) return NULL;
8605
8606                         y = p_ptr->y + ddy[dir];
8607                         x = p_ptr->x + ddx[dir];
8608
8609                         if (cave[y][x].m_idx)
8610                                 py_attack(y, x, HISSATSU_DRAIN);
8611                         else
8612                         {
8613                                         msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
8614                                 return NULL;
8615                         }
8616                 }
8617                 break;
8618
8619         case 25:
8620                 if (name) return _("幻惑", "Moon Dazzling");
8621                 if (desc) return _("視界内の起きている全モンスターに朦朧、混乱、眠りを与えようとする。", "Attempts to stun, confuse and sleep all waking monsters.");
8622     
8623                 if (cast)
8624                 {
8625                         msg_print(_("武器を不規則に揺らした...", "You irregularly wave your weapon..."));
8626                         project_hack(GF_ENGETSU, plev * 4);
8627                         project_hack(GF_ENGETSU, plev * 4);
8628                         project_hack(GF_ENGETSU, plev * 4);
8629                 }
8630                 break;
8631
8632         case 26:
8633                 if (name) return _("百人斬り", "Hundred Slaughter");
8634                 if (desc) return _("連続して入身でモンスターを攻撃する。攻撃するたびにMPを消費。MPがなくなるか、モンスターを倒せなかったら百人斬りは終了する。", 
8635                         "Performs a series of rush attacks. The series continues while killing each monster in a time and SP remains.");
8636     
8637                 if (cast)
8638                 {
8639                         const int mana_cost_per_monster = 8;
8640                         bool is_new = TRUE;
8641                         bool mdeath;
8642
8643                         do
8644                         {
8645                                 if (!rush_attack(&mdeath)) break;
8646                                 if (is_new)
8647                                 {
8648                                         /* Reserve needed mana point */
8649                                         p_ptr->csp -= technic_info[REALM_HISSATSU - MIN_TECHNIC][26].smana;
8650                                         is_new = FALSE;
8651                                 }
8652                                 else
8653                                         p_ptr->csp -= mana_cost_per_monster;
8654
8655                                 if (!mdeath) break;
8656                                 command_dir = 0;
8657
8658                                 p_ptr->redraw |= PR_MANA;
8659                                 handle_stuff();
8660                         }
8661                         while (p_ptr->csp > mana_cost_per_monster);
8662
8663                         if (is_new) return NULL;
8664         
8665                         /* Restore reserved mana */
8666                         p_ptr->csp += technic_info[REALM_HISSATSU - MIN_TECHNIC][26].smana;
8667                 }
8668                 break;
8669
8670         case 27:
8671                 if (name) return _("天翔龍閃", "Dragonic Flash");
8672                 if (desc) return _("視界内の場所を指定して、その場所と自分の間にいる全モンスターを攻撃し、その場所に移動する。", 
8673                         "Runs toward given location while attacking all monsters on the path.");
8674     
8675                 if (cast)
8676                 {
8677                         int y, x;
8678
8679                         if (!tgt_pt(&x, &y)) return NULL;
8680
8681                         if (!cave_player_teleportable_bold(y, x, 0L) ||
8682                             (distance(y, x, p_ptr->y, p_ptr->x) > MAX_SIGHT / 2) ||
8683                             !projectable(p_ptr->y, p_ptr->x, y, x))
8684                         {
8685                                 msg_print(_("失敗!", "You cannot move to that place!"));
8686                                 break;
8687                         }
8688                         if (p_ptr->anti_tele)
8689                         {
8690                                 msg_print(_("不思議な力がテレポートを防いだ!", "A mysterious force prevents you from teleporting!"));
8691                                 break;
8692                         }
8693                         project(0, 0, y, x, HISSATSU_ISSEN, GF_ATTACK, PROJECT_BEAM | PROJECT_KILL, -1);
8694                         teleport_player_to(y, x, 0L);
8695                 }
8696                 break;
8697
8698         case 28:
8699                 if (name) return _("二重の剣撃", "Twin Slash");
8700                 if (desc) return _("1ターンで2度攻撃を行う。", "double attacks at a time.");
8701     
8702                 if (cast)
8703                 {
8704                         int x, y;
8705         
8706                         if (!get_rep_dir(&dir, FALSE)) return NULL;
8707
8708                         y = p_ptr->y + ddy[dir];
8709                         x = p_ptr->x + ddx[dir];
8710
8711                         if (cave[y][x].m_idx)
8712                         {
8713                                 py_attack(y, x, 0);
8714                                 if (cave[y][x].m_idx)
8715                                 {
8716                                         handle_stuff();
8717                                         py_attack(y, x, 0);
8718                                 }
8719                         }
8720                         else
8721                         {
8722                                 msg_print(_("その方向にはモンスターはいません。", "You don't see any monster in this direction"));
8723                                 return NULL;
8724                         }
8725                 }
8726                 break;
8727
8728         case 29:
8729                 if (name) return _("虎伏絶刀勢", "Kofuku-Zettousei");
8730                 if (desc) return _("強力な攻撃を行い、近くの場所にも効果が及ぶ。", "Performs a powerful attack which even effect nearby monsters.");
8731     
8732                 if (cast)
8733                 {
8734                         int total_damage = 0, basedam, i;
8735                         int y, x;
8736                         u32b flgs[TR_FLAG_SIZE];
8737                         object_type *o_ptr;
8738         
8739                         if (!get_rep_dir2(&dir)) return NULL;
8740                         if (dir == 5) return NULL;
8741
8742                         y = p_ptr->y + ddy[dir];
8743                         x = p_ptr->x + ddx[dir];
8744
8745                         if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
8746                         {
8747                                 msg_print(_("なぜか攻撃することができない。", "Something prevent you from attacking."));
8748                                 return "";
8749                         }
8750                         msg_print(_("武器を大きく振り下ろした。", "You swing your weapon downward."));
8751                         for (i = 0; i < 2; i++)
8752                         {
8753                                 int damage;
8754                                 if (!buki_motteruka(INVEN_RARM+i)) break;
8755                                 o_ptr = &inventory[INVEN_RARM+i];
8756                                 basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
8757                                 damage = o_ptr->to_d * 100;
8758                                 object_flags(o_ptr, flgs);
8759                                 if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD))
8760                                 {
8761                                         /* vorpal blade */
8762                                         basedam *= 5;
8763                                         basedam /= 3;
8764                                 }
8765                                 else if (have_flag(flgs, TR_VORPAL))
8766                                 {
8767                                         /* vorpal flag only */
8768                                         basedam *= 11;
8769                                         basedam /= 9;
8770                                 }
8771                                 damage += basedam;
8772                                 damage += p_ptr->to_d[i] * 100;
8773                                 damage *= p_ptr->num_blow[i];
8774                                 total_damage += (damage / 100);
8775                         }
8776                         project(0, (cave_have_flag_bold(y, x, FF_PROJECT) ? 5 : 0), y, x, total_damage * 3 / 2, GF_METEOR, PROJECT_KILL | PROJECT_JUMP | PROJECT_ITEM, -1);
8777                 }
8778                 break;
8779
8780         case 30:
8781                 if (name) return _("慶雲鬼忍剣", "Keiun-Kininken");
8782                 if (desc) return _("自分もダメージをくらうが、相手に非常に大きなダメージを与える。アンデッドには特に効果がある。", 
8783                         "Attacks a monster with extremely powerful damage. But you also takes some damages. Hurts a undead monster greatly.");
8784     
8785                 if (cast)
8786                 {
8787                         int y, x;
8788
8789                         if (!get_rep_dir2(&dir)) return NULL;
8790                         if (dir == 5) return NULL;
8791
8792                         y = p_ptr->y + ddy[dir];
8793                         x = p_ptr->x + ddx[dir];
8794
8795                         if (cave[y][x].m_idx)
8796                                 py_attack(y, x, HISSATSU_UNDEAD);
8797                         else
8798                         {
8799                                 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
8800                                 return NULL;
8801                         }
8802                         take_hit(DAMAGE_NOESCAPE, 100 + randint1(100), _("慶雲鬼忍剣を使った衝撃", "exhaustion on using Keiun-Kininken"), -1);
8803                 }
8804                 break;
8805
8806         case 31:
8807                 if (name) return _("切腹", "Harakiri");
8808                 if (desc) return _("「武士道とは、死ぬことと見つけたり。」", "'Busido is found in death'");
8809
8810                 if (cast)
8811                 {
8812                         int i;
8813                         if (!get_check(_("本当に自殺しますか?", "Do you really want to commit suicide? "))) return NULL;
8814                                 /* Special Verification for suicide */
8815                         prt(_("確認のため '@' を押して下さい。", "Please verify SUICIDE by typing the '@' sign: "), 0, 0);
8816         
8817                         flush();
8818                         i = inkey();
8819                         prt("", 0, 0);
8820                         if (i != '@') return NULL;
8821                         if (p_ptr->total_winner)
8822                         {
8823                                 take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1);
8824                                 p_ptr->total_winner = TRUE;
8825                         }
8826                         else
8827                         {
8828                                 msg_print(_("武士道とは、死ぬことと見つけたり。", "Meaning of Bushi-do is found in the death."));
8829                                 take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1);
8830                         }
8831                 }
8832                 break;
8833         }
8834
8835         return "";
8836 }
8837
8838 /*!
8839  * @brief 呪術領域の武器呪縛の対象にできる武器かどうかを返す。 / An "item_tester_hook" for offer
8840  * @param o_ptr オブジェクト構造体の参照ポインタ
8841  * @return 呪縛可能な武器ならばTRUEを返す
8842  */
8843 static bool item_tester_hook_weapon_except_bow(object_type *o_ptr)
8844 {
8845         switch (o_ptr->tval)
8846         {
8847                 case TV_SWORD:
8848                 case TV_HAFTED:
8849                 case TV_POLEARM:
8850                 case TV_DIGGING:
8851                 {
8852                         return (TRUE);
8853                 }
8854         }
8855
8856         return (FALSE);
8857 }
8858
8859 /*!
8860  * @brief 呪術領域の各処理に使える呪われた装備かどうかを返す。 / An "item_tester_hook" for offer
8861  * @param o_ptr オブジェクト構造体の参照ポインタ
8862  * @return 使える装備ならばTRUEを返す
8863  */
8864 static bool item_tester_hook_cursed(object_type *o_ptr)
8865 {
8866         return (bool)(object_is_cursed(o_ptr));
8867 }
8868
8869 /*!
8870  * @brief 呪術領域魔法の各処理を行う
8871  * @param spell 魔法ID
8872  * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST / SPELL_CONT / SPELL_STOP)
8873  * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST / SPELL_CONT / SPELL_STOP 時はNULL文字列を返す。
8874  */
8875 static cptr do_hex_spell(int spell, int mode)
8876 {
8877         bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
8878         bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
8879         bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
8880         bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
8881         bool cont = (mode == SPELL_CONT) ? TRUE : FALSE;
8882         bool stop = (mode == SPELL_STOP) ? TRUE : FALSE;
8883
8884         bool add = TRUE;
8885
8886         int plev = p_ptr->lev;
8887         int power;
8888
8889         switch (spell)
8890         {
8891         /*** 1st book (0-7) ***/
8892         case 0:
8893                 if (name) return _("邪なる祝福", "Evily blessing");
8894                 if (desc) return _("祝福により攻撃精度と防御力が上がる。", "Attempts to increase +to_hit of a weapon and AC");
8895                 if (cast)
8896                 {
8897                         if (!p_ptr->blessed)
8898                         {
8899                                 msg_print(_("高潔な気分になった!", "You feel righteous!"));
8900                         }
8901                 }
8902                 if (stop)
8903                 {
8904                         if (!p_ptr->blessed)
8905                         {
8906                                 msg_print(_("高潔な気分が消え失せた。", "The prayer has expired."));
8907                         }
8908                 }
8909                 break;
8910
8911         case 1:
8912                 if (name) return _("軽傷の治癒", "Cure light wounds");
8913                 if (desc) return _("HPや傷を少し回復させる。", "Heals cut and HP a little.");
8914                 if (info) return info_heal(1, 10, 0);
8915                 if (cast)
8916                 {
8917                         msg_print(_("気分が良くなってくる。", "You feel better and better."));
8918                 }
8919                 if (cast || cont)
8920                 {
8921                         hp_player(damroll(1, 10));
8922                         set_cut(p_ptr->cut - 10);
8923                 }
8924                 break;
8925
8926         case 2:
8927                 if (name) return _("悪魔のオーラ", "Demonic aura");
8928                 if (desc) return _("炎のオーラを身にまとい、回復速度が速くなる。", "Gives fire aura and regeneration.");
8929                 if (cast)
8930                 {
8931                         msg_print(_("体が炎のオーラで覆われた。", "You have enveloped by fiery aura!"));
8932                 }
8933                 if (stop)
8934                 {
8935                         msg_print(_("炎のオーラが消え去った。", "Fiery aura disappeared."));
8936                 }
8937                 break;
8938
8939         case 3:
8940                 if (name) return _("悪臭霧", "Stinking mist");
8941                 if (desc) return _("視界内のモンスターに微弱量の毒のダメージを与える。", "Deals few damages of poison to all monsters in your sight.");
8942                 power = plev / 2 + 5;
8943                 if (info) return info_damage(1, power, 0);
8944                 if (cast || cont)
8945                 {
8946                         project_hack(GF_POIS, randint1(power));
8947                 }
8948                 break;
8949
8950         case 4:
8951                 if (name) return _("腕力強化", "Extra might");
8952                 if (desc) return _("術者の腕力を上昇させる。", "Attempts to increase your strength.");
8953                 if (cast)
8954                 {
8955                         msg_print(_("何だか力が湧いて来る。", "You feel you get stronger."));
8956                 }
8957                 break;
8958
8959         case 5:
8960                 if (name) return _("武器呪縛", "Curse weapon");
8961                 if (desc) return _("装備している武器を呪う。", "Curses your weapon.");
8962                 if (cast)
8963                 {
8964                         int item;
8965                         cptr q, s;
8966                         char o_name[MAX_NLEN];
8967                         object_type *o_ptr;
8968                         u32b f[TR_FLAG_SIZE];
8969
8970                         item_tester_hook = item_tester_hook_weapon_except_bow;
8971                         q = _("どれを呪いますか?", "Which weapon do you curse?");
8972                         s = _("武器を装備していない。", "You wield no weapons.");
8973
8974                         if (!get_item(&item, q, s, (USE_EQUIP))) return FALSE;
8975
8976                         o_ptr = &inventory[item];
8977                         object_desc(o_name, o_ptr, OD_NAME_ONLY);
8978                         object_flags(o_ptr, f);
8979
8980                         if (!get_check(format(_("本当に %s を呪いますか?", "Do you curse %s, really?"), o_name))) return FALSE;
8981
8982                         if (!one_in_(3) &&
8983                                 (object_is_artifact(o_ptr) || have_flag(f, TR_BLESSED)))
8984                         {
8985                                 msg_format(_("%s は呪いを跳ね返した。", "%s resists the effect."), o_name);
8986                                 if (one_in_(3))
8987                                 {
8988                                         if (o_ptr->to_d > 0)
8989                                         {
8990                                                 o_ptr->to_d -= randint1(3) % 2;
8991                                                 if (o_ptr->to_d < 0) o_ptr->to_d = 0;
8992                                         }
8993                                         if (o_ptr->to_h > 0)
8994                                         {
8995                                                 o_ptr->to_h -= randint1(3) % 2;
8996                                                 if (o_ptr->to_h < 0) o_ptr->to_h = 0;
8997                                         }
8998                                         if (o_ptr->to_a > 0)
8999                                         {
9000                                                 o_ptr->to_a -= randint1(3) % 2;
9001                                                 if (o_ptr->to_a < 0) o_ptr->to_a = 0;
9002                                         }
9003                                         msg_format(_("%s は劣化してしまった。", "Your %s was disenchanted!"), o_name);
9004                                 }
9005                         }
9006                         else
9007                         {
9008                                 int curse_rank = 0;
9009                                 msg_format(_("恐怖の暗黒オーラがあなたの%sを包み込んだ!", "A terrible black aura blasts your %s!"), o_name);
9010                                 o_ptr->curse_flags |= (TRC_CURSED);
9011
9012                                 if (object_is_artifact(o_ptr) || object_is_ego(o_ptr))
9013                                 {
9014
9015                                         if (one_in_(3)) o_ptr->curse_flags |= (TRC_HEAVY_CURSE);
9016                                         if (one_in_(666))
9017                                         {
9018                                                 o_ptr->curse_flags |= (TRC_TY_CURSE);
9019                                                 if (one_in_(666)) o_ptr->curse_flags |= (TRC_PERMA_CURSE);
9020
9021                                                 add_flag(o_ptr->art_flags, TR_AGGRAVATE);
9022                                                 add_flag(o_ptr->art_flags, TR_VORPAL);
9023                                                 add_flag(o_ptr->art_flags, TR_VAMPIRIC);
9024                                                 msg_print(_("血だ!血だ!血だ!", "Blood, Blood, Blood!"));
9025                                                 curse_rank = 2;
9026                                         }
9027                                 }
9028
9029                                 o_ptr->curse_flags |= get_curse(curse_rank, o_ptr);
9030                         }
9031
9032                         p_ptr->update |= (PU_BONUS);
9033                         add = FALSE;
9034                 }
9035                 break;
9036
9037         case 6:
9038                 if (name) return _("邪悪感知", "Evil detection");
9039                 if (desc) return _("周囲の邪悪なモンスターを感知する。", "Detects evil monsters.");
9040                 if (info) return info_range(MAX_SIGHT);
9041                 if (cast)
9042                 {
9043                         msg_print(_("邪悪な生物の存在を感じ取ろうとした。", "You attend to the presence of evil creatures."));
9044                 }
9045                 break;
9046
9047         case 7:
9048                 if (name) return _("我慢", "Patience");
9049                 if (desc) return _("数ターン攻撃を耐えた後、受けたダメージを地獄の業火として周囲に放出する。", 
9050                         "Bursts hell fire strongly after patients any damage while few turns.");
9051                 power = MIN(200, (p_ptr->magic_num1[2] * 2));
9052                 if (info) return info_damage(0, 0, power);
9053                 if (cast)
9054                 {
9055                         int a = 3 - (p_ptr->pspeed - 100) / 10;
9056                         int r = 3 + randint1(3) + MAX(0, MIN(3, a));
9057
9058                         if (p_ptr->magic_num2[2] > 0)
9059                         {
9060                                 msg_print(_("すでに我慢をしている。", "You are already patienting."));
9061                                 return NULL;
9062                         }
9063
9064                         p_ptr->magic_num2[1] = 1;
9065                         p_ptr->magic_num2[2] = r;
9066                         p_ptr->magic_num1[2] = 0;
9067                         msg_print(_("じっと耐えることにした。", "You decide to patient all damages."));
9068                         add = FALSE;
9069                 }
9070                 if (cont)
9071                 {
9072                         int rad = 2 + (power / 50);
9073
9074                         p_ptr->magic_num2[2]--;
9075
9076                         if ((p_ptr->magic_num2[2] <= 0) || (power >= 200))
9077                         {
9078                                 msg_print(_("我慢が解かれた!", "Time for end of patioence!"));
9079                                 if (power)
9080                                 {
9081                                         project(0, rad, p_ptr->y, p_ptr->x, power, GF_HELL_FIRE,
9082                                                 (PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL), -1);
9083                                 }
9084                                 if (p_ptr->wizard)
9085                                 {
9086                                         msg_format(_("%d点のダメージを返した。", "You return %d damages."), power);
9087                                 }
9088
9089                                 /* Reset */
9090                                 p_ptr->magic_num2[1] = 0;
9091                                 p_ptr->magic_num2[2] = 0;
9092                                 p_ptr->magic_num1[2] = 0;
9093                         }
9094                 }
9095                 break;
9096
9097         /*** 2nd book (8-15) ***/
9098         case 8:
9099                 if (name) return _("氷の鎧", "Ice armor");
9100                 if (desc) return _("氷のオーラを身にまとい、防御力が上昇する。", "Gives fire aura and bonus to AC.");
9101                 if (cast)
9102                 {
9103                         msg_print(_("体が氷の鎧で覆われた。", "You have enveloped by ice armor!"));
9104                 }
9105                 if (stop)
9106                 {
9107                         msg_print(_("氷の鎧が消え去った。", "Ice armor disappeared."));
9108                 }
9109                 break;
9110
9111         case 9:
9112                 if (name) return _("重傷の治癒", "Cure serious wounds");
9113                 if (desc) return _("体力や傷を多少回復させる。", "Heals cut and HP more.");
9114                 if (info) return info_heal(2, 10, 0);
9115                 if (cast)
9116                 {
9117                         msg_print(_("気分が良くなってくる。", "You feel better and better."));
9118                 }
9119                 if (cast || cont)
9120                 {
9121                         hp_player(damroll(2, 10));
9122                         set_cut((p_ptr->cut / 2) - 10);
9123                 }
9124                 break;
9125
9126         case 10:
9127                 if (name) return _("薬品吸入", "Inhail potion");
9128                 if (desc) return _("呪文詠唱を中止することなく、薬の効果を得ることができる。", "Quaffs a potion without canceling of casting a spell.");
9129                 if (cast)
9130                 {
9131                         p_ptr->magic_num1[0] |= (1L << HEX_INHAIL);
9132                         do_cmd_quaff_potion();
9133                         p_ptr->magic_num1[0] &= ~(1L << HEX_INHAIL);
9134                         add = FALSE;
9135                 }
9136                 break;
9137
9138         case 11:
9139                 if (name) return _("吸血霧", "Vampiric mist");
9140                 if (desc) return _("視界内のモンスターに微弱量の生命力吸収のダメージを与える。与えたダメージの分、体力が回復する。", 
9141                         "Deals few dameges of drain life to all monsters in your sight.");
9142                 power = (plev / 2) + 5;
9143                 if (info) return info_damage(1, power, 0);
9144                 if (cast || cont)
9145                 {
9146                         project_hack(GF_OLD_DRAIN, randint1(power));
9147                 }
9148                 break;
9149
9150         case 12:
9151                 if (name) return _("魔剣化", "Swords to runeswords");
9152                 if (desc) return _("武器の攻撃力を上げる。切れ味を得、呪いに応じて与えるダメージが上昇し、善良なモンスターに対するダメージが2倍になる。", 
9153                         "Gives vorpal ability to your weapon. Increases damages by your weapon acccording to curse of your weapon.");
9154                 if (cast)
9155                 {
9156 #ifdef JP
9157                         msg_print("あなたの武器が黒く輝いた。");
9158 #else
9159                         if (!empty_hands(FALSE))
9160                                 msg_print("Your weapons glow bright black.");
9161                         else
9162                                 msg_print("Your weapon glows bright black.");
9163 #endif
9164                 }
9165                 if (stop)
9166                 {
9167 #ifdef JP
9168                         msg_print("武器の輝きが消え去った。");
9169 #else
9170                         msg_format("Brightness of weapon%s disappeared.", (empty_hands(FALSE)) ? "" : "s");
9171 #endif
9172                 }
9173                 break;
9174
9175         case 13:
9176                 if (name) return _("混乱の手", "Touch of confusion");
9177                 if (desc) return _("攻撃した際モンスターを混乱させる。", "Confuses a monster when you attack.");
9178                 if (cast)
9179                 {
9180                         msg_print(_("あなたの手が赤く輝き始めた。", "Your hands glow bright red."));
9181                 }
9182                 if (stop)
9183                 {
9184                         msg_print(_("手の輝きがなくなった。", "Brightness on your hands disappeard."));
9185                 }
9186                 break;
9187
9188         case 14:
9189                 if (name) return _("肉体強化", "Building up");
9190                 if (desc) return _("術者の腕力、器用さ、耐久力を上昇させる。攻撃回数の上限を 1 増加させる。", 
9191                         "Attempts to increases your strength, dexterity and constitusion.");
9192                 if (cast)
9193                 {
9194                         msg_print(_("身体が強くなった気がした。", "You feel your body is developed more now."));
9195                 }
9196                 break;
9197
9198         case 15:
9199                 if (name) return _("反テレポート結界", "Anti teleport barrier");
9200                 if (desc) return _("視界内のモンスターのテレポートを阻害するバリアを張る。", "Obstructs all teleportations by monsters in your sight.");
9201                 power = plev * 3 / 2;
9202                 if (info) return info_power(power);
9203                 if (cast)
9204                 {
9205                         msg_print(_("テレポートを防ぐ呪いをかけた。", "You feel anyone can not teleport except you."));
9206                 }
9207                 break;
9208
9209         /*** 3rd book (16-23) ***/
9210         case 16:
9211                 if (name) return _("衝撃のクローク", "Cloak of shock");
9212                 if (desc) return _("電気のオーラを身にまとい、動きが速くなる。", "Gives lightning aura and a bonus to speed.");
9213                 if (cast)
9214                 {
9215                         msg_print(_("体が稲妻のオーラで覆われた。", "You have enveloped by electrical aura!"));
9216                 }
9217                 if (stop)
9218                 {
9219                         msg_print(_("稲妻のオーラが消え去った。", "Electrical aura disappeared."));
9220                 }
9221                 break;
9222
9223         case 17:
9224                 if (name) return _("致命傷の治癒", "Cure critical wounds");
9225                 if (desc) return _("体力や傷を回復させる。", "Heals cut and HP greatry.");
9226                 if (info) return info_heal(4, 10, 0);
9227                 if (cast)
9228                 {
9229                         msg_print(_("気分が良くなってくる。", "You feel better and better."));
9230                 }
9231                 if (cast || cont)
9232                 {
9233                         hp_player(damroll(4, 10));
9234                         set_stun(0);
9235                         set_cut(0);
9236                         set_poisoned(0);
9237                 }
9238                 break;
9239
9240         case 18:
9241                 if (name) return _("呪力封入", "Recharging");
9242                 if (desc) return _("魔法の道具に魔力を再充填する。", "Recharges a magic device.");
9243                 power = plev * 2;
9244                 if (info) return info_power(power);
9245                 if (cast)
9246                 {
9247                         if (!recharge(power)) return NULL;
9248                         add = FALSE;
9249                 }
9250                 break;
9251
9252         case 19:
9253                 if (name) return _("死者復活", "Animate Dead");
9254                 if (desc) return _("死体を蘇らせてペットにする。", "Raises corpses and skeletons from dead.");
9255                 if (cast)
9256                 {
9257                         msg_print(_("死者への呼びかけを始めた。", "You start to call deads.!"));
9258                 }
9259                 if (cast || cont)
9260                 {
9261                         animate_dead(0, p_ptr->y, p_ptr->x);
9262                 }
9263                 break;
9264
9265         case 20:
9266                 if (name) return _("防具呪縛", "Curse armor");
9267                 if (desc) return _("装備している防具に呪いをかける。", "Curse a piece of armour that you wielding.");
9268                 if (cast)
9269                 {
9270                         int item;
9271                         cptr q, s;
9272                         char o_name[MAX_NLEN];
9273                         object_type *o_ptr;
9274                         u32b f[TR_FLAG_SIZE];
9275
9276                         item_tester_hook = object_is_armour;
9277                         q = _("どれを呪いますか?", "Which piece of armour do you curse?");
9278                         s = _("防具を装備していない。", "You wield no piece of armours.");
9279
9280                         if (!get_item(&item, q, s, (USE_EQUIP))) return FALSE;
9281
9282                         o_ptr = &inventory[item];
9283                         object_desc(o_name, o_ptr, OD_NAME_ONLY);
9284                         object_flags(o_ptr, f);
9285
9286                         if (!get_check(format(_("本当に %s を呪いますか?", "Do you curse %s, really?"), o_name))) return FALSE;
9287
9288                         if (!one_in_(3) &&
9289                                 (object_is_artifact(o_ptr) || have_flag(f, TR_BLESSED)))
9290                         {
9291                                 msg_format(_("%s は呪いを跳ね返した。", "%s resists the effect."), o_name);
9292                                 if (one_in_(3))
9293                                 {
9294                                         if (o_ptr->to_d > 0)
9295                                         {
9296                                                 o_ptr->to_d -= randint1(3) % 2;
9297                                                 if (o_ptr->to_d < 0) o_ptr->to_d = 0;
9298                                         }
9299                                         if (o_ptr->to_h > 0)
9300                                         {
9301                                                 o_ptr->to_h -= randint1(3) % 2;
9302                                                 if (o_ptr->to_h < 0) o_ptr->to_h = 0;
9303                                         }
9304                                         if (o_ptr->to_a > 0)
9305                                         {
9306                                                 o_ptr->to_a -= randint1(3) % 2;
9307                                                 if (o_ptr->to_a < 0) o_ptr->to_a = 0;
9308                                         }
9309                                         msg_format(_("%s は劣化してしまった。", "Your %s was disenchanted!"), o_name);
9310                                 }
9311                         }
9312                         else
9313                         {
9314                                 int curse_rank = 0;
9315                                 msg_format(_("恐怖の暗黒オーラがあなたの%sを包み込んだ!", "A terrible black aura blasts your %s!"), o_name);
9316                                 o_ptr->curse_flags |= (TRC_CURSED);
9317
9318                                 if (object_is_artifact(o_ptr) || object_is_ego(o_ptr))
9319                                 {
9320
9321                                         if (one_in_(3)) o_ptr->curse_flags |= (TRC_HEAVY_CURSE);
9322                                         if (one_in_(666))
9323                                         {
9324                                                 o_ptr->curse_flags |= (TRC_TY_CURSE);
9325                                                 if (one_in_(666)) o_ptr->curse_flags |= (TRC_PERMA_CURSE);
9326
9327                                                 add_flag(o_ptr->art_flags, TR_AGGRAVATE);
9328                                                 add_flag(o_ptr->art_flags, TR_RES_POIS);
9329                                                 add_flag(o_ptr->art_flags, TR_RES_DARK);
9330                                                 add_flag(o_ptr->art_flags, TR_RES_NETHER);
9331                                                 msg_print(_("血だ!血だ!血だ!", "Blood, Blood, Blood!"));
9332                                                 curse_rank = 2;
9333                                         }
9334                                 }
9335
9336                                 o_ptr->curse_flags |= get_curse(curse_rank, o_ptr);
9337                         }
9338
9339                         p_ptr->update |= (PU_BONUS);
9340                         add = FALSE;
9341                 }
9342                 break;
9343
9344         case 21:
9345                 if (name) return _("影のクローク", "Cloak of shadow");
9346                 if (desc) return _("影のオーラを身にまとい、敵に影のダメージを与える。", "Gives aura of shadow.");
9347                 if (cast)
9348                 {
9349                         object_type *o_ptr = &inventory[INVEN_OUTER];
9350
9351                         if (!o_ptr->k_idx)
9352                         {
9353                                 msg_print(_("クロークを身につけていない!", "You don't ware any cloak."));
9354                                 return NULL;
9355                         }
9356                         else if (!object_is_cursed(o_ptr))
9357                         {
9358                                 msg_print(_("クロークは呪われていない!", "Your cloak is not cursed."));
9359                                 return NULL;
9360                         }
9361                         else
9362                         {
9363                                 msg_print(_("影のオーラを身にまとった。", "You have enveloped by shadow aura!"));
9364                         }
9365                 }
9366                 if (cont)
9367                 {
9368                         object_type *o_ptr = &inventory[INVEN_OUTER];
9369
9370                         if ((!o_ptr->k_idx) || (!object_is_cursed(o_ptr)))
9371                         {
9372                                 do_spell(REALM_HEX, spell, SPELL_STOP);
9373                                 p_ptr->magic_num1[0] &= ~(1L << spell);
9374                                 p_ptr->magic_num2[0]--;
9375                                 if (!p_ptr->magic_num2[0]) set_action(ACTION_NONE);
9376                         }
9377                 }
9378                 if (stop)
9379                 {
9380                         msg_print(_("影のオーラが消え去った。", "Shadow aura disappeared."));
9381                 }
9382                 break;
9383
9384         case 22:
9385                 if (name) return _("苦痛を魔力に", "Pains to mana");
9386                 if (desc) return _("視界内のモンスターに精神ダメージ与え、魔力を吸い取る。", "Deals psychic damages to all monsters in sight, and drains some mana.");
9387                 power = plev * 3 / 2;
9388                 if (info) return info_damage(1, power, 0);
9389                 if (cast || cont)
9390                 {
9391                         project_hack(GF_PSI_DRAIN, randint1(power));
9392                 }
9393                 break;
9394
9395         case 23:
9396                 if (name) return _("目には目を", "Eye for an eye");
9397                 if (desc) return _("打撃や魔法で受けたダメージを、攻撃元のモンスターにも与える。", "Returns same damage which you got to the monster which damaged you.");
9398                 if (cast)
9399                 {
9400                         msg_print(_("復讐したい欲望にかられた。", "You wish strongly you want to revenge anything."));
9401                 }
9402                 break;
9403
9404         /*** 4th book (24-31) ***/
9405         case 24:
9406                 if (name) return _("反増殖結界", "Anti multiply barrier");
9407                 if (desc) return _("その階の増殖するモンスターの増殖を阻止する。", "Obstructs all multiplying by monsters in entire floor.");
9408                 if (cast)
9409                 {
9410                         msg_print(_("増殖を阻止する呪いをかけた。", "You feel anyone can not already multiply."));
9411                 }
9412                 break;
9413
9414         case 25:
9415                 if (name) return _("全復活", "Restoration");
9416                 if (desc) return _("経験値を徐々に復活し、減少した能力値を回復させる。", "Restores experience and status.");
9417                 if (cast)
9418                 {
9419                         msg_print(_("体が元の活力を取り戻し始めた。", "You feel your lost status starting to return."));
9420                 }
9421                 if (cast || cont)
9422                 {
9423                         bool flag = FALSE;
9424                         int d = (p_ptr->max_exp - p_ptr->exp);
9425                         int r = (p_ptr->exp / 20);
9426                         int i;
9427
9428                         if (d > 0)
9429                         {
9430                                 if (d < r)
9431                                         p_ptr->exp = p_ptr->max_exp;
9432                                 else
9433                                         p_ptr->exp += r;
9434
9435                                 /* Check the experience */
9436                                 check_experience();
9437
9438                                 flag = TRUE;
9439                         }
9440                         for (i = A_STR; i < 6; i ++)
9441                         {
9442                                 if (p_ptr->stat_cur[i] < p_ptr->stat_max[i])
9443                                 {
9444                                         if (p_ptr->stat_cur[i] < 18)
9445                                                 p_ptr->stat_cur[i]++;
9446                                         else
9447                                                 p_ptr->stat_cur[i] += 10;
9448
9449                                         if (p_ptr->stat_cur[i] > p_ptr->stat_max[i])
9450                                                 p_ptr->stat_cur[i] = p_ptr->stat_max[i];
9451
9452                                         /* Recalculate bonuses */
9453                                         p_ptr->update |= (PU_BONUS);
9454
9455                                         flag = TRUE;
9456                                 }
9457                         }
9458
9459                         if (!flag)
9460                         {
9461                                 msg_format(_("%sの呪文の詠唱をやめた。", "Finish casting '%^s'."), do_spell(REALM_HEX, HEX_RESTORE, SPELL_NAME));
9462                                 p_ptr->magic_num1[0] &= ~(1L << HEX_RESTORE);
9463                                 if (cont) p_ptr->magic_num2[0]--;
9464                                 if (p_ptr->magic_num2) p_ptr->action = ACTION_NONE;
9465
9466                                 /* Redraw status */
9467                                 p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
9468                                 p_ptr->redraw |= (PR_EXTRA);
9469
9470                                 return "";
9471                         }
9472                 }
9473                 break;
9474
9475         case 26:
9476                 if (name) return _("呪力吸収", "Drain curse power");
9477                 if (desc) return _("呪われた武器の呪いを吸収して魔力を回復する。", "Drains curse on your weapon and heals SP a little.");
9478                 if (cast)
9479                 {
9480                         int item;
9481                         cptr s, q;
9482                         u32b f[TR_FLAG_SIZE];
9483                         object_type *o_ptr;
9484
9485                         item_tester_hook = item_tester_hook_cursed;
9486                         q = _("どの装備品から吸収しますか?", "Which cursed equipment do you drain mana from?");
9487                         s = _("呪われたアイテムを装備していない。", "You have no cursed equipment.");
9488
9489                         if (!get_item(&item, q, s, (USE_EQUIP))) return FALSE;
9490
9491                         o_ptr = &inventory[item];
9492                         object_flags(o_ptr, f);
9493
9494                         p_ptr->csp += (p_ptr->lev / 5) + randint1(p_ptr->lev / 5);
9495                         if (have_flag(f, TR_TY_CURSE) || (o_ptr->curse_flags & TRC_TY_CURSE)) p_ptr->csp += randint1(5);
9496                         if (p_ptr->csp > p_ptr->msp) p_ptr->csp = p_ptr->msp;
9497
9498                         if (o_ptr->curse_flags & TRC_PERMA_CURSE)
9499                         {
9500                                 /* Nothing */
9501                         }
9502                         else if (o_ptr->curse_flags & TRC_HEAVY_CURSE)
9503                         {
9504                                 if (one_in_(7))
9505                                 {
9506                                         msg_print(_("呪いを全て吸い取った。", "Heavy curse vanished away."));
9507                                         o_ptr->curse_flags = 0L;
9508                                 }
9509                         }
9510                         else if ((o_ptr->curse_flags & (TRC_CURSED)) && one_in_(3))
9511                         {
9512                                 msg_print(_("呪いを全て吸い取った。", "Curse vanished away."));
9513                                 o_ptr->curse_flags = 0L;
9514                         }
9515
9516                         add = FALSE;
9517                 }
9518                 break;
9519
9520         case 27:
9521                 if (name) return _("吸血の刃", "Swords to vampires");
9522                 if (desc) return _("吸血属性で攻撃する。", "Gives vampiric ability to your weapon.");
9523                 if (cast)
9524                 {
9525 #ifdef JP
9526                         msg_print("あなたの武器が血を欲している。");
9527 #else
9528                         if (!empty_hands(FALSE))
9529                                 msg_print("Your weapons want more blood now.");
9530                         else
9531                                 msg_print("Your weapon wants more blood now.");
9532 #endif
9533                 }
9534                 if (stop)
9535                 {
9536 #ifdef JP
9537                         msg_print("武器の渇望が消え去った。");
9538 #else
9539                         msg_format("Thirsty of weapon%s disappeared.", (empty_hands(FALSE)) ? "" : "s");
9540 #endif
9541                 }
9542                 break;
9543
9544         case 28:
9545                 if (name) return _("朦朧の言葉", "Word of stun");
9546                 if (desc) return _("視界内のモンスターを朦朧とさせる。", "Stuns all monsters in your sight.");
9547                 power = plev * 4;
9548                 if (info) return info_power(power);
9549                 if (cast || cont)
9550                 {
9551                         stun_monsters(power);
9552                 }
9553                 break;
9554
9555         case 29:
9556                 if (name) return _("影移動", "Moving into shadow");
9557                 if (desc) return _("モンスターの隣のマスに瞬間移動する。", "Teleports you close to a monster.");
9558                 if (cast)
9559                 {
9560                         int i, y, x, dir;
9561                         bool flag;
9562
9563                         for (i = 0; i < 3; i++)
9564                         {
9565                                 if (!tgt_pt(&x, &y)) return FALSE;
9566
9567                                 flag = FALSE;
9568
9569                                 for (dir = 0; dir < 8; dir++)
9570                                 {
9571                                         int dy = y + ddy_ddd[dir];
9572                                         int dx = x + ddx_ddd[dir];
9573                                         if (dir == 5) continue;
9574                                         if(cave[dy][dx].m_idx) flag = TRUE;
9575                                 }
9576
9577                                 if (!cave_empty_bold(y, x) || (cave[y][x].info & CAVE_ICKY) ||
9578                                         (distance(y, x, p_ptr->y, p_ptr->x) > plev + 2))
9579                                 {
9580                                         msg_print(_("そこには移動できない。", "Can not teleport to there."));
9581                                         continue;
9582                                 }
9583                                 break;
9584                         }
9585
9586                         if (flag && randint0(plev * plev / 2))
9587                         {
9588                                 teleport_player_to(y, x, 0L);
9589                         }
9590                         else
9591                         {
9592                                 msg_print(_("おっと!", "Oops!"));
9593                                 teleport_player(30, 0L);
9594                         }
9595
9596                         add = FALSE;
9597                 }
9598                 break;
9599
9600         case 30:
9601                 if (name) return _("反魔法結界", "Anti magic barrier");
9602                 if (desc) return _("視界内のモンスターの魔法を阻害するバリアを張る。", "Obstructs all magic spell of monsters in your sight.");
9603                 power = plev * 3 / 2;
9604                 if (info) return info_power(power);
9605                 if (cast)
9606                 {
9607                         msg_print(_("魔法を防ぐ呪いをかけた。", "You feel anyone can not cast spells except you."));
9608                 }
9609                 break;
9610
9611         case 31:
9612                 if (name) return _("復讐の宣告", "Revenge sentence");
9613                 if (desc) return _("数ターン後にそれまで受けたダメージに応じた威力の地獄の劫火の弾を放つ。", 
9614                         "Fires  a ball of hell fire to try revenging after few turns.");
9615                 power = p_ptr->magic_num1[2];
9616                 if (info) return info_damage(0, 0, power);
9617                 if (cast)
9618                 {
9619                         int r;
9620                         int a = 3 - (p_ptr->pspeed - 100) / 10;
9621                         r = 1 + randint1(2) + MAX(0, MIN(3, a));
9622
9623                         if (p_ptr->magic_num2[2] > 0)
9624                         {
9625                                 msg_print(_("すでに復讐は宣告済みだ。", "You already pronounced your revenge."));
9626                                 return NULL;
9627                         }
9628
9629                         p_ptr->magic_num2[1] = 2;
9630                         p_ptr->magic_num2[2] = r;
9631                         msg_format(_("あなたは復讐を宣告した。あと %d ターン。", "You pronounce your revenge. %d turns left."), r);
9632                         add = FALSE;
9633                 }
9634                 if (cont)
9635                 {
9636                         p_ptr->magic_num2[2]--;
9637
9638                         if (p_ptr->magic_num2[2] <= 0)
9639                         {
9640                                 int dir;
9641
9642                                 if (power)
9643                                 {
9644                                         command_dir = 0;
9645
9646                                         do
9647                                         {
9648                                                 msg_print(_("復讐の時だ!", "Time to revenge!"));
9649                                         }
9650                                         while (!get_aim_dir(&dir));
9651
9652                                         fire_ball(GF_HELL_FIRE, dir, power, 1);
9653
9654                                         if (p_ptr->wizard)
9655                                         {
9656                                                 msg_format(_("%d点のダメージを返した。", "You return %d damages."), power);
9657                                         }
9658                                 }
9659                                 else
9660                                 {
9661                                         msg_print(_("復讐する気が失せた。", "You are not a mood to revenge."));
9662                                 }
9663                                 p_ptr->magic_num1[2] = 0;
9664                         }
9665                 }
9666                 break;
9667         }
9668
9669         /* start casting */
9670         if ((cast) && (add))
9671         {
9672                 /* add spell */
9673                 p_ptr->magic_num1[0] |= 1L << (spell);
9674                 p_ptr->magic_num2[0]++;
9675
9676                 if (p_ptr->action != ACTION_SPELL) set_action(ACTION_SPELL);
9677         }
9678
9679         /* Redraw status */
9680         if (!info)
9681         {
9682                 p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
9683                 p_ptr->redraw |= (PR_EXTRA | PR_HP | PR_MANA);
9684         }
9685
9686         return "";
9687 }
9688
9689
9690 /*!
9691  * @brief 魔法処理のメインルーチン
9692  * @param realm 魔法領域のID
9693  * @param spell 各領域の魔法ID
9694  * @param mode 求める処理
9695  * @return 各領域魔法に各種テキストを求めた場合は文字列参照ポインタ、そうでない場合はNULLポインタを返す。
9696  */
9697 cptr do_spell(int realm, int spell, int mode)
9698 {
9699         switch (realm)
9700         {
9701         case REALM_LIFE:     return do_life_spell(spell, mode);
9702         case REALM_SORCERY:  return do_sorcery_spell(spell, mode);
9703         case REALM_NATURE:   return do_nature_spell(spell, mode);
9704         case REALM_CHAOS:    return do_chaos_spell(spell, mode);
9705         case REALM_DEATH:    return do_death_spell(spell, mode);
9706         case REALM_TRUMP:    return do_trump_spell(spell, mode);
9707         case REALM_ARCANE:   return do_arcane_spell(spell, mode);
9708         case REALM_CRAFT:    return do_craft_spell(spell, mode);
9709         case REALM_DAEMON:   return do_daemon_spell(spell, mode);
9710         case REALM_CRUSADE:  return do_crusade_spell(spell, mode);
9711         case REALM_MUSIC:    return do_music_spell(spell, mode);
9712         case REALM_HISSATSU: return do_hissatsu_spell(spell, mode);
9713         case REALM_HEX:      return do_hex_spell(spell, mode);
9714         }
9715
9716         return NULL;
9717 }