OSDN Git Service

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