OSDN Git Service

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