OSDN Git Service

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