OSDN Git Service

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