OSDN Git Service

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