OSDN Git Service

モンスターの耐性のうち, 特定フラグに依存する暗黙の耐性の大部分を明示
[hengbandforosx/hengbandosx.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                                 /* Memorize a flag */
2115                                 if (tr_ptr->flagsr & RFR_RES_ALL) tr_ptr->r_flagsr |= (RFR_RES_ALL);
2116                                 if (tr_ptr->flags3 & RF3_NO_CONF) tr_ptr->r_flags3 |= (RF3_NO_CONF);
2117
2118 #ifdef JP
2119                                 msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2120 #else
2121                                 msg_format("%^s is unaffected!", t_name);
2122 #endif
2123
2124                         }
2125                 }
2126                 else
2127                 {
2128                         if (see_t)
2129                         {
2130 #ifdef JP
2131                                 msg_format("%^s¤ÏÀº¿À¹¶·â¤ò¿©¤é¤Ã¤¿¡£", t_name);
2132 #else
2133                                 msg_format("%^s is blasted by psionic energy.", t_name);
2134 #endif
2135
2136                         }
2137
2138                         t_ptr->confused += randint0(4) + 4;
2139
2140 #ifdef JP
2141                         mon_take_hit_mon(t_idx, dam, &fear, "¤ÎÀº¿À¤ÏÊø²õ¤·¡¢ÆùÂΤÏÈ´¤±³Ì¤È¤Ê¤Ã¤¿¡£", m_idx);
2142 #else
2143                         mon_take_hit_mon(t_idx, dam, &fear, " collapses, a mindless husk.", m_idx);
2144 #endif
2145                 }
2146
2147                 wake_up = TRUE;
2148
2149                 break;
2150
2151         /* RF5_BRAIN_SMASH */
2152         case 128+11:
2153                 if (see_m)
2154                 {
2155 #ifdef JP
2156                         msg_format("%^s¤Ï%s¤ò¤¸¤Ã¤Èâˤó¤À", m_name, t_name);
2157 #else
2158                         msg_format("%^s gazes intently at %s.", m_name, t_name);
2159 #endif
2160
2161                 }
2162
2163                 dam = damroll(12, 12);
2164                 /* Attempt a saving throw */
2165                 if ((tr_ptr->flags1 & RF1_UNIQUE) ||
2166                     (tr_ptr->flags3 & RF3_NO_CONF) ||
2167                     (tr_ptr->flagsr & RFR_RES_ALL) ||
2168                     (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10))
2169                 {
2170                         /* No obvious effect */
2171                         if (see_both)
2172                         {
2173                                 /* Memorize a flag */
2174                                 if (tr_ptr->flagsr & RFR_RES_ALL) tr_ptr->r_flagsr |= (RFR_RES_ALL);
2175                                 if (tr_ptr->flags3 & RF3_NO_CONF) tr_ptr->r_flags3 |= (RF3_NO_CONF);
2176
2177 #ifdef JP
2178                                 msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2179 #else
2180                                 msg_format("%^s is unaffected!", t_name);
2181 #endif
2182
2183                         }
2184                 }
2185                 else
2186                 {
2187                         if (see_t)
2188                         {
2189 #ifdef JP
2190                                 msg_format("%^s¤ÏÀº¿À¹¶·â¤ò¿©¤é¤Ã¤¿¡£", t_name);
2191 #else
2192                                 msg_format("%^s is blasted by psionic energy.", t_name);
2193 #endif
2194
2195                         }
2196
2197                         t_ptr->confused += randint0(4) + 4;
2198                         t_ptr->slow = MIN(200, t_ptr->slow + 10);
2199                         t_ptr->stunned += randint0(4) + 4;
2200
2201 #ifdef JP
2202                         mon_take_hit_mon(t_idx, dam, &fear, "¤ÎÀº¿À¤ÏÊø²õ¤·¡¢ÆùÂΤÏÈ´¤±³Ì¤È¤Ê¤Ã¤¿¡£", m_idx);
2203 #else
2204                         mon_take_hit_mon(t_idx, dam, &fear, " collapses, a mindless husk.", m_idx);
2205 #endif
2206                 }
2207
2208                 wake_up = TRUE;
2209
2210                 break;
2211
2212         /* RF5_CAUSE_1 */
2213         case 128+12:
2214                 if (known)
2215                 {
2216                         if (see_m)
2217                         {
2218 #ifdef JP
2219                                 msg_format("%^s¤Ï%s¤ò»Ø¤µ¤·¤Æ¼ö¤¤¤ò¤«¤±¤¿¡£", m_name, t_name);
2220 #else
2221                                 msg_format("%^s points at %s and curses.", m_name, t_name);
2222 #endif
2223
2224                         }
2225                         else
2226                         {
2227                                 mon_fight = TRUE;
2228                         }
2229                 }
2230
2231                 dam = damroll(3, 8);
2232                 if ((randint0(100 + rlev/2) < (tr_ptr->level + 35)) ||
2233                     (tr_ptr->flagsr & RFR_RES_ALL))
2234                 {
2235                         /* Memorize a flag */
2236                         if (tr_ptr->flagsr & RFR_RES_ALL)
2237                         {
2238                                 tr_ptr->r_flagsr |= (RFR_RES_ALL);
2239                         }
2240 #ifdef JP
2241                         if (see_both) msg_format("%^s¤ÏÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡ª", t_name);
2242 #else
2243                         if (see_both) msg_format("%^s resists!", t_name);
2244 #endif
2245
2246                 }
2247                 else
2248                 {
2249                         mon_take_hit_mon(t_idx, dam, &fear, NULL, m_idx);
2250                 }
2251
2252                 wake_up = TRUE;
2253
2254                 break;
2255
2256         /* RF5_CAUSE_2 */
2257         case 128+13:
2258                 if (known)
2259                 {
2260                         if (see_m)
2261                         {
2262 #ifdef JP
2263                                 msg_format("%^s¤Ï%s¤ò»Ø¤µ¤·¤Æ¶²¤í¤·¤²¤Ë¼ö¤¤¤ò¤«¤±¤¿¡£", m_name, t_name);
2264 #else
2265                                 msg_format("%^s points at %s and curses horribly.", m_name, t_name);
2266 #endif
2267
2268                         }
2269                         else
2270                         {
2271                                 mon_fight = TRUE;
2272                         }
2273                 }
2274
2275                 dam = damroll(8, 8);
2276                 if ((randint0(100 + rlev/2) < (tr_ptr->level + 35)) ||
2277                     (tr_ptr->flagsr & RFR_RES_ALL))
2278                 {
2279                         /* Memorize a flag */
2280                         if (tr_ptr->flagsr & RFR_RES_ALL)
2281                         {
2282                                 tr_ptr->r_flagsr |= (RFR_RES_ALL);
2283                         }
2284 #ifdef JP
2285                         if (see_both) msg_format("%^s¤ÏÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡ª", t_name);
2286 #else
2287                         if (see_both) msg_format("%^s resists!", t_name);
2288 #endif
2289
2290                 }
2291                 else
2292                 {
2293                         mon_take_hit_mon(t_idx, dam, &fear, NULL, m_idx);
2294                 }
2295
2296                 wake_up = TRUE;
2297
2298                 break;
2299
2300         /* RF5_CAUSE_3 */
2301         case 128+14:
2302                 if (known)
2303                 {
2304                         if (see_m)
2305                         {
2306 #ifdef JP
2307                                 msg_format("%^s¤Ï%s¤ò»Ø¤µ¤·¡¢¶²¤í¤·¤²¤Ë¼öʸ¤ò¾§¤¨¤¿¡ª", m_name, t_name);
2308 #else
2309                                 msg_format("%^s points at %s, incanting terribly!", m_name, t_name);
2310 #endif
2311
2312                         }
2313                         else
2314                         {
2315                                 mon_fight = TRUE;
2316                         }
2317                 }
2318
2319                 dam = damroll(10, 15);
2320                 if ((randint0(100 + rlev/2) < (tr_ptr->level + 35)) ||
2321                     (tr_ptr->flagsr & RFR_RES_ALL))
2322                 {
2323                         /* Memorize a flag */
2324                         if (tr_ptr->flagsr & RFR_RES_ALL)
2325                         {
2326                                 tr_ptr->r_flagsr |= (RFR_RES_ALL);
2327                         }
2328 #ifdef JP
2329                         if (see_both) msg_format("%^s¤ÏÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡ª", t_name);
2330 #else
2331                         if (see_both) msg_format("%^s resists!", t_name);
2332 #endif
2333
2334                 }
2335                 else
2336                 {
2337                         mon_take_hit_mon(t_idx, dam, &fear, NULL, m_idx);
2338                 }
2339
2340                 wake_up = TRUE;
2341
2342                 break;
2343
2344         /* RF5_CAUSE_4 */
2345         case 128+15:
2346                 if (known)
2347                 {
2348                         if (see_m)
2349                         {
2350 #ifdef JP
2351                                 msg_format("%^s¤¬%s¤ÎÈ빦¤òÆͤ¤¤Æ¡¢¡Ö¤ªÁ°¤Ï´û¤Ë»à¤ó¤Ç¤¤¤ë¡×¤È¶«¤ó¤À¡£", m_name, t_name);
2352 #else
2353                                 msg_format("%^s points at %s, screaming the word, 'DIE!'", m_name, t_name);
2354 #endif
2355
2356                         }
2357                         else
2358                         {
2359                                 mon_fight = TRUE;
2360                         }
2361                 }
2362
2363                 dam = damroll(15, 15);
2364                 if (((randint0(100 + rlev/2) < (tr_ptr->level + 35)) && (m_ptr->r_idx != MON_KENSHIROU)) ||
2365                     (tr_ptr->flagsr & RFR_RES_ALL))
2366                 {
2367                         /* Memorize a flag */
2368                         if (tr_ptr->flagsr & RFR_RES_ALL)
2369                         {
2370                                 tr_ptr->r_flagsr |= (RFR_RES_ALL);
2371                         }
2372 #ifdef JP
2373                         if (see_both) msg_format("%^s¤ÏÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡ª", t_name);
2374 #else
2375                         if (see_both) msg_format("%^s resists!", t_name);
2376 #endif
2377
2378                 }
2379                 else
2380                 {
2381                         mon_take_hit_mon(t_idx, dam, &fear, NULL, m_idx);
2382                 }
2383
2384                 wake_up = TRUE;
2385
2386                 break;
2387
2388         /* RF5_BO_ACID */
2389         case 128+16:
2390                 if (known)
2391                 {
2392                         if (see_either)
2393                         {
2394 #ifdef JP
2395                                 msg_format("%s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2396 #else
2397                                 msg_format("%^s casts an acid bolt at %s.", m_name, t_name);
2398 #endif
2399
2400                         }
2401                         else
2402                         {
2403                                 mon_fight = TRUE;
2404                         }
2405                 }
2406
2407                 dam = (damroll(7, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
2408                 monst_bolt_monst(m_idx, y, x, GF_ACID,
2409                                  dam, MS_BOLT_ACID, learnable);
2410
2411                 break;
2412
2413         /* RF5_BO_ELEC */
2414         case 128+17:
2415                 if (known)
2416                 {
2417                         if (see_either)
2418                         {
2419 #ifdef JP
2420                                 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2421 #else
2422                                 msg_format("%^s casts a lightning bolt at %s.", m_name, t_name);
2423 #endif
2424
2425                         }
2426                         else
2427                         {
2428                                 mon_fight = TRUE;
2429                         }
2430                 }
2431
2432                 dam = (damroll(4, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
2433                 monst_bolt_monst(m_idx, y, x, GF_ELEC,
2434                                  dam, MS_BOLT_ELEC, learnable);
2435
2436                 break;
2437
2438         /* RF5_BO_FIRE */
2439         case 128+18:
2440                 if (known)
2441                 {
2442                         if (see_either)
2443                         {
2444 #ifdef JP
2445                                 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2446 #else
2447                                 msg_format("%^s casts a fire bolt at %s.", m_name, t_name);
2448 #endif
2449
2450                         }
2451                         else
2452                         {
2453                                 mon_fight = TRUE;
2454                         }
2455                 }
2456
2457                 dam = (damroll(9, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
2458                 monst_bolt_monst(m_idx, y, x, GF_FIRE,
2459                                  dam, MS_BOLT_FIRE, learnable);
2460
2461                 break;
2462
2463         /* RF5_BO_COLD */
2464         case 128+19:
2465                 if (known)
2466                 {
2467                         if (see_either)
2468                         {
2469 #ifdef JP
2470                                 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥¢¥¤¥¹¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2471 #else
2472                                 msg_format("%^s casts a frost bolt at %s.", m_name, t_name);
2473 #endif
2474
2475                         }
2476                         else
2477                         {
2478                                 mon_fight = TRUE;
2479                         }
2480                 }
2481
2482                 dam = (damroll(6, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
2483                 monst_bolt_monst(m_idx, y, x, GF_COLD,
2484                                  dam, MS_BOLT_COLD, learnable);
2485
2486                 break;
2487
2488         /* RF5_BA_LITE */
2489         case 128+20:
2490                 if (known)
2491                 {
2492                         if (see_either)
2493                         {
2494                                 disturb(1, 0);
2495
2496                                 if (blind)
2497                                 {
2498 #ifdef JP
2499                                         msg_format("%^s¤¬²¿¤«¤òÎ϶¯¤¯¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
2500 #else
2501                                         msg_format("%^s mumbles powerfully.", m_name);
2502 #endif
2503
2504                                 }
2505                                 else
2506                                 {
2507 #ifdef JP
2508                                         msg_format("%^s¤¬%s¤ËÂФ·¤Æ¥¹¥¿¡¼¥Ð¡¼¥¹¥È¤Î¼öʸ¤òÇ°¤¸¤¿¡£", m_name, t_name);
2509 #else
2510                                         msg_format("%^s invokes a starburst upon %s.", m_name, t_name);
2511 #endif
2512
2513                                 }
2514                         }
2515                         else
2516                         {
2517                                 mon_fight = TRUE;
2518                         }
2519                 }
2520
2521                 dam = (rlev * 4) + 50 + damroll(10, 10);
2522                 monst_breath_monst(m_idx, y, x, GF_LITE, dam, 4, FALSE, MS_STARBURST, learnable);
2523
2524                 break;
2525
2526         /* RF5_BO_NETH */
2527         case 128+21:
2528                 if (known)
2529                 {
2530                         if (see_either)
2531                         {
2532 #ifdef JP
2533                                 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤ÆÃϹö¤ÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2534 #else
2535                                 msg_format("%^s casts a nether bolt at %s.", m_name, t_name);
2536 #endif
2537
2538                         }
2539                         else
2540                         {
2541                                 mon_fight = TRUE;
2542                         }
2543                 }
2544
2545                 dam = 30 + damroll(5, 5) + (rlev * 4) / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3);
2546                 monst_bolt_monst(m_idx, y, x, GF_NETHER,
2547                                  dam, MS_BOLT_NETHER, learnable);
2548
2549                 break;
2550
2551         /* RF5_BO_WATE */
2552         case 128+22:
2553                 if (known)
2554                 {
2555                         if (see_either)
2556                         {
2557 #ifdef JP
2558                                 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥¦¥©¡¼¥¿¡¼¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2559 #else
2560                                 msg_format("%^s casts a water bolt at %s.", m_name, t_name);
2561 #endif
2562
2563                         }
2564                         else
2565                         {
2566                                 mon_fight = TRUE;
2567                         }
2568                 }
2569
2570                 dam = damroll(10, 10) + (rlev * 3 / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3));
2571                 monst_bolt_monst(m_idx, y, x, GF_WATER,
2572                                  dam, MS_BOLT_WATER, learnable);
2573
2574                 break;
2575
2576         /* RF5_BO_MANA */
2577         case 128+23:
2578                 if (known)
2579                 {
2580                         if (see_either)
2581                         {
2582 #ifdef JP
2583                                 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤ÆËâÎϤÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2584 #else
2585                                 msg_format("%^s casts a mana bolt at %s.", m_name, t_name);
2586 #endif
2587
2588                         }
2589                         else
2590                         {
2591                                 mon_fight = TRUE;
2592                         }
2593                 }
2594
2595                 dam = randint1(rlev * 7 / 2) + 50;
2596                 monst_bolt_monst(m_idx, y, x, GF_MANA,
2597                                  dam, MS_BOLT_MANA, learnable);
2598
2599                 break;
2600
2601         /* RF5_BO_PLAS */
2602         case 128+24:
2603                 if (known)
2604                 {
2605                         if (see_either)
2606                         {
2607 #ifdef JP
2608                                 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥×¥é¥º¥Þ¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2609 #else
2610                                 msg_format("%^s casts a plasma bolt at %s.", m_name, t_name);
2611 #endif
2612
2613                         }
2614                         else
2615                         {
2616                                 mon_fight = TRUE;
2617                         }
2618                 }
2619
2620                 dam = 10 + damroll(8, 7) + (rlev * 3 / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3));
2621                 monst_bolt_monst(m_idx, y, x, GF_PLASMA,
2622                                  dam, MS_BOLT_PLASMA, learnable);
2623
2624                 break;
2625
2626         /* RF5_BO_ICEE */
2627         case 128+25:
2628                 if (known)
2629                 {
2630                         if (see_either)
2631                         {
2632 #ifdef JP
2633                                 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¶Ë´¨¤ÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2634 #else
2635                                 msg_format("%^s casts an ice bolt at %s.", m_name, t_name);
2636 #endif
2637
2638                         }
2639                         else
2640                         {
2641                                 mon_fight = TRUE;
2642                         }
2643                 }
2644
2645                 dam = damroll(6, 6) + (rlev * 3 / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3));
2646                 monst_bolt_monst(m_idx, y, x, GF_ICE,
2647                                  dam, MS_BOLT_ICE, learnable);
2648
2649                 break;
2650
2651         /* RF5_MISSILE */
2652         case 128+26:
2653                 if (known)
2654                 {
2655                         if (see_either)
2656                         {
2657 #ifdef JP
2658                                 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2659 #else
2660                                 msg_format("%^s casts a magic missile at %s.", m_name, t_name);
2661 #endif
2662
2663                         }
2664                         else
2665                         {
2666                                 mon_fight = TRUE;
2667                         }
2668                 }
2669
2670                 dam = damroll(2, 6) + (rlev / 3);
2671                 monst_bolt_monst(m_idx, y, x, GF_MISSILE,
2672                                  dam, MS_MAGIC_MISSILE, learnable);
2673
2674                 break;
2675
2676         /* RF5_SCARE */
2677         case 128+27:
2678                 if (known)
2679                 {
2680                         if (see_either)
2681                         {
2682 #ifdef JP
2683                                 msg_format("%^s¤¬¶²¤í¤·¤²¤Ê¸¸³Ð¤òºî¤ê½Ð¤·¤¿¡£", m_name, t_name);
2684 #else
2685                                 msg_format("%^s casts a fearful illusion in front of %s.", m_name, t_name);
2686 #endif
2687
2688                         }
2689                         else
2690                         {
2691                                 mon_fight = TRUE;
2692                         }
2693                 }
2694
2695                 if (tr_ptr->flags3 & RF3_NO_FEAR)
2696                 {
2697 #ifdef JP
2698                         if (see_t) msg_format("%^s¤Ï¶²Éݤò´¶¤¸¤Ê¤¤¡£", t_name);
2699 #else
2700                         if (see_t) msg_format("%^s refuses to be frightened.", t_name);
2701 #endif
2702
2703                 }
2704                 else if (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10)
2705                 {
2706 #ifdef JP
2707                         if (see_t) msg_format("%^s¤Ï¶²Éݤò´¶¤¸¤Ê¤¤¡£", t_name);
2708 #else
2709                         if (see_t) msg_format("%^s refuses to be frightened.", t_name);
2710 #endif
2711
2712                 }
2713                 else
2714                 {
2715                         if (!t_ptr->monfear) fear = TRUE;
2716
2717                         t_ptr->monfear += randint0(4) + 4;
2718                 }
2719
2720                 wake_up = TRUE;
2721
2722                 break;
2723
2724         /* RF5_BLIND */
2725         case 128+28:
2726                 if (known)
2727                 {
2728                         if (see_either)
2729                         {
2730 #ifdef JP
2731                                 msg_format("%s¤Ï¼öʸ¤ò¾§¤¨¤Æ%s¤ÎÌܤò¾Æ¤­ÉÕ¤«¤»¤¿¡£", m_name, t_name);
2732 #else
2733                                 msg_format("%^s casts a spell, burning %s%s eyes.", m_name, t_name,
2734                                            (streq(t_name, "it") ? "s" : "'s"));
2735 #endif
2736
2737                         }
2738                         else
2739                         {
2740                                 mon_fight = TRUE;
2741                         }
2742                 }
2743
2744                 /* Simulate blindness with confusion */
2745                 if (tr_ptr->flags3 & RF3_NO_CONF)
2746                 {
2747 #ifdef JP
2748                         if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2749 #else
2750                         if (see_t) msg_format("%^s is unaffected.", t_name);
2751 #endif
2752
2753                 }
2754                 else if (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10)
2755                 {
2756 #ifdef JP
2757                         if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2758 #else
2759                         if (see_t) msg_format("%^s is unaffected.", t_name);
2760 #endif
2761
2762                 }
2763                 else
2764                 {
2765 #ifdef JP
2766                         if (see_t)   msg_format("%^s¤ÏÌܤ¬¸«¤¨¤Ê¤¯¤Ê¤Ã¤¿¡ª ", t_name);
2767 #else
2768                         if (see_t) msg_format("%^s is blinded!", t_name);
2769 #endif
2770
2771
2772                         t_ptr->confused += 12 + (byte)randint0(4);
2773                 }
2774
2775                 wake_up = TRUE;
2776
2777                 break;
2778
2779         /* RF5_CONF */
2780         case 128+29:
2781                 if (known)
2782                 {
2783                         if (see_either)
2784                         {
2785 #ifdef JP
2786                                 msg_format("%^s¤¬%s¤ÎÁ°¤Ë¸¸ÏÇŪ¤Ê¸¸¤ò¤Ä¤¯¤ê½Ð¤·¤¿¡£", m_name, t_name);
2787 #else
2788                                 msg_format("%^s casts a mesmerizing illusion in front of %s.", m_name, t_name);
2789 #endif
2790
2791                         }
2792                         else
2793                         {
2794                                 mon_fight = TRUE;
2795                         }
2796                 }
2797
2798                 if (tr_ptr->flags3 & RF3_NO_CONF)
2799                 {
2800 #ifdef JP
2801                         if (see_t) msg_format("%^s¤ÏÏǤ蘆¤ì¤Ê¤«¤Ã¤¿¡£", t_name);
2802 #else
2803                         if (see_t) msg_format("%^s disbelieves the feeble spell.", t_name);
2804 #endif
2805
2806                 }
2807                 else if (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10)
2808                 {
2809 #ifdef JP
2810                         if (see_t) msg_format("%^s¤ÏÏǤ蘆¤ì¤Ê¤«¤Ã¤¿¡£", t_name);
2811 #else
2812                         if (see_t) msg_format("%^s disbelieves the feeble spell.", t_name);
2813 #endif
2814
2815                 }
2816                 else
2817                 {
2818 #ifdef JP
2819                         if (see_t) msg_format("%^s¤Ïº®Í𤷤¿¤è¤¦¤À¡£", t_name);
2820 #else
2821                         if (see_t) msg_format("%^s seems confused.", t_name);
2822 #endif
2823
2824
2825                         t_ptr->confused += 12 + (byte)randint0(4);
2826                 }
2827
2828                 wake_up = TRUE;
2829
2830                 break;
2831
2832         /* RF5_SLOW */
2833         case 128+30:
2834                 if (known)
2835                 {
2836                         if (see_either)
2837                         {
2838 #ifdef JP
2839                                 msg_format("%s¤¬%s¤Î¶ÚÆù¤«¤éÎϤòµÛ¤¤¤È¤Ã¤¿¡£", m_name, t_name);
2840 #else
2841                                 msg_format("%^s drains power from %s%s muscles.", m_name, t_name,
2842                                            (streq(t_name, "it") ? "s" : "'s"));
2843 #endif
2844
2845                         }
2846                         else
2847                         {
2848                                 mon_fight = TRUE;
2849                         }
2850                 }
2851
2852                 if (tr_ptr->flags1 & RF1_UNIQUE)
2853                 {
2854 #ifdef JP
2855                         if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2856 #else
2857                         if (see_t) msg_format("%^s is unaffected.", t_name);
2858 #endif
2859
2860                 }
2861                 else if (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10)
2862                 {
2863 #ifdef JP
2864                         if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2865 #else
2866                         if (see_t) msg_format("%^s is unaffected.", t_name);
2867 #endif
2868
2869                 }
2870                 else
2871                 {
2872                         if (!t_ptr->slow)
2873                         {
2874 #ifdef JP
2875                                 if (see_t) msg_format("%s¤ÎÆ°¤­¤¬ÃÙ¤¯¤Ê¤Ã¤¿¡£", t_name);
2876 #else
2877                                 if (see_t) msg_format("%^s starts moving slower.", t_name);
2878 #endif
2879                         }
2880
2881                         t_ptr->slow = MIN(200, t_ptr->slow + 50);
2882                 }
2883
2884                 wake_up = TRUE;
2885
2886                 break;
2887
2888         /* RF5_HOLD */
2889         case 128+31:
2890                 if (known)
2891                 {
2892                         if (see_either)
2893                         {
2894 #ifdef JP
2895                                 msg_format("%^s¤Ï%s¤ò¤¸¤Ã¤È¸«¤Ä¤á¤¿¡£", m_name, t_name);
2896 #else
2897                                 msg_format("%^s stares intently at %s.", m_name, t_name);
2898 #endif
2899
2900                         }
2901                         else
2902                         {
2903                                 mon_fight = TRUE;
2904                         }
2905                 }
2906
2907                 if ((tr_ptr->flags1 & RF1_UNIQUE) ||
2908                     (tr_ptr->flags3 & RF3_NO_STUN))
2909                 {
2910 #ifdef JP
2911                         if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2912 #else
2913                         if (see_t) msg_format("%^s is unaffected.", t_name);
2914 #endif
2915
2916                 }
2917                 else if (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10)
2918                 {
2919 #ifdef JP
2920                         if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2921 #else
2922                         if (see_t) msg_format("%^s is unaffected.", t_name);
2923 #endif
2924
2925                 }
2926                 else
2927                 {
2928 #ifdef JP
2929                         if (see_t) msg_format("%^s¤ÏËãá㤷¤¿¡ª", t_name);
2930 #else
2931                         if (see_t) msg_format("%^s is paralyzed!", t_name);
2932 #endif
2933
2934
2935                         t_ptr->stunned += randint1(4) + 4;
2936                 }
2937
2938                 wake_up = TRUE;
2939
2940                 break;
2941
2942
2943         /* RF6_HASTE */
2944         case 160+0:
2945                 if (known)
2946                 {
2947                         if (see_m)
2948                         {
2949 #ifdef JP
2950                                 msg_format("%^s¤¬¼«Ê¬¤ÎÂΤËÇ°¤òÁ÷¤Ã¤¿¡£", m_name);
2951 #else
2952                                 msg_format("%^s concentrates on %s body.", m_name, m_poss);
2953 #endif
2954
2955                         }
2956                         else
2957                         {
2958                                 mon_fight = TRUE;
2959                         }
2960                 }
2961
2962                 /* Allow quick speed increases to base+10 */
2963                 if (!m_ptr->fast)
2964                 {
2965 #ifdef JP
2966                         if (see_m) msg_format("%^s¤ÎÆ°¤­¤¬Â®¤¯¤Ê¤Ã¤¿¡£", m_name);
2967 #else
2968                         if (see_m) msg_format("%^s starts moving faster.", m_name);
2969 #endif
2970
2971                 }
2972                 m_ptr->fast = MIN(200, m_ptr->fast + 100);
2973                 if (p_ptr->riding == m_idx) p_ptr->update |= PU_BONUS;
2974                 break;
2975
2976         /* RF6_HAND_DOOM */
2977         case 160+1:
2978                 if (known)
2979                 {
2980                         if (see_m)
2981                         {
2982 #ifdef JP
2983                                 msg_format("%^s¤¬%s¤Ë<ÇËÌǤμê>¤òÊü¤Ã¤¿¡ª", m_name, t_name);
2984 #else
2985                                 msg_format("%^s invokes the Hand of Doom upon %s!", m_name, t_name);
2986 #endif
2987
2988                         }
2989                         else
2990                         {
2991                                 mon_fight = TRUE;
2992                         }
2993                 }
2994
2995                 if ((tr_ptr->flags1 & RF1_UNIQUE) || (tr_ptr->flagsr & RFR_RES_ALL))
2996                 {
2997                         /* Memorize a flag */
2998                         if (tr_ptr->flagsr & RFR_RES_ALL)
2999                         {
3000                                 tr_ptr->r_flagsr |= (RFR_RES_ALL);
3001                         }
3002 #ifdef JP
3003                         if (see_both) msg_format("¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡ª", t_name);
3004 #else
3005                         if (see_both) msg_format("^%s is unaffected!", t_name);
3006 #endif
3007
3008                 }
3009                 else
3010                 {
3011                         if ((r_ptr->level + randint1(20)) >
3012                             (tr_ptr->level + 10 + randint1(20)))
3013                         {
3014                                 t_ptr->hp = t_ptr->hp -
3015                                         (((s32b)((40 + randint1(20)) * t_ptr->hp)) / 100);
3016
3017                                 if (t_ptr->hp < 1) t_ptr->hp = 1;
3018                         }
3019                         else
3020                         {
3021 #ifdef JP
3022                                 if (see_both) msg_format("%^s¤ÏÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡ª", t_name);
3023 #else
3024                                 if (see_both) msg_format("%^s resists!", t_name);
3025 #endif
3026
3027                         }
3028                 }
3029
3030                 wake_up = TRUE;
3031
3032                 break;
3033
3034         /* RF6_HEAL */
3035         case 160+2:
3036                 if (known)
3037                 {
3038                         if (see_m)
3039                         {
3040 #ifdef JP
3041                                 msg_format("%^s¤Ï¼«Ê¬¤Î½ý¤ËÇ°¤ò½¸Ã椷¤¿¡£", m_name);
3042 #else
3043                                 msg_format("%^s concentrates on %s wounds.", m_name, m_poss);
3044 #endif
3045
3046                         }
3047                         else
3048                         {
3049                                 mon_fight = TRUE;
3050                         }
3051                 }
3052
3053                 /* Heal some */
3054                 m_ptr->hp += (rlev * 6);
3055
3056                 /* Fully healed */
3057                 if (m_ptr->hp >= m_ptr->maxhp)
3058                 {
3059                         /* Fully healed */
3060                         m_ptr->hp = m_ptr->maxhp;
3061
3062                         if (known)
3063                         {
3064                                 if (see_m)
3065                                 {
3066 #ifdef JP
3067                                         msg_format("%^s¤Ï´°Á´¤Ë¼£¤Ã¤¿¡ª", m_name);
3068 #else
3069                                         msg_format("%^s looks completely healed!", m_name);
3070 #endif
3071
3072                                 }
3073                                 else
3074                                 {
3075                                         mon_fight = TRUE;
3076                                 }
3077                         }
3078                 }
3079
3080                 /* Partially healed */
3081                 else if (known)
3082                 {
3083                         if (see_m)
3084                         {
3085 #ifdef JP
3086                                 msg_format("%^s¤ÏÂÎÎϤò²óÉü¤·¤¿¤è¤¦¤À¡£", m_name);
3087 #else
3088                                 msg_format("%^s looks healthier.", m_name);
3089 #endif
3090
3091                         }
3092                         else
3093                         {
3094                                 mon_fight = TRUE;
3095                         }
3096                 }
3097
3098                 /* Redraw (later) if needed */
3099                 if (p_ptr->health_who == m_idx) p_ptr->redraw |= (PR_HEALTH);
3100                 if (p_ptr->riding == m_idx) p_ptr->redraw |= (PR_UHEALTH);
3101
3102                 /* Cancel fear */
3103                 if (m_ptr->monfear)
3104                 {
3105                         /* Cancel fear */
3106                         m_ptr->monfear = 0;
3107
3108                         /* Message */
3109 #ifdef JP
3110                         if (see_m) msg_format("%^s¤Ïͦµ¤¤ò¼è¤êÌᤷ¤¿¡£", m_name);
3111 #else
3112                         if (see_m) msg_format("%^s recovers %s courage.", m_name, m_poss);
3113 #endif
3114
3115                 }
3116
3117                 break;
3118
3119         /* RF6_INVULNER */
3120         case 160+3:
3121                 if (known)
3122                 {
3123                         if (see_m)
3124                         {
3125                                 disturb(1, 0);
3126 #ifdef JP
3127                                 msg_format("%s¤Ï̵½ý¤Îµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name);
3128 #else
3129                                 msg_format("%^s casts a Globe of Invulnerability.", m_name);
3130 #endif
3131
3132                         }
3133                         else
3134                         {
3135                                 mon_fight = TRUE;
3136                         }
3137                 }
3138
3139                 if (!m_ptr->invulner) m_ptr->invulner = randint1(4) + 4;
3140
3141                 if (p_ptr->health_who == m_idx) p_ptr->redraw |= (PR_HEALTH);
3142                 if (p_ptr->riding == m_idx) p_ptr->redraw |= (PR_UHEALTH);
3143                 break;
3144
3145         /* RF6_BLINK */
3146         case 160+4:
3147                 if (see_m)
3148                 {
3149 #ifdef JP
3150                         msg_format("%^s¤¬½Ö»þ¤Ë¾Ã¤¨¤¿¡£", m_name);
3151 #else
3152                         msg_format("%^s blinks away.", m_name);
3153 #endif
3154
3155                 }
3156
3157                 teleport_away(m_idx, 10, FALSE);
3158
3159                 break;
3160
3161         /* RF6_TPORT */
3162         case 160+5:
3163                 if (see_m)
3164                 {
3165 #ifdef JP
3166                         msg_format("%^s¤¬¥Æ¥ì¥Ý¡¼¥È¤·¤¿¡£", m_name);
3167 #else
3168                         msg_format("%^s teleports away.", m_name);
3169 #endif
3170                 }
3171
3172                 teleport_away(m_idx, MAX_SIGHT * 2 + 5, FALSE);
3173
3174                 if (los(py, px, m_ptr->fy, m_ptr->fx) && !world_monster && see_m)
3175                 {
3176                         for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
3177                         {
3178                                 u32b flgs[TR_FLAG_SIZE];
3179                                 object_type *o_ptr = &inventory[i];
3180
3181                                 if (cursed_p(o_ptr)) continue;
3182
3183                                 object_flags(o_ptr, flgs);
3184
3185                                 if((have_flag(flgs, TR_TELEPORT)) || (p_ptr->muta1 & MUT1_VTELEPORT) || (p_ptr->pclass == CLASS_IMITATOR))
3186                                 {
3187 #ifdef JP
3188                                         cptr msg = "¤Ä¤¤¤Æ¤¤¤­¤Þ¤¹¤«¡©";
3189 #else
3190                                         cptr msg = "Do you follow it? ";
3191 #endif
3192
3193                                         if(get_check_strict(msg, CHECK_OKAY_CANCEL))
3194                                         {
3195                                                 if (one_in_(3))
3196                                                 {
3197                                                         teleport_player(200);
3198 #ifdef JP
3199                                                         msg_print("¼ºÇÔ¡ª");
3200 #else
3201                                                         msg_print("Failed!");
3202 #endif
3203                                                 }
3204                                                 else teleport_player_to(m_ptr->fy, m_ptr->fx, TRUE);
3205                                                 p_ptr->energy_need = ENERGY_NEED();
3206                                         }
3207                                         break;
3208                                 }
3209                         }
3210                 }
3211                 break;
3212
3213         /* RF6_WORLD */
3214         case 160+6:
3215 #if 0
3216                 int who = 0;
3217                 if(m_ptr->r_idx = MON_DIO) who == 1;
3218                 else if(m_ptr->r_idx = MON_WONG) who == 3;
3219                 dam = who;
3220                 if(!process_the_world(randint1(2)+2, who, los(py, px, m_ptr->fy, m_ptr->fx))) return (FALSE);
3221 #endif
3222                 return FALSE;
3223
3224         /* RF6_SPECIAL */
3225         case 160+7:
3226                 switch (m_ptr->r_idx)
3227                 {
3228                 case MON_OHMU:
3229                         /* Moved to process_monster(), like multiplication */
3230                         return FALSE;
3231
3232                 default:
3233                         if (r_ptr->d_char == 'B')
3234                         {
3235                                 if (one_in_(3))
3236                                 {
3237                                         if (see_m)
3238                                         {
3239 #ifdef JP
3240                                                 msg_format("%^s¤ÏÆÍÁ³µÞ¾å¾º¤·¤Æ»ë³¦¤«¤é¾Ã¤¨¤¿!", m_name);
3241 #else
3242                                                 msg_format("%^s suddenly go out of your sight!", m_name);
3243 #endif
3244                                         }
3245                                         teleport_away(m_idx, 10, FALSE);
3246                                         p_ptr->update |= (PU_MONSTERS | PU_MON_LITE);
3247                                 }
3248                                 else
3249                                 {
3250                                         /* Not implemented */
3251                                         return FALSE;
3252                                 }
3253                                 break;
3254                         }
3255
3256                         /* Something is wrong */
3257                         else return FALSE;
3258                 }
3259
3260                 /* done */
3261                 break;
3262
3263         /* RF6_TELE_TO */
3264         case 160+8:
3265                 /* Not implemented */
3266                 return FALSE;
3267
3268         /* RF6_TELE_AWAY */
3269         case 160+9:
3270                 if (known)
3271                 {
3272                         if (see_either)
3273                         {
3274 #ifdef JP
3275                                 msg_format("%^s¤Ï%s¤ò¥Æ¥ì¥Ý¡¼¥È¤µ¤»¤¿¡£", m_name, t_name);
3276 #else
3277                                 msg_format("%^s teleports %s away.", m_name, t_name);
3278 #endif
3279
3280                         }
3281                         else
3282                         {
3283                                 mon_fight = TRUE;
3284                         }
3285                 }
3286
3287                 {
3288                         bool resists_tele = FALSE;
3289
3290                         if (tr_ptr->flagsr & RFR_RES_TELE)
3291                         {
3292                                 if ((tr_ptr->flags1 & RF1_UNIQUE) || (tr_ptr->flagsr & RFR_RES_ALL))
3293                                 {
3294                                         if (see_t)
3295                                         {
3296                                                 tr_ptr->r_flagsr |= RFR_RES_TELE;
3297 #ifdef JP
3298                                                 msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
3299 #else
3300                                                 msg_format("%^s is unaffected!", t_name);
3301 #endif
3302
3303                                         }
3304
3305                                         resists_tele = TRUE;
3306                                 }
3307                                 else if (tr_ptr->level > randint1(100))
3308                                 {
3309                                         if (see_t)
3310                                         {
3311                                                 tr_ptr->r_flagsr |= RFR_RES_TELE;
3312 #ifdef JP
3313                                                 msg_format("%^s¤ÏÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡ª", t_name);
3314 #else
3315                                                 msg_format("%^s resists!", t_name);
3316 #endif
3317
3318                                         }
3319
3320                                         resists_tele = TRUE;
3321                                 }
3322                         }
3323
3324                         if (!resists_tele)
3325                         {
3326                                 if (t_idx == p_ptr->riding) teleport_player(MAX_SIGHT * 2 + 5);
3327                                 else teleport_away(t_idx, MAX_SIGHT * 2 + 5, FALSE);
3328                         }
3329
3330                         wake_up = TRUE;
3331                 }
3332                 break;
3333
3334         /* RF6_TELE_LEVEL */
3335         case 160+10:
3336                 /* Not implemented */
3337                 return FALSE;
3338
3339         /* RF6_PSY_SPEAR */
3340         case 160+11:
3341                 if (known)
3342                 {
3343                         if (see_either)
3344                         {
3345 #ifdef JP
3346                                 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¸÷¤Î·õ¤òÊü¤Ã¤¿¡£", m_name, t_name);
3347 #else
3348                                 msg_format("%^s throw a Psycho-spear at %s.", m_name, t_name);
3349 #endif
3350
3351                         }
3352                         else
3353                         {
3354                                 mon_fight = TRUE;
3355                         }
3356                 }
3357
3358                 dam = (r_ptr->flags2 & RF2_POWERFUL) ? (randint1(rlev * 2) + 180) : (randint1(rlev * 3 / 2) + 120);
3359                 monst_beam_monst(m_idx, y, x, GF_PSY_SPEAR,
3360                                  dam, MS_PSY_SPEAR, learnable);
3361                 break;
3362
3363         /* RF6_DARKNESS */
3364         case 160+12:
3365                 if (known)
3366                 {
3367                         if (see_m)
3368                         {
3369 #ifdef JP
3370                                 msg_format("%^s¤¬°Å°Ç¤ÎÃæ¤Ç¼ê¤ò¿¶¤Ã¤¿¡£", m_name);
3371 #else
3372                                 msg_format("%^s gestures in shadow.", m_name);
3373 #endif
3374
3375
3376                                 if (see_t)
3377                                 {
3378 #ifdef JP
3379                                         msg_format("%^s¤Ï°Å°Ç¤ËÊñ¤Þ¤ì¤¿¡£", t_name);
3380 #else
3381                                         msg_format("%^s is surrounded by darkness.", t_name);
3382 #endif
3383
3384                                 }
3385                         }
3386                         else
3387                         {
3388                                 mon_fight = TRUE;
3389                         }
3390                 }
3391
3392                 (void)project(m_idx, 3, y, x, 0, GF_DARK_WEAK, PROJECT_GRID | PROJECT_KILL | PROJECT_MONSTER, MS_DARKNESS);
3393
3394                 unlite_room(y, x);
3395
3396                 break;
3397
3398         /* RF6_TRAPS */
3399         case 160+13:
3400 #if 0
3401                 if (known)
3402                 {
3403                         if (see_m)
3404                         {
3405 #ifdef JP
3406                                 msg_format("%^s¤¬¼öʸ¤ò¾§¤¨¤Æ¼Ù°­¤ËÈù¾Ð¤ó¤À¡£", m_name);
3407 #else
3408                                 msg_format("%^s casts a spell and cackles evilly.", m_name);
3409 #endif
3410                         }
3411                         else
3412                         {
3413 #ifdef JP
3414                                 msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
3415 #else
3416                                 msg_format("%^s mumbles.", m_name);
3417 #endif
3418                         }
3419                 }
3420
3421                 trap_creation(y, x);
3422 #endif
3423                 break;
3424
3425         /* RF6_FORGET */
3426         case 160+14:
3427                 /* Not implemented */
3428                 return FALSE;
3429
3430         /* RF6_RAISE_DEAD */
3431         case 160+15:
3432                 if (known)
3433                 {
3434                         if (see_either)
3435                         {
3436                                 disturb(1, 0);
3437 #ifdef JP
3438                                 if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
3439 #else
3440                                 if (blind) msg_format("%^s mumbles.", m_name);
3441 #endif
3442
3443 #ifdef JP
3444                                 else msg_format("%^s¤¬»à¼ÔÉü³è¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name);
3445 #else
3446                                 else msg_format("%^s casts a spell to revive corpses.", m_name);
3447 #endif
3448                         }
3449                         else
3450                         {
3451                                 mon_fight = TRUE;
3452                         }
3453                 }
3454                 animate_dead(m_idx, m_ptr->fy, m_ptr->fx);
3455                 break;
3456
3457         /* RF6_SUMMON_KIN */
3458         case 160+16:
3459                 if (known)
3460                 {
3461                         if (see_either)
3462                         {
3463                                 disturb(1, 0);
3464
3465                                 if (m_ptr->r_idx == MON_ROLENTO)
3466                                 {
3467 #ifdef JP
3468                                         msg_format("%^s¤Ï¼êÜØÃƤò¤Ð¤é¤Þ¤¤¤¿¡£",
3469                                                    m_name);
3470 #else
3471                                         msg_format("%^s throws some hand grenades.",
3472                                                    m_name);
3473 #endif
3474                                 }
3475                                 else if (m_ptr->r_idx == MON_SERPENT || m_ptr->r_idx == MON_ZOMBI_SERPENT)
3476                                 {
3477 #ifdef JP
3478                                         msg_format("%^s¤¬¥À¥ó¥¸¥ç¥ó¤Î¼ç¤ò¾¤´­¤·¤¿¡£", m_name);
3479 #else
3480                                         msg_format("%^s magically summons guardians of dungeons.", m_name);
3481 #endif
3482                                 }
3483                                 else
3484                                 {
3485 #ifdef JP
3486                                         msg_format("%s¤¬ËâË¡¤Ç%s¤ò¾¤´­¤·¤¿¡£", m_name,
3487                                                    ((r_ptr->flags1 & RF1_UNIQUE) ? "¼ê²¼" : "Ãç´Ö"));
3488 #else
3489                                         msg_format("%^s magically summons %s %s.", m_name, m_poss,
3490                                                    ((r_ptr->flags1 & RF1_UNIQUE) ? "minions" : "kin"));
3491 #endif
3492                                 }
3493
3494                         }
3495                         else
3496                         {
3497                                 mon_fight = TRUE;
3498                         }
3499                 }
3500
3501                 if(m_ptr->r_idx == MON_ROLENTO)
3502                 {
3503                         int num = 1 + randint1(3);
3504                         for (k = 0; k < num; k++)
3505                         {
3506                                 count += summon_named_creature(m_idx, y, x, MON_SHURYUUDAN, p_mode);
3507                         }
3508                 }
3509                 else if(m_ptr->r_idx == MON_THORONDOR ||
3510                         m_ptr->r_idx == MON_GWAIHIR ||
3511                         m_ptr->r_idx == MON_MENELDOR)
3512                 {
3513                         int num = 4 + randint1(3);
3514                         for (k = 0; k < num; k++)
3515                         {
3516                                 count += summon_specific(m_idx, y, x, rlev, SUMMON_EAGLES, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | p_mode));
3517                         }
3518                 }
3519                 else if(m_ptr->r_idx == MON_LOUSY)
3520                 {
3521                         int num = 2 + randint1(3);
3522                         for (k = 0; k < num; k++)
3523                         {
3524                                 count += summon_specific(m_idx, y, x, rlev, SUMMON_LOUSE, (PM_ALLOW_GROUP | p_mode));
3525                         }
3526                 }
3527                 else if(m_ptr->r_idx == MON_BULLGATES)
3528                 {
3529                         int num = 2 + randint1(3);
3530                         for (k = 0; k < num; k++)
3531                         {
3532                                 count += summon_named_creature(m_idx, y, x, 921, p_mode);
3533                         }
3534                 }
3535                 else if (m_ptr->r_idx == MON_CALDARM)
3536                 {
3537                         int num = randint1(3);
3538                         for (k = 0; k < num; k++)
3539                         {
3540                                 count += summon_named_creature(m_idx, y, x, 930, p_mode);
3541                         }
3542                 }
3543                 else if (m_ptr->r_idx == MON_SERPENT || m_ptr->r_idx == MON_ZOMBI_SERPENT)
3544                 {
3545                         int num = 2 + randint1(3);
3546                         for (k = 0; k < num; k++)
3547                         {
3548                                 count += summon_specific(m_idx, y, x, rlev, SUMMON_GUARDIANS, (PM_ALLOW_GROUP | p_mode | PM_ALLOW_UNIQUE));
3549                         }
3550                 }
3551                 else
3552                 {
3553                         summon_kin_type = r_ptr->d_char;
3554
3555                         for (k = 0; k < 4; k++)
3556                         {
3557                                 count += summon_specific(m_idx, y, x, rlev, SUMMON_KIN, (PM_ALLOW_GROUP | p_mode));
3558                         }
3559                 }
3560
3561                 if (known && !see_t && count)
3562                 {
3563                         mon_fight = TRUE;
3564                 }
3565
3566                 break;
3567
3568         /* RF6_S_CYBER */
3569         case 160+17:
3570                 if (known)
3571                 {
3572                         if (see_either)
3573                         {
3574                                 disturb(1, 0);
3575
3576 #ifdef JP
3577                                 msg_format("%^s¤¬¥µ¥¤¥Ð¡¼¥Ç¡¼¥â¥ó¤ò¾¤´­¤·¤¿¡ª", m_name);
3578 #else
3579                                 msg_format("%^s magically summons Cyberdemons!", m_name);
3580 #endif
3581
3582                         }
3583                         else
3584                         {
3585                                 mon_fight = TRUE;
3586                         }
3587                 }
3588
3589                 if (is_friendly(m_ptr))
3590                 {
3591                         count += summon_specific(m_idx, y, x, rlev, SUMMON_CYBER, (PM_ALLOW_GROUP | p_mode));
3592                 }
3593                 else
3594                 {
3595                         count += summon_cyber(m_idx, y, x);
3596                 }
3597
3598                 if (known && !see_t && count)
3599                 {
3600                         mon_fight = TRUE;
3601                 }
3602
3603                 break;
3604
3605         /* RF6_S_MONSTER */
3606         case 160+18:
3607                 if (known)
3608                 {
3609                         if (see_either)
3610                         {
3611                                 disturb(1, 0);
3612
3613 #ifdef JP
3614                                 msg_format("%^s¤¬ËâË¡¤ÇÃç´Ö¤ò¾¤´­¤·¤¿¡ª", m_name);
3615 #else
3616                                 msg_format("%^s magically summons help!", m_name);
3617 #endif
3618
3619                         }
3620                         else
3621                         {
3622                                 mon_fight = TRUE;
3623                         }
3624                 }
3625
3626                 count += summon_specific(m_idx, y, x, rlev, 0, (p_mode | u_mode));
3627
3628                 if (known && !see_t && count)
3629                 {
3630                         mon_fight = TRUE;
3631                 }
3632
3633                 break;
3634
3635         /* RF6_S_MONSTERS */
3636         case 160+19:
3637                 if (known)
3638                 {
3639                         if (see_either)
3640                         {
3641                                 disturb(1, 0);
3642
3643 #ifdef JP
3644                                 msg_format("%^s¤¬ËâË¡¤Ç¥â¥ó¥¹¥¿¡¼¤ò¾¤´­¤·¤¿¡ª", m_name);
3645 #else
3646                                 msg_format("%^s magically summons monsters!", m_name);
3647 #endif
3648
3649                         }
3650                         else
3651                         {
3652                                 mon_fight = TRUE;
3653                         }
3654                 }
3655
3656                 for (k = 0; k < s_num_6; k++)
3657                 {
3658                         count += summon_specific(m_idx, y, x, rlev, 0, (PM_ALLOW_GROUP | p_mode | u_mode));
3659                 }
3660
3661                 if (known && !see_t && count)
3662                 {
3663                         mon_fight = TRUE;
3664                 }
3665
3666                 break;
3667
3668         /* RF6_S_ANT */
3669         case 160+20:
3670                 if (known)
3671                 {
3672                         if (see_either)
3673                         {
3674                                 disturb(1, 0);
3675
3676 #ifdef JP
3677                                 msg_format("%^s¤¬ËâË¡¤Ç¥¢¥ê¤ò¾¤´­¤·¤¿¡£", m_name);
3678 #else
3679                                 msg_format("%^s magically summons ants.", m_name);
3680 #endif
3681
3682                         }
3683                         else
3684                         {
3685                                 mon_fight = TRUE;
3686                         }
3687                 }
3688
3689                 for (k = 0; k < s_num_6; k++)
3690                 {
3691                         count += summon_specific(m_idx, y, x, rlev, SUMMON_ANT, (PM_ALLOW_GROUP | p_mode));
3692                 }
3693
3694                 if (known && !see_t && count)
3695                 {
3696                         mon_fight = TRUE;
3697                 }
3698
3699                 break;
3700
3701         /* RF6_S_SPIDER */
3702         case 160+21:
3703                 if (known)
3704                 {
3705                         if (see_either)
3706                         {
3707                                 disturb(1, 0);
3708
3709 #ifdef JP
3710                                 msg_format("%^s¤¬ËâË¡¤Ç¥¯¥â¤ò¾¤´­¤·¤¿¡£", m_name);
3711 #else
3712                                 msg_format("%^s magically summons spiders.", m_name);
3713 #endif
3714
3715                         }
3716                         else
3717                         {
3718                                 mon_fight = TRUE;
3719                         }
3720                 }
3721
3722                 for (k = 0; k < s_num_6; k++)
3723                 {
3724                         count += summon_specific(m_idx, y, x, rlev, SUMMON_SPIDER, (PM_ALLOW_GROUP | p_mode));
3725                 }
3726
3727                 if (known && !see_t && count)
3728                 {
3729                         mon_fight = TRUE;
3730                 }
3731
3732                 break;
3733
3734         /* RF6_S_HOUND */
3735         case 160+22:
3736                 if (known)
3737                 {
3738                         if (see_either)
3739                         {
3740                                 disturb(1, 0);
3741
3742 #ifdef JP
3743                                 msg_format("%^s¤¬ËâË¡¤Ç¥Ï¥¦¥ó¥É¤ò¾¤´­¤·¤¿¡£", m_name);
3744 #else
3745                                 msg_format("%^s magically summons hounds.", m_name);
3746 #endif
3747
3748                         }
3749                         else
3750                         {
3751                                 mon_fight = TRUE;
3752                         }
3753                 }
3754
3755                 for (k = 0; k < s_num_4; k++)
3756                 {
3757                         count += summon_specific(m_idx, y, x, rlev, SUMMON_HOUND, (PM_ALLOW_GROUP | p_mode));
3758                 }
3759
3760                 if (known && !see_t && count)
3761                 {
3762                         mon_fight = TRUE;
3763                 }
3764
3765                 break;
3766
3767         /* RF6_S_HYDRA */
3768         case 160+23:
3769                 if (known)
3770                 {
3771                         if (see_either)
3772                         {
3773                                 disturb(1, 0);
3774
3775 #ifdef JP
3776                                 msg_format("%^s¤¬ËâË¡¤Ç¥Ò¥É¥é¤ò¾¤´­¤·¤¿¡£", m_name);
3777 #else
3778                                 msg_format("%^s magically summons hydras.", m_name);
3779 #endif
3780
3781                         }
3782                         else
3783                         {
3784                                 mon_fight = TRUE;
3785                         }
3786                 }
3787
3788                 for (k = 0; k < s_num_4; k++)
3789                 {
3790                         count += summon_specific(m_idx, y, x, rlev, SUMMON_HYDRA, (PM_ALLOW_GROUP | p_mode));
3791                 }
3792
3793                 if (known && !see_t && count)
3794                 {
3795                         mon_fight = TRUE;
3796                 }
3797
3798                 break;
3799
3800         /* RF6_S_ANGEL */
3801         case 160+24:
3802                 if (known)
3803                 {
3804                         if (see_either)
3805                         {
3806                                 disturb(1, 0);
3807
3808 #ifdef JP
3809                                 msg_format("%^s¤¬ËâË¡¤ÇÅ·»È¤ò¾¤´­¤·¤¿¡ª", m_name);
3810 #else
3811                                 msg_format("%^s magically summons an angel!", m_name);
3812 #endif
3813
3814                         }
3815                         else
3816                         {
3817                                 mon_fight = TRUE;
3818                         }
3819                 }
3820
3821                 {
3822                         int num = 1;
3823
3824                         if ((r_ptr->flags1 & RF1_UNIQUE) && !easy_band)
3825                         {
3826                                 num += r_ptr->level/40;
3827                         }
3828
3829                         for (k = 0; k < num; k++)
3830                         {
3831                                 count += summon_specific(m_idx, y, x, rlev, SUMMON_ANGEL, (PM_ALLOW_GROUP | p_mode));
3832                         }
3833                 }
3834
3835                 if (known && !see_t && count)
3836                 {
3837                         mon_fight = TRUE;
3838                 }
3839
3840                 break;
3841
3842         /* RF6_S_DEMON */
3843         case 160+25:
3844                 if (known)
3845                 {
3846                         if (see_either)
3847                         {
3848                                 disturb(1, 0);
3849
3850 #ifdef JP
3851                                 msg_format("%^s¤¬ËâË¡¤Çº®Æ٤εÜÄ¤é¥Ç¡¼¥â¥ó¤ò¾¤´­¤·¤¿¡ª", m_name);
3852 #else
3853                                 msg_format("%^s magically summons a demon from the Courts of Chaos!", m_name);
3854 #endif
3855
3856                         }
3857                         else
3858                         {
3859                                 mon_fight = TRUE;
3860                         }
3861                 }
3862
3863                 for (k = 0; k < 1; k++)
3864                 {
3865                         count += summon_specific(m_idx, y, x, rlev, SUMMON_DEMON, (PM_ALLOW_GROUP | p_mode));
3866                 }
3867
3868                 if (known && !see_t && count)
3869                 {
3870                         mon_fight = TRUE;
3871                 }
3872
3873                 break;
3874
3875         /* RF6_S_UNDEAD */
3876         case 160+26:
3877                 if (known)
3878                 {
3879                         if (see_either)
3880                         {
3881                                 disturb(1, 0);
3882
3883 #ifdef JP
3884                                 msg_format("%s¤¬ËâË¡¤Ç¥¢¥ó¥Ç¥Ã¥É¤ò¾¤´­¤·¤¿¡£", m_name);
3885 #else
3886                                 msg_format("%^s magically summons undead.", m_name);
3887 #endif
3888
3889                         }
3890                         else
3891                         {
3892                                 mon_fight = TRUE;
3893                         }
3894                 }
3895
3896                 for (k = 0; k < 1; k++)
3897                 {
3898                         count += summon_specific(m_idx, y, x, rlev, SUMMON_UNDEAD, (PM_ALLOW_GROUP | p_mode));
3899                 }
3900
3901                 if (known && !see_t && count)
3902                 {
3903                         mon_fight = TRUE;
3904                 }
3905
3906                 break;
3907
3908         /* RF6_S_DRAGON */
3909         case 160+27:
3910                 if (known)
3911                 {
3912                         if (see_either)
3913                         {
3914                                 disturb(1, 0);
3915
3916 #ifdef JP
3917                                 msg_format("%^s¤¬ËâË¡¤Ç¥É¥é¥´¥ó¤ò¾¤´­¤·¤¿¡ª", m_name);
3918 #else
3919                                 msg_format("%^s magically summons a dragon!", m_name);
3920 #endif
3921
3922                         }
3923                         else
3924                         {
3925                                 mon_fight = TRUE;
3926                         }
3927                 }
3928
3929                 for (k = 0; k < 1; k++)
3930                 {
3931                         count += summon_specific(m_idx, y, x, rlev, SUMMON_DRAGON, (PM_ALLOW_GROUP | p_mode));
3932                 }
3933
3934                 if (known && !see_t && count)
3935                 {
3936                         mon_fight = TRUE;
3937                 }
3938
3939                 break;
3940
3941         /* RF6_S_HI_UNDEAD */
3942         case 160+28:
3943                 if (known)
3944                 {
3945                         if (see_either)
3946                         {
3947                                 disturb(1, 0);
3948
3949 #ifdef JP
3950                                 msg_format("%s¤¬ËâË¡¤Ç¥¢¥ó¥Ç¥Ã¥É¤ò¾¤´­¤·¤¿¡£", m_name);
3951 #else
3952                                 msg_format("%^s magically summons undead.", m_name);
3953 #endif
3954
3955                         }
3956                         else
3957                         {
3958                                 mon_fight = TRUE;
3959                         }
3960                 }
3961
3962                 for (k = 0; k < s_num_6; k++)
3963                 {
3964                         count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_UNDEAD, (PM_ALLOW_GROUP | p_mode | u_mode));
3965                 }
3966
3967                 if (known && !see_t && count)
3968                 {
3969                         mon_fight = TRUE;
3970                 }
3971
3972                 break;
3973
3974         /* RF6_S_HI_DRAGON */
3975         case 160+29:
3976                 if (known)
3977                 {
3978                         if (see_either)
3979                         {
3980                                 disturb(1, 0);
3981
3982 #ifdef JP
3983                                 msg_format("%^s¤¬ËâË¡¤Ç¸ÅÂå¥É¥é¥´¥ó¤ò¾¤´­¤·¤¿¡ª", m_name);
3984 #else
3985                                 msg_format("%^s magically summons ancient dragons!", m_name);
3986 #endif
3987
3988                         }
3989                         else
3990                         {
3991                                 mon_fight = TRUE;
3992                         }
3993                 }
3994
3995                 for (k = 0; k < s_num_4; k++)
3996                 {
3997                         count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_DRAGON, (PM_ALLOW_GROUP | p_mode | u_mode));
3998                 }
3999
4000                 if (known && !see_t && count)
4001                 {
4002                         mon_fight = TRUE;
4003                 }
4004
4005                 break;
4006
4007         /* RF6_S_AMBERITES */
4008         case 160+30:
4009                 if (known)
4010                 {
4011                         if (see_either)
4012                         {
4013                                 disturb(1, 0);
4014
4015 #ifdef JP
4016                                 msg_format("%^s¤¬¥¢¥ó¥Ð¡¼¤Î²¦Â²¤ò¾¤´­¤·¤¿¡ª", m_name);
4017 #else
4018                                 msg_format("%^s magically summons Lords of Amber!", m_name);
4019 #endif
4020
4021                         }
4022                         else
4023                         {
4024                                 mon_fight = TRUE;
4025                         }
4026                 }
4027
4028                 for (k = 0; k < s_num_4; k++)
4029                 {
4030                         count += summon_specific(m_idx, y, x, rlev, SUMMON_AMBERITES, (PM_ALLOW_GROUP | p_mode | PM_ALLOW_UNIQUE));
4031                 }
4032
4033                 if (known && !see_t && count)
4034                 {
4035                         mon_fight = TRUE;
4036                 }
4037
4038                 break;
4039
4040         /* RF6_S_UNIQUE */
4041         case 160+31:
4042                 if (known)
4043                 {
4044                         if (see_either)
4045                         {
4046                                 disturb(1, 0);
4047
4048 #ifdef JP
4049                                 msg_format("%^s¤¬ËâË¡¤ÇÆÃÊ̤ʶ¯Å¨¤ò¾¤´­¤·¤¿¡ª", m_name);
4050 #else
4051                                 msg_format("%^s magically summons special opponents!", m_name);
4052 #endif
4053
4054                         }
4055                         else
4056                         {
4057                                 mon_fight = TRUE;
4058                         }
4059                 }
4060
4061                 for (k = 0; k < s_num_4; k++)
4062                 {
4063                         count += summon_specific(m_idx, y, x, rlev, SUMMON_UNIQUE, (PM_ALLOW_GROUP | p_mode | PM_ALLOW_UNIQUE));
4064                 }
4065
4066                 if (known && !see_t && count)
4067                 {
4068                         mon_fight = TRUE;
4069                 }
4070
4071                 break;
4072         }
4073
4074         if (wake_up)
4075         {
4076                 t_ptr->csleep = 0;
4077         }
4078
4079         if (fear && see_t)
4080         {
4081 #ifdef JP
4082                 msg_format("%^s¤Ï¶²Éݤ·¤Æƨ¤²½Ð¤·¤¿¡ª", t_name);
4083 #else
4084                 msg_format("%^s flees in terror!", t_name);
4085 #endif
4086
4087         }
4088
4089         if (see_m && maneable && !world_monster && !p_ptr->blind && (p_ptr->pclass == CLASS_IMITATOR))
4090         {
4091                 if (thrown_spell != 167) /* Not RF6_SPECIAL */
4092                 {
4093                         if (p_ptr->mane_num == MAX_MANE)
4094                         {
4095                                 p_ptr->mane_num--;
4096                                 for (i = 0; i < p_ptr->mane_num - 1; i++)
4097                                 {
4098                                         p_ptr->mane_spell[i] = p_ptr->mane_spell[i+1];
4099                                         p_ptr->mane_dam[i] = p_ptr->mane_dam[i+1];
4100                                 }
4101                         }
4102                         p_ptr->mane_spell[p_ptr->mane_num] = thrown_spell - 96;
4103                         p_ptr->mane_dam[p_ptr->mane_num] = dam;
4104                         p_ptr->mane_num++;
4105                         new_mane = TRUE;
4106
4107                         p_ptr->redraw |= (PR_MANE);
4108                 }
4109         }
4110
4111         /* Remember what the monster did, if we saw it */
4112         if (see_m)
4113         {
4114                 /* Inate spell */
4115                 if (thrown_spell < 32*4)
4116                 {
4117                         r_ptr->r_flags4 |= (1L << (thrown_spell - 32*3));
4118                         if (r_ptr->r_cast_spell < MAX_UCHAR) r_ptr->r_cast_spell++;
4119                 }
4120
4121                 /* Bolt or Ball */
4122                 else if (thrown_spell < 32*5)
4123                 {
4124                         r_ptr->r_flags5 |= (1L << (thrown_spell - 32*4));
4125                         if (r_ptr->r_cast_spell < MAX_UCHAR) r_ptr->r_cast_spell++;
4126                 }
4127
4128                 /* Special spell */
4129                 else if (thrown_spell < 32*6)
4130                 {
4131                         r_ptr->r_flags6 |= (1L << (thrown_spell - 32*5));
4132                         if (r_ptr->r_cast_spell < MAX_UCHAR) r_ptr->r_cast_spell++;
4133                 }
4134         }
4135
4136         /* Always take note of monsters that kill you */
4137         if (p_ptr->is_dead && (r_ptr->r_deaths < MAX_SHORT) && !p_ptr->inside_arena)
4138         {
4139                 r_ptr->r_deaths++;
4140         }
4141
4142         /* A spell was cast */
4143         return TRUE;
4144 }