OSDN Git Service

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