OSDN Git Service

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