OSDN Git Service

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