OSDN Git Service

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