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 (m_ptr->confused) 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 (!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 (t_idx != pet_t_m_idx &&
344                             !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 (!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 || (m_ptr->stunned && 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 (!t_ptr->monfear)
2674                         {
2675                                 if (!t_ptr->mproc_idx) mproc_add(t_idx);
2676                                 fear = TRUE;
2677                         }
2678
2679                         t_ptr->monfear += randint0(4) + 4;
2680                 }
2681
2682                 wake_up = TRUE;
2683
2684                 break;
2685
2686         /* RF5_BLIND */
2687         case 128+28:
2688                 if (known)
2689                 {
2690                         if (see_either)
2691                         {
2692 #ifdef JP
2693                                 msg_format("%s¤Ï¼öʸ¤ò¾§¤¨¤Æ%s¤ÎÌܤò¾Æ¤­ÉÕ¤«¤»¤¿¡£", m_name, t_name);
2694 #else
2695                                 msg_format("%^s casts a spell, burning %s%s eyes.", m_name, t_name,
2696                                            (streq(t_name, "it") ? "s" : "'s"));
2697 #endif
2698
2699                         }
2700                         else
2701                         {
2702                                 mon_fight = TRUE;
2703                         }
2704                 }
2705
2706                 /* Simulate blindness with confusion */
2707                 if (tr_ptr->flags3 & RF3_NO_CONF)
2708                 {
2709 #ifdef JP
2710                         if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2711 #else
2712                         if (see_t) msg_format("%^s is unaffected.", t_name);
2713 #endif
2714
2715                 }
2716                 else if (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10)
2717                 {
2718 #ifdef JP
2719                         if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2720 #else
2721                         if (see_t) msg_format("%^s is unaffected.", t_name);
2722 #endif
2723
2724                 }
2725                 else
2726                 {
2727 #ifdef JP
2728                         if (see_t) msg_format("%^s¤ÏÌܤ¬¸«¤¨¤Ê¤¯¤Ê¤Ã¤¿¡ª ", t_name);
2729 #else
2730                         if (see_t) msg_format("%^s is blinded!", t_name);
2731 #endif
2732
2733
2734                         if (!t_ptr->mproc_idx) mproc_add(t_idx);
2735                         t_ptr->confused += 12 + (byte)randint0(4);
2736                 }
2737
2738                 wake_up = TRUE;
2739
2740                 break;
2741
2742         /* RF5_CONF */
2743         case 128+29:
2744                 if (known)
2745                 {
2746                         if (see_either)
2747                         {
2748 #ifdef JP
2749                                 msg_format("%^s¤¬%s¤ÎÁ°¤Ë¸¸ÏÇŪ¤Ê¸¸¤ò¤Ä¤¯¤ê½Ð¤·¤¿¡£", m_name, t_name);
2750 #else
2751                                 msg_format("%^s casts a mesmerizing illusion in front of %s.", m_name, t_name);
2752 #endif
2753
2754                         }
2755                         else
2756                         {
2757                                 mon_fight = TRUE;
2758                         }
2759                 }
2760
2761                 if (tr_ptr->flags3 & RF3_NO_CONF)
2762                 {
2763 #ifdef JP
2764                         if (see_t) msg_format("%^s¤ÏÏǤ蘆¤ì¤Ê¤«¤Ã¤¿¡£", t_name);
2765 #else
2766                         if (see_t) msg_format("%^s disbelieves the feeble spell.", t_name);
2767 #endif
2768
2769                 }
2770                 else if (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10)
2771                 {
2772 #ifdef JP
2773                         if (see_t) msg_format("%^s¤ÏÏǤ蘆¤ì¤Ê¤«¤Ã¤¿¡£", t_name);
2774 #else
2775                         if (see_t) msg_format("%^s disbelieves the feeble spell.", t_name);
2776 #endif
2777
2778                 }
2779                 else
2780                 {
2781 #ifdef JP
2782                         if (see_t) msg_format("%^s¤Ïº®Í𤷤¿¤è¤¦¤À¡£", t_name);
2783 #else
2784                         if (see_t) msg_format("%^s seems confused.", t_name);
2785 #endif
2786
2787
2788                         if (!t_ptr->mproc_idx) mproc_add(t_idx);
2789                         t_ptr->confused += 12 + (byte)randint0(4);
2790                 }
2791
2792                 wake_up = TRUE;
2793
2794                 break;
2795
2796         /* RF5_SLOW */
2797         case 128+30:
2798                 if (known)
2799                 {
2800                         if (see_either)
2801                         {
2802 #ifdef JP
2803                                 msg_format("%s¤¬%s¤Î¶ÚÆù¤«¤éÎϤòµÛ¤¤¤È¤Ã¤¿¡£", m_name, t_name);
2804 #else
2805                                 msg_format("%^s drains power from %s%s muscles.", m_name, t_name,
2806                                            (streq(t_name, "it") ? "s" : "'s"));
2807 #endif
2808
2809                         }
2810                         else
2811                         {
2812                                 mon_fight = TRUE;
2813                         }
2814                 }
2815
2816                 if (tr_ptr->flags1 & RF1_UNIQUE)
2817                 {
2818 #ifdef JP
2819                         if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2820 #else
2821                         if (see_t) msg_format("%^s is unaffected.", t_name);
2822 #endif
2823
2824                 }
2825                 else if (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10)
2826                 {
2827 #ifdef JP
2828                         if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2829 #else
2830                         if (see_t) msg_format("%^s is unaffected.", t_name);
2831 #endif
2832
2833                 }
2834                 else
2835                 {
2836                         if (!t_ptr->slow)
2837                         {
2838 #ifdef JP
2839                                 if (see_t) msg_format("%s¤ÎÆ°¤­¤¬ÃÙ¤¯¤Ê¤Ã¤¿¡£", t_name);
2840 #else
2841                                 if (see_t) msg_format("%^s starts moving slower.", t_name);
2842 #endif
2843                                 if (!t_ptr->mproc_idx) mproc_add(t_idx);
2844                         }
2845
2846                         t_ptr->slow = MIN(200, t_ptr->slow + 50);
2847                         if (p_ptr->riding == t_idx) p_ptr->update |= PU_BONUS;
2848                 }
2849
2850                 wake_up = TRUE;
2851
2852                 break;
2853
2854         /* RF5_HOLD */
2855         case 128+31:
2856                 if (known)
2857                 {
2858                         if (see_either)
2859                         {
2860 #ifdef JP
2861                                 msg_format("%^s¤Ï%s¤ò¤¸¤Ã¤È¸«¤Ä¤á¤¿¡£", m_name, t_name);
2862 #else
2863                                 msg_format("%^s stares intently at %s.", m_name, t_name);
2864 #endif
2865
2866                         }
2867                         else
2868                         {
2869                                 mon_fight = TRUE;
2870                         }
2871                 }
2872
2873                 if ((tr_ptr->flags1 & RF1_UNIQUE) ||
2874                     (tr_ptr->flags3 & RF3_NO_STUN))
2875                 {
2876 #ifdef JP
2877                         if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2878 #else
2879                         if (see_t) msg_format("%^s is unaffected.", t_name);
2880 #endif
2881
2882                 }
2883                 else if (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10)
2884                 {
2885 #ifdef JP
2886                         if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2887 #else
2888                         if (see_t) msg_format("%^s is unaffected.", t_name);
2889 #endif
2890
2891                 }
2892                 else
2893                 {
2894 #ifdef JP
2895                         if (see_t) msg_format("%^s¤ÏËãá㤷¤¿¡ª", t_name);
2896 #else
2897                         if (see_t) msg_format("%^s is paralyzed!", t_name);
2898 #endif
2899
2900
2901                         if (!t_ptr->mproc_idx) mproc_add(t_idx);
2902                         t_ptr->stunned += randint1(4) + 4;
2903                 }
2904
2905                 wake_up = TRUE;
2906
2907                 break;
2908
2909
2910         /* RF6_HASTE */
2911         case 160+0:
2912                 if (known)
2913                 {
2914                         if (see_m)
2915                         {
2916 #ifdef JP
2917                                 msg_format("%^s¤¬¼«Ê¬¤ÎÂΤËÇ°¤òÁ÷¤Ã¤¿¡£", m_name);
2918 #else
2919                                 msg_format("%^s concentrates on %s body.", m_name, m_poss);
2920 #endif
2921
2922                         }
2923                         else
2924                         {
2925                                 mon_fight = TRUE;
2926                         }
2927                 }
2928
2929                 /* Allow quick speed increases to base+10 */
2930                 if (!m_ptr->fast)
2931                 {
2932 #ifdef JP
2933                         if (see_m) msg_format("%^s¤ÎÆ°¤­¤¬Â®¤¯¤Ê¤Ã¤¿¡£", m_name);
2934 #else
2935                         if (see_m) msg_format("%^s starts moving faster.", m_name);
2936 #endif
2937                         if (!m_ptr->mproc_idx) mproc_add(m_idx);
2938                 }
2939                 m_ptr->fast = MIN(200, m_ptr->fast + 100);
2940                 if (p_ptr->riding == m_idx) p_ptr->update |= PU_BONUS;
2941                 break;
2942
2943         /* RF6_HAND_DOOM */
2944         case 160+1:
2945                 if (known)
2946                 {
2947                         if (see_m)
2948                         {
2949 #ifdef JP
2950                                 msg_format("%^s¤¬%s¤Ë<ÇËÌǤμê>¤òÊü¤Ã¤¿¡ª", m_name, t_name);
2951 #else
2952                                 msg_format("%^s invokes the Hand of Doom upon %s!", m_name, t_name);
2953 #endif
2954
2955                         }
2956                         else
2957                         {
2958                                 mon_fight = TRUE;
2959                         }
2960                 }
2961
2962                 dam = 20; /* Dummy power */
2963                 monst_breath_monst(m_idx, y, x, GF_HAND_DOOM, dam, 0, FALSE, MS_HAND_DOOM, learnable);
2964
2965                 break;
2966
2967         /* RF6_HEAL */
2968         case 160+2:
2969                 if (known)
2970                 {
2971                         if (see_m)
2972                         {
2973 #ifdef JP
2974                                 msg_format("%^s¤Ï¼«Ê¬¤Î½ý¤ËÇ°¤ò½¸Ã椷¤¿¡£", m_name);
2975 #else
2976                                 msg_format("%^s concentrates on %s wounds.", m_name, m_poss);
2977 #endif
2978
2979                         }
2980                         else
2981                         {
2982                                 mon_fight = TRUE;
2983                         }
2984                 }
2985
2986                 /* Heal some */
2987                 m_ptr->hp += (rlev * 6);
2988
2989                 /* Fully healed */
2990                 if (m_ptr->hp >= m_ptr->maxhp)
2991                 {
2992                         /* Fully healed */
2993                         m_ptr->hp = m_ptr->maxhp;
2994
2995                         if (known)
2996                         {
2997                                 if (see_m)
2998                                 {
2999 #ifdef JP
3000                                         msg_format("%^s¤Ï´°Á´¤Ë¼£¤Ã¤¿¡ª", m_name);
3001 #else
3002                                         msg_format("%^s looks completely healed!", m_name);
3003 #endif
3004
3005                                 }
3006                                 else
3007                                 {
3008                                         mon_fight = TRUE;
3009                                 }
3010                         }
3011                 }
3012
3013                 /* Partially healed */
3014                 else if (known)
3015                 {
3016                         if (see_m)
3017                         {
3018 #ifdef JP
3019                                 msg_format("%^s¤ÏÂÎÎϤò²óÉü¤·¤¿¤è¤¦¤À¡£", m_name);
3020 #else
3021                                 msg_format("%^s looks healthier.", m_name);
3022 #endif
3023
3024                         }
3025                         else
3026                         {
3027                                 mon_fight = TRUE;
3028                         }
3029                 }
3030
3031                 /* Redraw (later) if needed */
3032                 if (p_ptr->health_who == m_idx) p_ptr->redraw |= (PR_HEALTH);
3033                 if (p_ptr->riding == m_idx) p_ptr->redraw |= (PR_UHEALTH);
3034
3035                 /* Cancel fear */
3036                 if (m_ptr->monfear)
3037                 {
3038                         /* Cancel fear */
3039                         m_ptr->monfear = 0;
3040                         if (!need_mproc(m_ptr)) mproc_remove(m_ptr->mproc_idx);
3041
3042                         /* Message */
3043 #ifdef JP
3044                         if (see_m) msg_format("%^s¤Ïͦµ¤¤ò¼è¤êÌᤷ¤¿¡£", m_name);
3045 #else
3046                         if (see_m) msg_format("%^s recovers %s courage.", m_name, m_poss);
3047 #endif
3048
3049                 }
3050
3051                 break;
3052
3053         /* RF6_INVULNER */
3054         case 160+3:
3055                 if (known)
3056                 {
3057                         if (see_m)
3058                         {
3059                                 disturb(1, 0);
3060 #ifdef JP
3061                                 msg_format("%s¤Ï̵½ý¤Îµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name);
3062 #else
3063                                 msg_format("%^s casts a Globe of Invulnerability.", m_name);
3064 #endif
3065
3066                         }
3067                         else
3068                         {
3069                                 mon_fight = TRUE;
3070                         }
3071                 }
3072
3073                 if (!m_ptr->invulner)
3074                 {
3075                         if (!m_ptr->mproc_idx) mproc_add(m_idx);
3076                         m_ptr->invulner = randint1(4) + 4;
3077                 }
3078
3079                 if (p_ptr->health_who == m_idx) p_ptr->redraw |= (PR_HEALTH);
3080                 if (p_ptr->riding == m_idx) p_ptr->redraw |= (PR_UHEALTH);
3081                 break;
3082
3083         /* RF6_BLINK */
3084         case 160+4:
3085                 if (see_m)
3086                 {
3087 #ifdef JP
3088                         msg_format("%^s¤¬½Ö»þ¤Ë¾Ã¤¨¤¿¡£", m_name);
3089 #else
3090                         msg_format("%^s blinks away.", m_name);
3091 #endif
3092
3093                 }
3094
3095                 teleport_away(m_idx, 10, FALSE, FALSE);
3096
3097                 break;
3098
3099         /* RF6_TPORT */
3100         case 160+5:
3101                 if (see_m)
3102                 {
3103 #ifdef JP
3104                         msg_format("%^s¤¬¥Æ¥ì¥Ý¡¼¥È¤·¤¿¡£", m_name);
3105 #else
3106                         msg_format("%^s teleports away.", m_name);
3107 #endif
3108                 }
3109
3110                 teleport_away(m_idx, MAX_SIGHT * 2 + 5, FALSE, FALSE);
3111
3112                 if (los(py, px, m_ptr->fy, m_ptr->fx) && !world_monster && m_ptr->ml)
3113                 {
3114                         for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
3115                         {
3116                                 u32b flgs[TR_FLAG_SIZE];
3117                                 object_type *o_ptr = &inventory[i];
3118
3119                                 if (object_is_cursed(o_ptr)) continue;
3120
3121                                 object_flags(o_ptr, flgs);
3122
3123                                 if ((have_flag(flgs, TR_TELEPORT)) || (p_ptr->muta1 & MUT1_VTELEPORT) || (p_ptr->pclass == CLASS_IMITATOR))
3124                                 {
3125 #ifdef JP
3126                                         cptr msg = "¤Ä¤¤¤Æ¤¤¤­¤Þ¤¹¤«¡©";
3127 #else
3128                                         cptr msg = "Do you follow it? ";
3129 #endif
3130
3131                                         if (get_check_strict(msg, CHECK_OKAY_CANCEL))
3132                                         {
3133                                                 if (one_in_(3))
3134                                                 {
3135                                                         teleport_player(200, TRUE);
3136 #ifdef JP
3137                                                         msg_print("¼ºÇÔ¡ª");
3138 #else
3139                                                         msg_print("Failed!");
3140 #endif
3141                                                 }
3142                                                 else teleport_player_to(m_ptr->fy, m_ptr->fx, TRUE, FALSE);
3143                                                 p_ptr->energy_need = ENERGY_NEED();
3144                                         }
3145                                         break;
3146                                 }
3147                         }
3148                 }
3149                 break;
3150
3151         /* RF6_WORLD */
3152         case 160+6:
3153 #if 0
3154                 int who = 0;
3155                 if(m_ptr->r_idx = MON_DIO) who == 1;
3156                 else if(m_ptr->r_idx = MON_WONG) who == 3;
3157                 dam = who;
3158                 if(!process_the_world(randint1(2)+2, who, player_has_los_bold(m_ptr->fy, m_ptr->fx))) return (FALSE);
3159 #endif
3160                 return FALSE;
3161
3162         /* RF6_SPECIAL */
3163         case 160+7:
3164                 switch (m_ptr->r_idx)
3165                 {
3166                 case MON_OHMU:
3167                         /* Moved to process_monster(), like multiplication */
3168                         return FALSE;
3169
3170                 case MON_ROLENTO:
3171                         if (known)
3172                         {
3173                                 if (see_either)
3174                                 {
3175                                         disturb(1, 0);
3176
3177 #ifdef JP
3178                                         msg_format("%^s¤Ï¼êÜØÃƤò¤Ð¤é¤Þ¤¤¤¿¡£", m_name);
3179 #else
3180                                         msg_format("%^s throws some hand grenades.", m_name);
3181 #endif
3182                                 }
3183                                 else
3184                                 {
3185                                         mon_fight = TRUE;
3186                                 }
3187                         }
3188
3189                         {
3190                                 int num = 1 + randint1(3);
3191                                 for (k = 0; k < num; k++)
3192                                 {
3193                                         count += summon_named_creature(m_idx, y, x, MON_SHURYUUDAN, 0);
3194                                 }
3195                         }
3196
3197                         if (known && !see_t && count)
3198                         {
3199                                 mon_fight = TRUE;
3200                         }
3201                         break;
3202
3203                 default:
3204                         if (r_ptr->d_char == 'B')
3205                         {
3206                                 if (one_in_(3))
3207                                 {
3208                                         if (see_m)
3209                                         {
3210 #ifdef JP
3211                                                 msg_format("%^s¤ÏÆÍÁ³µÞ¾å¾º¤·¤Æ»ë³¦¤«¤é¾Ã¤¨¤¿!", m_name);
3212 #else
3213                                                 msg_format("%^s suddenly go out of your sight!", m_name);
3214 #endif
3215                                         }
3216                                         teleport_away(m_idx, 10, FALSE, FALSE);
3217                                         p_ptr->update |= (PU_MONSTERS);
3218                                 }
3219                                 else
3220                                 {
3221                                         if (known)
3222                                         {
3223                                                 if (see_either)
3224                                                 {
3225 #ifdef JP
3226                                                         msg_format("%^s¤¬%s¤òÄϤó¤Ç¶õÃ椫¤éÅꤲÍ¤¿¡£", m_name, t_name);
3227 #else
3228                                                         msg_format("%^s holds %s, and drops from the sky.", m_name, t_name);
3229 #endif
3230
3231                                                 }
3232                                                 else
3233                                                 {
3234                                                         mon_fight = TRUE;
3235                                                 }
3236                                         }
3237
3238                                         dam = damroll(4, 8);
3239
3240                                         if (t_idx == p_ptr->riding) teleport_player_to(m_ptr->fy, m_ptr->fx, FALSE, TRUE);
3241                                         else teleport_monster_to(t_idx, m_ptr->fy, m_ptr->fx, 100, TRUE);
3242
3243                                         sound(SOUND_FALL);
3244
3245                                         if (tr_ptr->flags7 & RF7_CAN_FLY)
3246                                         {
3247 #ifdef JP
3248                                                 if (see_t) msg_format("%^s¤ÏÀŤ«¤ËÃåÃϤ·¤¿¡£", t_name);
3249 #else
3250                                                 if (see_t) msg_format("%^s floats gently down to the ground.", t_name);
3251 #endif
3252                                         }
3253                                         else
3254                                         {
3255 #ifdef JP
3256                                                 if (see_t) msg_format("%^s¤ÏÃÏÌ̤Ë᤭¤Ä¤±¤é¤ì¤¿¡£", t_name);
3257 #else
3258                                                 if (see_t) msg_format("%^s crashed into the ground.", t_name);
3259 #endif
3260                                                 dam += damroll(6, 8);
3261                                         }
3262
3263                                         if (p_ptr->riding == t_idx)
3264                                         {
3265                                                 int get_damage = 0;
3266
3267                                                 /* Mega hack -- this special action deals damage to the player. Therefore the code of "eyeeye" is necessary.
3268                                                    -- henkma
3269                                                  */
3270                                                 get_damage = take_hit(DAMAGE_NOESCAPE, dam, m_name, -1);
3271                                                 if (p_ptr->tim_eyeeye && get_damage > 0 && !p_ptr->is_dead)
3272                                                 {
3273 #ifdef JP
3274                                                         msg_format("¹¶·â¤¬%s¼«¿È¤ò½ý¤Ä¤±¤¿¡ª", m_name);
3275 #else
3276                                                         char m_name_self[80];
3277
3278                                                         /* hisself */
3279                                                         monster_desc(m_name_self, m_ptr, MD_PRON_VISIBLE | MD_POSSESSIVE | MD_OBJECTIVE);
3280
3281                                                         msg_format("The attack of %s has wounded %s!", m_name, m_name_self);
3282 #endif
3283                                                         project(0, 0, m_ptr->fy, m_ptr->fx, get_damage, GF_MISSILE, PROJECT_KILL, -1);
3284                                                         set_tim_eyeeye(p_ptr->tim_eyeeye-5, TRUE);
3285                                                 }
3286                                         }
3287
3288                                         mon_take_hit_mon(t_idx, dam, &fear, extract_note_dies(real_r_ptr(t_ptr)), m_idx);
3289                                 }
3290                                 break;
3291                         }
3292
3293                         /* Something is wrong */
3294                         else return FALSE;
3295                 }
3296
3297                 /* done */
3298                 break;
3299
3300         /* RF6_TELE_TO */
3301         case 160+8:
3302                 if (known)
3303                 {
3304                         if (see_either)
3305                         {
3306 #ifdef JP
3307                                 msg_format("%^s¤¬%s¤ò°ú¤­Ìᤷ¤¿¡£", m_name, t_name);
3308 #else
3309                                 msg_format("%^s commands %s to return.", m_name, t_name);
3310 #endif
3311
3312                         }
3313                         else
3314                         {
3315                                 mon_fight = TRUE;
3316                         }
3317                 }
3318
3319                 if (tr_ptr->flagsr & RFR_RES_TELE)
3320                 {
3321                         if ((tr_ptr->flags1 & RF1_UNIQUE) || (tr_ptr->flagsr & RFR_RES_ALL))
3322                         {
3323                                 if (is_original_ap_and_seen(t_ptr)) tr_ptr->r_flagsr |= RFR_RES_TELE;
3324                                 if (see_t)
3325                                 {
3326 #ifdef JP
3327                                         msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
3328 #else
3329                                         msg_format("%^s is unaffected!", t_name);
3330 #endif
3331                                 }
3332
3333                                 resists_tele = TRUE;
3334                         }
3335                         else if (tr_ptr->level > randint1(100))
3336                         {
3337                                 if (is_original_ap_and_seen(t_ptr)) tr_ptr->r_flagsr |= RFR_RES_TELE;
3338                                 if (see_t)
3339                                 {
3340 #ifdef JP
3341                                         msg_format("%^s¤ÏÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡ª", t_name);
3342 #else
3343                                         msg_format("%^s resists!", t_name);
3344 #endif
3345                                 }
3346
3347                                 resists_tele = TRUE;
3348                         }
3349                 }
3350
3351                 if (!resists_tele)
3352                 {
3353                         if (t_idx == p_ptr->riding) teleport_player_to(m_ptr->fy, m_ptr->fx, TRUE, TRUE);
3354                         else teleport_monster_to(t_idx, m_ptr->fy, m_ptr->fx, 100, TRUE);
3355                 }
3356
3357                 wake_up = TRUE;
3358                 break;
3359
3360         /* RF6_TELE_AWAY */
3361         case 160+9:
3362                 if (known)
3363                 {
3364                         if (see_either)
3365                         {
3366 #ifdef JP
3367                                 msg_format("%^s¤Ï%s¤ò¥Æ¥ì¥Ý¡¼¥È¤µ¤»¤¿¡£", m_name, t_name);
3368 #else
3369                                 msg_format("%^s teleports %s away.", m_name, t_name);
3370 #endif
3371
3372                         }
3373                         else
3374                         {
3375                                 mon_fight = TRUE;
3376                         }
3377                 }
3378
3379                 if (tr_ptr->flagsr & RFR_RES_TELE)
3380                 {
3381                         if ((tr_ptr->flags1 & RF1_UNIQUE) || (tr_ptr->flagsr & RFR_RES_ALL))
3382                         {
3383                                 if (is_original_ap_and_seen(t_ptr)) tr_ptr->r_flagsr |= RFR_RES_TELE;
3384                                 if (see_t)
3385                                 {
3386 #ifdef JP
3387                                         msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
3388 #else
3389                                         msg_format("%^s is unaffected!", t_name);
3390 #endif
3391                                 }
3392
3393                                 resists_tele = TRUE;
3394                         }
3395                         else if (tr_ptr->level > randint1(100))
3396                         {
3397                                 if (is_original_ap_and_seen(t_ptr)) tr_ptr->r_flagsr |= RFR_RES_TELE;
3398                                 if (see_t)
3399                                 {
3400 #ifdef JP
3401                                         msg_format("%^s¤ÏÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡ª", t_name);
3402 #else
3403                                         msg_format("%^s resists!", t_name);
3404 #endif
3405                                 }
3406
3407                                 resists_tele = TRUE;
3408                         }
3409                 }
3410
3411                 if (!resists_tele)
3412                 {
3413                         if (t_idx == p_ptr->riding) teleport_player(MAX_SIGHT * 2 + 5, TRUE);
3414                         else teleport_away(t_idx, MAX_SIGHT * 2 + 5, FALSE, TRUE);
3415                 }
3416
3417                 wake_up = TRUE;
3418                 break;
3419
3420         /* RF6_TELE_LEVEL */
3421         case 160+10:
3422                 if (known)
3423                 {
3424                         if (see_either)
3425                         {
3426 #ifdef JP
3427                                 msg_format("%^s¤¬%s¤Î­¤ò»Ø¤µ¤·¤¿¡£", m_name, t_name);
3428 #else
3429                                 msg_format("%^s gestures at %s's feet.", m_name, t_name);
3430 #endif
3431                         }
3432                         else
3433                         {
3434                                 mon_fight = TRUE;
3435                         }
3436                 }
3437
3438                 if (tr_ptr->flagsr & (RFR_EFF_RES_NEXU_MASK | RFR_RES_TELE))
3439                 {
3440 #ifdef JP
3441                         if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
3442 #else
3443                         if (see_t) msg_format("%^s is unaffected!", t_name);
3444 #endif
3445                 }
3446                 else if ((tr_ptr->flags1 & RF1_QUESTOR) ||
3447                             (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10))
3448                 {
3449 #ifdef JP
3450                         if (see_t) msg_format("%^s¤Ï¸úÎϤòÄ·¤ÍÊÖ¤·¤¿¡ª", t_name);
3451 #else
3452                         if (see_t) msg_format("%^s resist the effects!", t_name);
3453 #endif
3454                 }
3455                 else teleport_level((t_idx == p_ptr->riding) ? 0 : t_idx);
3456
3457                 wake_up = TRUE;
3458                 break;
3459
3460         /* RF6_PSY_SPEAR */
3461         case 160+11:
3462                 if (known)
3463                 {
3464                         if (see_either)
3465                         {
3466 #ifdef JP
3467                                 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¸÷¤Î·õ¤òÊü¤Ã¤¿¡£", m_name, t_name);
3468 #else
3469                                 msg_format("%^s throw a Psycho-spear at %s.", m_name, t_name);
3470 #endif
3471
3472                         }
3473                         else
3474                         {
3475                                 mon_fight = TRUE;
3476                         }
3477                 }
3478
3479                 dam = (r_ptr->flags2 & RF2_POWERFUL) ? (randint1(rlev * 2) + 180) : (randint1(rlev * 3 / 2) + 120);
3480                 monst_beam_monst(m_idx, y, x, GF_PSY_SPEAR,
3481                                  dam, MS_PSY_SPEAR, learnable);
3482                 break;
3483
3484         /* RF6_DARKNESS */
3485         case 160+12:
3486                 if (known)
3487                 {
3488                         if (see_m)
3489                         {
3490 #ifdef JP
3491                                 if (can_use_lite_area) msg_format("%^s¤¬ÊÕ¤ê¤òÌÀ¤ë¤¯¾È¤é¤·¤¿¡£", m_name);
3492                                 else msg_format("%^s¤¬°Å°Ç¤ÎÃæ¤Ç¼ê¤ò¿¶¤Ã¤¿¡£", m_name);
3493 #else
3494                                 if (can_use_lite_area) msg_format("%^s cast a spell to light up.", m_name);
3495                                 else msg_format("%^s gestures in shadow.", m_name);
3496 #endif
3497
3498                                 if (see_t)
3499                                 {
3500 #ifdef JP
3501                                         if (can_use_lite_area) msg_format("%^s¤ÏÇò¤¤¸÷¤ËÊñ¤Þ¤ì¤¿¡£", t_name);
3502                                         else msg_format("%^s¤Ï°Å°Ç¤ËÊñ¤Þ¤ì¤¿¡£", t_name);
3503 #else
3504                                         if (can_use_lite_area) msg_format("%^s is surrounded by a white light.", t_name);
3505                                         else msg_format("%^s is surrounded by darkness.", t_name);
3506 #endif
3507                                 }
3508                         }
3509                         else
3510                         {
3511                                 mon_fight = TRUE;
3512                         }
3513                 }
3514
3515                 if (can_use_lite_area)
3516                 {
3517                         (void)project(m_idx, 3, y, x, 0, GF_LITE_WEAK, PROJECT_GRID | PROJECT_KILL, -1);
3518                         lite_room(y, x);
3519                 }
3520                 else
3521                 {
3522                         (void)project(m_idx, 3, y, x, 0, GF_DARK_WEAK, PROJECT_GRID | PROJECT_KILL, MS_DARKNESS);
3523                         unlite_room(y, x);
3524                 }
3525
3526                 break;
3527
3528         /* RF6_TRAPS */
3529         case 160+13:
3530 #if 0
3531                 if (known)
3532                 {
3533                         if (see_m)
3534                         {
3535 #ifdef JP
3536                                 msg_format("%^s¤¬¼öʸ¤ò¾§¤¨¤Æ¼Ù°­¤ËÈù¾Ð¤ó¤À¡£", m_name);
3537 #else
3538                                 msg_format("%^s casts a spell and cackles evilly.", m_name);
3539 #endif
3540                         }
3541                         else
3542                         {
3543 #ifdef JP
3544                                 msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
3545 #else
3546                                 msg_format("%^s mumbles.", m_name);
3547 #endif
3548                         }
3549                 }
3550
3551                 trap_creation(y, x);
3552
3553                 break;
3554 #else
3555                 /* Not implemented */
3556                 return FALSE;
3557 #endif
3558
3559         /* RF6_FORGET */
3560         case 160+14:
3561                 /* Not implemented */
3562                 return FALSE;
3563
3564         /* RF6_RAISE_DEAD */
3565         case 160+15:
3566                 if (known)
3567                 {
3568                         if (see_either)
3569                         {
3570                                 disturb(1, 0);
3571 #ifdef JP
3572                                 if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
3573 #else
3574                                 if (blind) msg_format("%^s mumbles.", m_name);
3575 #endif
3576
3577 #ifdef JP
3578                                 else msg_format("%^s¤¬»à¼ÔÉü³è¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name);
3579 #else
3580                                 else msg_format("%^s casts a spell to revive corpses.", m_name);
3581 #endif
3582                         }
3583                         else
3584                         {
3585                                 mon_fight = TRUE;
3586                         }
3587                 }
3588                 animate_dead(m_idx, m_ptr->fy, m_ptr->fx);
3589                 break;
3590
3591         /* RF6_S_KIN */
3592         case 160+16:
3593                 if (known)
3594                 {
3595                         if (see_either)
3596                         {
3597                                 disturb(1, 0);
3598
3599                                 if (m_ptr->r_idx == MON_SERPENT || m_ptr->r_idx == MON_ZOMBI_SERPENT)
3600                                 {
3601 #ifdef JP
3602                                         msg_format("%^s¤¬¥À¥ó¥¸¥ç¥ó¤Î¼ç¤ò¾¤´­¤·¤¿¡£", m_name);
3603 #else
3604                                         msg_format("%^s magically summons guardians of dungeons.", m_name);
3605 #endif
3606                                 }
3607                                 else
3608                                 {
3609 #ifdef JP
3610                                         msg_format("%s¤¬ËâË¡¤Ç%s¤ò¾¤´­¤·¤¿¡£", m_name,
3611                                                    ((r_ptr->flags1 & RF1_UNIQUE) ? "¼ê²¼" : "Ãç´Ö"));
3612 #else
3613                                         msg_format("%^s magically summons %s %s.", m_name, m_poss,
3614                                                    ((r_ptr->flags1 & RF1_UNIQUE) ? "minions" : "kin"));
3615 #endif
3616                                 }
3617
3618                         }
3619                         else
3620                         {
3621                                 mon_fight = TRUE;
3622                         }
3623                 }
3624
3625                 switch (m_ptr->r_idx)
3626                 {
3627                 case MON_MENELDOR:
3628                 case MON_GWAIHIR:
3629                 case MON_THORONDOR:
3630                         {
3631                                 int num = 4 + randint1(3);
3632                                 for (k = 0; k < num; k++)
3633                                 {
3634                                         count += summon_specific(m_idx, y, x, rlev, SUMMON_EAGLES, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
3635                                 }
3636                         }
3637                         break;
3638
3639                 case MON_BULLGATES:
3640                         {
3641                                 int num = 2 + randint1(3);
3642                                 for (k = 0; k < num; k++)
3643                                 {
3644                                         count += summon_named_creature(m_idx, y, x, MON_IE, 0);
3645                                 }
3646                         }
3647                         break;
3648
3649                 case MON_SERPENT:
3650                 case MON_ZOMBI_SERPENT:
3651                         if (r_info[MON_JORMUNGAND].cur_num < r_info[MON_JORMUNGAND].max_num && one_in_(6))
3652                         {
3653                                 if (known && see_t)
3654                                 {
3655 #ifdef JP
3656                                         msg_print("ÃÏÌ̤«¤é¿å¤¬¿á¤­½Ð¤·¤¿¡ª");
3657 #else
3658                                         msg_print("Water blew off from the ground!");
3659 #endif
3660                                 }
3661                                 project(t_idx, 8, y, x, 3, GF_WATER_FLOW, PROJECT_GRID | PROJECT_HIDE, -1);
3662                         }
3663
3664                         {
3665                                 int num = 2 + randint1(3);
3666                                 for (k = 0; k < num; k++)
3667                                 {
3668                                         count += summon_specific(m_idx, y, x, rlev, SUMMON_GUARDIANS, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
3669                                 }
3670                         }
3671                         break;
3672
3673                 case MON_CALDARM:
3674                         {
3675                                 int num = randint1(3);
3676                                 for (k = 0; k < num; k++)
3677                                 {
3678                                         count += summon_named_creature(m_idx, y, x, MON_LOCKE_CLONE, 0);
3679                                 }
3680                         }
3681                         break;
3682
3683                 case MON_LOUSY:
3684                         {
3685                                 int num = 2 + randint1(3);
3686                                 for (k = 0; k < num; k++)
3687                                 {
3688                                         count += summon_specific(m_idx, y, x, rlev, SUMMON_LOUSE, (PM_ALLOW_GROUP));
3689                                 }
3690                         }
3691                         break;
3692
3693                 default:
3694                         summon_kin_type = r_ptr->d_char;
3695
3696                         for (k = 0; k < 4; k++)
3697                         {
3698                                 count += summon_specific(m_idx, y, x, rlev, SUMMON_KIN, (PM_ALLOW_GROUP));
3699                         }
3700                         break;
3701                 }
3702
3703                 if (known && !see_t && count)
3704                 {
3705                         mon_fight = TRUE;
3706                 }
3707
3708                 break;
3709
3710         /* RF6_S_CYBER */
3711         case 160+17:
3712                 if (known)
3713                 {
3714                         if (see_either)
3715                         {
3716                                 disturb(1, 0);
3717
3718 #ifdef JP
3719                                 msg_format("%^s¤¬¥µ¥¤¥Ð¡¼¥Ç¡¼¥â¥ó¤ò¾¤´­¤·¤¿¡ª", m_name);
3720 #else
3721                                 msg_format("%^s magically summons Cyberdemons!", m_name);
3722 #endif
3723
3724                         }
3725                         else
3726                         {
3727                                 mon_fight = TRUE;
3728                         }
3729                 }
3730
3731                 if (is_friendly(m_ptr))
3732                 {
3733                         count += summon_specific(m_idx, y, x, rlev, SUMMON_CYBER, (PM_ALLOW_GROUP));
3734                 }
3735                 else
3736                 {
3737                         count += summon_cyber(m_idx, y, x);
3738                 }
3739
3740                 if (known && !see_t && count)
3741                 {
3742                         mon_fight = TRUE;
3743                 }
3744
3745                 break;
3746
3747         /* RF6_S_MONSTER */
3748         case 160+18:
3749                 if (known)
3750                 {
3751                         if (see_either)
3752                         {
3753                                 disturb(1, 0);
3754
3755 #ifdef JP
3756                                 msg_format("%^s¤¬ËâË¡¤ÇÃç´Ö¤ò¾¤´­¤·¤¿¡ª", m_name);
3757 #else
3758                                 msg_format("%^s magically summons help!", m_name);
3759 #endif
3760
3761                         }
3762                         else
3763                         {
3764                                 mon_fight = TRUE;
3765                         }
3766                 }
3767
3768                 count += summon_specific(m_idx, y, x, rlev, 0, (u_mode));
3769
3770                 if (known && !see_t && count)
3771                 {
3772                         mon_fight = TRUE;
3773                 }
3774
3775                 break;
3776
3777         /* RF6_S_MONSTERS */
3778         case 160+19:
3779                 if (known)
3780                 {
3781                         if (see_either)
3782                         {
3783                                 disturb(1, 0);
3784
3785 #ifdef JP
3786                                 msg_format("%^s¤¬ËâË¡¤Ç¥â¥ó¥¹¥¿¡¼¤ò¾¤´­¤·¤¿¡ª", m_name);
3787 #else
3788                                 msg_format("%^s magically summons monsters!", m_name);
3789 #endif
3790
3791                         }
3792                         else
3793                         {
3794                                 mon_fight = TRUE;
3795                         }
3796                 }
3797
3798                 for (k = 0; k < s_num_6; k++)
3799                 {
3800                         count += summon_specific(m_idx, y, x, rlev, 0, (PM_ALLOW_GROUP | u_mode));
3801                 }
3802
3803                 if (known && !see_t && count)
3804                 {
3805                         mon_fight = TRUE;
3806                 }
3807
3808                 break;
3809
3810         /* RF6_S_ANT */
3811         case 160+20:
3812                 if (known)
3813                 {
3814                         if (see_either)
3815                         {
3816                                 disturb(1, 0);
3817
3818 #ifdef JP
3819                                 msg_format("%^s¤¬ËâË¡¤Ç¥¢¥ê¤ò¾¤´­¤·¤¿¡£", m_name);
3820 #else
3821                                 msg_format("%^s magically summons ants.", m_name);
3822 #endif
3823
3824                         }
3825                         else
3826                         {
3827                                 mon_fight = TRUE;
3828                         }
3829                 }
3830
3831                 for (k = 0; k < s_num_6; k++)
3832                 {
3833                         count += summon_specific(m_idx, y, x, rlev, SUMMON_ANT, (PM_ALLOW_GROUP));
3834                 }
3835
3836                 if (known && !see_t && count)
3837                 {
3838                         mon_fight = TRUE;
3839                 }
3840
3841                 break;
3842
3843         /* RF6_S_SPIDER */
3844         case 160+21:
3845                 if (known)
3846                 {
3847                         if (see_either)
3848                         {
3849                                 disturb(1, 0);
3850
3851 #ifdef JP
3852                                 msg_format("%^s¤¬ËâË¡¤Ç¥¯¥â¤ò¾¤´­¤·¤¿¡£", m_name);
3853 #else
3854                                 msg_format("%^s magically summons spiders.", m_name);
3855 #endif
3856
3857                         }
3858                         else
3859                         {
3860                                 mon_fight = TRUE;
3861                         }
3862                 }
3863
3864                 for (k = 0; k < s_num_6; k++)
3865                 {
3866                         count += summon_specific(m_idx, y, x, rlev, SUMMON_SPIDER, (PM_ALLOW_GROUP));
3867                 }
3868
3869                 if (known && !see_t && count)
3870                 {
3871                         mon_fight = TRUE;
3872                 }
3873
3874                 break;
3875
3876         /* RF6_S_HOUND */
3877         case 160+22:
3878                 if (known)
3879                 {
3880                         if (see_either)
3881                         {
3882                                 disturb(1, 0);
3883
3884 #ifdef JP
3885                                 msg_format("%^s¤¬ËâË¡¤Ç¥Ï¥¦¥ó¥É¤ò¾¤´­¤·¤¿¡£", m_name);
3886 #else
3887                                 msg_format("%^s magically summons hounds.", m_name);
3888 #endif
3889
3890                         }
3891                         else
3892                         {
3893                                 mon_fight = TRUE;
3894                         }
3895                 }
3896
3897                 for (k = 0; k < s_num_4; k++)
3898                 {
3899                         count += summon_specific(m_idx, y, x, rlev, SUMMON_HOUND, (PM_ALLOW_GROUP));
3900                 }
3901
3902                 if (known && !see_t && count)
3903                 {
3904                         mon_fight = TRUE;
3905                 }
3906
3907                 break;
3908
3909         /* RF6_S_HYDRA */
3910         case 160+23:
3911                 if (known)
3912                 {
3913                         if (see_either)
3914                         {
3915                                 disturb(1, 0);
3916
3917 #ifdef JP
3918                                 msg_format("%^s¤¬ËâË¡¤Ç¥Ò¥É¥é¤ò¾¤´­¤·¤¿¡£", m_name);
3919 #else
3920                                 msg_format("%^s magically summons hydras.", m_name);
3921 #endif
3922
3923                         }
3924                         else
3925                         {
3926                                 mon_fight = TRUE;
3927                         }
3928                 }
3929
3930                 for (k = 0; k < s_num_4; k++)
3931                 {
3932                         count += summon_specific(m_idx, y, x, rlev, SUMMON_HYDRA, (PM_ALLOW_GROUP));
3933                 }
3934
3935                 if (known && !see_t && count)
3936                 {
3937                         mon_fight = TRUE;
3938                 }
3939
3940                 break;
3941
3942         /* RF6_S_ANGEL */
3943         case 160+24:
3944                 if (known)
3945                 {
3946                         if (see_either)
3947                         {
3948                                 disturb(1, 0);
3949
3950 #ifdef JP
3951                                 msg_format("%^s¤¬ËâË¡¤ÇÅ·»È¤ò¾¤´­¤·¤¿¡ª", m_name);
3952 #else
3953                                 msg_format("%^s magically summons an angel!", m_name);
3954 #endif
3955
3956                         }
3957                         else
3958                         {
3959                                 mon_fight = TRUE;
3960                         }
3961                 }
3962
3963                 {
3964                         int num = 1;
3965
3966                         if ((r_ptr->flags1 & RF1_UNIQUE) && !easy_band)
3967                         {
3968                                 num += r_ptr->level/40;
3969                         }
3970
3971                         for (k = 0; k < num; k++)
3972                         {
3973                                 count += summon_specific(m_idx, y, x, rlev, SUMMON_ANGEL, (PM_ALLOW_GROUP));
3974                         }
3975                 }
3976
3977                 if (known && !see_t && count)
3978                 {
3979                         mon_fight = TRUE;
3980                 }
3981
3982                 break;
3983
3984         /* RF6_S_DEMON */
3985         case 160+25:
3986                 if (known)
3987                 {
3988                         if (see_either)
3989                         {
3990                                 disturb(1, 0);
3991
3992 #ifdef JP
3993                                 msg_format("%^s¤¬ËâË¡¤Çº®Æ٤εÜÄ¤é¥Ç¡¼¥â¥ó¤ò¾¤´­¤·¤¿¡ª", m_name);
3994 #else
3995                                 msg_format("%^s magically summons a demon from the Courts of Chaos!", m_name);
3996 #endif
3997
3998                         }
3999                         else
4000                         {
4001                                 mon_fight = TRUE;
4002                         }
4003                 }
4004
4005                 for (k = 0; k < 1; k++)
4006                 {
4007                         count += summon_specific(m_idx, y, x, rlev, SUMMON_DEMON, (PM_ALLOW_GROUP));
4008                 }
4009
4010                 if (known && !see_t && count)
4011                 {
4012                         mon_fight = TRUE;
4013                 }
4014
4015                 break;
4016
4017         /* RF6_S_UNDEAD */
4018         case 160+26:
4019                 if (known)
4020                 {
4021                         if (see_either)
4022                         {
4023                                 disturb(1, 0);
4024
4025 #ifdef JP
4026                                 msg_format("%s¤¬ËâË¡¤Ç¥¢¥ó¥Ç¥Ã¥É¤ò¾¤´­¤·¤¿¡£", m_name);
4027 #else
4028                                 msg_format("%^s magically summons undead.", m_name);
4029 #endif
4030
4031                         }
4032                         else
4033                         {
4034                                 mon_fight = TRUE;
4035                         }
4036                 }
4037
4038                 for (k = 0; k < 1; k++)
4039                 {
4040                         count += summon_specific(m_idx, y, x, rlev, SUMMON_UNDEAD, (PM_ALLOW_GROUP));
4041                 }
4042
4043                 if (known && !see_t && count)
4044                 {
4045                         mon_fight = TRUE;
4046                 }
4047
4048                 break;
4049
4050         /* RF6_S_DRAGON */
4051         case 160+27:
4052                 if (known)
4053                 {
4054                         if (see_either)
4055                         {
4056                                 disturb(1, 0);
4057
4058 #ifdef JP
4059                                 msg_format("%^s¤¬ËâË¡¤Ç¥É¥é¥´¥ó¤ò¾¤´­¤·¤¿¡ª", m_name);
4060 #else
4061                                 msg_format("%^s magically summons a dragon!", m_name);
4062 #endif
4063
4064                         }
4065                         else
4066                         {
4067                                 mon_fight = TRUE;
4068                         }
4069                 }
4070
4071                 for (k = 0; k < 1; k++)
4072                 {
4073                         count += summon_specific(m_idx, y, x, rlev, SUMMON_DRAGON, (PM_ALLOW_GROUP));
4074                 }
4075
4076                 if (known && !see_t && count)
4077                 {
4078                         mon_fight = TRUE;
4079                 }
4080
4081                 break;
4082
4083         /* RF6_S_HI_UNDEAD */
4084         case 160+28:
4085                 if (known)
4086                 {
4087                         if (see_either)
4088                         {
4089                                 disturb(1, 0);
4090
4091 #ifdef JP
4092                                 msg_format("%s¤¬ËâË¡¤Ç¥¢¥ó¥Ç¥Ã¥É¤ò¾¤´­¤·¤¿¡£", m_name);
4093 #else
4094                                 msg_format("%^s magically summons undead.", m_name);
4095 #endif
4096
4097                         }
4098                         else
4099                         {
4100                                 mon_fight = TRUE;
4101                         }
4102                 }
4103
4104                 for (k = 0; k < s_num_6; k++)
4105                 {
4106                         count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_UNDEAD, (PM_ALLOW_GROUP | u_mode));
4107                 }
4108
4109                 if (known && !see_t && count)
4110                 {
4111                         mon_fight = TRUE;
4112                 }
4113
4114                 break;
4115
4116         /* RF6_S_HI_DRAGON */
4117         case 160+29:
4118                 if (known)
4119                 {
4120                         if (see_either)
4121                         {
4122                                 disturb(1, 0);
4123
4124 #ifdef JP
4125                                 msg_format("%^s¤¬ËâË¡¤Ç¸ÅÂå¥É¥é¥´¥ó¤ò¾¤´­¤·¤¿¡ª", m_name);
4126 #else
4127                                 msg_format("%^s magically summons ancient dragons!", m_name);
4128 #endif
4129
4130                         }
4131                         else
4132                         {
4133                                 mon_fight = TRUE;
4134                         }
4135                 }
4136
4137                 for (k = 0; k < s_num_4; k++)
4138                 {
4139                         count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_DRAGON, (PM_ALLOW_GROUP | u_mode));
4140                 }
4141
4142                 if (known && !see_t && count)
4143                 {
4144                         mon_fight = TRUE;
4145                 }
4146
4147                 break;
4148
4149         /* RF6_S_AMBERITES */
4150         case 160+30:
4151                 if (known)
4152                 {
4153                         if (see_either)
4154                         {
4155                                 disturb(1, 0);
4156
4157 #ifdef JP
4158                                 msg_format("%^s¤¬¥¢¥ó¥Ð¡¼¤Î²¦Â²¤ò¾¤´­¤·¤¿¡ª", m_name);
4159 #else
4160                                 msg_format("%^s magically summons Lords of Amber!", m_name);
4161 #endif
4162
4163                         }
4164                         else
4165                         {
4166                                 mon_fight = TRUE;
4167                         }
4168                 }
4169
4170                 for (k = 0; k < s_num_4; k++)
4171                 {
4172                         count += summon_specific(m_idx, y, x, rlev, SUMMON_AMBERITES, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
4173                 }
4174
4175                 if (known && !see_t && count)
4176                 {
4177                         mon_fight = TRUE;
4178                 }
4179
4180                 break;
4181
4182         /* RF6_S_UNIQUE */
4183         case 160+31:
4184                 if (known)
4185                 {
4186                         if (see_either)
4187                         {
4188                                 disturb(1, 0);
4189
4190 #ifdef JP
4191                                 msg_format("%^s¤¬ËâË¡¤ÇÆÃÊ̤ʶ¯Å¨¤ò¾¤´­¤·¤¿¡ª", m_name);
4192 #else
4193                                 msg_format("%^s magically summons special opponents!", m_name);
4194 #endif
4195
4196                         }
4197                         else
4198                         {
4199                                 mon_fight = TRUE;
4200                         }
4201                 }
4202
4203                 for (k = 0; k < s_num_4; k++)
4204                 {
4205                         count += summon_specific(m_idx, y, x, rlev, SUMMON_UNIQUE, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
4206                 }
4207
4208                 if (known && !see_t && count)
4209                 {
4210                         mon_fight = TRUE;
4211                 }
4212
4213                 break;
4214         }
4215
4216         if (wake_up && t_ptr->csleep)
4217         {
4218                 t_ptr->csleep = 0;
4219                 if (!need_mproc(t_ptr)) mproc_remove(t_ptr->mproc_idx);
4220                 if (tr_ptr->flags7 & RF7_HAS_LD_MASK) p_ptr->update |= (PU_MON_LITE);
4221                 if (t_ptr->ml)
4222                 {
4223                         /* Redraw the health bar */
4224                         if (p_ptr->health_who == t_idx) p_ptr->redraw |= (PR_HEALTH);
4225                         if (p_ptr->riding == t_idx) p_ptr->redraw |= (PR_UHEALTH);
4226                 }
4227         }
4228
4229         if (fear && see_t)
4230         {
4231 #ifdef JP
4232                 msg_format("%^s¤Ï¶²Éݤ·¤Æƨ¤²½Ð¤·¤¿¡ª", t_name);
4233 #else
4234                 msg_format("%^s flees in terror!", t_name);
4235 #endif
4236
4237         }
4238
4239         if (m_ptr->ml && maneable && !world_monster && !p_ptr->blind && (p_ptr->pclass == CLASS_IMITATOR))
4240         {
4241                 if (thrown_spell != 167) /* Not RF6_SPECIAL */
4242                 {
4243                         if (p_ptr->mane_num == MAX_MANE)
4244                         {
4245                                 p_ptr->mane_num--;
4246                                 for (i = 0; i < p_ptr->mane_num - 1; i++)
4247                                 {
4248                                         p_ptr->mane_spell[i] = p_ptr->mane_spell[i+1];
4249                                         p_ptr->mane_dam[i] = p_ptr->mane_dam[i+1];
4250                                 }
4251                         }
4252                         p_ptr->mane_spell[p_ptr->mane_num] = thrown_spell - 96;
4253                         p_ptr->mane_dam[p_ptr->mane_num] = dam;
4254                         p_ptr->mane_num++;
4255                         new_mane = TRUE;
4256
4257                         p_ptr->redraw |= (PR_MANE);
4258                 }
4259         }
4260
4261         /* Remember what the monster did, if we saw it */
4262         if (can_remember)
4263         {
4264                 /* Inate spell */
4265                 if (thrown_spell < 32*4)
4266                 {
4267                         r_ptr->r_flags4 |= (1L << (thrown_spell - 32*3));
4268                         if (r_ptr->r_cast_spell < MAX_UCHAR) r_ptr->r_cast_spell++;
4269                 }
4270
4271                 /* Bolt or Ball */
4272                 else if (thrown_spell < 32*5)
4273                 {
4274                         r_ptr->r_flags5 |= (1L << (thrown_spell - 32*4));
4275                         if (r_ptr->r_cast_spell < MAX_UCHAR) r_ptr->r_cast_spell++;
4276                 }
4277
4278                 /* Special spell */
4279                 else if (thrown_spell < 32*6)
4280                 {
4281                         r_ptr->r_flags6 |= (1L << (thrown_spell - 32*5));
4282                         if (r_ptr->r_cast_spell < MAX_UCHAR) r_ptr->r_cast_spell++;
4283                 }
4284         }
4285
4286         /* Always take note of monsters that kill you */
4287         if (p_ptr->is_dead && (r_ptr->r_deaths < MAX_SHORT) && !p_ptr->inside_arena)
4288         {
4289                 r_ptr->r_deaths++; /* Ignore appearance difference */
4290         }
4291
4292         /* A spell was cast */
4293         return TRUE;
4294 }