OSDN Git Service

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