OSDN Git Service

モンスター対モンスターの魔法ターゲット選択時に自分自身を選んでしまう
[hengband/hengband.git] / src / mspells2.c
1 /* File: mspells2.c */
2
3 /*
4  * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
5  *
6  * This software may be copied and distributed for educational, research,
7  * and not for profit purposes provided that this copyright and statement
8  * are included in all such copies.  Other copyrights may also apply.
9  */
10
11 /* Purpose: Monster spells (attack monster) */
12
13 #include "angband.h"
14
15
16 /*
17  * Monster casts a breath (or ball) attack at another monster.
18  * Pass over any monsters that may be in the way
19  * Affect grids, objects, monsters, and the player
20  */
21 static void monst_breath_monst(int m_idx, int y, int x, int typ, int dam_hp, int rad, bool breath, int monspell, bool learnable)
22 {
23         int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
24
25         monster_type *m_ptr = &m_list[m_idx];
26         monster_race *r_ptr = &r_info[m_ptr->r_idx];
27
28         /* Determine the radius of the blast */
29         if (rad < 1 && breath) rad = (r_ptr->flags2 & RF2_POWERFUL) ? 3 : 2;
30
31         /* Handle breath attacks */
32         if (breath) rad = 0 - rad;
33
34         switch (typ)
35         {
36         case GF_ROCKET:
37                 flg |= PROJECT_STOP;
38                 break;
39         case GF_DRAIN_MANA:
40         case GF_MIND_BLAST:
41         case GF_BRAIN_SMASH:
42         case GF_CAUSE_1:
43         case GF_CAUSE_2:
44         case GF_CAUSE_3:
45         case GF_CAUSE_4:
46         case GF_HAND_DOOM:
47                 flg |= (PROJECT_HIDE | PROJECT_AIMED);
48                 break;
49         }
50
51         (void)project(m_idx, rad, y, x, dam_hp, typ, flg, (learnable ? monspell : -1));
52 }
53
54
55 /*
56  * Monster casts a bolt at another monster
57  * Stop if we hit a monster
58  * Affect monsters and the player
59  */
60 static void monst_bolt_monst(int m_idx, int y, int x, int typ, int dam_hp, int monspell, bool learnable)
61 {
62         int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
63
64         (void)project(m_idx, 0, y, x, dam_hp, typ, flg, (learnable ? monspell : -1));
65 }
66
67 static void monst_beam_monst(int m_idx, int y, int x, int typ, int dam_hp, int monspell, bool learnable)
68 {
69         int flg = PROJECT_BEAM | PROJECT_KILL | PROJECT_THRU;
70
71         (void)project(m_idx, 0, y, x, dam_hp, typ, flg, (learnable ? monspell : -1));
72 }
73
74 /*
75  * Determine if a beam spell will hit the target.
76  */
77 static bool direct_beam(int y1, int x1, int y2, int x2, monster_type *m_ptr)
78 {
79         bool hit2 = FALSE;
80         int i, y, x;
81
82         int grid_n = 0;
83         u16b grid_g[512];
84
85         bool friend = is_pet(m_ptr);
86
87         /* Check the projection path */
88         grid_n = project_path(grid_g, MAX_RANGE, y1, x1, y2, x2, PROJECT_THRU);
89
90         /* No grid is ever projectable from itself */
91         if (!grid_n) return (FALSE);
92
93         for (i = 0; i < grid_n; i++)
94         {
95                 y = GRID_Y(grid_g[i]);
96                 x = GRID_X(grid_g[i]);
97
98                 if (y == y2 && x == x2)
99                         hit2 = TRUE;
100                 else if (friend && cave[y][x].m_idx > 0 &&
101                          !are_enemies(m_ptr, &m_list[cave[y][x].m_idx]))
102                 {
103                         /* Friends don't shoot friends */
104                         return FALSE;
105                 }
106
107                 if (friend && player_bold(y, x))
108                         return FALSE;
109         }
110         if (!hit2)
111                 return FALSE;
112         return TRUE;
113 }
114
115 static bool breath_direct(int y1, int x1, int y2, int x2, int rad, int typ, bool friend)
116 {
117         /* Must be the same as projectable() */
118
119         int i;
120
121         /* Initial grid */
122         int y = y1;
123         int x = x1;
124
125         int grid_n = 0;
126         u16b grid_g[512];
127
128         int grids = 0;
129         byte gx[1024], gy[1024];
130         byte gm[32];
131         int gm_rad = rad;
132
133         bool hit2 = FALSE;
134         bool hityou = FALSE;
135
136         int flg;
137
138         switch (typ)
139         {
140         case GF_LITE:
141         case GF_LITE_WEAK:
142                 flg = PROJECT_LOS;
143                 break;
144         case GF_DISINTEGRATE:
145                 flg = PROJECT_DISI;
146                 break;
147         default:
148                 flg = 0;
149                 break;
150         }
151
152         /* Check the projection path */
153         grid_n = project_path(grid_g, MAX_RANGE, y1, x1, y2, x2, flg);
154
155         /* Project along the path */
156         for (i = 0; i < grid_n; ++i)
157         {
158                 int ny = GRID_Y(grid_g[i]);
159                 int nx = GRID_X(grid_g[i]);
160
161                 if (flg & PROJECT_DISI)
162                 {
163                         /* Hack -- Balls explode before reaching walls */
164                         if (cave_stop_disintegration(ny, nx)) break;
165                 }
166                 else if (flg & PROJECT_LOS)
167                 {
168                         /* Hack -- Balls explode before reaching walls */
169                         if (!cave_los_bold(ny, nx)) break;
170                 }
171                 else
172                 {
173                         /* Hack -- Balls explode before reaching walls */
174                         if (!cave_have_flag_bold(ny, nx, FF_PROJECT)) break;
175                 }
176
177                 /* Save the "blast epicenter" */
178                 y = ny;
179                 x = nx;
180         }
181
182         grid_n = i;
183
184         if (!grid_n)
185         {
186                 if (flg & PROJECT_DISI)
187                 {
188                         if (in_disintegration_range(y1, x1, y2, x2) && (distance(y1, x1, y2, x2) <= rad)) hit2 = TRUE;
189                         if (in_disintegration_range(y1, x1, py, px) && (distance(y1, x1, py, px) <= rad)) hityou = TRUE;
190                 }
191                 else if (flg & PROJECT_LOS)
192                 {
193                         if (los(y1, x1, y2, x2) && (distance(y1, x1, y2, x2) <= rad)) hit2 = TRUE;
194                         if (los(y1, x1, py, px) && (distance(y1, x1, py, px) <= rad)) hityou = TRUE;
195                 }
196                 else
197                 {
198                         if (projectable(y1, x1, y2, x2) && (distance(y1, x1, y2, x2) <= rad)) hit2 = TRUE;
199                         if (projectable(y1, x1, py, px) && (distance(y1, x1, py, px) <= rad)) hityou = TRUE;
200                 }
201         }
202         else
203         {
204                 breath_shape(grid_g, grid_n, &grids, gx, gy, gm, &gm_rad, rad, y1, x1, y, x, typ);
205
206                 for (i = 0; i < grids; i++)
207                 {
208                         /* Extract the location */
209                         y = gy[i];
210                         x = gx[i];
211
212                         if ((y == y2) && (x == x2)) hit2 = TRUE;
213                         if (player_bold(y, x)) hityou = TRUE;
214                 }
215         }
216
217         if (!hit2) return FALSE;
218         if (friend && hityou) return FALSE;
219
220         return TRUE;
221 }
222
223 /*
224  * Get the actual center point of ball spells (rad > 1) (originally from TOband)
225  */
226 void get_project_point(int sy, int sx, int *ty, int *tx, int flg)
227 {
228         u16b path_g[128];
229         int  path_n, i;
230
231         path_n = project_path(path_g, MAX_RANGE, sy, sx, *ty, *tx, flg);
232
233         *ty = sy;
234         *tx = sx;
235
236         /* Project along the path */
237         for (i = 0; i < path_n; i++)
238         {
239                 sy = GRID_Y(path_g[i]);
240                 sx = GRID_X(path_g[i]);
241
242                 /* Hack -- Balls explode before reaching walls */
243                 if (!cave_have_flag_bold(sy, sx, FF_PROJECT)) break;
244
245                 *ty = sy;
246                 *tx = sx;
247         }
248 }
249
250 /*
251  * Monster tries to 'cast a spell' (or breath, etc)
252  * at another monster.
253  *
254  * The player is only disturbed if able to be affected by the spell.
255  */
256 bool monst_spell_monst(int m_idx)
257 {
258         int y = 0, x = 0;
259         int i, k, t_idx = 0;
260         int thrown_spell, count = 0;
261         int rlev;
262         int dam = 0;
263         int start;
264         int plus = 1;
265         u32b u_mode = 0L;
266         int s_num_6 = (easy_band ? 2 : 6);
267         int s_num_4 = (easy_band ? 1 : 4);
268
269         byte spell[96], num = 0;
270
271         char m_name[160];
272         char t_name[160];
273
274 #ifndef JP
275         char m_poss[160];
276 #endif
277
278         monster_type *m_ptr = &m_list[m_idx];
279         monster_type *t_ptr = NULL;
280
281         monster_race *r_ptr = &r_info[m_ptr->r_idx];
282         monster_race *tr_ptr = NULL;
283
284         u32b f4, f5, f6;
285
286         bool wake_up = FALSE;
287         bool fear = FALSE;
288
289         bool blind = (p_ptr->blind ? TRUE : FALSE);
290
291         bool see_m = is_seen(m_ptr);
292         bool maneable = player_has_los_bold(m_ptr->fy, m_ptr->fx);
293         bool learnable = (m_ptr->ml && maneable && !world_monster);
294         bool see_t;
295         bool see_either;
296         bool known;
297
298         bool pet = is_pet(m_ptr);
299
300         bool in_no_magic_dungeon = (d_info[dungeon_type].flags1 & DF1_NO_MAGIC) && dun_level
301                 && (!p_ptr->inside_quest || is_fixed_quest_idx(p_ptr->inside_quest));
302
303         bool can_use_lite_area = FALSE;
304
305         bool can_remember;
306
307         bool resists_tele = FALSE;
308
309         /* Prepare flags for summoning */
310         if (!pet) u_mode |= PM_ALLOW_UNIQUE;
311
312         /* Cannot cast spells when confused */
313         if (MON_CONFUSED(m_ptr)) return (FALSE);
314
315         /* Extract the racial spell flags */
316         f4 = r_ptr->flags4;
317         f5 = r_ptr->flags5;
318         f6 = r_ptr->flags6;
319
320         /* Target is given for pet? */
321         if (pet_t_m_idx && pet)
322         {
323                 t_idx = pet_t_m_idx;
324                 t_ptr = &m_list[t_idx];
325
326                 /* Cancel if not projectable (for now) */
327                 if ((m_idx == t_idx) || !projectable(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx))
328                 {
329                         t_idx = 0;
330                 }
331         }
332
333         /* Is there counter attack target? */
334         if (!t_idx && m_ptr->target_y)
335         {
336                 t_idx = cave[m_ptr->target_y][m_ptr->target_x].m_idx;
337
338                 if (t_idx)
339                 {
340                         t_ptr = &m_list[t_idx];
341
342                         /* Cancel if neither enemy nor a given target */
343                         if ((m_idx == t_idx) ||
344                             ((t_idx != pet_t_m_idx) && !are_enemies(m_ptr, t_ptr)))
345                         {
346                                 t_idx = 0;
347                         }
348
349                         /* Allow only summoning etc.. if not projectable */
350                         else if (!projectable(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx))
351                         {
352                                 f4 &= (RF4_INDIRECT_MASK);
353                                 f5 &= (RF5_INDIRECT_MASK);
354                                 f6 &= (RF6_INDIRECT_MASK);
355                         }
356                 }
357         }
358
359         /* Look for enemies normally */
360         if (!t_idx)
361         {
362                 bool success = FALSE;
363
364                 if (p_ptr->inside_battle)
365                 {
366                         start = randint1(m_max-1) + m_max;
367                         if (randint0(2)) plus = -1;
368                 }
369                 else start = m_max + 1;
370
371                 /* Scan thru all monsters */
372                 for (i = start; ((i < start + m_max) && (i > start - m_max)); i += plus)
373                 {
374                         int dummy = (i % m_max);
375                         if (!dummy) continue;
376
377                         t_idx = dummy;
378                         t_ptr = &m_list[t_idx];
379
380                         /* Skip dead monsters */
381                         if (!t_ptr->r_idx) continue;
382
383                         /* Monster must be 'an enemy' */
384                         if ((m_idx == t_idx) || !are_enemies(m_ptr, t_ptr)) continue;
385
386                         /* Monster must be projectable */
387                         if (!projectable(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx)) continue;
388
389                         /* Get it */
390                         success = TRUE;
391                         break;
392                 }
393
394                 /* No enemy found */
395                 if (!success) return FALSE;
396         }
397
398
399         /* OK -- we've got a target */
400         y = t_ptr->fy;
401         x = t_ptr->fx;
402         tr_ptr = &r_info[t_ptr->r_idx];
403
404         /* Forget old counter attack target */
405         reset_target(m_ptr);
406
407         /* Extract the monster level */
408         rlev = ((r_ptr->level >= 1) ? r_ptr->level : 1);
409
410         /* Remove unimplemented spells */
411         f4 &= ~(RF4_DISPEL);
412         f6 &= ~(RF6_WORLD | RF6_TRAPS | RF6_FORGET);
413
414         /* Remove unimplemented special moves */
415         if (f6 & RF6_SPECIAL)
416         {
417                 if ((m_ptr->r_idx != MON_ROLENTO) && (r_ptr->d_char != 'B'))
418                         f6 &= ~(RF6_SPECIAL);
419         }
420
421         if (f6 & RF6_DARKNESS)
422         {
423                 bool vs_ninja = (p_ptr->pclass == CLASS_NINJA) && !is_hostile(t_ptr);
424
425                 if (vs_ninja &&
426                     !(r_ptr->flags3 & (RF3_UNDEAD | RF3_HURT_LITE)) &&
427                     !(r_ptr->flags7 & RF7_DARK_MASK))
428                         can_use_lite_area = TRUE;
429
430                 if (!(r_ptr->flags2 & RF2_STUPID))
431                 {
432                         if (d_info[dungeon_type].flags1 & DF1_DARKNESS) f6 &= ~(RF6_DARKNESS);
433                         else if (vs_ninja && !can_use_lite_area) f6 &= ~(RF6_DARKNESS);
434                 }
435         }
436
437         if (in_no_magic_dungeon && !(r_ptr->flags2 & RF2_STUPID))
438         {
439                 f4 &= (RF4_NOMAGIC_MASK);
440                 f5 &= (RF5_NOMAGIC_MASK);
441                 f6 &= (RF6_NOMAGIC_MASK);
442         }
443
444         if (p_ptr->inside_arena || p_ptr->inside_battle)
445         {
446                 f4 &= ~(RF4_SUMMON_MASK);
447                 f5 &= ~(RF5_SUMMON_MASK);
448                 f6 &= ~(RF6_SUMMON_MASK | RF6_TELE_LEVEL);
449
450                 if (m_ptr->r_idx == MON_ROLENTO) f6 &= ~(RF6_SPECIAL);
451         }
452
453         if (p_ptr->inside_battle && !one_in_(3))
454         {
455                 f6 &= ~(RF6_HEAL);
456         }
457
458         if (m_idx == p_ptr->riding)
459         {
460                 f4 &= ~(RF4_RIDING_MASK);
461                 f5 &= ~(RF5_RIDING_MASK);
462                 f6 &= ~(RF6_RIDING_MASK);
463         }
464
465         if (pet)
466         {
467                 f4 &= ~(RF4_SHRIEK);
468                 f6 &= ~(RF6_DARKNESS | RF6_TRAPS);
469
470                 if (!(p_ptr->pet_extra_flags & PF_TELEPORT))
471                 {
472                         f6 &= ~(RF6_BLINK | RF6_TPORT | RF6_TELE_TO | RF6_TELE_AWAY | RF6_TELE_LEVEL);
473                 }
474
475                 if (!(p_ptr->pet_extra_flags & PF_ATTACK_SPELL))
476                 {
477                         f4 &= ~(RF4_ATTACK_MASK);
478                         f5 &= ~(RF5_ATTACK_MASK);
479                         f6 &= ~(RF6_ATTACK_MASK);
480                 }
481
482                 if (!(p_ptr->pet_extra_flags & PF_SUMMON_SPELL))
483                 {
484                         f4 &= ~(RF4_SUMMON_MASK);
485                         f5 &= ~(RF5_SUMMON_MASK);
486                         f6 &= ~(RF6_SUMMON_MASK);
487                 }
488
489                 /* Prevent collateral damage */
490                 if (!(p_ptr->pet_extra_flags & PF_BALL_SPELL) && (m_idx != p_ptr->riding))
491                 {
492                         if ((f4 & (RF4_BALL_MASK & ~(RF4_ROCKET))) ||
493                             (f5 & RF5_BALL_MASK) ||
494                             (f6 & RF6_BALL_MASK))
495                         {
496                                 int real_y = y;
497                                 int real_x = x;
498
499                                 get_project_point(m_ptr->fy, m_ptr->fx, &real_y, &real_x, 0L);
500
501                                 if (projectable(real_y, real_x, py, px))
502                                 {
503                                         int dist = distance(real_y, real_x, py, px);
504
505                                         if (dist <= 2)
506                                         {
507                                                 f4 &= ~(RF4_BALL_MASK & ~(RF4_ROCKET));
508                                                 f5 &= ~(RF5_BALL_MASK);
509                                                 f6 &= ~(RF6_BALL_MASK);
510                                         }
511                                         else if (dist <= 4)
512                                         {
513                                                 f4 &= ~(RF4_BIG_BALL_MASK);
514                                                 f5 &= ~(RF5_BIG_BALL_MASK);
515                                                 f6 &= ~(RF6_BIG_BALL_MASK);
516                                         }
517                                 }
518                                 else if (f5 & RF5_BA_LITE)
519                                 {
520                                         if ((distance(real_y, real_x, py, px) <= 4) && los(real_y, real_x, py, px))
521                                                 f5 &= ~(RF5_BA_LITE);
522                                 }
523                         }
524
525                         if (f4 & RF4_ROCKET)
526                         {
527                                 int real_y = y;
528                                 int real_x = x;
529
530                                 get_project_point(m_ptr->fy, m_ptr->fx, &real_y, &real_x, PROJECT_STOP);
531                                 if (projectable(real_y, real_x, py, px) && (distance(real_y, real_x, py, px) <= 2))
532                                         f4 &= ~(RF4_ROCKET);
533                         }
534
535                         if (((f4 & RF4_BEAM_MASK) ||
536                              (f5 & RF5_BEAM_MASK) ||
537                              (f6 & RF6_BEAM_MASK)) &&
538                             !direct_beam(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx, m_ptr))
539                         {
540                                 f4 &= ~(RF4_BEAM_MASK);
541                                 f5 &= ~(RF5_BEAM_MASK);
542                                 f6 &= ~(RF6_BEAM_MASK);
543                         }
544
545                         if ((f4 & RF4_BREATH_MASK) ||
546                             (f5 & RF5_BREATH_MASK) ||
547                             (f6 & RF6_BREATH_MASK))
548                         {
549                                 /* Expected breath radius */
550                                 int rad = (r_ptr->flags2 & RF2_POWERFUL) ? 3 : 2;
551
552                                 if (!breath_direct(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx, rad, 0, TRUE))
553                                 {
554                                         f4 &= ~(RF4_BREATH_MASK);
555                                         f5 &= ~(RF5_BREATH_MASK);
556                                         f6 &= ~(RF6_BREATH_MASK);
557                                 }
558                                 else if ((f4 & RF4_BR_LITE) &&
559                                          !breath_direct(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx, rad, GF_LITE, TRUE))
560                                 {
561                                         f4 &= ~(RF4_BR_LITE);
562                                 }
563                                 else if ((f4 & RF4_BR_DISI) &&
564                                          !breath_direct(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx, rad, GF_DISINTEGRATE, TRUE))
565                                 {
566                                         f4 &= ~(RF4_BR_DISI);
567                                 }
568                         }
569                 }
570
571                 /* Special moves restriction */
572                 if (f6 & RF6_SPECIAL)
573                 {
574                         if (m_ptr->r_idx == MON_ROLENTO)
575                         {
576                                 if ((p_ptr->pet_extra_flags & (PF_ATTACK_SPELL | PF_SUMMON_SPELL)) != (PF_ATTACK_SPELL | PF_SUMMON_SPELL))
577                                         f6 &= ~(RF6_SPECIAL);
578                         }
579                         else if (r_ptr->d_char == 'B')
580                         {
581                                 if ((p_ptr->pet_extra_flags & (PF_ATTACK_SPELL | PF_TELEPORT)) != (PF_ATTACK_SPELL | PF_TELEPORT))
582                                         f6 &= ~(RF6_SPECIAL);
583                         }
584                         else f6 &= ~(RF6_SPECIAL);
585                 }
586         }
587
588         /* Remove some spells if necessary */
589
590         if (!(r_ptr->flags2 & RF2_STUPID))
591         {
592                 /* Check for a clean bolt shot */
593                 if (((f4 & RF4_BOLT_MASK) ||
594                      (f5 & RF5_BOLT_MASK) ||
595                      (f6 & RF6_BOLT_MASK)) &&
596                     !clean_shot(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx, pet))
597                 {
598                         f4 &= ~(RF4_BOLT_MASK);
599                         f5 &= ~(RF5_BOLT_MASK);
600                         f6 &= ~(RF6_BOLT_MASK);
601                 }
602
603                 /* Check for a possible summon */
604                 if (((f4 & RF4_SUMMON_MASK) ||
605                      (f5 & RF5_SUMMON_MASK) ||
606                      (f6 & RF6_SUMMON_MASK)) &&
607                     !(summon_possible(t_ptr->fy, t_ptr->fx)))
608                 {
609                         /* Remove summoning spells */
610                         f4 &= ~(RF4_SUMMON_MASK);
611                         f5 &= ~(RF5_SUMMON_MASK);
612                         f6 &= ~(RF6_SUMMON_MASK);
613                 }
614
615                 /* Check for a possible raise dead */
616                 if ((f6 & RF6_RAISE_DEAD) && !raise_possible(m_ptr))
617                 {
618                         /* Remove raise dead spell */
619                         f6 &= ~(RF6_RAISE_DEAD);
620                 }
621
622                 /* Special moves restriction */
623                 if (f6 & RF6_SPECIAL)
624                 {
625                         if ((m_ptr->r_idx == MON_ROLENTO) && !summon_possible(t_ptr->fy, t_ptr->fx))
626                         {
627                                 f6 &= ~(RF6_SPECIAL);
628                         }
629                 }
630         }
631
632         if (r_ptr->flags2 & RF2_SMART)
633         {
634                 /* Hack -- allow "desperate" spells */
635                 if ((m_ptr->hp < m_ptr->maxhp / 10) &&
636                     (randint0(100) < 50))
637                 {
638                         /* Require intelligent spells */
639                         f4 &= (RF4_INT_MASK);
640                         f5 &= (RF5_INT_MASK);
641                         f6 &= (RF6_INT_MASK);
642                 }
643
644                 /* Hack -- decline "teleport level" in some case */
645                 if ((f6 & RF6_TELE_LEVEL) && TELE_LEVEL_IS_INEFF((t_idx == p_ptr->riding) ? 0 : t_idx))
646                 {
647                         f6 &= ~(RF6_TELE_LEVEL);
648                 }
649         }
650
651         /* No spells left */
652         if (!f4 && !f5 && !f6) return FALSE;
653
654         /* Extract the "inate" spells */
655         for (k = 0; k < 32; k++)
656         {
657                 if (f4 & (1L << k)) spell[num++] = k + 32 * 3;
658         }
659
660         /* Extract the "normal" spells */
661         for (k = 0; k < 32; k++)
662         {
663                 if (f5 & (1L << k)) spell[num++] = k + 32 * 4;
664         }
665
666         /* Extract the "bizarre" spells */
667         for (k = 0; k < 32; k++)
668         {
669                 if (f6 & (1L << k)) spell[num++] = k + 32 * 5;
670         }
671
672         /* No spells left */
673         if (!num) return (FALSE);
674
675         /* Stop if player is dead or gone */
676         if (!p_ptr->playing || p_ptr->is_dead) return (FALSE);
677
678         /* Handle "leaving" */
679         if (p_ptr->leaving) return (FALSE);
680
681         /* Get the monster name (or "it") */
682         monster_desc(m_name, m_ptr, 0x00);
683
684 #ifndef JP
685         /* Get the monster possessive ("his"/"her"/"its") */
686         monster_desc(m_poss, m_ptr, MD_PRON_VISIBLE | MD_POSSESSIVE);
687 #endif
688
689         /* Get the target's name (or "it") */
690         monster_desc(t_name, t_ptr, 0x00);
691
692         /* Choose a spell to cast */
693         thrown_spell = spell[randint0(num)];
694
695         see_t = is_seen(t_ptr);
696         see_either = (see_m || see_t);
697
698         /* Can the player be aware of this attack? */
699         known = (m_ptr->cdis <= MAX_SIGHT) || (t_ptr->cdis <= MAX_SIGHT);
700
701         if (p_ptr->riding && (m_idx == p_ptr->riding)) disturb(1, 0);
702
703         /* Check for spell failure (inate attacks never fail) */
704         if (!spell_is_inate(thrown_spell) && (in_no_magic_dungeon || (MON_STUNNED(m_ptr) && one_in_(2))))
705         {
706                 disturb(1, 0);
707                 /* Message */
708 #ifdef JP
709                 if (see_m) msg_format("%^s¤Ï¼öʸ¤ò¾§¤¨¤è¤¦¤È¤·¤¿¤¬¼ºÇÔ¤·¤¿¡£", m_name);
710 #else
711                 if (see_m) msg_format("%^s tries to cast a spell, but fails.", m_name);
712 #endif
713
714                 return (TRUE);
715         }
716
717         can_remember = is_original_ap_and_seen(m_ptr);
718
719         switch (thrown_spell)
720         {
721         /* RF4_SHRIEK */
722         case 96+0:
723                 if (known)
724                 {
725                         if (see_m)
726                         {
727 #ifdef JP
728                                 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¶«¤ó¤À¡£", m_name, t_name);
729 #else
730                                 msg_format("%^s shrieks at %s.", m_name, t_name);
731 #endif
732
733                         }
734                         else
735                         {
736                                 mon_fight = TRUE;
737                         }
738                 }
739
740                 wake_up = TRUE;
741
742                 break;
743
744         /* RF4_XXX1 */
745         case 96+1:
746                 /* XXX XXX XXX */
747                 return FALSE;
748
749         /* RF4_DISPEL */
750         case 96+2:
751                 return FALSE;
752
753         /* RF4_ROCKET */
754         case 96+3:
755                 if (known)
756                 {
757                         if (see_either)
758                         {
759                                 disturb(1, 0);
760
761                                 if (blind)
762                                 {
763 #ifdef JP
764                                         msg_format("%^s¤¬²¿¤«¤ò¼Í¤Ã¤¿¡£", m_name);
765 #else
766                                         msg_format("%^s shoots something.", m_name);
767 #endif
768
769                                 }
770                                 else
771                                 {
772 #ifdef JP
773                                         msg_format("%^s¤¬%s¤Ë¥í¥±¥Ã¥È¤òȯ¼Í¤·¤¿¡£", m_name, t_name);
774 #else
775                                         msg_format("%^s fires a rocket at %s.", m_name, t_name);
776 #endif
777
778                                 }
779                         }
780                         else
781                         {
782                                 mon_fight = TRUE;
783                         }
784                 }
785
786                 dam = ((m_ptr->hp / 4) > 800 ? 800 : (m_ptr->hp / 4));
787                 monst_breath_monst(m_idx, y, x, GF_ROCKET,
788                                    dam, 2, FALSE, MS_ROCKET, learnable);
789
790                 break;
791
792         /* RF4_SHOOT */
793         case 96+4:
794                 if (known)
795                 {
796                         if (see_either)
797                         {
798                                 if (blind)
799                                 {
800 #ifdef JP
801                                         msg_format("%^s¤¬´ñ̯¤Ê²»¤òȯ¤·¤¿¡£", m_name);
802 #else
803                                         msg_format("%^s makes a strange noise.", m_name);
804 #endif
805
806                                 }
807                                 else
808                                 {
809 #ifdef JP
810                                         msg_format("%^s¤¬%s¤ËÌð¤òÊü¤Ã¤¿¡£", m_name, t_name);
811 #else
812                                         msg_format("%^s fires an arrow at %s.", m_name, t_name);
813 #endif
814
815                                 }
816                         }
817                         else
818                         {
819                                 mon_fight = TRUE;
820                         }
821
822                         sound(SOUND_SHOOT);
823                 }
824
825                 dam = damroll(r_ptr->blow[0].d_dice, r_ptr->blow[0].d_side);
826                 monst_bolt_monst(m_idx, y, x, GF_ARROW, dam, MS_SHOOT, learnable);
827
828                 break;
829
830         /* RF4_XXX2 */
831         case 96+5:
832                 /* XXX XXX XXX */
833                 return FALSE;
834
835         /* RF4_XXX3 */
836         case 96+6:
837                 /* XXX XXX XXX */
838                 return FALSE;
839
840         /* RF4_XXX4 */
841         case 96+7:
842                 /* XXX XXX XXX */
843                 return FALSE;
844
845         /* RF4_BR_ACID */
846         case 96+8:
847                 if (known)
848                 {
849                         if (see_either)
850                         {
851                                 disturb(1, 0);
852
853                                 if (blind)
854                                 {
855 #ifdef JP
856                                         msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
857 #else
858                                         msg_format("%^s breathes.", m_name);
859 #endif
860
861                                 }
862                                 else
863                                 {
864 #ifdef JP
865                                         msg_format("%^s¤¬%s¤Ë»À¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
866 #else
867                                         msg_format("%^s breathes acid at %s.", m_name, t_name);
868 #endif
869
870                                 }
871                         }
872                         else
873                         {
874                                 mon_fight = TRUE;
875                         }
876
877                         sound(SOUND_BREATH);
878                 }
879
880                 dam = ((m_ptr->hp / 3) > 1600 ? 1600 : (m_ptr->hp / 3));
881                 monst_breath_monst(m_idx, y, x, GF_ACID,
882                                    dam,0, TRUE, MS_BR_ACID, learnable);
883
884                 break;
885
886         /* RF4_BR_ELEC */
887         case 96+9:
888                 if (known)
889                 {
890                         if (see_either)
891                         {
892                                 disturb(1, 0);
893
894                                 if (blind)
895                                 {
896 #ifdef JP
897                                         msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
898 #else
899                                         msg_format("%^s breathes.", m_name);
900 #endif
901
902                                 }
903                                 else
904                                 {
905 #ifdef JP
906                                         msg_format("%^s¤¬%s¤Ë°ðºÊ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
907 #else
908                                         msg_format("%^s breathes lightning at %s.", m_name, t_name);
909 #endif
910
911                                 }
912                         }
913                         else
914                         {
915                                 mon_fight = TRUE;
916                         }
917
918                         sound(SOUND_BREATH);
919                 }
920
921                 dam = ((m_ptr->hp / 3) > 1600 ? 1600 : (m_ptr->hp / 3));
922                 monst_breath_monst(m_idx, y, x, GF_ELEC,
923                                    dam,0, TRUE, MS_BR_ELEC, learnable);
924
925                 break;
926
927         /* RF4_BR_FIRE */
928         case 96+10:
929                 if (known)
930                 {
931                         if (see_either)
932                         {
933                                 disturb(1, 0);
934
935                                 if (blind)
936                                 {
937 #ifdef JP
938                                         msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
939 #else
940                                         msg_format("%^s breathes.", m_name);
941 #endif
942
943                                 }
944                                 else
945                                 {
946 #ifdef JP
947                                         msg_format("%^s¤¬%s¤Ë²Ð±ê¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
948 #else
949                                         msg_format("%^s breathes fire at %s.", m_name, t_name);
950 #endif
951
952                                 }
953                         }
954                         else
955                         {
956                                 mon_fight = TRUE;
957                         }
958
959                         sound(SOUND_BREATH);
960                 }
961
962                 dam = ((m_ptr->hp / 3) > 1600 ? 1600 : (m_ptr->hp / 3));
963                 monst_breath_monst(m_idx, y, x, GF_FIRE,
964                                    dam,0, TRUE, MS_BR_FIRE, learnable);
965
966                 break;
967
968         /* RF4_BR_COLD */
969         case 96+11:
970                 if (known)
971                 {
972                         if (see_either)
973                         {
974                                 disturb(1, 0);
975
976                                 if (blind)
977                                 {
978 #ifdef JP
979                                         msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
980 #else
981                                         msg_format("%^s breathes.", m_name);
982 #endif
983
984                                 }
985                                 else
986                                 {
987 #ifdef JP
988                                         msg_format("%^s¤¬%s¤ËÎ䵤¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
989 #else
990                                         msg_format("%^s breathes frost at %s.", m_name, t_name);
991 #endif
992
993                                 }
994                         }
995                         else
996                         {
997                                 mon_fight = TRUE;
998                         }
999
1000                         sound(SOUND_BREATH);
1001                 }
1002
1003                 dam = ((m_ptr->hp / 3) > 1600 ? 1600 : (m_ptr->hp / 3));
1004                 monst_breath_monst(m_idx, y, x, GF_COLD,
1005                                    dam,0, TRUE, MS_BR_COLD, learnable);
1006                 break;
1007
1008         /* RF4_BR_POIS */
1009         case 96+12:
1010                 if (known)
1011                 {
1012                         if (see_either)
1013                         {
1014                                 disturb(1, 0);
1015
1016                                 if (blind)
1017                                 {
1018 #ifdef JP
1019                                         msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1020 #else
1021                                         msg_format("%^s breathes.", m_name);
1022 #endif
1023
1024                                 }
1025                                 else
1026                                 {
1027 #ifdef JP
1028                                         msg_format("%^s¤¬%s¤Ë¥¬¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
1029 #else
1030                                         msg_format("%^s breathes gas at %s.", m_name, t_name);
1031 #endif
1032
1033                                 }
1034                         }
1035                         else
1036                         {
1037                                 mon_fight = TRUE;
1038                         }
1039
1040                         sound(SOUND_BREATH);
1041                 }
1042
1043                 dam = ((m_ptr->hp / 3) > 800 ? 800 : (m_ptr->hp / 3));
1044                 monst_breath_monst(m_idx, y, x, GF_POIS,
1045                                    dam,0, TRUE, MS_BR_POIS, learnable);
1046
1047                 break;
1048
1049         /* RF4_BR_NETH */
1050         case 96+13:
1051                 if (known)
1052                 {
1053                         if (see_either)
1054                         {
1055                                 disturb(1, 0);
1056
1057                                 if (blind)
1058                                 {
1059 #ifdef JP
1060                                         msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1061 #else
1062                                         msg_format("%^s breathes.", m_name);
1063 #endif
1064
1065                                 }
1066                                 else
1067                                 {
1068 #ifdef JP
1069                                         msg_format("%^s¤¬%s¤ËÃϹö¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
1070 #else
1071                                         msg_format("%^s breathes nether at %s.", m_name, t_name);
1072 #endif
1073
1074                                 }
1075                         }
1076                         else
1077                         {
1078                                 mon_fight = TRUE;
1079                         }
1080
1081                         sound(SOUND_BREATH);
1082                 }
1083
1084                 dam = ((m_ptr->hp / 6) > 550 ? 550 : (m_ptr->hp / 6));
1085                 monst_breath_monst(m_idx, y, x, GF_NETHER,
1086                                    dam,0, TRUE, MS_BR_NETHER, learnable);
1087
1088                 break;
1089
1090         /* RF4_BR_LITE */
1091         case 96+14:
1092                 if (known)
1093                 {
1094                         if (see_either)
1095                         {
1096                                 disturb(1, 0);
1097
1098                                 if (blind)
1099                                 {
1100 #ifdef JP
1101                                         msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1102 #else
1103                                         msg_format("%^s breathes.", m_name);
1104 #endif
1105
1106                                 }
1107                                 else
1108                                 {
1109 #ifdef JP
1110                                         msg_format("%^s¤¬%s¤ËÁ®¸÷¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
1111 #else
1112                                         msg_format("%^s breathes light at %s.", m_name, t_name);
1113 #endif
1114
1115                                 }
1116                         }
1117                         else
1118                         {
1119                                 mon_fight = TRUE;
1120                         }
1121
1122                         sound(SOUND_BREATH);
1123                 }
1124
1125                 dam = ((m_ptr->hp / 6) > 400 ? 400 : (m_ptr->hp / 6));
1126                 monst_breath_monst(m_idx, y, x, GF_LITE,
1127                                    dam,0, TRUE, MS_BR_LITE, learnable);
1128
1129                 break;
1130
1131         /* RF4_BR_DARK */
1132         case 96+15:
1133                 if (known)
1134                 {
1135                         if (see_either)
1136                         {
1137                                 disturb(1, 0);
1138
1139                                 if (blind)
1140                                 {
1141 #ifdef JP
1142                                         msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1143 #else
1144                                         msg_format("%^s breathes.", m_name);
1145 #endif
1146
1147                                 }
1148                                 else
1149                                 {
1150 #ifdef JP
1151                                         msg_format("%^s¤¬%s¤Ë°Å¹õ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
1152 #else
1153                                         msg_format("%^s breathes darkness at %s.", m_name, t_name);
1154 #endif
1155
1156                                 }
1157                         }
1158                         else
1159                         {
1160                                 mon_fight = TRUE;
1161                         }
1162
1163                         sound(SOUND_BREATH);
1164                 }
1165
1166                 dam = ((m_ptr->hp / 6) > 400 ? 400 : (m_ptr->hp / 6));
1167                 monst_breath_monst(m_idx, y, x, GF_DARK,
1168                                    dam,0, TRUE, MS_BR_DARK, learnable);
1169
1170                 break;
1171
1172         /* RF4_BR_CONF */
1173         case 96+16:
1174                 if (known)
1175                 {
1176                         if (see_either)
1177                         {
1178                                 disturb(1, 0);
1179
1180                                 if (blind)
1181                                 {
1182 #ifdef JP
1183                                         msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1184 #else
1185                                         msg_format("%^s breathes.", m_name);
1186 #endif
1187
1188                                 }
1189                                 else
1190                                 {
1191 #ifdef JP
1192                                         msg_format("%^s¤¬%s¤Ëº®Íð¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
1193 #else
1194                                         msg_format("%^s breathes confusion at %s.", m_name, t_name);
1195 #endif
1196
1197                                 }
1198                         }
1199                         else
1200                         {
1201                                 mon_fight = TRUE;
1202                         }
1203
1204                         sound(SOUND_BREATH);
1205                 }
1206
1207                 dam = ((m_ptr->hp / 6) > 450 ? 450 : (m_ptr->hp / 6));
1208                 monst_breath_monst(m_idx, y, x, GF_CONFUSION,
1209                                    dam,0, TRUE, MS_BR_CONF, learnable);
1210
1211                 break;
1212
1213         /* RF4_BR_SOUN */
1214         case 96+17:
1215                 if (known)
1216                 {
1217                         if (see_either)
1218                         {
1219                                 disturb(1, 0);
1220
1221                                 if (m_ptr->r_idx == MON_JAIAN)
1222 #ifdef JP
1223                                         msg_format("¡Ö¥Ü¥©¥¨¡Á¡Á¡Á¡Á¡Á¡Á¡×");
1224 #else
1225                                 msg_format("'Booooeeeeee'");
1226 #endif
1227                                 else if (blind)
1228                                 {
1229 #ifdef JP
1230                                         msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1231 #else
1232                                         msg_format("%^s breathes.", m_name);
1233 #endif
1234
1235                                 }
1236                                 else
1237                                 {
1238 #ifdef JP
1239                                         msg_format("%^s¤¬%s¤Ë¹ì²»¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
1240 #else
1241                                         msg_format("%^s breathes sound at %s.", m_name, t_name);
1242 #endif
1243
1244                                 }
1245                         }
1246                         else
1247                         {
1248                                 mon_fight = TRUE;
1249                         }
1250
1251                         sound(SOUND_BREATH);
1252                 }
1253
1254                 dam = ((m_ptr->hp / 6) > 450 ? 450 : (m_ptr->hp / 6));
1255                 monst_breath_monst(m_idx, y, x, GF_SOUND,
1256                                    dam,0, TRUE, MS_BR_SOUND, learnable);
1257
1258                 break;
1259
1260         /* RF4_BR_CHAO */
1261         case 96+18:
1262                 if (known)
1263                 {
1264                         if (see_either)
1265                         {
1266                                 disturb(1, 0);
1267
1268                                 if (blind)
1269                                 {
1270 #ifdef JP
1271                                         msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1272 #else
1273                                         msg_format("%^s breathes.", m_name);
1274 #endif
1275
1276                                 }
1277                                 else
1278                                 {
1279 #ifdef JP
1280                                         msg_format("%^s¤¬%s¤Ë¥«¥ª¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
1281 #else
1282                                         msg_format("%^s breathes chaos at %s.", m_name, t_name);
1283 #endif
1284
1285                                 }
1286                         }
1287                         else
1288                         {
1289                                 mon_fight = TRUE;
1290                         }
1291
1292                         sound(SOUND_BREATH);
1293                 }
1294
1295                 dam = ((m_ptr->hp / 6) > 600 ? 600 : (m_ptr->hp / 6));
1296                 monst_breath_monst(m_idx, y, x, GF_CHAOS,
1297                                    dam,0, TRUE, MS_BR_CHAOS, learnable);
1298
1299                 break;
1300
1301         /* RF4_BR_DISE */
1302         case 96+19:
1303                 if (known)
1304                 {
1305                         if (see_either)
1306                         {
1307                                 disturb(1, 0);
1308
1309                                 if (blind)
1310                                 {
1311 #ifdef JP
1312                                         msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1313 #else
1314                                         msg_format("%^s breathes.", m_name);
1315 #endif
1316
1317                                 }
1318                                 else
1319                                 {
1320 #ifdef JP
1321                                         msg_format("%^s¤¬%s¤ËÎô²½¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
1322 #else
1323                                         msg_format("%^s breathes disenchantment at %s.", m_name, t_name);
1324 #endif
1325
1326                                 }
1327                         }
1328                         else
1329                         {
1330                                 mon_fight = TRUE;
1331                         }
1332
1333                         sound(SOUND_BREATH);
1334                 }
1335
1336                 dam = ((m_ptr->hp / 6) > 500 ? 500 : (m_ptr->hp / 6));
1337                 monst_breath_monst(m_idx, y, x, GF_DISENCHANT,
1338                                    dam,0, TRUE, MS_BR_DISEN, learnable);
1339
1340                 break;
1341
1342         /* RF4_BR_NEXU */
1343         case 96+20:
1344                 if (known)
1345                 {
1346                         if (see_either)
1347                         {
1348                                 disturb(1, 0);
1349
1350                                 if (blind)
1351                                 {
1352 #ifdef JP
1353                                         msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1354 #else
1355                                         msg_format("%^s breathes.", m_name);
1356 #endif
1357
1358                                 }
1359                                 else
1360                                 {
1361 #ifdef JP
1362                                         msg_format("%^s¤¬%s¤Ë°ø²Ìº®Íð¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
1363 #else
1364                                         msg_format("%^s breathes nexus at %s.", m_name, t_name);
1365 #endif
1366
1367                                 }
1368                         }
1369                         else
1370                         {
1371                                 mon_fight = TRUE;
1372                         }
1373
1374                         sound(SOUND_BREATH);
1375                 }
1376
1377                 dam = ((m_ptr->hp / 3) > 250 ? 250 : (m_ptr->hp / 3));
1378                 monst_breath_monst(m_idx, y, x, GF_NEXUS,
1379                                    dam,0, TRUE, MS_BR_NEXUS, learnable);
1380
1381                 break;
1382
1383         /* RF4_BR_TIME */
1384         case 96+21:
1385                 if (known)
1386                 {
1387                         if (see_either)
1388                         {
1389                                 disturb(1, 0);
1390
1391                                 if (blind)
1392                                 {
1393 #ifdef JP
1394                                         msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1395 #else
1396                                         msg_format("%^s breathes.", m_name);
1397 #endif
1398
1399                                 }
1400                                 else
1401                                 {
1402 #ifdef JP
1403                                         msg_format("%^s¤¬%s¤Ë»þ´ÖµÕž¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
1404 #else
1405                                         msg_format("%^s breathes time at %s.", m_name, t_name);
1406 #endif
1407
1408                                 }
1409                         }
1410                         else
1411                         {
1412                                 mon_fight = TRUE;
1413                         }
1414
1415                         sound(SOUND_BREATH);
1416                 }
1417
1418                 dam = ((m_ptr->hp / 3) > 150 ? 150 : (m_ptr->hp / 3));
1419                 monst_breath_monst(m_idx, y, x, GF_TIME,
1420                                    dam,0, TRUE, MS_BR_TIME, learnable);
1421
1422                 break;
1423
1424         /* RF4_BR_INER */
1425         case 96+22:
1426                 if (known)
1427                 {
1428                         if (see_either)
1429                         {
1430                                 disturb(1, 0);
1431
1432                                 if (blind)
1433                                 {
1434 #ifdef JP
1435                                         msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1436 #else
1437                                         msg_format("%^s breathes.", m_name);
1438 #endif
1439
1440                                 }
1441                                 else
1442                                 {
1443 #ifdef JP
1444                                         msg_format("%^s¤¬%s¤ËÃÙÆߤΥ֥쥹¤òÅǤ¤¤¿¡£", m_name, t_name);
1445 #else
1446                                         msg_format("%^s breathes inertia at %s.", m_name, t_name);
1447 #endif
1448
1449                                 }
1450                         }
1451                         else
1452                         {
1453                                 mon_fight = TRUE;
1454                         }
1455
1456                         sound(SOUND_BREATH);
1457                 }
1458
1459                 dam = ((m_ptr->hp / 6) > 200 ? 200 : (m_ptr->hp / 6));
1460                 monst_breath_monst(m_idx, y, x, GF_INERTIA,
1461                                    dam,0, TRUE, MS_BR_INERTIA, learnable);
1462
1463                 break;
1464
1465         /* RF4_BR_GRAV */
1466         case 96+23:
1467                 if (known)
1468                 {
1469                         if (see_either)
1470                         {
1471                                 disturb(1, 0);
1472
1473                                 if (blind)
1474                                 {
1475 #ifdef JP
1476                                         msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1477 #else
1478                                         msg_format("%^s breathes.", m_name);
1479 #endif
1480
1481                                 }
1482                                 else
1483                                 {
1484 #ifdef JP
1485                                         msg_format("%^s¤¬%s¤Ë½ÅÎϤΥ֥쥹¤òÅǤ¤¤¿¡£", m_name, t_name);
1486 #else
1487                                         msg_format("%^s breathes gravity at %s.", m_name, t_name);
1488 #endif
1489
1490                                 }
1491                         }
1492                         else
1493                         {
1494                                 mon_fight = TRUE;
1495                         }
1496
1497                         sound(SOUND_BREATH);
1498                 }
1499
1500                 dam = ((m_ptr->hp / 3) > 200 ? 200 : (m_ptr->hp / 3));
1501                 monst_breath_monst(m_idx, y, x, GF_GRAVITY,
1502                                    dam,0, TRUE, MS_BR_GRAVITY, learnable);
1503
1504                 break;
1505
1506         /* RF4_BR_SHAR */
1507         case 96+24:
1508                 if (known)
1509                 {
1510                         if (see_either)
1511                         {
1512                                 disturb(1, 0);
1513
1514                                 if (m_ptr->r_idx == MON_BOTEI)
1515 #ifdef JP
1516                                         msg_format("¡Ö¥ÜÄë¥Ó¥ë¥«¥Ã¥¿¡¼¡ª¡ª¡ª¡×");
1517 #else
1518                                 msg_format("'Boty-Build cutter!!!'");
1519 #endif
1520                                 else if (blind)
1521                                 {
1522 #ifdef JP
1523                                         msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1524 #else
1525                                         msg_format("%^s breathes.", m_name);
1526 #endif
1527
1528                                 }
1529                                 else
1530                                 {
1531 #ifdef JP
1532                                         msg_format("%^s¤¬%s¤ËÇËÊҤΥ֥쥹¤òÅǤ¤¤¿¡£", m_name, t_name);
1533 #else
1534                                         msg_format("%^s breathes shards at %s.", m_name, t_name);
1535 #endif
1536
1537                                 }
1538                         }
1539                         else
1540                         {
1541                                 mon_fight = TRUE;
1542                         }
1543
1544                         sound(SOUND_BREATH);
1545                 }
1546
1547                 dam = ((m_ptr->hp / 6) > 500 ? 500 : (m_ptr->hp / 6));
1548                 monst_breath_monst(m_idx, y, x, GF_SHARDS,
1549                                    dam,0, TRUE, MS_BR_SHARDS, learnable);
1550
1551                 break;
1552
1553         /* RF4_BR_PLAS */
1554         case 96+25:
1555                 if (known)
1556                 {
1557                         if (see_either)
1558                         {
1559                                 disturb(1, 0);
1560
1561                                 if (blind)
1562                                 {
1563 #ifdef JP
1564                                         msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1565 #else
1566                                         msg_format("%^s breathes.", m_name);
1567 #endif
1568
1569                                 }
1570                                 else
1571                                 {
1572 #ifdef JP
1573                                         msg_format("%^s¤¬%s¤Ë¥×¥é¥º¥Þ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
1574 #else
1575                                         msg_format("%^s breathes plasma at %s.", m_name, t_name);
1576 #endif
1577
1578                                 }
1579                         }
1580                         else
1581                         {
1582                                 mon_fight = TRUE;
1583                         }
1584
1585                         sound(SOUND_BREATH);
1586                 }
1587
1588                 dam = ((m_ptr->hp / 6) > 150 ? 150 : (m_ptr->hp / 6));
1589                 monst_breath_monst(m_idx, y, x, GF_PLASMA,
1590                                    dam,0, TRUE, MS_BR_PLASMA, learnable);
1591
1592                 break;
1593
1594         /* RF4_BR_WALL */
1595         case 96+26:
1596                 if (known)
1597                 {
1598                         if (see_either)
1599                         {
1600                                 disturb(1, 0);
1601
1602                                 if (blind)
1603                                 {
1604 #ifdef JP
1605                                         msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1606 #else
1607                                         msg_format("%^s breathes.", m_name);
1608 #endif
1609
1610                                 }
1611                                 else
1612                                 {
1613 #ifdef JP
1614                                         msg_format("%^s¤¬%s¤Ë¥Õ¥©¡¼¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
1615 #else
1616                                         msg_format("%^s breathes force at %s.", m_name, t_name);
1617 #endif
1618
1619                                 }
1620                         }
1621                         else
1622                         {
1623                                 mon_fight = TRUE;
1624                         }
1625
1626                         sound(SOUND_BREATH);
1627                 }
1628
1629                 dam = ((m_ptr->hp / 6) > 200 ? 200 : (m_ptr->hp / 6));
1630                 monst_breath_monst(m_idx, y, x, GF_FORCE,
1631                                    dam,0, TRUE, MS_BR_FORCE, learnable);
1632                 break;
1633
1634         /* RF4_BR_MANA */
1635         case 96+27:
1636                 if (known)
1637                 {
1638                         if (see_either)
1639                         {
1640                                 disturb(1, 0);
1641
1642                                 if (blind)
1643                                 {
1644 #ifdef JP
1645                                         msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1646 #else
1647                                         msg_format("%^s breathes.", m_name);
1648 #endif
1649
1650                                 }
1651                                 else
1652                                 {
1653 #ifdef JP
1654                                         msg_format("%^s¤¬%s¤ËËâÎϤΥ֥쥹¤òÅǤ¤¤¿¡£", m_name, t_name);
1655 #else
1656                                         msg_format("%^s breathes mana at %s.", m_name, t_name);
1657 #endif
1658
1659                                 }
1660                         }
1661                         else
1662                         {
1663                                 mon_fight = TRUE;
1664                         }
1665
1666                         sound(SOUND_BREATH);
1667                 }
1668
1669                 dam = ((m_ptr->hp / 3) > 250 ? 250 : (m_ptr->hp / 3));
1670                 monst_breath_monst(m_idx, y, x, GF_MANA,
1671                                    dam,0, TRUE, MS_BR_MANA, learnable);
1672
1673                 break;
1674
1675         /* RF4_BA_NUKE */
1676         case 96+28:
1677                 if (known)
1678                 {
1679                         if (see_either)
1680                         {
1681                                 disturb(1, 0);
1682
1683                                 if (blind)
1684                                 {
1685 #ifdef JP
1686                                         msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
1687 #else
1688                                         msg_format("%^s mumbles.", m_name);
1689 #endif
1690
1691                                 }
1692                                 else
1693                                 {
1694 #ifdef JP
1695                                         msg_format("%^s¤¬%s¤ËÊü¼Íǽµå¤òÊü¤Ã¤¿¡£", m_name, t_name);
1696 #else
1697                                         msg_format("%^s casts a ball of radiation at %s.", m_name, t_name);
1698 #endif
1699
1700                                 }
1701                         }
1702                         else
1703                         {
1704                                 mon_fight = TRUE;
1705                         }
1706                 }
1707
1708                 dam = (rlev + damroll(10, 6));
1709                 monst_breath_monst(m_idx, y, x, GF_NUKE,
1710                                    dam, 2, FALSE, MS_BALL_NUKE, learnable);
1711
1712                 break;
1713
1714         /* RF4_BR_NUKE */
1715         case 96+29:
1716                 if (known)
1717                 {
1718                         if (see_either)
1719                         {
1720                                 disturb(1, 0);
1721
1722                                 if (blind)
1723                                 {
1724 #ifdef JP
1725                                         msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1726 #else
1727                                         msg_format("%^s breathes.", m_name);
1728 #endif
1729
1730                                 }
1731                                 else
1732                                 {
1733 #ifdef JP
1734                                         msg_format("%^s¤¬%s¤ËÊü¼ÍÀ­ÇÑ´þʪ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
1735 #else
1736                                         msg_format("%^s breathes toxic waste at %s.", m_name, t_name);
1737 #endif
1738
1739                                 }
1740                         }
1741                         else
1742                         {
1743                                 mon_fight = TRUE;
1744                         }
1745
1746                         sound(SOUND_BREATH);
1747                 }
1748
1749                 dam = ((m_ptr->hp / 3) > 800 ? 800 : (m_ptr->hp / 3));
1750                 monst_breath_monst(m_idx, y, x, GF_NUKE,
1751                                    dam,0, TRUE, MS_BR_NUKE, learnable);
1752                 break;
1753
1754         /* RF4_BA_CHAO */
1755         case 96+30:
1756                 if (known)
1757                 {
1758                         if (see_either)
1759                         {
1760                                 disturb(1, 0);
1761
1762                                 if (blind)
1763                                 {
1764 #ifdef JP
1765                                         msg_format("%^s¤¬¶²¤í¤·¤²¤Ë¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
1766 #else
1767                                         msg_format("%^s mumbles frighteningly.", m_name);
1768 #endif
1769
1770                                 }
1771                                 else
1772                                 {
1773 #ifdef JP
1774                                         msg_format("%^s¤¬%s¤Ë½ã¥í¥°¥ë¥¹¤òÊü¤Ã¤¿¡£", m_name, t_name);
1775 #else
1776                                         msg_format("%^s invokes raw Logrus upon %s.", m_name, t_name);
1777 #endif
1778
1779                                 }
1780                         }
1781                         else
1782                         {
1783                                 mon_fight = TRUE;
1784                         }
1785                 }
1786
1787                 dam = (rlev * 2) + damroll(10, 10);
1788                 monst_breath_monst(m_idx, y, x, GF_CHAOS,
1789                                    dam, 4, FALSE, MS_BALL_CHAOS, learnable);
1790
1791                 break;
1792
1793         /* RF4_BR_DISI */
1794         case 96+31:
1795                 if (known)
1796                 {
1797                         if (see_either)
1798                         {
1799                                 disturb(1, 0);
1800
1801                                 if (blind)
1802                                 {
1803 #ifdef JP
1804                                         msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1805 #else
1806                                         msg_format("%^s breathes.", m_name);
1807 #endif
1808
1809                                 }
1810                                 else
1811                                 {
1812 #ifdef JP
1813                                         msg_format("%^s¤¬%s¤Ëʬ²ò¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
1814 #else
1815                                         msg_format("%^s breathes disintegration at %s.", m_name, t_name);
1816 #endif
1817
1818                                 }
1819                         }
1820                         else
1821                         {
1822                                 mon_fight = TRUE;
1823                         }
1824
1825                         sound(SOUND_BREATH);
1826                 }
1827
1828                 dam = ((m_ptr->hp / 6) > 150 ? 150 : (m_ptr->hp / 6));
1829                 monst_breath_monst(m_idx, y, x, GF_DISINTEGRATE,
1830                                    dam,0, TRUE, MS_BR_DISI, learnable);
1831                 break;
1832
1833         /* RF5_BA_ACID */
1834         case 128+0:
1835                 if (known)
1836                 {
1837                         if (see_either)
1838                         {
1839                                 disturb(1, 0);
1840
1841                                 if (blind)
1842                                 {
1843 #ifdef JP
1844                                         msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
1845 #else
1846                                         msg_format("%^s mumbles.", m_name);
1847 #endif
1848
1849                                 }
1850                                 else
1851                                 {
1852 #ifdef JP
1853                                         msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
1854 #else
1855                                         msg_format("%^s casts an acid ball at %s.", m_name, t_name);
1856 #endif
1857
1858                                 }
1859                         }
1860                         else
1861                         {
1862                                 mon_fight = TRUE;
1863                         }
1864                 }
1865
1866                 dam = (randint1(rlev * 3) + 15) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
1867                 monst_breath_monst(m_idx, y, x, GF_ACID, dam, 2, FALSE, MS_BALL_ACID, learnable);
1868
1869                 break;
1870
1871         /* RF5_BA_ELEC */
1872         case 128+1:
1873                 if (known)
1874                 {
1875                         if (see_either)
1876                         {
1877                                 disturb(1, 0);
1878
1879                                 if (blind)
1880                                 {
1881 #ifdef JP
1882                                         msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
1883 #else
1884                                         msg_format("%^s mumbles.", m_name);
1885 #endif
1886
1887                                 }
1888                                 else
1889                                 {
1890 #ifdef JP
1891                                         msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
1892 #else
1893                                         msg_format("%^s casts a lightning ball at %s.", m_name, t_name);
1894 #endif
1895
1896                                 }
1897                         }
1898                         else
1899                         {
1900                                 mon_fight = TRUE;
1901                         }
1902                 }
1903
1904                 dam = (randint1(rlev * 3 / 2) + 8) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
1905                 monst_breath_monst(m_idx, y, x, GF_ELEC, dam, 2, FALSE, MS_BALL_ELEC, learnable);
1906
1907                 break;
1908
1909         /* RF5_BA_FIRE */
1910         case 128+2:
1911                 if (known)
1912                 {
1913                         if (see_either)
1914                         {
1915                                 disturb(1, 0);
1916
1917                                 if (m_ptr->r_idx == MON_ROLENTO)
1918                                 {
1919 #ifdef JP
1920                                         if (blind)
1921                                                 msg_format("%^s¤¬²¿¤«¤òÅꤲ¤¿¡£", m_name);
1922                                         else
1923                                                 msg_format("%^s¤¬%^s¤Ë¸þ¤«¤Ã¤Æ¼êÜØÃƤòÅꤲ¤¿¡£", m_name, t_name);
1924 #else
1925                                         if (blind)
1926                                                 msg_format("%^s throws something.", m_name);
1927                                         else
1928                                                 msg_format("%^s throws a hand grenade.", m_name);
1929 #endif
1930                                 }
1931                                 else
1932                                 {
1933                                         if (blind)
1934                                         {
1935 #ifdef JP
1936                                                 msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
1937 #else
1938                                                 msg_format("%^s mumbles.", m_name);
1939 #endif
1940
1941                                         }
1942                                         else
1943                                         {
1944 #ifdef JP
1945                                                 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
1946 #else
1947                                                 msg_format("%^s casts a fire ball at %s.", m_name, t_name);
1948 #endif
1949
1950                                         }
1951                                 }
1952                         }
1953                         else
1954                         {
1955                                 mon_fight = TRUE;
1956                         }
1957                 }
1958
1959                 dam = (randint1(rlev * 7 / 2) + 10) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
1960                 monst_breath_monst(m_idx, y, x, GF_FIRE, dam, 2, FALSE, MS_BALL_FIRE, learnable);
1961
1962                 break;
1963
1964         /* RF5_BA_COLD */
1965         case 128+3:
1966                 if (known)
1967                 {
1968                         if (see_either)
1969                         {
1970                                 disturb(1, 0);
1971
1972                                 if (blind)
1973                                 {
1974 #ifdef JP
1975                                         msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
1976 #else
1977                                         msg_format("%^s mumbles.", m_name);
1978 #endif
1979
1980                                 }
1981                                 else
1982                                 {
1983 #ifdef JP
1984                                         msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥¢¥¤¥¹¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
1985 #else
1986                                         msg_format("%^s casts a frost ball at %s.", m_name, t_name);
1987 #endif
1988
1989                                 }
1990                         }
1991                         else
1992                         {
1993                                 mon_fight = TRUE;
1994                         }
1995                 }
1996
1997                 dam = (randint1(rlev * 3 / 2) + 10) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
1998                 monst_breath_monst(m_idx, y, x, GF_COLD, dam, 2, FALSE, MS_BALL_COLD, learnable);
1999
2000                 break;
2001
2002         /* RF5_BA_POIS */
2003         case 128+4:
2004                 if (known)
2005                 {
2006                         if (see_either)
2007                         {
2008                                 disturb(1, 0);
2009
2010                                 if (blind)
2011                                 {
2012 #ifdef JP
2013                                         msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
2014 #else
2015                                         msg_format("%^s mumbles.", m_name);
2016 #endif
2017
2018                                 }
2019                                 else
2020                                 {
2021 #ifdef JP
2022                                         msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ°­½­±À¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2023 #else
2024                                         msg_format("%^s casts a stinking cloud at %s.", m_name, t_name);
2025 #endif
2026
2027                                 }
2028                         }
2029                         else
2030                         {
2031                                 mon_fight = TRUE;
2032                         }
2033                 }
2034
2035                 dam = damroll(12, 2) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
2036                 monst_breath_monst(m_idx, y, x, GF_POIS, dam, 2, FALSE, MS_BALL_POIS, learnable);
2037
2038                 break;
2039
2040         /* RF5_BA_NETH */
2041         case 128+5:
2042                 if (known)
2043                 {
2044                         if (see_either)
2045                         {
2046                                 disturb(1, 0);
2047
2048                                 if (blind)
2049                                 {
2050 #ifdef JP
2051                                         msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
2052 #else
2053                                         msg_format("%^s mumbles.", m_name);
2054 #endif
2055
2056                                 }
2057                                 else
2058                                 {
2059 #ifdef JP
2060                                         msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤ÆÃϹöµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2061 #else
2062                                         msg_format("%^s casts a nether ball at %s.", m_name, t_name);
2063 #endif
2064
2065                                 }
2066                         }
2067                         else
2068                         {
2069                                 mon_fight = TRUE;
2070                         }
2071                 }
2072
2073                 dam = 50 + damroll(10, 10) + (rlev * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1));
2074                 monst_breath_monst(m_idx, y, x, GF_NETHER, dam, 2, FALSE, MS_BALL_NETHER, learnable);
2075
2076                 break;
2077
2078         /* RF5_BA_WATE */
2079         case 128+6:
2080                 if (known)
2081                 {
2082                         if (see_either)
2083                         {
2084                                 disturb(1, 0);
2085
2086                                 if (blind)
2087                                 {
2088 #ifdef JP
2089                                         msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
2090 #else
2091                                         msg_format("%^s mumbles.", m_name);
2092 #endif
2093
2094                                 }
2095                                 else
2096                                 {
2097 #ifdef JP
2098                                         msg_format("%^s¤¬%s¤ËÂФ·¤Æή¤ì¤ë¤è¤¦¤Ê¿È¿¶¤ê¤ò¤·¤¿¡£", m_name, t_name);
2099 #else
2100                                         msg_format("%^s gestures fluidly at %s.", m_name, t_name);
2101 #endif
2102
2103 #ifdef JP
2104                                         msg_format("%^s¤Ï±²´¬¤Ë°û¤ß¹þ¤Þ¤ì¤¿¡£", t_name);
2105 #else
2106                                         msg_format("%^s is engulfed in a whirlpool.", t_name);
2107 #endif
2108
2109                                 }
2110                         }
2111                         else
2112                         {
2113                                 mon_fight = TRUE;
2114                         }
2115                 }
2116
2117                 dam = ((r_ptr->flags2 & RF2_POWERFUL) ? randint1(rlev * 3) : randint1(rlev * 2)) + 50;
2118                 monst_breath_monst(m_idx, y, x, GF_WATER, dam, 4, FALSE, MS_BALL_WATER, learnable);
2119
2120                 break;
2121
2122         /* RF5_BA_MANA */
2123         case 128+7:
2124                 if (known)
2125                 {
2126                         if (see_either)
2127                         {
2128                                 disturb(1, 0);
2129
2130                                 if (blind)
2131                                 {
2132 #ifdef JP
2133                                         msg_format("%^s¤¬²¿¤«¤òÎ϶¯¤¯¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
2134 #else
2135                                         msg_format("%^s mumbles powerfully.", m_name);
2136 #endif
2137
2138                                 }
2139                                 else
2140                                 {
2141 #ifdef JP
2142                                         msg_format("%^s¤¬%s¤ËÂФ·¤ÆËâÎϤÎÍò¤Î¼öʸ¤òÇ°¤¸¤¿¡£", m_name, t_name);
2143 #else
2144                                         msg_format("%^s invokes a mana storm upon %s.", m_name, t_name);
2145 #endif
2146
2147                                 }
2148                         }
2149                         else
2150                         {
2151                                 mon_fight = TRUE;
2152                         }
2153                 }
2154
2155                 dam = (rlev * 4) + 50 + damroll(10, 10);
2156                 monst_breath_monst(m_idx, y, x, GF_MANA, dam, 4, FALSE, MS_BALL_MANA, learnable);
2157
2158                 break;
2159
2160         /* RF5_BA_DARK */
2161         case 128+8:
2162                 if (known)
2163                 {
2164                         if (see_either)
2165                         {
2166                                 disturb(1, 0);
2167
2168                                 if (blind)
2169                                 {
2170 #ifdef JP
2171                                         msg_format("%^s¤¬²¿¤«¤òÎ϶¯¤¯¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
2172 #else
2173                                         msg_format("%^s mumbles powerfully.", m_name);
2174 #endif
2175
2176                                 }
2177                                 else
2178                                 {
2179 #ifdef JP
2180                                         msg_format("%^s¤¬%s¤ËÂФ·¤Æ°Å¹õ¤ÎÍò¤Î¼öʸ¤òÇ°¤¸¤¿¡£", m_name, t_name);
2181 #else
2182                                         msg_format("%^s invokes a darkness storm upon %s.", m_name, t_name);
2183 #endif
2184
2185                                 }
2186                         }
2187                         else
2188                         {
2189                                 mon_fight = TRUE;
2190                         }
2191                 }
2192
2193                 dam = (rlev * 4) + 50 + damroll(10, 10);
2194                 monst_breath_monst(m_idx, y, x, GF_DARK, dam, 4, FALSE, MS_BALL_DARK, learnable);
2195
2196                 break;
2197
2198         /* RF5_DRAIN_MANA */
2199         case 128+9:
2200                 if (see_m)
2201                 {
2202                         /* Basic message */
2203 #ifdef JP
2204                         msg_format("%^s¤ÏÀº¿À¥¨¥Í¥ë¥®¡¼¤ò%s¤«¤éµÛ¤¤¤È¤Ã¤¿¡£", m_name, t_name);
2205 #else
2206                         msg_format("%^s draws psychic energy from %s.", m_name, t_name);
2207 #endif
2208
2209                 }
2210
2211                 dam = ((randint1(rlev) / 2) + 1);
2212                 monst_breath_monst(m_idx, y, x, GF_DRAIN_MANA, dam, 0, FALSE, MS_DRAIN_MANA, learnable);
2213
2214                 break;
2215
2216         /* RF5_MIND_BLAST */
2217         case 128+10:
2218                 if (see_m)
2219                 {
2220 #ifdef JP
2221                         msg_format("%^s¤Ï%s¤ò¤¸¤Ã¤Èâˤó¤À¡£", m_name, t_name);
2222 #else
2223                         msg_format("%^s gazes intently at %s.", m_name, t_name);
2224 #endif
2225
2226                 }
2227
2228                 dam = damroll(7, 7);
2229                 monst_breath_monst(m_idx, y, x, GF_MIND_BLAST, dam, 0, FALSE, MS_MIND_BLAST, learnable);
2230
2231                 break;
2232
2233         /* RF5_BRAIN_SMASH */
2234         case 128+11:
2235                 if (see_m)
2236                 {
2237 #ifdef JP
2238                         msg_format("%^s¤Ï%s¤ò¤¸¤Ã¤Èâˤó¤À¡£", m_name, t_name);
2239 #else
2240                         msg_format("%^s gazes intently at %s.", m_name, t_name);
2241 #endif
2242
2243                 }
2244
2245                 dam = damroll(12, 12);
2246                 monst_breath_monst(m_idx, y, x, GF_BRAIN_SMASH, dam, 0, FALSE, MS_BRAIN_SMASH, learnable);
2247
2248                 break;
2249
2250         /* RF5_CAUSE_1 */
2251         case 128+12:
2252                 if (known)
2253                 {
2254                         if (see_m)
2255                         {
2256 #ifdef JP
2257                                 msg_format("%^s¤Ï%s¤ò»Ø¤µ¤·¤Æ¼ö¤¤¤ò¤«¤±¤¿¡£", m_name, t_name);
2258 #else
2259                                 msg_format("%^s points at %s and curses.", m_name, t_name);
2260 #endif
2261
2262                         }
2263                         else
2264                         {
2265                                 mon_fight = TRUE;
2266                         }
2267                 }
2268
2269                 dam = damroll(3, 8);
2270                 monst_breath_monst(m_idx, y, x, GF_CAUSE_1, dam, 0, FALSE, MS_CAUSE_1, learnable);
2271
2272                 break;
2273
2274         /* RF5_CAUSE_2 */
2275         case 128+13:
2276                 if (known)
2277                 {
2278                         if (see_m)
2279                         {
2280 #ifdef JP
2281                                 msg_format("%^s¤Ï%s¤ò»Ø¤µ¤·¤Æ¶²¤í¤·¤²¤Ë¼ö¤¤¤ò¤«¤±¤¿¡£", m_name, t_name);
2282 #else
2283                                 msg_format("%^s points at %s and curses horribly.", m_name, t_name);
2284 #endif
2285
2286                         }
2287                         else
2288                         {
2289                                 mon_fight = TRUE;
2290                         }
2291                 }
2292
2293                 dam = damroll(8, 8);
2294                 monst_breath_monst(m_idx, y, x, GF_CAUSE_2, dam, 0, FALSE, MS_CAUSE_2, learnable);
2295
2296                 break;
2297
2298         /* RF5_CAUSE_3 */
2299         case 128+14:
2300                 if (known)
2301                 {
2302                         if (see_m)
2303                         {
2304 #ifdef JP
2305                                 msg_format("%^s¤Ï%s¤ò»Ø¤µ¤·¡¢¶²¤í¤·¤²¤Ë¼öʸ¤ò¾§¤¨¤¿¡ª", m_name, t_name);
2306 #else
2307                                 msg_format("%^s points at %s, incanting terribly!", m_name, t_name);
2308 #endif
2309
2310                         }
2311                         else
2312                         {
2313                                 mon_fight = TRUE;
2314                         }
2315                 }
2316
2317                 dam = damroll(10, 15);
2318                 monst_breath_monst(m_idx, y, x, GF_CAUSE_3, dam, 0, FALSE, MS_CAUSE_3, learnable);
2319
2320                 break;
2321
2322         /* RF5_CAUSE_4 */
2323         case 128+15:
2324                 if (known)
2325                 {
2326                         if (see_m)
2327                         {
2328 #ifdef JP
2329                                 msg_format("%^s¤¬%s¤ÎÈ빦¤òÆͤ¤¤Æ¡¢¡Ö¤ªÁ°¤Ï´û¤Ë»à¤ó¤Ç¤¤¤ë¡×¤È¶«¤ó¤À¡£", m_name, t_name);
2330 #else
2331                                 msg_format("%^s points at %s, screaming the word, 'DIE!'", m_name, t_name);
2332 #endif
2333
2334                         }
2335                         else
2336                         {
2337                                 mon_fight = TRUE;
2338                         }
2339                 }
2340
2341                 dam = damroll(15, 15);
2342                 monst_breath_monst(m_idx, y, x, GF_CAUSE_4, dam, 0, FALSE, MS_CAUSE_4, learnable);
2343
2344                 break;
2345
2346         /* RF5_BO_ACID */
2347         case 128+16:
2348                 if (known)
2349                 {
2350                         if (see_either)
2351                         {
2352 #ifdef JP
2353                                 msg_format("%s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2354 #else
2355                                 msg_format("%^s casts an acid bolt at %s.", m_name, t_name);
2356 #endif
2357
2358                         }
2359                         else
2360                         {
2361                                 mon_fight = TRUE;
2362                         }
2363                 }
2364
2365                 dam = (damroll(7, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
2366                 monst_bolt_monst(m_idx, y, x, GF_ACID,
2367                                  dam, MS_BOLT_ACID, learnable);
2368
2369                 break;
2370
2371         /* RF5_BO_ELEC */
2372         case 128+17:
2373                 if (known)
2374                 {
2375                         if (see_either)
2376                         {
2377 #ifdef JP
2378                                 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2379 #else
2380                                 msg_format("%^s casts a lightning bolt at %s.", m_name, t_name);
2381 #endif
2382
2383                         }
2384                         else
2385                         {
2386                                 mon_fight = TRUE;
2387                         }
2388                 }
2389
2390                 dam = (damroll(4, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
2391                 monst_bolt_monst(m_idx, y, x, GF_ELEC,
2392                                  dam, MS_BOLT_ELEC, learnable);
2393
2394                 break;
2395
2396         /* RF5_BO_FIRE */
2397         case 128+18:
2398                 if (known)
2399                 {
2400                         if (see_either)
2401                         {
2402 #ifdef JP
2403                                 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2404 #else
2405                                 msg_format("%^s casts a fire bolt at %s.", m_name, t_name);
2406 #endif
2407
2408                         }
2409                         else
2410                         {
2411                                 mon_fight = TRUE;
2412                         }
2413                 }
2414
2415                 dam = (damroll(9, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
2416                 monst_bolt_monst(m_idx, y, x, GF_FIRE,
2417                                  dam, MS_BOLT_FIRE, learnable);
2418
2419                 break;
2420
2421         /* RF5_BO_COLD */
2422         case 128+19:
2423                 if (known)
2424                 {
2425                         if (see_either)
2426                         {
2427 #ifdef JP
2428                                 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥¢¥¤¥¹¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2429 #else
2430                                 msg_format("%^s casts a frost bolt at %s.", m_name, t_name);
2431 #endif
2432
2433                         }
2434                         else
2435                         {
2436                                 mon_fight = TRUE;
2437                         }
2438                 }
2439
2440                 dam = (damroll(6, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
2441                 monst_bolt_monst(m_idx, y, x, GF_COLD,
2442                                  dam, MS_BOLT_COLD, learnable);
2443
2444                 break;
2445
2446         /* RF5_BA_LITE */
2447         case 128+20:
2448                 if (known)
2449                 {
2450                         if (see_either)
2451                         {
2452                                 disturb(1, 0);
2453
2454                                 if (blind)
2455                                 {
2456 #ifdef JP
2457                                         msg_format("%^s¤¬²¿¤«¤òÎ϶¯¤¯¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
2458 #else
2459                                         msg_format("%^s mumbles powerfully.", m_name);
2460 #endif
2461
2462                                 }
2463                                 else
2464                                 {
2465 #ifdef JP
2466                                         msg_format("%^s¤¬%s¤ËÂФ·¤Æ¥¹¥¿¡¼¥Ð¡¼¥¹¥È¤Î¼öʸ¤òÇ°¤¸¤¿¡£", m_name, t_name);
2467 #else
2468                                         msg_format("%^s invokes a starburst upon %s.", m_name, t_name);
2469 #endif
2470
2471                                 }
2472                         }
2473                         else
2474                         {
2475                                 mon_fight = TRUE;
2476                         }
2477                 }
2478
2479                 dam = (rlev * 4) + 50 + damroll(10, 10);
2480                 monst_breath_monst(m_idx, y, x, GF_LITE, dam, 4, FALSE, MS_STARBURST, learnable);
2481
2482                 break;
2483
2484         /* RF5_BO_NETH */
2485         case 128+21:
2486                 if (known)
2487                 {
2488                         if (see_either)
2489                         {
2490 #ifdef JP
2491                                 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤ÆÃϹö¤ÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2492 #else
2493                                 msg_format("%^s casts a nether bolt at %s.", m_name, t_name);
2494 #endif
2495
2496                         }
2497                         else
2498                         {
2499                                 mon_fight = TRUE;
2500                         }
2501                 }
2502
2503                 dam = 30 + damroll(5, 5) + (rlev * 4) / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3);
2504                 monst_bolt_monst(m_idx, y, x, GF_NETHER,
2505                                  dam, MS_BOLT_NETHER, learnable);
2506
2507                 break;
2508
2509         /* RF5_BO_WATE */
2510         case 128+22:
2511                 if (known)
2512                 {
2513                         if (see_either)
2514                         {
2515 #ifdef JP
2516                                 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥¦¥©¡¼¥¿¡¼¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2517 #else
2518                                 msg_format("%^s casts a water bolt at %s.", m_name, t_name);
2519 #endif
2520
2521                         }
2522                         else
2523                         {
2524                                 mon_fight = TRUE;
2525                         }
2526                 }
2527
2528                 dam = damroll(10, 10) + (rlev * 3 / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3));
2529                 monst_bolt_monst(m_idx, y, x, GF_WATER,
2530                                  dam, MS_BOLT_WATER, learnable);
2531
2532                 break;
2533
2534         /* RF5_BO_MANA */
2535         case 128+23:
2536                 if (known)
2537                 {
2538                         if (see_either)
2539                         {
2540 #ifdef JP
2541                                 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤ÆËâÎϤÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2542 #else
2543                                 msg_format("%^s casts a mana bolt at %s.", m_name, t_name);
2544 #endif
2545
2546                         }
2547                         else
2548                         {
2549                                 mon_fight = TRUE;
2550                         }
2551                 }
2552
2553                 dam = randint1(rlev * 7 / 2) + 50;
2554                 monst_bolt_monst(m_idx, y, x, GF_MANA,
2555                                  dam, MS_BOLT_MANA, learnable);
2556
2557                 break;
2558
2559         /* RF5_BO_PLAS */
2560         case 128+24:
2561                 if (known)
2562                 {
2563                         if (see_either)
2564                         {
2565 #ifdef JP
2566                                 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥×¥é¥º¥Þ¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2567 #else
2568                                 msg_format("%^s casts a plasma bolt at %s.", m_name, t_name);
2569 #endif
2570
2571                         }
2572                         else
2573                         {
2574                                 mon_fight = TRUE;
2575                         }
2576                 }
2577
2578                 dam = 10 + damroll(8, 7) + (rlev * 3 / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3));
2579                 monst_bolt_monst(m_idx, y, x, GF_PLASMA,
2580                                  dam, MS_BOLT_PLASMA, learnable);
2581
2582                 break;
2583
2584         /* RF5_BO_ICEE */
2585         case 128+25:
2586                 if (known)
2587                 {
2588                         if (see_either)
2589                         {
2590 #ifdef JP
2591                                 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¶Ë´¨¤ÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2592 #else
2593                                 msg_format("%^s casts an ice bolt at %s.", m_name, t_name);
2594 #endif
2595
2596                         }
2597                         else
2598                         {
2599                                 mon_fight = TRUE;
2600                         }
2601                 }
2602
2603                 dam = damroll(6, 6) + (rlev * 3 / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3));
2604                 monst_bolt_monst(m_idx, y, x, GF_ICE,
2605                                  dam, MS_BOLT_ICE, learnable);
2606
2607                 break;
2608
2609         /* RF5_MISSILE */
2610         case 128+26:
2611                 if (known)
2612                 {
2613                         if (see_either)
2614                         {
2615 #ifdef JP
2616                                 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2617 #else
2618                                 msg_format("%^s casts a magic missile at %s.", m_name, t_name);
2619 #endif
2620
2621                         }
2622                         else
2623                         {
2624                                 mon_fight = TRUE;
2625                         }
2626                 }
2627
2628                 dam = damroll(2, 6) + (rlev / 3);
2629                 monst_bolt_monst(m_idx, y, x, GF_MISSILE,
2630                                  dam, MS_MAGIC_MISSILE, learnable);
2631
2632                 break;
2633
2634         /* RF5_SCARE */
2635         case 128+27:
2636                 if (known)
2637                 {
2638                         if (see_either)
2639                         {
2640 #ifdef JP
2641                                 msg_format("%^s¤¬¶²¤í¤·¤²¤Ê¸¸³Ð¤òºî¤ê½Ð¤·¤¿¡£", m_name, t_name);
2642 #else
2643                                 msg_format("%^s casts a fearful illusion in front of %s.", m_name, t_name);
2644 #endif
2645
2646                         }
2647                         else
2648                         {
2649                                 mon_fight = TRUE;
2650                         }
2651                 }
2652
2653                 if (tr_ptr->flags3 & RF3_NO_FEAR)
2654                 {
2655 #ifdef JP
2656                         if (see_t) msg_format("%^s¤Ï¶²Éݤò´¶¤¸¤Ê¤¤¡£", t_name);
2657 #else
2658                         if (see_t) msg_format("%^s refuses to be frightened.", t_name);
2659 #endif
2660
2661                 }
2662                 else if (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10)
2663                 {
2664 #ifdef JP
2665                         if (see_t) msg_format("%^s¤Ï¶²Éݤò´¶¤¸¤Ê¤¤¡£", t_name);
2666 #else
2667                         if (see_t) msg_format("%^s refuses to be frightened.", t_name);
2668 #endif
2669
2670                 }
2671                 else
2672                 {
2673                         if (set_monster_monfear(t_idx, MON_MONFEAR(t_ptr) + randint0(4) + 4)) fear = TRUE;
2674                 }
2675
2676                 wake_up = TRUE;
2677
2678                 break;
2679
2680         /* RF5_BLIND */
2681         case 128+28:
2682                 if (known)
2683                 {
2684                         if (see_either)
2685                         {
2686 #ifdef JP
2687                                 msg_format("%s¤Ï¼öʸ¤ò¾§¤¨¤Æ%s¤ÎÌܤò¾Æ¤­ÉÕ¤«¤»¤¿¡£", m_name, t_name);
2688 #else
2689                                 msg_format("%^s casts a spell, burning %s%s eyes.", m_name, t_name,
2690                                            (streq(t_name, "it") ? "s" : "'s"));
2691 #endif
2692
2693                         }
2694                         else
2695                         {
2696                                 mon_fight = TRUE;
2697                         }
2698                 }
2699
2700                 /* Simulate blindness with confusion */
2701                 if (tr_ptr->flags3 & RF3_NO_CONF)
2702                 {
2703 #ifdef JP
2704                         if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2705 #else
2706                         if (see_t) msg_format("%^s is unaffected.", t_name);
2707 #endif
2708
2709                 }
2710                 else if (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10)
2711                 {
2712 #ifdef JP
2713                         if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2714 #else
2715                         if (see_t) msg_format("%^s is unaffected.", t_name);
2716 #endif
2717
2718                 }
2719                 else
2720                 {
2721 #ifdef JP
2722                         if (see_t) msg_format("%^s¤ÏÌܤ¬¸«¤¨¤Ê¤¯¤Ê¤Ã¤¿¡ª ", t_name);
2723 #else
2724                         if (see_t) msg_format("%^s is blinded!", t_name);
2725 #endif
2726
2727                         (void)set_monster_confused(t_idx, MON_CONFUSED(t_ptr) + 12 + randint0(4));
2728                 }
2729
2730                 wake_up = TRUE;
2731
2732                 break;
2733
2734         /* RF5_CONF */
2735         case 128+29:
2736                 if (known)
2737                 {
2738                         if (see_either)
2739                         {
2740 #ifdef JP
2741                                 msg_format("%^s¤¬%s¤ÎÁ°¤Ë¸¸ÏÇŪ¤Ê¸¸¤ò¤Ä¤¯¤ê½Ð¤·¤¿¡£", m_name, t_name);
2742 #else
2743                                 msg_format("%^s casts a mesmerizing illusion in front of %s.", m_name, t_name);
2744 #endif
2745
2746                         }
2747                         else
2748                         {
2749                                 mon_fight = TRUE;
2750                         }
2751                 }
2752
2753                 if (tr_ptr->flags3 & RF3_NO_CONF)
2754                 {
2755 #ifdef JP
2756                         if (see_t) msg_format("%^s¤ÏÏǤ蘆¤ì¤Ê¤«¤Ã¤¿¡£", t_name);
2757 #else
2758                         if (see_t) msg_format("%^s disbelieves the feeble spell.", t_name);
2759 #endif
2760
2761                 }
2762                 else if (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10)
2763                 {
2764 #ifdef JP
2765                         if (see_t) msg_format("%^s¤ÏÏǤ蘆¤ì¤Ê¤«¤Ã¤¿¡£", t_name);
2766 #else
2767                         if (see_t) msg_format("%^s disbelieves the feeble spell.", t_name);
2768 #endif
2769
2770                 }
2771                 else
2772                 {
2773 #ifdef JP
2774                         if (see_t) msg_format("%^s¤Ïº®Í𤷤¿¤è¤¦¤À¡£", t_name);
2775 #else
2776                         if (see_t) msg_format("%^s seems confused.", t_name);
2777 #endif
2778
2779                         (void)set_monster_confused(t_idx, MON_CONFUSED(t_ptr) + 12 + randint0(4));
2780                 }
2781
2782                 wake_up = TRUE;
2783
2784                 break;
2785
2786         /* RF5_SLOW */
2787         case 128+30:
2788                 if (known)
2789                 {
2790                         if (see_either)
2791                         {
2792 #ifdef JP
2793                                 msg_format("%s¤¬%s¤Î¶ÚÆù¤«¤éÎϤòµÛ¤¤¤È¤Ã¤¿¡£", m_name, t_name);
2794 #else
2795                                 msg_format("%^s drains power from %s%s muscles.", m_name, t_name,
2796                                            (streq(t_name, "it") ? "s" : "'s"));
2797 #endif
2798
2799                         }
2800                         else
2801                         {
2802                                 mon_fight = TRUE;
2803                         }
2804                 }
2805
2806                 if (tr_ptr->flags1 & RF1_UNIQUE)
2807                 {
2808 #ifdef JP
2809                         if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2810 #else
2811                         if (see_t) msg_format("%^s is unaffected.", t_name);
2812 #endif
2813
2814                 }
2815                 else if (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10)
2816                 {
2817 #ifdef JP
2818                         if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2819 #else
2820                         if (see_t) msg_format("%^s is unaffected.", t_name);
2821 #endif
2822
2823                 }
2824                 else
2825                 {
2826                         if (set_monster_slow(t_idx, MON_SLOW(t_ptr) + 50))
2827                         {
2828 #ifdef JP
2829                                 if (see_t) msg_format("%s¤ÎÆ°¤­¤¬ÃÙ¤¯¤Ê¤Ã¤¿¡£", t_name);
2830 #else
2831                                 if (see_t) msg_format("%^s starts moving slower.", t_name);
2832 #endif
2833                         }
2834                 }
2835
2836                 wake_up = TRUE;
2837
2838                 break;
2839
2840         /* RF5_HOLD */
2841         case 128+31:
2842                 if (known)
2843                 {
2844                         if (see_either)
2845                         {
2846 #ifdef JP
2847                                 msg_format("%^s¤Ï%s¤ò¤¸¤Ã¤È¸«¤Ä¤á¤¿¡£", m_name, t_name);
2848 #else
2849                                 msg_format("%^s stares intently at %s.", m_name, t_name);
2850 #endif
2851
2852                         }
2853                         else
2854                         {
2855                                 mon_fight = TRUE;
2856                         }
2857                 }
2858
2859                 if ((tr_ptr->flags1 & RF1_UNIQUE) ||
2860                     (tr_ptr->flags3 & RF3_NO_STUN))
2861                 {
2862 #ifdef JP
2863                         if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2864 #else
2865                         if (see_t) msg_format("%^s is unaffected.", t_name);
2866 #endif
2867
2868                 }
2869                 else if (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10)
2870                 {
2871 #ifdef JP
2872                         if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2873 #else
2874                         if (see_t) msg_format("%^s is unaffected.", t_name);
2875 #endif
2876
2877                 }
2878                 else
2879                 {
2880 #ifdef JP
2881                         if (see_t) msg_format("%^s¤ÏËãá㤷¤¿¡ª", t_name);
2882 #else
2883                         if (see_t) msg_format("%^s is paralyzed!", t_name);
2884 #endif
2885
2886                         (void)set_monster_stunned(t_idx, MON_STUNNED(t_ptr) + randint1(4) + 4);
2887                 }
2888
2889                 wake_up = TRUE;
2890
2891                 break;
2892
2893
2894         /* RF6_HASTE */
2895         case 160+0:
2896                 if (known)
2897                 {
2898                         if (see_m)
2899                         {
2900 #ifdef JP
2901                                 msg_format("%^s¤¬¼«Ê¬¤ÎÂΤËÇ°¤òÁ÷¤Ã¤¿¡£", m_name);
2902 #else
2903                                 msg_format("%^s concentrates on %s body.", m_name, m_poss);
2904 #endif
2905
2906                         }
2907                         else
2908                         {
2909                                 mon_fight = TRUE;
2910                         }
2911                 }
2912
2913                 /* Allow quick speed increases to base+10 */
2914                 if (set_monster_fast(m_idx, MON_FAST(m_ptr) + 100))
2915                 {
2916 #ifdef JP
2917                         if (see_m) msg_format("%^s¤ÎÆ°¤­¤¬Â®¤¯¤Ê¤Ã¤¿¡£", m_name);
2918 #else
2919                         if (see_m) msg_format("%^s starts moving faster.", m_name);
2920 #endif
2921                 }
2922                 break;
2923
2924         /* RF6_HAND_DOOM */
2925         case 160+1:
2926                 if (known)
2927                 {
2928                         if (see_m)
2929                         {
2930 #ifdef JP
2931                                 msg_format("%^s¤¬%s¤Ë<ÇËÌǤμê>¤òÊü¤Ã¤¿¡ª", m_name, t_name);
2932 #else
2933                                 msg_format("%^s invokes the Hand of Doom upon %s!", m_name, t_name);
2934 #endif
2935
2936                         }
2937                         else
2938                         {
2939                                 mon_fight = TRUE;
2940                         }
2941                 }
2942
2943                 dam = 20; /* Dummy power */
2944                 monst_breath_monst(m_idx, y, x, GF_HAND_DOOM, dam, 0, FALSE, MS_HAND_DOOM, learnable);
2945
2946                 break;
2947
2948         /* RF6_HEAL */
2949         case 160+2:
2950                 if (known)
2951                 {
2952                         if (see_m)
2953                         {
2954 #ifdef JP
2955                                 msg_format("%^s¤Ï¼«Ê¬¤Î½ý¤ËÇ°¤ò½¸Ã椷¤¿¡£", m_name);
2956 #else
2957                                 msg_format("%^s concentrates on %s wounds.", m_name, m_poss);
2958 #endif
2959
2960                         }
2961                         else
2962                         {
2963                                 mon_fight = TRUE;
2964                         }
2965                 }
2966
2967                 /* Heal some */
2968                 m_ptr->hp += (rlev * 6);
2969
2970                 /* Fully healed */
2971                 if (m_ptr->hp >= m_ptr->maxhp)
2972                 {
2973                         /* Fully healed */
2974                         m_ptr->hp = m_ptr->maxhp;
2975
2976                         if (known)
2977                         {
2978                                 if (see_m)
2979                                 {
2980 #ifdef JP
2981                                         msg_format("%^s¤Ï´°Á´¤Ë¼£¤Ã¤¿¡ª", m_name);
2982 #else
2983                                         msg_format("%^s looks completely healed!", m_name);
2984 #endif
2985
2986                                 }
2987                                 else
2988                                 {
2989                                         mon_fight = TRUE;
2990                                 }
2991                         }
2992                 }
2993
2994                 /* Partially healed */
2995                 else if (known)
2996                 {
2997                         if (see_m)
2998                         {
2999 #ifdef JP
3000                                 msg_format("%^s¤ÏÂÎÎϤò²óÉü¤·¤¿¤è¤¦¤À¡£", m_name);
3001 #else
3002                                 msg_format("%^s looks healthier.", m_name);
3003 #endif
3004                         }
3005                         else
3006                         {
3007                                 mon_fight = TRUE;
3008                         }
3009                 }
3010
3011                 /* Redraw (later) if needed */
3012                 if (p_ptr->health_who == m_idx) p_ptr->redraw |= (PR_HEALTH);
3013                 if (p_ptr->riding == m_idx) p_ptr->redraw |= (PR_UHEALTH);
3014
3015                 /* Cancel fear */
3016                 if (MON_MONFEAR(m_ptr))
3017                 {
3018                         /* Cancel fear */
3019                         (void)set_monster_monfear(m_idx, 0);
3020
3021                         /* Message */
3022 #ifdef JP
3023                         if (see_m) msg_format("%^s¤Ïͦµ¤¤ò¼è¤êÌᤷ¤¿¡£", m_name);
3024 #else
3025                         if (see_m) msg_format("%^s recovers %s courage.", m_name, m_poss);
3026 #endif
3027                 }
3028
3029                 break;
3030
3031         /* RF6_INVULNER */
3032         case 160+3:
3033                 if (known)
3034                 {
3035                         if (see_m)
3036                         {
3037                                 disturb(1, 0);
3038 #ifdef JP
3039                                 msg_format("%s¤Ï̵½ý¤Îµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name);
3040 #else
3041                                 msg_format("%^s casts a Globe of Invulnerability.", m_name);
3042 #endif
3043                         }
3044                         else
3045                         {
3046                                 mon_fight = TRUE;
3047                         }
3048                 }
3049
3050                 if (!MON_INVULNER(m_ptr)) (void)set_monster_invulner(m_idx, randint1(4) + 4, FALSE);
3051                 break;
3052
3053         /* RF6_BLINK */
3054         case 160+4:
3055                 if (see_m)
3056                 {
3057 #ifdef JP
3058                         msg_format("%^s¤¬½Ö»þ¤Ë¾Ã¤¨¤¿¡£", m_name);
3059 #else
3060                         msg_format("%^s blinks away.", m_name);
3061 #endif
3062
3063                 }
3064
3065                 teleport_away(m_idx, 10, 0L);
3066
3067                 break;
3068
3069         /* RF6_TPORT */
3070         case 160+5:
3071                 if (see_m)
3072                 {
3073 #ifdef JP
3074                         msg_format("%^s¤¬¥Æ¥ì¥Ý¡¼¥È¤·¤¿¡£", m_name);
3075 #else
3076                         msg_format("%^s teleports away.", m_name);
3077 #endif
3078                 }
3079
3080                 teleport_away_followable(m_idx);
3081                 break;
3082
3083         /* RF6_WORLD */
3084         case 160+6:
3085 #if 0
3086                 int who = 0;
3087                 if(m_ptr->r_idx = MON_DIO) who == 1;
3088                 else if(m_ptr->r_idx = MON_WONG) who == 3;
3089                 dam = who;
3090                 if(!process_the_world(randint1(2)+2, who, player_has_los_bold(m_ptr->fy, m_ptr->fx))) return (FALSE);
3091 #endif
3092                 return FALSE;
3093
3094         /* RF6_SPECIAL */
3095         case 160+7:
3096                 switch (m_ptr->r_idx)
3097                 {
3098                 case MON_OHMU:
3099                         /* Moved to process_monster(), like multiplication */
3100                         return FALSE;
3101
3102                 case MON_ROLENTO:
3103                         if (known)
3104                         {
3105                                 if (see_either)
3106                                 {
3107                                         disturb(1, 0);
3108
3109 #ifdef JP
3110                                         msg_format("%^s¤Ï¼êÜØÃƤò¤Ð¤é¤Þ¤¤¤¿¡£", m_name);
3111 #else
3112                                         msg_format("%^s throws some hand grenades.", m_name);
3113 #endif
3114                                 }
3115                                 else
3116                                 {
3117                                         mon_fight = TRUE;
3118                                 }
3119                         }
3120
3121                         {
3122                                 int num = 1 + randint1(3);
3123                                 for (k = 0; k < num; k++)
3124                                 {
3125                                         count += summon_named_creature(m_idx, y, x, MON_SHURYUUDAN, 0);
3126                                 }
3127                         }
3128
3129                         if (known && !see_t && count)
3130                         {
3131                                 mon_fight = TRUE;
3132                         }
3133                         break;
3134
3135                 default:
3136                         if (r_ptr->d_char == 'B')
3137                         {
3138                                 if (one_in_(3))
3139                                 {
3140                                         if (see_m)
3141                                         {
3142 #ifdef JP
3143                                                 msg_format("%^s¤ÏÆÍÁ³µÞ¾å¾º¤·¤Æ»ë³¦¤«¤é¾Ã¤¨¤¿!", m_name);
3144 #else
3145                                                 msg_format("%^s suddenly go out of your sight!", m_name);
3146 #endif
3147                                         }
3148                                         teleport_away(m_idx, 10, TELEPORT_NONMAGICAL);
3149                                         p_ptr->update |= (PU_MONSTERS);
3150                                 }
3151                                 else
3152                                 {
3153                                         if (known)
3154                                         {
3155                                                 if (see_either)
3156                                                 {
3157 #ifdef JP
3158                                                         msg_format("%^s¤¬%s¤òÄϤó¤Ç¶õÃ椫¤éÅꤲÍ¤¿¡£", m_name, t_name);
3159 #else
3160                                                         msg_format("%^s holds %s, and drops from the sky.", m_name, t_name);
3161 #endif
3162
3163                                                 }
3164                                                 else
3165                                                 {
3166                                                         mon_fight = TRUE;
3167                                                 }
3168                                         }
3169
3170                                         dam = damroll(4, 8);
3171
3172                                         if (t_idx == p_ptr->riding) teleport_player_to(m_ptr->fy, m_ptr->fx, TELEPORT_NONMAGICAL | TELEPORT_PASSIVE);
3173                                         else teleport_monster_to(t_idx, m_ptr->fy, m_ptr->fx, 100, TELEPORT_NONMAGICAL | TELEPORT_PASSIVE);
3174
3175                                         sound(SOUND_FALL);
3176
3177                                         if (tr_ptr->flags7 & RF7_CAN_FLY)
3178                                         {
3179 #ifdef JP
3180                                                 if (see_t) msg_format("%^s¤ÏÀŤ«¤ËÃåÃϤ·¤¿¡£", t_name);
3181 #else
3182                                                 if (see_t) msg_format("%^s floats gently down to the ground.", t_name);
3183 #endif
3184                                         }
3185                                         else
3186                                         {
3187 #ifdef JP
3188                                                 if (see_t) msg_format("%^s¤ÏÃÏÌ̤Ë᤭¤Ä¤±¤é¤ì¤¿¡£", t_name);
3189 #else
3190                                                 if (see_t) msg_format("%^s crashed into the ground.", t_name);
3191 #endif
3192                                                 dam += damroll(6, 8);
3193                                         }
3194
3195                                         if (p_ptr->riding == t_idx)
3196                                         {
3197                                                 int get_damage = 0;
3198
3199                                                 /* Mega hack -- this special action deals damage to the player. Therefore the code of "eyeeye" is necessary.
3200                                                    -- henkma
3201                                                  */
3202                                                 get_damage = take_hit(DAMAGE_NOESCAPE, dam, m_name, -1);
3203                                                 if (p_ptr->tim_eyeeye && get_damage > 0 && !p_ptr->is_dead)
3204                                                 {
3205 #ifdef JP
3206                                                         msg_format("¹¶·â¤¬%s¼«¿È¤ò½ý¤Ä¤±¤¿¡ª", m_name);
3207 #else
3208                                                         char m_name_self[80];
3209
3210                                                         /* hisself */
3211                                                         monster_desc(m_name_self, m_ptr, MD_PRON_VISIBLE | MD_POSSESSIVE | MD_OBJECTIVE);
3212
3213                                                         msg_format("The attack of %s has wounded %s!", m_name, m_name_self);
3214 #endif
3215                                                         project(0, 0, m_ptr->fy, m_ptr->fx, get_damage, GF_MISSILE, PROJECT_KILL, -1);
3216                                                         set_tim_eyeeye(p_ptr->tim_eyeeye-5, TRUE);
3217                                                 }
3218                                         }
3219
3220                                         mon_take_hit_mon(t_idx, dam, &fear, extract_note_dies(real_r_ptr(t_ptr)), m_idx);
3221                                 }
3222                                 break;
3223                         }
3224
3225                         /* Something is wrong */
3226                         else return FALSE;
3227                 }
3228
3229                 /* done */
3230                 break;
3231
3232         /* RF6_TELE_TO */
3233         case 160+8:
3234                 if (known)
3235                 {
3236                         if (see_either)
3237                         {
3238 #ifdef JP
3239                                 msg_format("%^s¤¬%s¤ò°ú¤­Ìᤷ¤¿¡£", m_name, t_name);
3240 #else
3241                                 msg_format("%^s commands %s to return.", m_name, t_name);
3242 #endif
3243
3244                         }
3245                         else
3246                         {
3247                                 mon_fight = TRUE;
3248                         }
3249                 }
3250
3251                 if (tr_ptr->flagsr & RFR_RES_TELE)
3252                 {
3253                         if ((tr_ptr->flags1 & RF1_UNIQUE) || (tr_ptr->flagsr & RFR_RES_ALL))
3254                         {
3255                                 if (is_original_ap_and_seen(t_ptr)) tr_ptr->r_flagsr |= RFR_RES_TELE;
3256                                 if (see_t)
3257                                 {
3258 #ifdef JP
3259                                         msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
3260 #else
3261                                         msg_format("%^s is unaffected!", t_name);
3262 #endif
3263                                 }
3264
3265                                 resists_tele = TRUE;
3266                         }
3267                         else if (tr_ptr->level > randint1(100))
3268                         {
3269                                 if (is_original_ap_and_seen(t_ptr)) tr_ptr->r_flagsr |= RFR_RES_TELE;
3270                                 if (see_t)
3271                                 {
3272 #ifdef JP
3273                                         msg_format("%^s¤ÏÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡ª", t_name);
3274 #else
3275                                         msg_format("%^s resists!", t_name);
3276 #endif
3277                                 }
3278
3279                                 resists_tele = TRUE;
3280                         }
3281                 }
3282
3283                 if (!resists_tele)
3284                 {
3285                         if (t_idx == p_ptr->riding) teleport_player_to(m_ptr->fy, m_ptr->fx, TELEPORT_PASSIVE);
3286                         else teleport_monster_to(t_idx, m_ptr->fy, m_ptr->fx, 100, TELEPORT_PASSIVE);
3287                 }
3288
3289                 wake_up = TRUE;
3290                 break;
3291
3292         /* RF6_TELE_AWAY */
3293         case 160+9:
3294                 if (known)
3295                 {
3296                         if (see_either)
3297                         {
3298 #ifdef JP
3299                                 msg_format("%^s¤Ï%s¤ò¥Æ¥ì¥Ý¡¼¥È¤µ¤»¤¿¡£", m_name, t_name);
3300 #else
3301                                 msg_format("%^s teleports %s away.", m_name, t_name);
3302 #endif
3303
3304                         }
3305                         else
3306                         {
3307                                 mon_fight = TRUE;
3308                         }
3309                 }
3310
3311                 if (tr_ptr->flagsr & RFR_RES_TELE)
3312                 {
3313                         if ((tr_ptr->flags1 & RF1_UNIQUE) || (tr_ptr->flagsr & RFR_RES_ALL))
3314                         {
3315                                 if (is_original_ap_and_seen(t_ptr)) tr_ptr->r_flagsr |= RFR_RES_TELE;
3316                                 if (see_t)
3317                                 {
3318 #ifdef JP
3319                                         msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
3320 #else
3321                                         msg_format("%^s is unaffected!", t_name);
3322 #endif
3323                                 }
3324
3325                                 resists_tele = TRUE;
3326                         }
3327                         else if (tr_ptr->level > randint1(100))
3328                         {
3329                                 if (is_original_ap_and_seen(t_ptr)) tr_ptr->r_flagsr |= RFR_RES_TELE;
3330                                 if (see_t)
3331                                 {
3332 #ifdef JP
3333                                         msg_format("%^s¤ÏÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡ª", t_name);
3334 #else
3335                                         msg_format("%^s resists!", t_name);
3336 #endif
3337                                 }
3338
3339                                 resists_tele = TRUE;
3340                         }
3341                 }
3342
3343                 if (!resists_tele)
3344                 {
3345                         if (t_idx == p_ptr->riding) teleport_player_away(m_idx, MAX_SIGHT * 2 + 5);
3346                         else teleport_away(t_idx, MAX_SIGHT * 2 + 5, TELEPORT_PASSIVE);
3347                 }
3348
3349                 wake_up = TRUE;
3350                 break;
3351
3352         /* RF6_TELE_LEVEL */
3353         case 160+10:
3354                 if (known)
3355                 {
3356                         if (see_either)
3357                         {
3358 #ifdef JP
3359                                 msg_format("%^s¤¬%s¤Î­¤ò»Ø¤µ¤·¤¿¡£", m_name, t_name);
3360 #else
3361                                 msg_format("%^s gestures at %s's feet.", m_name, t_name);
3362 #endif
3363                         }
3364                         else
3365                         {
3366                                 mon_fight = TRUE;
3367                         }
3368                 }
3369
3370                 if (tr_ptr->flagsr & (RFR_EFF_RES_NEXU_MASK | RFR_RES_TELE))
3371                 {
3372 #ifdef JP
3373                         if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
3374 #else
3375                         if (see_t) msg_format("%^s is unaffected!", t_name);
3376 #endif
3377                 }
3378                 else if ((tr_ptr->flags1 & RF1_QUESTOR) ||
3379                             (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10))
3380                 {
3381 #ifdef JP
3382                         if (see_t) msg_format("%^s¤Ï¸úÎϤòÄ·¤ÍÊÖ¤·¤¿¡ª", t_name);
3383 #else
3384                         if (see_t) msg_format("%^s resist the effects!", t_name);
3385 #endif
3386                 }
3387                 else teleport_level((t_idx == p_ptr->riding) ? 0 : t_idx);
3388
3389                 wake_up = TRUE;
3390                 break;
3391
3392         /* RF6_PSY_SPEAR */
3393         case 160+11:
3394                 if (known)
3395                 {
3396                         if (see_either)
3397                         {
3398 #ifdef JP
3399                                 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¸÷¤Î·õ¤òÊü¤Ã¤¿¡£", m_name, t_name);
3400 #else
3401                                 msg_format("%^s throw a Psycho-spear at %s.", m_name, t_name);
3402 #endif
3403
3404                         }
3405                         else
3406                         {
3407                                 mon_fight = TRUE;
3408                         }
3409                 }
3410
3411                 dam = (r_ptr->flags2 & RF2_POWERFUL) ? (randint1(rlev * 2) + 180) : (randint1(rlev * 3 / 2) + 120);
3412                 monst_beam_monst(m_idx, y, x, GF_PSY_SPEAR,
3413                                  dam, MS_PSY_SPEAR, learnable);
3414                 break;
3415
3416         /* RF6_DARKNESS */
3417         case 160+12:
3418                 if (known)
3419                 {
3420                         if (see_m)
3421                         {
3422 #ifdef JP
3423                                 if (can_use_lite_area) msg_format("%^s¤¬ÊÕ¤ê¤òÌÀ¤ë¤¯¾È¤é¤·¤¿¡£", m_name);
3424                                 else msg_format("%^s¤¬°Å°Ç¤ÎÃæ¤Ç¼ê¤ò¿¶¤Ã¤¿¡£", m_name);
3425 #else
3426                                 if (can_use_lite_area) msg_format("%^s cast a spell to light up.", m_name);
3427                                 else msg_format("%^s gestures in shadow.", m_name);
3428 #endif
3429
3430                                 if (see_t)
3431                                 {
3432 #ifdef JP
3433                                         if (can_use_lite_area) msg_format("%^s¤ÏÇò¤¤¸÷¤ËÊñ¤Þ¤ì¤¿¡£", t_name);
3434                                         else msg_format("%^s¤Ï°Å°Ç¤ËÊñ¤Þ¤ì¤¿¡£", t_name);
3435 #else
3436                                         if (can_use_lite_area) msg_format("%^s is surrounded by a white light.", t_name);
3437                                         else msg_format("%^s is surrounded by darkness.", t_name);
3438 #endif
3439                                 }
3440                         }
3441                         else
3442                         {
3443                                 mon_fight = TRUE;
3444                         }
3445                 }
3446
3447                 if (can_use_lite_area)
3448                 {
3449                         (void)project(m_idx, 3, y, x, 0, GF_LITE_WEAK, PROJECT_GRID | PROJECT_KILL, -1);
3450                         lite_room(y, x);
3451                 }
3452                 else
3453                 {
3454                         (void)project(m_idx, 3, y, x, 0, GF_DARK_WEAK, PROJECT_GRID | PROJECT_KILL, MS_DARKNESS);
3455                         unlite_room(y, x);
3456                 }
3457
3458                 break;
3459
3460         /* RF6_TRAPS */
3461         case 160+13:
3462 #if 0
3463                 if (known)
3464                 {
3465                         if (see_m)
3466                         {
3467 #ifdef JP
3468                                 msg_format("%^s¤¬¼öʸ¤ò¾§¤¨¤Æ¼Ù°­¤ËÈù¾Ð¤ó¤À¡£", m_name);
3469 #else
3470                                 msg_format("%^s casts a spell and cackles evilly.", m_name);
3471 #endif
3472                         }
3473                         else
3474                         {
3475 #ifdef JP
3476                                 msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
3477 #else
3478                                 msg_format("%^s mumbles.", m_name);
3479 #endif
3480                         }
3481                 }
3482
3483                 trap_creation(y, x);
3484
3485                 break;
3486 #else
3487                 /* Not implemented */
3488                 return FALSE;
3489 #endif
3490
3491         /* RF6_FORGET */
3492         case 160+14:
3493                 /* Not implemented */
3494                 return FALSE;
3495
3496         /* RF6_RAISE_DEAD */
3497         case 160+15:
3498                 if (known)
3499                 {
3500                         if (see_either)
3501                         {
3502                                 disturb(1, 0);
3503 #ifdef JP
3504                                 if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
3505 #else
3506                                 if (blind) msg_format("%^s mumbles.", m_name);
3507 #endif
3508
3509 #ifdef JP
3510                                 else msg_format("%^s¤¬»à¼ÔÉü³è¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name);
3511 #else
3512                                 else msg_format("%^s casts a spell to revive corpses.", m_name);
3513 #endif
3514                         }
3515                         else
3516                         {
3517                                 mon_fight = TRUE;
3518                         }
3519                 }
3520                 animate_dead(m_idx, m_ptr->fy, m_ptr->fx);
3521                 break;
3522
3523         /* RF6_S_KIN */
3524         case 160+16:
3525                 if (known)
3526                 {
3527                         if (see_either)
3528                         {
3529                                 disturb(1, 0);
3530
3531                                 if (m_ptr->r_idx == MON_SERPENT || m_ptr->r_idx == MON_ZOMBI_SERPENT)
3532                                 {
3533 #ifdef JP
3534                                         msg_format("%^s¤¬¥À¥ó¥¸¥ç¥ó¤Î¼ç¤ò¾¤´­¤·¤¿¡£", m_name);
3535 #else
3536                                         msg_format("%^s magically summons guardians of dungeons.", m_name);
3537 #endif
3538                                 }
3539                                 else
3540                                 {
3541 #ifdef JP
3542                                         msg_format("%s¤¬ËâË¡¤Ç%s¤ò¾¤´­¤·¤¿¡£", m_name,
3543                                                    ((r_ptr->flags1 & RF1_UNIQUE) ? "¼ê²¼" : "Ãç´Ö"));
3544 #else
3545                                         msg_format("%^s magically summons %s %s.", m_name, m_poss,
3546                                                    ((r_ptr->flags1 & RF1_UNIQUE) ? "minions" : "kin"));
3547 #endif
3548                                 }
3549
3550                         }
3551                         else
3552                         {
3553                                 mon_fight = TRUE;
3554                         }
3555                 }
3556
3557                 switch (m_ptr->r_idx)
3558                 {
3559                 case MON_MENELDOR:
3560                 case MON_GWAIHIR:
3561                 case MON_THORONDOR:
3562                         {
3563                                 int num = 4 + randint1(3);
3564                                 for (k = 0; k < num; k++)
3565                                 {
3566                                         count += summon_specific(m_idx, y, x, rlev, SUMMON_EAGLES, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
3567                                 }
3568                         }
3569                         break;
3570
3571                 case MON_BULLGATES:
3572                         {
3573                                 int num = 2 + randint1(3);
3574                                 for (k = 0; k < num; k++)
3575                                 {
3576                                         count += summon_named_creature(m_idx, y, x, MON_IE, 0);
3577                                 }
3578                         }
3579                         break;
3580
3581                 case MON_SERPENT:
3582                 case MON_ZOMBI_SERPENT:
3583                         if (r_info[MON_JORMUNGAND].cur_num < r_info[MON_JORMUNGAND].max_num && one_in_(6))
3584                         {
3585                                 if (known && see_t)
3586                                 {
3587 #ifdef JP
3588                                         msg_print("ÃÏÌ̤«¤é¿å¤¬¿á¤­½Ð¤·¤¿¡ª");
3589 #else
3590                                         msg_print("Water blew off from the ground!");
3591 #endif
3592                                 }
3593                                 project(t_idx, 8, y, x, 3, GF_WATER_FLOW, PROJECT_GRID | PROJECT_HIDE, -1);
3594                         }
3595
3596                         {
3597                                 int num = 2 + randint1(3);
3598                                 for (k = 0; k < num; k++)
3599                                 {
3600                                         count += summon_specific(m_idx, y, x, rlev, SUMMON_GUARDIANS, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
3601                                 }
3602                         }
3603                         break;
3604
3605                 case MON_CALDARM:
3606                         {
3607                                 int num = randint1(3);
3608                                 for (k = 0; k < num; k++)
3609                                 {
3610                                         count += summon_named_creature(m_idx, y, x, MON_LOCKE_CLONE, 0);
3611                                 }
3612                         }
3613                         break;
3614
3615                 case MON_LOUSY:
3616                         {
3617                                 int num = 2 + randint1(3);
3618                                 for (k = 0; k < num; k++)
3619                                 {
3620                                         count += summon_specific(m_idx, y, x, rlev, SUMMON_LOUSE, (PM_ALLOW_GROUP));
3621                                 }
3622                         }
3623                         break;
3624
3625                 default:
3626                         summon_kin_type = r_ptr->d_char;
3627
3628                         for (k = 0; k < 4; k++)
3629                         {
3630                                 count += summon_specific(m_idx, y, x, rlev, SUMMON_KIN, (PM_ALLOW_GROUP));
3631                         }
3632                         break;
3633                 }
3634
3635                 if (known && !see_t && count)
3636                 {
3637                         mon_fight = TRUE;
3638                 }
3639
3640                 break;
3641
3642         /* RF6_S_CYBER */
3643         case 160+17:
3644                 if (known)
3645                 {
3646                         if (see_either)
3647                         {
3648                                 disturb(1, 0);
3649
3650 #ifdef JP
3651                                 msg_format("%^s¤¬¥µ¥¤¥Ð¡¼¥Ç¡¼¥â¥ó¤ò¾¤´­¤·¤¿¡ª", m_name);
3652 #else
3653                                 msg_format("%^s magically summons Cyberdemons!", m_name);
3654 #endif
3655
3656                         }
3657                         else
3658                         {
3659                                 mon_fight = TRUE;
3660                         }
3661                 }
3662
3663                 if (is_friendly(m_ptr))
3664                 {
3665                         count += summon_specific(m_idx, y, x, rlev, SUMMON_CYBER, (PM_ALLOW_GROUP));
3666                 }
3667                 else
3668                 {
3669                         count += summon_cyber(m_idx, y, x);
3670                 }
3671
3672                 if (known && !see_t && count)
3673                 {
3674                         mon_fight = TRUE;
3675                 }
3676
3677                 break;
3678
3679         /* RF6_S_MONSTER */
3680         case 160+18:
3681                 if (known)
3682                 {
3683                         if (see_either)
3684                         {
3685                                 disturb(1, 0);
3686
3687 #ifdef JP
3688                                 msg_format("%^s¤¬ËâË¡¤ÇÃç´Ö¤ò¾¤´­¤·¤¿¡ª", m_name);
3689 #else
3690                                 msg_format("%^s magically summons help!", m_name);
3691 #endif
3692
3693                         }
3694                         else
3695                         {
3696                                 mon_fight = TRUE;
3697                         }
3698                 }
3699
3700                 count += summon_specific(m_idx, y, x, rlev, 0, (u_mode));
3701
3702                 if (known && !see_t && count)
3703                 {
3704                         mon_fight = TRUE;
3705                 }
3706
3707                 break;
3708
3709         /* RF6_S_MONSTERS */
3710         case 160+19:
3711                 if (known)
3712                 {
3713                         if (see_either)
3714                         {
3715                                 disturb(1, 0);
3716
3717 #ifdef JP
3718                                 msg_format("%^s¤¬ËâË¡¤Ç¥â¥ó¥¹¥¿¡¼¤ò¾¤´­¤·¤¿¡ª", m_name);
3719 #else
3720                                 msg_format("%^s magically summons monsters!", m_name);
3721 #endif
3722
3723                         }
3724                         else
3725                         {
3726                                 mon_fight = TRUE;
3727                         }
3728                 }
3729
3730                 for (k = 0; k < s_num_6; k++)
3731                 {
3732                         count += summon_specific(m_idx, y, x, rlev, 0, (PM_ALLOW_GROUP | u_mode));
3733                 }
3734
3735                 if (known && !see_t && count)
3736                 {
3737                         mon_fight = TRUE;
3738                 }
3739
3740                 break;
3741
3742         /* RF6_S_ANT */
3743         case 160+20:
3744                 if (known)
3745                 {
3746                         if (see_either)
3747                         {
3748                                 disturb(1, 0);
3749
3750 #ifdef JP
3751                                 msg_format("%^s¤¬ËâË¡¤Ç¥¢¥ê¤ò¾¤´­¤·¤¿¡£", m_name);
3752 #else
3753                                 msg_format("%^s magically summons ants.", m_name);
3754 #endif
3755
3756                         }
3757                         else
3758                         {
3759                                 mon_fight = TRUE;
3760                         }
3761                 }
3762
3763                 for (k = 0; k < s_num_6; k++)
3764                 {
3765                         count += summon_specific(m_idx, y, x, rlev, SUMMON_ANT, (PM_ALLOW_GROUP));
3766                 }
3767
3768                 if (known && !see_t && count)
3769                 {
3770                         mon_fight = TRUE;
3771                 }
3772
3773                 break;
3774
3775         /* RF6_S_SPIDER */
3776         case 160+21:
3777                 if (known)
3778                 {
3779                         if (see_either)
3780                         {
3781                                 disturb(1, 0);
3782
3783 #ifdef JP
3784                                 msg_format("%^s¤¬ËâË¡¤Ç¥¯¥â¤ò¾¤´­¤·¤¿¡£", m_name);
3785 #else
3786                                 msg_format("%^s magically summons spiders.", m_name);
3787 #endif
3788
3789                         }
3790                         else
3791                         {
3792                                 mon_fight = TRUE;
3793                         }
3794                 }
3795
3796                 for (k = 0; k < s_num_6; k++)
3797                 {
3798                         count += summon_specific(m_idx, y, x, rlev, SUMMON_SPIDER, (PM_ALLOW_GROUP));
3799                 }
3800
3801                 if (known && !see_t && count)
3802                 {
3803                         mon_fight = TRUE;
3804                 }
3805
3806                 break;
3807
3808         /* RF6_S_HOUND */
3809         case 160+22:
3810                 if (known)
3811                 {
3812                         if (see_either)
3813                         {
3814                                 disturb(1, 0);
3815
3816 #ifdef JP
3817                                 msg_format("%^s¤¬ËâË¡¤Ç¥Ï¥¦¥ó¥É¤ò¾¤´­¤·¤¿¡£", m_name);
3818 #else
3819                                 msg_format("%^s magically summons hounds.", m_name);
3820 #endif
3821
3822                         }
3823                         else
3824                         {
3825                                 mon_fight = TRUE;
3826                         }
3827                 }
3828
3829                 for (k = 0; k < s_num_4; k++)
3830                 {
3831                         count += summon_specific(m_idx, y, x, rlev, SUMMON_HOUND, (PM_ALLOW_GROUP));
3832                 }
3833
3834                 if (known && !see_t && count)
3835                 {
3836                         mon_fight = TRUE;
3837                 }
3838
3839                 break;
3840
3841         /* RF6_S_HYDRA */
3842         case 160+23:
3843                 if (known)
3844                 {
3845                         if (see_either)
3846                         {
3847                                 disturb(1, 0);
3848
3849 #ifdef JP
3850                                 msg_format("%^s¤¬ËâË¡¤Ç¥Ò¥É¥é¤ò¾¤´­¤·¤¿¡£", m_name);
3851 #else
3852                                 msg_format("%^s magically summons hydras.", m_name);
3853 #endif
3854
3855                         }
3856                         else
3857                         {
3858                                 mon_fight = TRUE;
3859                         }
3860                 }
3861
3862                 for (k = 0; k < s_num_4; k++)
3863                 {
3864                         count += summon_specific(m_idx, y, x, rlev, SUMMON_HYDRA, (PM_ALLOW_GROUP));
3865                 }
3866
3867                 if (known && !see_t && count)
3868                 {
3869                         mon_fight = TRUE;
3870                 }
3871
3872                 break;
3873
3874         /* RF6_S_ANGEL */
3875         case 160+24:
3876                 if (known)
3877                 {
3878                         if (see_either)
3879                         {
3880                                 disturb(1, 0);
3881
3882 #ifdef JP
3883                                 msg_format("%^s¤¬ËâË¡¤ÇÅ·»È¤ò¾¤´­¤·¤¿¡ª", m_name);
3884 #else
3885                                 msg_format("%^s magically summons an angel!", m_name);
3886 #endif
3887
3888                         }
3889                         else
3890                         {
3891                                 mon_fight = TRUE;
3892                         }
3893                 }
3894
3895                 {
3896                         int num = 1;
3897
3898                         if ((r_ptr->flags1 & RF1_UNIQUE) && !easy_band)
3899                         {
3900                                 num += r_ptr->level/40;
3901                         }
3902
3903                         for (k = 0; k < num; k++)
3904                         {
3905                                 count += summon_specific(m_idx, y, x, rlev, SUMMON_ANGEL, (PM_ALLOW_GROUP));
3906                         }
3907                 }
3908
3909                 if (known && !see_t && count)
3910                 {
3911                         mon_fight = TRUE;
3912                 }
3913
3914                 break;
3915
3916         /* RF6_S_DEMON */
3917         case 160+25:
3918                 if (known)
3919                 {
3920                         if (see_either)
3921                         {
3922                                 disturb(1, 0);
3923
3924 #ifdef JP
3925                                 msg_format("%^s¤¬ËâË¡¤Çº®Æ٤εÜÄ¤é¥Ç¡¼¥â¥ó¤ò¾¤´­¤·¤¿¡ª", m_name);
3926 #else
3927                                 msg_format("%^s magically summons a demon from the Courts of Chaos!", m_name);
3928 #endif
3929
3930                         }
3931                         else
3932                         {
3933                                 mon_fight = TRUE;
3934                         }
3935                 }
3936
3937                 for (k = 0; k < 1; k++)
3938                 {
3939                         count += summon_specific(m_idx, y, x, rlev, SUMMON_DEMON, (PM_ALLOW_GROUP));
3940                 }
3941
3942                 if (known && !see_t && count)
3943                 {
3944                         mon_fight = TRUE;
3945                 }
3946
3947                 break;
3948
3949         /* RF6_S_UNDEAD */
3950         case 160+26:
3951                 if (known)
3952                 {
3953                         if (see_either)
3954                         {
3955                                 disturb(1, 0);
3956
3957 #ifdef JP
3958                                 msg_format("%s¤¬ËâË¡¤Ç¥¢¥ó¥Ç¥Ã¥É¤ò¾¤´­¤·¤¿¡£", m_name);
3959 #else
3960                                 msg_format("%^s magically summons undead.", m_name);
3961 #endif
3962
3963                         }
3964                         else
3965                         {
3966                                 mon_fight = TRUE;
3967                         }
3968                 }
3969
3970                 for (k = 0; k < 1; k++)
3971                 {
3972                         count += summon_specific(m_idx, y, x, rlev, SUMMON_UNDEAD, (PM_ALLOW_GROUP));
3973                 }
3974
3975                 if (known && !see_t && count)
3976                 {
3977                         mon_fight = TRUE;
3978                 }
3979
3980                 break;
3981
3982         /* RF6_S_DRAGON */
3983         case 160+27:
3984                 if (known)
3985                 {
3986                         if (see_either)
3987                         {
3988                                 disturb(1, 0);
3989
3990 #ifdef JP
3991                                 msg_format("%^s¤¬ËâË¡¤Ç¥É¥é¥´¥ó¤ò¾¤´­¤·¤¿¡ª", m_name);
3992 #else
3993                                 msg_format("%^s magically summons a dragon!", m_name);
3994 #endif
3995
3996                         }
3997                         else
3998                         {
3999                                 mon_fight = TRUE;
4000                         }
4001                 }
4002
4003                 for (k = 0; k < 1; k++)
4004                 {
4005                         count += summon_specific(m_idx, y, x, rlev, SUMMON_DRAGON, (PM_ALLOW_GROUP));
4006                 }
4007
4008                 if (known && !see_t && count)
4009                 {
4010                         mon_fight = TRUE;
4011                 }
4012
4013                 break;
4014
4015         /* RF6_S_HI_UNDEAD */
4016         case 160+28:
4017                 if (known)
4018                 {
4019                         if (see_either)
4020                         {
4021                                 disturb(1, 0);
4022
4023 #ifdef JP
4024                                 msg_format("%s¤¬ËâË¡¤Ç¥¢¥ó¥Ç¥Ã¥É¤ò¾¤´­¤·¤¿¡£", m_name);
4025 #else
4026                                 msg_format("%^s magically summons undead.", m_name);
4027 #endif
4028
4029                         }
4030                         else
4031                         {
4032                                 mon_fight = TRUE;
4033                         }
4034                 }
4035
4036                 for (k = 0; k < s_num_6; k++)
4037                 {
4038                         count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_UNDEAD, (PM_ALLOW_GROUP | u_mode));
4039                 }
4040
4041                 if (known && !see_t && count)
4042                 {
4043                         mon_fight = TRUE;
4044                 }
4045
4046                 break;
4047
4048         /* RF6_S_HI_DRAGON */
4049         case 160+29:
4050                 if (known)
4051                 {
4052                         if (see_either)
4053                         {
4054                                 disturb(1, 0);
4055
4056 #ifdef JP
4057                                 msg_format("%^s¤¬ËâË¡¤Ç¸ÅÂå¥É¥é¥´¥ó¤ò¾¤´­¤·¤¿¡ª", m_name);
4058 #else
4059                                 msg_format("%^s magically summons ancient dragons!", m_name);
4060 #endif
4061
4062                         }
4063                         else
4064                         {
4065                                 mon_fight = TRUE;
4066                         }
4067                 }
4068
4069                 for (k = 0; k < s_num_4; k++)
4070                 {
4071                         count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_DRAGON, (PM_ALLOW_GROUP | u_mode));
4072                 }
4073
4074                 if (known && !see_t && count)
4075                 {
4076                         mon_fight = TRUE;
4077                 }
4078
4079                 break;
4080
4081         /* RF6_S_AMBERITES */
4082         case 160+30:
4083                 if (known)
4084                 {
4085                         if (see_either)
4086                         {
4087                                 disturb(1, 0);
4088
4089 #ifdef JP
4090                                 msg_format("%^s¤¬¥¢¥ó¥Ð¡¼¤Î²¦Â²¤ò¾¤´­¤·¤¿¡ª", m_name);
4091 #else
4092                                 msg_format("%^s magically summons Lords of Amber!", m_name);
4093 #endif
4094
4095                         }
4096                         else
4097                         {
4098                                 mon_fight = TRUE;
4099                         }
4100                 }
4101
4102                 for (k = 0; k < s_num_4; k++)
4103                 {
4104                         count += summon_specific(m_idx, y, x, rlev, SUMMON_AMBERITES, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
4105                 }
4106
4107                 if (known && !see_t && count)
4108                 {
4109                         mon_fight = TRUE;
4110                 }
4111
4112                 break;
4113
4114         /* RF6_S_UNIQUE */
4115         case 160+31:
4116                 if (known)
4117                 {
4118                         if (see_either)
4119                         {
4120                                 disturb(1, 0);
4121
4122 #ifdef JP
4123                                 msg_format("%^s¤¬ËâË¡¤ÇÆÃÊ̤ʶ¯Å¨¤ò¾¤´­¤·¤¿¡ª", m_name);
4124 #else
4125                                 msg_format("%^s magically summons special opponents!", m_name);
4126 #endif
4127
4128                         }
4129                         else
4130                         {
4131                                 mon_fight = TRUE;
4132                         }
4133                 }
4134
4135                 for (k = 0; k < s_num_4; k++)
4136                 {
4137                         count += summon_specific(m_idx, y, x, rlev, SUMMON_UNIQUE, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
4138                 }
4139
4140                 if (known && !see_t && count)
4141                 {
4142                         mon_fight = TRUE;
4143                 }
4144
4145                 break;
4146         }
4147
4148         if (wake_up) (void)set_monster_csleep(t_idx, 0);
4149
4150         if (fear && see_t)
4151         {
4152 #ifdef JP
4153                 msg_format("%^s¤Ï¶²Éݤ·¤Æƨ¤²½Ð¤·¤¿¡ª", t_name);
4154 #else
4155                 msg_format("%^s flees in terror!", t_name);
4156 #endif
4157         }
4158
4159         if (m_ptr->ml && maneable && !world_monster && !p_ptr->blind && (p_ptr->pclass == CLASS_IMITATOR))
4160         {
4161                 if (thrown_spell != 167) /* Not RF6_SPECIAL */
4162                 {
4163                         if (p_ptr->mane_num == MAX_MANE)
4164                         {
4165                                 p_ptr->mane_num--;
4166                                 for (i = 0; i < p_ptr->mane_num - 1; i++)
4167                                 {
4168                                         p_ptr->mane_spell[i] = p_ptr->mane_spell[i+1];
4169                                         p_ptr->mane_dam[i] = p_ptr->mane_dam[i+1];
4170                                 }
4171                         }
4172                         p_ptr->mane_spell[p_ptr->mane_num] = thrown_spell - 96;
4173                         p_ptr->mane_dam[p_ptr->mane_num] = dam;
4174                         p_ptr->mane_num++;
4175                         new_mane = TRUE;
4176
4177                         p_ptr->redraw |= (PR_MANE);
4178                 }
4179         }
4180
4181         /* Remember what the monster did, if we saw it */
4182         if (can_remember)
4183         {
4184                 /* Inate spell */
4185                 if (thrown_spell < 32*4)
4186                 {
4187                         r_ptr->r_flags4 |= (1L << (thrown_spell - 32*3));
4188                         if (r_ptr->r_cast_spell < MAX_UCHAR) r_ptr->r_cast_spell++;
4189                 }
4190
4191                 /* Bolt or Ball */
4192                 else if (thrown_spell < 32*5)
4193                 {
4194                         r_ptr->r_flags5 |= (1L << (thrown_spell - 32*4));
4195                         if (r_ptr->r_cast_spell < MAX_UCHAR) r_ptr->r_cast_spell++;
4196                 }
4197
4198                 /* Special spell */
4199                 else if (thrown_spell < 32*6)
4200                 {
4201                         r_ptr->r_flags6 |= (1L << (thrown_spell - 32*5));
4202                         if (r_ptr->r_cast_spell < MAX_UCHAR) r_ptr->r_cast_spell++;
4203                 }
4204         }
4205
4206         /* Always take note of monsters that kill you */
4207         if (p_ptr->is_dead && (r_ptr->r_deaths < MAX_SHORT) && !p_ptr->inside_arena)
4208         {
4209                 r_ptr->r_deaths++; /* Ignore appearance difference */
4210         }
4211
4212         /* A spell was cast */
4213         return TRUE;
4214 }