OSDN Git Service

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