OSDN Git Service

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