OSDN Git Service

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