OSDN Git Service

Merge remote-tracking branch 'remotes/origin/feature/Fix-Sanity-Blast-by-AutoSave...
[hengband/hengband.git] / src / realm / realm-song.c
1 #include "cmd-action/cmd-spell.h"
2 #include "core/hp-mp-processor.h"
3 #include "core/player-redraw-types.h"
4 #include "core/player-update-types.h"
5 #include "core/window-redrawer.h"
6 #include "effect/effect-characteristics.h"
7 #include "effect/effect-processor.h"
8 #include "player/attack-defense-types.h"
9 #include "player/player-class.h"
10 #include "realm/realm-song-numbers.h"
11 #include "spell-kind/earthquake.h"
12 #include "spell-kind/spells-detection.h"
13 #include "spell-kind/spells-floor.h"
14 #include "spell-kind/spells-grid.h"
15 #include "spell-kind/spells-launcher.h"
16 #include "spell-kind/spells-lite.h"
17 #include "spell-kind/spells-neighbor.h"
18 #include "spell-kind/spells-sight.h"
19 #include "spell-kind/spells-world.h"
20 #include "spell/spell-types.h"
21 #include "spell/spells-status.h"
22 #include "status/action-setter.h"
23 #include "status/bad-status-setter.h"
24 #include "status/experience.h"
25 #include "target/target-getter.h"
26 #include "view/display-messages.h"
27
28 /*!
29  * @brief 歌の開始を処理する / Start singing if the player is a Bard
30  * @param spell 領域魔法としてのID
31  * @param song 魔法効果のID
32  * @return なし
33  */
34 static void start_singing(player_type *caster_ptr, SPELL_IDX spell, MAGIC_NUM1 song)
35 {
36     /* Remember the song index */
37     SINGING_SONG_EFFECT(caster_ptr) = (MAGIC_NUM1)song;
38
39     /* Remember the index of the spell which activated the song */
40     SINGING_SONG_ID(caster_ptr) = (MAGIC_NUM2)spell;
41
42     /* Now the player is singing */
43     set_action(caster_ptr, ACTION_SING);
44
45     caster_ptr->update |= (PU_BONUS);
46     caster_ptr->redraw |= (PR_STATUS);
47 }
48
49 /*!
50  * @brief 歌の各処理を行う
51  * @param caster_ptr プレーヤーへの参照ポインタ
52  * @param spell 歌ID
53  * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST / SPELL_FAIL / SPELL_CONT / SPELL_STOP)
54  * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST / SPELL_FAIL / SPELL_CONT / SPELL_STOP 時はNULL文字列を返す。
55  */
56 concptr do_music_spell(player_type *caster_ptr, SPELL_IDX spell, spell_type mode)
57 {
58     bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
59     bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
60     bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
61     bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
62     bool fail = (mode == SPELL_FAIL) ? TRUE : FALSE;
63     bool cont = (mode == SPELL_CONT) ? TRUE : FALSE;
64     bool stop = (mode == SPELL_STOP) ? TRUE : FALSE;
65
66     DIRECTION dir;
67     PLAYER_LEVEL plev = caster_ptr->lev;
68
69     switch (spell) {
70     case 0:
71         if (name)
72             return _("遅鈍の歌", "Song of Holding");
73         if (desc)
74             return _("視界内の全てのモンスターを減速させる。抵抗されると無効。", "Attempts to slow all monsters in sight.");
75
76         /* Stop singing before start another */
77         if (cast || fail)
78             stop_singing(caster_ptr);
79
80         if (cast) {
81             msg_print(_("ゆっくりとしたメロディを口ずさみ始めた...", "You start humming a slow, steady melody..."));
82             start_singing(caster_ptr, spell, MUSIC_SLOW);
83         }
84
85         {
86             POWER power = plev;
87
88             if (info)
89                 return info_power(power);
90
91             if (cont) {
92                 slow_monsters(caster_ptr, plev);
93             }
94         }
95         break;
96
97     case 1:
98         if (name)
99             return _("祝福の歌", "Song of Blessing");
100         if (desc)
101             return _("命中率とACのボーナスを得る。", "Gives a bonus to hit and AC for a few turns.");
102
103         /* Stop singing before start another */
104         if (cast || fail)
105             stop_singing(caster_ptr);
106
107         if (cast) {
108             msg_print(_("厳かなメロディを奏で始めた...", "The holy power of the Music of the Ainur enters you..."));
109             start_singing(caster_ptr, spell, MUSIC_BLESS);
110         }
111
112         if (stop) {
113             if (!caster_ptr->blessed) {
114                 msg_print(_("高潔な気分が消え失せた。", "The prayer has expired."));
115             }
116         }
117
118         break;
119
120     case 2:
121         if (name)
122             return _("崩壊の音色", "Wrecking Note");
123         if (desc)
124             return _("轟音のボルトを放つ。", "Fires a bolt of sound.");
125
126         /* Stop singing before start another */
127         if (cast || fail)
128             stop_singing(caster_ptr);
129
130         {
131             DICE_NUMBER dice = 4 + (plev - 1) / 5;
132             DICE_SID sides = 4;
133
134             if (info)
135                 return info_damage(dice, sides, 0);
136
137             if (cast) {
138                 if (!get_aim_dir(caster_ptr, &dir))
139                     return NULL;
140
141                 fire_bolt(caster_ptr, GF_SOUND, dir, damroll(dice, sides));
142             }
143         }
144         break;
145
146     case 3:
147         if (name)
148             return _("朦朧の旋律", "Stun Pattern");
149         if (desc)
150             return _("視界内の全てのモンスターを朦朧させる。抵抗されると無効。", "Attempts to stun all monsters in sight.");
151
152         /* Stop singing before start another */
153         if (cast || fail)
154             stop_singing(caster_ptr);
155
156         if (cast) {
157             msg_print(_("眩惑させるメロディを奏で始めた...", "You weave a pattern of sounds to bewilder and daze..."));
158             start_singing(caster_ptr, spell, MUSIC_STUN);
159         }
160
161         {
162             DICE_NUMBER dice = plev / 10;
163             DICE_SID sides = 2;
164
165             if (info)
166                 return info_power_dice(dice, sides);
167
168             if (cont) {
169                 stun_monsters(caster_ptr, damroll(dice, sides));
170             }
171         }
172
173         break;
174
175     case 4:
176         if (name)
177             return _("生命の流れ", "Flow of Life");
178         if (desc)
179             return _("体力を少し回復させる。", "Heals HP a little.");
180
181         /* Stop singing before start another */
182         if (cast || fail)
183             stop_singing(caster_ptr);
184
185         if (cast) {
186             msg_print(_("歌を通して体に活気が戻ってきた...", "Life flows through you as you sing a song of healing..."));
187             start_singing(caster_ptr, spell, MUSIC_L_LIFE);
188         }
189
190         {
191             DICE_NUMBER dice = 2;
192             DICE_SID sides = 6;
193
194             if (info)
195                 return info_heal(dice, sides, 0);
196
197             if (cont) {
198                 hp_player(caster_ptr, damroll(dice, sides));
199             }
200         }
201
202         break;
203
204     case 5:
205         if (name)
206             return _("太陽の歌", "Song of the Sun");
207         if (desc)
208             return _("光源が照らしている範囲か部屋全体を永久に明るくする。", "Lights up nearby area and the inside of a room permanently.");
209
210         /* Stop singing before start another */
211         if (cast || fail)
212             stop_singing(caster_ptr);
213
214         {
215             DICE_NUMBER dice = 2;
216             DICE_SID sides = plev / 2;
217             POSITION rad = plev / 10 + 1;
218
219             if (info)
220                 return info_damage(dice, sides, 0);
221
222             if (cast) {
223                 msg_print(_("光り輝く歌が辺りを照らした。", "Your uplifting song brings brightness to dark places..."));
224                 lite_area(caster_ptr, damroll(dice, sides), rad);
225             }
226         }
227         break;
228
229     case 6:
230         if (name)
231             return _("恐怖の歌", "Song of Fear");
232         if (desc)
233             return _("視界内の全てのモンスターを恐怖させる。抵抗されると無効。", "Attempts to scare all monsters in sight.");
234
235         /* Stop singing before start another */
236         if (cast || fail)
237             stop_singing(caster_ptr);
238
239         if (cast) {
240             msg_print(_("おどろおどろしいメロディを奏で始めた...", "You start weaving a fearful pattern..."));
241             start_singing(caster_ptr, spell, MUSIC_FEAR);
242         }
243
244         {
245             POWER power = plev;
246
247             if (info)
248                 return info_power(power);
249
250             if (cont) {
251                 project_all_los(caster_ptr, GF_TURN_ALL, power);
252             }
253         }
254
255         break;
256
257     case 7:
258         if (name)
259             return _("戦いの歌", "Heroic Ballad");
260         if (desc)
261             return _("ヒーロー気分になる。", "Removes fear. Gives a bonus to hit for a while. Heals you for 10 HP.");
262
263         /* Stop singing before start another */
264         if (cast || fail)
265             stop_singing(caster_ptr);
266
267         if (cast) {
268             msg_print(_("激しい戦いの歌を歌った...", "You start singing a song of intense fighting..."));
269
270             (void)hp_player(caster_ptr, 10);
271             (void)set_afraid(caster_ptr, 0);
272
273             /* Recalculate hitpoints */
274             caster_ptr->update |= (PU_HP);
275
276             start_singing(caster_ptr, spell, MUSIC_HERO);
277         }
278
279         if (stop) {
280             if (!caster_ptr->hero) {
281                 msg_print(_("ヒーローの気分が消え失せた。", "The heroism wears off."));
282                 /* Recalculate hitpoints */
283                 caster_ptr->update |= (PU_HP);
284             }
285         }
286
287         break;
288
289     case 8:
290         if (name)
291             return _("霊的知覚", "Clairaudience");
292         if (desc)
293             return _("近くの罠/扉/"
294                      "階段を感知する。レベル15で全てのモンスター、20で財宝とアイテムを感知できるようになる。レベル25で周辺の地形を感知し、40でその階全体を永久"
295                      "に照らし、ダンジョン内のすべてのアイテムを感知する。この効果は歌い続けることで順に起こる。",
296                 "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 "
297                 "level 25. Lights and know the whole level at level 40. These effects accumulate as the song continues.");
298
299         /* Stop singing before start another */
300         if (cast || fail)
301             stop_singing(caster_ptr);
302
303         if (cast) {
304             msg_print(_("静かな音楽が感覚を研ぎ澄まさせた...", "Your quiet music sharpens your sense of hearing..."));
305             /* Hack -- Initialize the turn count */
306             SINGING_COUNT(caster_ptr) = 0;
307             start_singing(caster_ptr, spell, MUSIC_DETECT);
308         }
309
310         {
311             POSITION rad = DETECT_RAD_DEFAULT;
312
313             if (info)
314                 return info_radius(rad);
315
316             if (cont) {
317                 int count = SINGING_COUNT(caster_ptr);
318
319                 if (count >= 19)
320                     wiz_lite(caster_ptr, FALSE);
321                 if (count >= 11) {
322                     map_area(caster_ptr, rad);
323                     if (plev > 39 && count < 19)
324                         SINGING_COUNT(caster_ptr) = count + 1;
325                 }
326                 if (count >= 6) {
327                     /* There are too many hidden treasure.  So... */
328                     /* detect_treasure(rad); */
329                     detect_objects_gold(caster_ptr, rad);
330                     detect_objects_normal(caster_ptr, rad);
331
332                     if (plev > 24 && count < 11)
333                         SINGING_COUNT(caster_ptr) = count + 1;
334                 }
335                 if (count >= 3) {
336                     detect_monsters_invis(caster_ptr, rad);
337                     detect_monsters_normal(caster_ptr, rad);
338
339                     if (plev > 19 && count < A_MAX)
340                         SINGING_COUNT(caster_ptr) = count + 1;
341                 }
342                 detect_traps(caster_ptr, rad, TRUE);
343                 detect_doors(caster_ptr, rad);
344                 detect_stairs(caster_ptr, rad);
345
346                 if (plev > 14 && count < 3)
347                     SINGING_COUNT(caster_ptr) = count + 1;
348             }
349         }
350
351         break;
352
353     case 9:
354         if (name)
355             return _("魂の歌", "Soul Shriek");
356         if (desc)
357             return _("視界内の全てのモンスターに対して精神攻撃を行う。", "Damages all monsters in sight with PSI damages.");
358
359         /* Stop singing before start another */
360         if (cast || fail)
361             stop_singing(caster_ptr);
362
363         if (cast) {
364             msg_print(_("精神を捻じ曲げる歌を歌った...", "You start singing a song of soul in pain..."));
365             start_singing(caster_ptr, spell, MUSIC_PSI);
366         }
367
368         {
369             DICE_NUMBER dice = 1;
370             DICE_SID sides = plev * 3 / 2;
371
372             if (info)
373                 return info_damage(dice, sides, 0);
374
375             if (cont) {
376                 project_all_los(caster_ptr, GF_PSI, damroll(dice, sides));
377             }
378         }
379
380         break;
381
382     case 10:
383         if (name)
384             return _("知識の歌", "Song of Lore");
385         if (desc)
386             return _("自分のいるマスと隣りのマスに落ちているアイテムを鑑定する。", "Identifies all items which are in the adjacent squares.");
387
388         /* Stop singing before start another */
389         if (cast || fail)
390             stop_singing(caster_ptr);
391
392         if (cast) {
393             msg_print(_("この世界の知識が流れ込んできた...", "You recall the rich lore of the world..."));
394             start_singing(caster_ptr, spell, MUSIC_ID);
395         }
396
397         {
398             POSITION rad = 1;
399
400             if (info)
401                 return info_radius(rad);
402
403             /*
404              * 歌の開始時にも効果発動:
405              * MP不足で鑑定が発動される前に歌が中断してしまうのを防止。
406              */
407             if (cont || cast) {
408                 project(caster_ptr, 0, rad, caster_ptr->y, caster_ptr->x, 0, GF_IDENTIFY, PROJECT_ITEM, -1);
409             }
410         }
411
412         break;
413
414     case 11:
415         if (name)
416             return _("隠遁の歌", "Hiding Tune");
417         if (desc)
418             return _("隠密行動能力を上昇させる。", "Gives improved stealth.");
419
420         /* Stop singing before start another */
421         if (cast || fail)
422             stop_singing(caster_ptr);
423
424         if (cast) {
425             msg_print(_("あなたの姿が景色にとけこんでいった...", "Your song carries you beyond the sight of mortal eyes..."));
426             start_singing(caster_ptr, spell, MUSIC_STEALTH);
427         }
428
429         if (stop) {
430             if (!caster_ptr->tim_stealth) {
431                 msg_print(_("姿がはっきりと見えるようになった。", "You are no longer hidden."));
432             }
433         }
434
435         break;
436
437     case 12:
438         if (name)
439             return _("幻影の旋律", "Illusion Pattern");
440         if (desc)
441             return _("視界内の全てのモンスターを混乱させる。抵抗されると無効。", "Attempts to confuse all monsters in sight.");
442
443         /* Stop singing before start another */
444         if (cast || fail)
445             stop_singing(caster_ptr);
446
447         if (cast) {
448             msg_print(_("辺り一面に幻影が現れた...", "You weave a pattern of sounds to beguile and confuse..."));
449             start_singing(caster_ptr, spell, MUSIC_CONF);
450         }
451
452         {
453             POWER power = plev * 2;
454
455             if (info)
456                 return info_power(power);
457
458             if (cont) {
459                 confuse_monsters(caster_ptr, power);
460             }
461         }
462
463         break;
464
465     case 13:
466         if (name)
467             return _("破滅の叫び", "Doomcall");
468         if (desc)
469             return _("視界内の全てのモンスターに対して轟音攻撃を行う。", "Damages all monsters in sight with booming sound.");
470
471         /* Stop singing before start another */
472         if (cast || fail)
473             stop_singing(caster_ptr);
474
475         if (cast) {
476             msg_print(_("轟音が響いた...", "The fury of the Downfall of Numenor lashes out..."));
477             start_singing(caster_ptr, spell, MUSIC_SOUND);
478         }
479
480         {
481             DICE_NUMBER dice = 10 + plev / 5;
482             DICE_SID sides = 7;
483
484             if (info)
485                 return info_damage(dice, sides, 0);
486
487             if (cont) {
488                 project_all_los(caster_ptr, GF_SOUND, damroll(dice, sides));
489             }
490         }
491
492         break;
493
494     case 14:
495         if (name)
496             return _("フィリエルの歌", "Firiel's Song");
497         if (desc)
498             return _("周囲の死体や骨を生き返す。", "Resurrects nearby corpse and skeletons. And makes them your pets.");
499
500         {
501             /* Stop singing before start another */
502             if (cast || fail)
503                 stop_singing(caster_ptr);
504
505             if (cast) {
506                 msg_print(_("生命と復活のテーマを奏で始めた...", "The themes of life and revival are woven into your song..."));
507                 animate_dead(caster_ptr, 0, caster_ptr->y, caster_ptr->x);
508             }
509         }
510         break;
511
512     case 15:
513         if (name)
514             return _("旅の仲間", "Fellowship Chant");
515         if (desc)
516             return _("視界内の全てのモンスターを魅了する。抵抗されると無効。", "Attempts to charm all monsters in sight.");
517
518         /* Stop singing before start another */
519         if (cast || fail)
520             stop_singing(caster_ptr);
521
522         if (cast) {
523             msg_print(_("安らかなメロディを奏で始めた...", "You weave a slow, soothing melody of imploration..."));
524             start_singing(caster_ptr, spell, MUSIC_CHARM);
525         }
526
527         {
528             DICE_NUMBER dice = 10 + plev / 15;
529             DICE_SID sides = 6;
530
531             if (info)
532                 return info_power_dice(dice, sides);
533
534             if (cont) {
535                 charm_monsters(caster_ptr, damroll(dice, sides));
536             }
537         }
538
539         break;
540
541     case 16:
542         if (name)
543             return _("分解音波", "Sound of disintegration");
544         if (desc)
545             return _("壁を掘り進む。自分の足元のアイテムは蒸発する。", "Makes you be able to burrow into walls. Objects under your feet evaporate.");
546
547         /* Stop singing before start another */
548         if (cast || fail)
549             stop_singing(caster_ptr);
550
551         if (cast) {
552             msg_print(_("粉砕するメロディを奏で始めた...", "You weave a violent pattern of sounds to break wall."));
553             start_singing(caster_ptr, spell, MUSIC_WALL);
554         }
555
556         {
557             /*
558              * 歌の開始時にも効果発動:
559              * MP不足で効果が発動される前に歌が中断してしまうのを防止。
560              */
561             if (cont || cast) {
562                 project(caster_ptr, 0, 0, caster_ptr->y, caster_ptr->x, 0, GF_DISINTEGRATE, PROJECT_KILL | PROJECT_ITEM | PROJECT_HIDE, -1);
563             }
564         }
565         break;
566
567     case 17:
568         if (name)
569             return _("元素耐性", "Finrod's Resistance");
570         if (desc)
571             return _("酸、電撃、炎、冷気、毒に対する耐性を得る。装備による耐性に累積する。",
572                 "Gives resistance to fire, cold, electricity, acid and poison. These resistances can be added to those from equipment for more powerful "
573                 "resistances.");
574
575         /* Stop singing before start another */
576         if (cast || fail)
577             stop_singing(caster_ptr);
578
579         if (cast) {
580             msg_print(_("元素の力に対する忍耐の歌を歌った。", "You sing a song of perseverance against powers..."));
581             start_singing(caster_ptr, spell, MUSIC_RESIST);
582         }
583
584         if (stop) {
585             if (!caster_ptr->oppose_acid) {
586                 msg_print(_("酸への耐性が薄れた気がする。", "You feel less resistant to acid."));
587             }
588
589             if (!caster_ptr->oppose_elec) {
590                 msg_print(_("電撃への耐性が薄れた気がする。", "You feel less resistant to elec."));
591             }
592
593             if (!caster_ptr->oppose_fire) {
594                 msg_print(_("火への耐性が薄れた気がする。", "You feel less resistant to fire."));
595             }
596
597             if (!caster_ptr->oppose_cold) {
598                 msg_print(_("冷気への耐性が薄れた気がする。", "You feel less resistant to cold."));
599             }
600
601             if (!caster_ptr->oppose_pois) {
602                 msg_print(_("毒への耐性が薄れた気がする。", "You feel less resistant to pois."));
603             }
604         }
605
606         break;
607
608     case 18:
609         if (name)
610             return _("ホビットのメロディ", "Hobbit Melodies");
611         if (desc)
612             return _("加速する。", "Hastes you.");
613
614         /* Stop singing before start another */
615         if (cast || fail)
616             stop_singing(caster_ptr);
617
618         if (cast) {
619             msg_print(_("軽快な歌を口ずさみ始めた...", "You start singing joyful pop song..."));
620             start_singing(caster_ptr, spell, MUSIC_SPEED);
621         }
622
623         if (stop) {
624             if (!caster_ptr->fast) {
625                 msg_print(_("動きの素早さがなくなったようだ。", "You feel yourself slow down."));
626             }
627         }
628
629         break;
630
631     case 19:
632         if (name)
633             return _("歪んだ世界", "World Contortion");
634         if (desc)
635             return _("近くのモンスターをテレポートさせる。抵抗されると無効。", "Teleports all nearby monsters away unless resisted.");
636
637         {
638             POSITION rad = plev / 15 + 1;
639             POWER power = plev * 3 + 1;
640
641             if (info)
642                 return info_radius(rad);
643
644             /* Stop singing before start another */
645             if (cast || fail)
646                 stop_singing(caster_ptr);
647
648             if (cast) {
649                 msg_print(_("歌が空間を歪めた...", "Reality whirls wildly as you sing a dizzying melody..."));
650                 project(caster_ptr, 0, rad, caster_ptr->y, caster_ptr->x, power, GF_AWAY_ALL, PROJECT_KILL, -1);
651             }
652         }
653         break;
654
655     case 20:
656         if (name)
657             return _("退散の歌", "Dispelling chant");
658         if (desc)
659             return _("視界内の全てのモンスターにダメージを与える。邪悪なモンスターに特に大きなダメージを与える。",
660                 "Damages all monsters in sight. Hurts evil monsters greatly.");
661
662         /* Stop singing before start another */
663         if (cast || fail)
664             stop_singing(caster_ptr);
665
666         if (cast) {
667             msg_print(_("耐えられない不協和音が敵を責め立てた...", "You cry out in an ear-wracking voice..."));
668             start_singing(caster_ptr, spell, MUSIC_DISPEL);
669         }
670
671         {
672             DICE_SID m_sides = plev * 3;
673             DICE_SID e_sides = plev * 3;
674
675             if (info)
676                 return format("%s1d%d+1d%d", KWD_DAM, m_sides, e_sides);
677
678             if (cont) {
679                 dispel_monsters(caster_ptr, randint1(m_sides));
680                 dispel_evil(caster_ptr, randint1(e_sides));
681             }
682         }
683         break;
684
685     case 21:
686         if (name)
687             return _("サルマンの甘言", "The Voice of Saruman");
688         if (desc)
689             return _("視界内の全てのモンスターを減速させ、眠らせようとする。抵抗されると無効。", "Attempts to slow and put to sleep all monsters in sight.");
690
691         /* Stop singing before start another */
692         if (cast || fail)
693             stop_singing(caster_ptr);
694
695         if (cast) {
696             msg_print(_("優しく、魅力的な歌を口ずさみ始めた...", "You start humming a gentle and attractive song..."));
697             start_singing(caster_ptr, spell, MUSIC_SARUMAN);
698         }
699
700         {
701             POWER power = plev;
702
703             if (info)
704                 return info_power(power);
705
706             if (cont) {
707                 slow_monsters(caster_ptr, plev);
708                 sleep_monsters(caster_ptr, plev);
709             }
710         }
711
712         break;
713
714     case 22:
715         if (name)
716             return _("嵐の音色", "Song of the Tempest");
717         if (desc)
718             return _("轟音のビームを放つ。", "Fires a beam of sound.");
719
720         {
721             DICE_NUMBER dice = 15 + (plev - 1) / 2;
722             DICE_SID sides = 10;
723
724             if (info)
725                 return info_damage(dice, sides, 0);
726
727             /* Stop singing before start another */
728             if (cast || fail)
729                 stop_singing(caster_ptr);
730
731             if (cast) {
732                 if (!get_aim_dir(caster_ptr, &dir))
733                     return NULL;
734
735                 fire_beam(caster_ptr, GF_SOUND, dir, damroll(dice, sides));
736             }
737         }
738         break;
739
740     case 23:
741         if (name)
742             return _("もう一つの世界", "Ambarkanta");
743         if (desc)
744             return _("現在の階を再構成する。", "Recreates current dungeon level.");
745
746         {
747             int base = 15;
748             DICE_SID sides = 20;
749
750             if (info)
751                 return info_delay(base, sides);
752
753             /* Stop singing before start another */
754             if (cast || fail)
755                 stop_singing(caster_ptr);
756
757             if (cast) {
758                 msg_print(_("周囲が変化し始めた...", "You sing of the primeval shaping of Middle-earth..."));
759                 reserve_alter_reality(caster_ptr, randint0(sides) + base);
760             }
761         }
762         break;
763
764     case 24:
765         if (name)
766             return _("破壊の旋律", "Wrecking Pattern");
767         if (desc)
768             return _(
769                 "周囲のダンジョンを揺らし、壁と床をランダムに入れ変える。", "Shakes dungeon structure, and results in random swapping of floors and walls.");
770
771         /* Stop singing before start another */
772         if (cast || fail)
773             stop_singing(caster_ptr);
774
775         if (cast) {
776             msg_print(_("破壊的な歌が響きわたった...", "You weave a pattern of sounds to contort and shatter..."));
777             start_singing(caster_ptr, spell, MUSIC_QUAKE);
778         }
779
780         {
781             POSITION rad = 10;
782
783             if (info)
784                 return info_radius(rad);
785
786             if (cont) {
787                 earthquake(caster_ptr, caster_ptr->y, caster_ptr->x, 10, 0);
788             }
789         }
790
791         break;
792
793     case 25:
794         if (name)
795             return _("停滞の歌", "Stationary Shriek");
796         if (desc)
797             return _("視界内の全てのモンスターを麻痺させようとする。抵抗されると無効。", "Attempts to freeze all monsters in sight.");
798
799         /* Stop singing before start another */
800         if (cast || fail)
801             stop_singing(caster_ptr);
802
803         if (cast) {
804             msg_print(_("ゆっくりとしたメロディを奏で始めた...", "You weave a very slow pattern which is almost likely to stop..."));
805             start_singing(caster_ptr, spell, MUSIC_STASIS);
806         }
807
808         {
809             POWER power = plev * 4;
810
811             if (info)
812                 return info_power(power);
813
814             if (cont) {
815                 stasis_monsters(caster_ptr, power);
816             }
817         }
818
819         break;
820
821     case 26:
822         if (name)
823             return _("守りの歌", "Endurance");
824         if (desc)
825             return _("自分のいる床の上に、モンスターが通り抜けたり召喚されたりすることができなくなるルーンを描く。",
826                 "Sets a glyph on the floor beneath you. If you are on a glyph, monsters cannot attack you but can try to break the glyph.");
827
828         {
829             /* Stop singing before start another */
830             if (cast || fail)
831                 stop_singing(caster_ptr);
832
833             if (cast) {
834                 msg_print(_("歌が神聖な場を作り出した...", "The holy power of the Music is creating sacred field..."));
835                 warding_glyph(caster_ptr);
836             }
837         }
838         break;
839
840     case 27:
841         if (name)
842             return _("英雄の詩", "The Hero's Poem");
843         if (desc)
844             return _("加速し、ヒーロー気分になり、視界内の全てのモンスターにダメージを与える。", "Hastes you. Gives heroism. Damages all monsters in sight.");
845
846         /* Stop singing before start another */
847         if (cast || fail)
848             stop_singing(caster_ptr);
849
850         if (cast) {
851             msg_print(_("英雄の歌を口ずさんだ...", "You chant a powerful, heroic call to arms..."));
852             (void)hp_player(caster_ptr, 10);
853             (void)set_afraid(caster_ptr, 0);
854
855             /* Recalculate hitpoints */
856             caster_ptr->update |= (PU_HP);
857
858             start_singing(caster_ptr, spell, MUSIC_SHERO);
859         }
860
861         if (stop) {
862             if (!caster_ptr->hero) {
863                 msg_print(_("ヒーローの気分が消え失せた。", "The heroism wears off."));
864                 /* Recalculate hitpoints */
865                 caster_ptr->update |= (PU_HP);
866             }
867
868             if (!caster_ptr->fast) {
869                 msg_print(_("動きの素早さがなくなったようだ。", "You feel yourself slow down."));
870             }
871         }
872
873         {
874             DICE_NUMBER dice = 1;
875             DICE_SID sides = plev * 3;
876
877             if (info)
878                 return info_damage(dice, sides, 0);
879
880             if (cont) {
881                 dispel_monsters(caster_ptr, damroll(dice, sides));
882             }
883         }
884         break;
885
886     case 28:
887         if (name)
888             return _("ヤヴァンナの助け", "Relief of Yavanna");
889         if (desc)
890             return _("強力な回復の歌で、負傷と朦朧状態も全快する。", "Powerful healing song. Also completely heals cuts and being stunned.");
891
892         /* Stop singing before start another */
893         if (cast || fail)
894             stop_singing(caster_ptr);
895
896         if (cast) {
897             msg_print(_("歌を通して体に活気が戻ってきた...", "Life flows through you as you sing the song..."));
898             start_singing(caster_ptr, spell, MUSIC_H_LIFE);
899         }
900
901         {
902             DICE_NUMBER dice = 15;
903             DICE_SID sides = 10;
904
905             if (info)
906                 return info_heal(dice, sides, 0);
907
908             if (cont) {
909                 hp_player(caster_ptr, damroll(dice, sides));
910                 set_stun(caster_ptr, 0);
911                 set_cut(caster_ptr, 0);
912             }
913         }
914
915         break;
916
917     case 29:
918         if (name)
919             return _("再生の歌", "Goddess' rebirth");
920         if (desc)
921             return _("すべてのステータスと経験値を回復する。", "Restores all stats and experience.");
922
923         {
924             /* Stop singing before start another */
925             if (cast || fail)
926                 stop_singing(caster_ptr);
927
928             if (cast) {
929                 msg_print(
930                     _("暗黒の中に光と美をふりまいた。体が元の活力を取り戻した。", "You strew light and beauty in the dark as you sing. You feel refreshed."));
931                 (void)restore_all_status(caster_ptr);
932                 (void)restore_level(caster_ptr);
933             }
934         }
935         break;
936
937     case 30:
938         if (name)
939             return _("サウロンの魔術", "Wizardry of Sauron");
940         if (desc)
941             return _("非常に強力でごく小さい轟音の球を放つ。", "Fires an extremely powerful tiny ball of sound.");
942
943         {
944             DICE_NUMBER dice = 50 + plev;
945             DICE_SID sides = 10;
946             POSITION rad = 0;
947
948             if (info)
949                 return info_damage(dice, sides, 0);
950
951             /* Stop singing before start another */
952             if (cast || fail)
953                 stop_singing(caster_ptr);
954
955             if (cast) {
956                 if (!get_aim_dir(caster_ptr, &dir))
957                     return NULL;
958
959                 fire_ball(caster_ptr, GF_SOUND, dir, damroll(dice, sides), rad);
960             }
961         }
962         break;
963
964     case 31:
965         if (name)
966             return _("フィンゴルフィンの挑戦", "Fingolfin's Challenge");
967         if (desc)
968             return _("ダメージを受けなくなるバリアを張る。", "Generates a barrier which completely protects you from almost all damage.");
969
970         /* Stop singing before start another */
971         if (cast || fail)
972             stop_singing(caster_ptr);
973
974         if (cast) {
975             msg_print(_("フィンゴルフィンの冥王への挑戦を歌った...", "You recall the valor of Fingolfin's challenge to the Dark Lord..."));
976
977             caster_ptr->redraw |= (PR_MAP);
978             caster_ptr->update |= (PU_MONSTERS);
979             caster_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
980
981             start_singing(caster_ptr, spell, MUSIC_INVULN);
982         }
983
984         if (stop) {
985             if (!caster_ptr->invuln) {
986                 msg_print(_("無敵ではなくなった。", "The invulnerability wears off."));
987
988                 caster_ptr->redraw |= (PR_MAP);
989                 caster_ptr->update |= (PU_MONSTERS);
990                 caster_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
991             }
992         }
993
994         break;
995     }
996
997     return "";
998 }