OSDN Git Service

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