OSDN Git Service

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