OSDN Git Service

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