OSDN Git Service

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