OSDN Git Service

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