OSDN Git Service

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