OSDN Git Service

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