4 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
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.
11 /* Purpose: Monster spells (attack monster) */
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
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)
23 int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_MONSTER;
25 monster_type *m_ptr = &m_list[m_idx];
26 monster_race *r_ptr = &r_info[m_ptr->r_idx];
28 /* Determine the radius of the blast */
29 if (rad < 1 && breath) rad = (r_ptr->flags2 & RF2_POWERFUL) ? 3 : 2;
31 /* Handle breath attacks */
32 if (breath) rad = 0 - rad;
34 if (typ == GF_ROCKET) flg |= PROJECT_STOP;
36 (void)project(m_idx, rad, y, x, dam_hp, typ, flg, (learnable ? monspell : -1));
41 * Monster casts a bolt at another monster
42 * Stop if we hit a monster
43 * Affect monsters and the player
45 static void monst_bolt_monst(int m_idx, int y, int x, int typ, int dam_hp, int monspell, bool learnable)
47 int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_MONSTER | PROJECT_REFLECTABLE;
49 (void)project(m_idx, 0, y, x, dam_hp, typ, flg, (learnable ? monspell : -1));
52 static void monst_beam_monst(int m_idx, int y, int x, int typ, int dam_hp, int monspell, bool learnable)
54 int flg = PROJECT_BEAM | PROJECT_KILL | PROJECT_THRU | PROJECT_MONSTER;
56 (void)project(m_idx, 0, y, x, dam_hp, typ, flg, (learnable ? monspell : -1));
60 * Determine if a beam spell will hit the target.
62 static bool direct_beam(int y1, int x1, int y2, int x2, monster_type *m_ptr)
70 bool friend = is_pet(m_ptr);
72 /* Check the projection path */
73 grid_n = project_path(grid_g, MAX_RANGE, y1, x1, y2, x2, PROJECT_THRU);
75 /* No grid is ever projectable from itself */
76 if (!grid_n) return (FALSE);
78 for (i = 0; i < grid_n; i++)
80 y = GRID_Y(grid_g[i]);
81 x = GRID_X(grid_g[i]);
83 if (y == y2 && x == x2)
85 else if (friend && cave[y][x].m_idx > 0 &&
86 !are_enemies(m_ptr, &m_list[cave[y][x].m_idx]))
88 /* Friends don't shoot friends */
92 if (friend && player_bold(y, x))
100 static bool breath_direct(int y1, int x1, int y2, int x2, int rad, bool disint_ball, bool friend)
102 /* Must be the same as projectable() */
110 byte gx[1024], gy[1024];
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);
121 for (i = 0; i < grids; i++)
123 /* Extract the location */
127 if (y == y2 && x == x2)
129 if (player_bold(y, x))
134 if (friend && hityou)
140 * Get the actual center point of ball spells (originally from TOband)
142 static void get_project_point(int sy, int sx, int *ty, int *tx, int flg)
147 path_n = project_path(path_g, MAX_RANGE, sy, sx, *ty, *tx, flg);
151 /* Use final point of projection */
152 *ty = GRID_Y(path_g[path_n - 1]);
153 *tx = GRID_X(path_g[path_n - 1]);
163 * Monster tries to 'cast a spell' (or breath, etc)
164 * at another monster.
166 * The player is only disturbed if able to be affected by the spell.
168 bool monst_spell_monst(int m_idx)
172 int thrown_spell, count = 0;
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);
181 byte spell[96], num = 0;
190 monster_type *m_ptr = &m_list[m_idx];
191 monster_type *t_ptr = NULL;
193 monster_race *r_ptr = &r_info[m_ptr->r_idx];
194 monster_race *tr_ptr = NULL;
198 bool wake_up = FALSE;
201 bool blind = (p_ptr->blind ? TRUE : FALSE);
203 bool see_m = m_ptr->ml;
204 bool maneable = player_has_los_bold(m_ptr->fy, m_ptr->fx);
205 bool learnable = (see_m && maneable && !world_monster);
211 bool pet = is_pet(m_ptr);
213 bool in_no_magic_dungeon = (d_info[dungeon_type].flags1 & DF1_NO_MAGIC) && dun_level
214 && (!p_ptr->inside_quest || is_fixed_quest_idx(p_ptr->inside_quest));
216 bool resists_tele = FALSE;
218 /* Prepare flags for summoning */
219 if (pet) p_mode |= PM_FORCE_PET;
220 if (!pet) u_mode |= PM_ALLOW_UNIQUE;
222 /* Cannot cast spells when confused */
223 if (m_ptr->confused) return (FALSE);
225 /* Extract the racial spell flags */
230 /* Target is given for pet? */
231 if (pet_t_m_idx && pet)
234 t_ptr = &m_list[t_idx];
236 /* Cancel if not projectable (for now) */
237 if (!projectable(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx))
243 /* Is there counter attack target? */
244 if (!t_idx && m_ptr->target_y)
246 t_idx = cave[m_ptr->target_y][m_ptr->target_x].m_idx;
250 t_ptr = &m_list[t_idx];
252 /* Cancel if neither enemy nor a given target */
253 if (t_idx != pet_t_m_idx &&
254 !are_enemies(m_ptr, t_ptr))
259 /* Allow only summoning etc.. if not projectable */
260 else if (!projectable(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx))
262 f4 &= (RF4_INDIRECT_MASK);
263 f5 &= (RF5_INDIRECT_MASK);
264 f6 &= (RF6_INDIRECT_MASK);
269 /* Look for enemies normally */
272 bool success = FALSE;
274 if (p_ptr->inside_battle)
276 start = randint1(m_max-1) + m_max;
277 if (randint0(2)) plus = -1;
279 else start = m_max + 1;
281 /* Scan thru all monsters */
282 for (i = start; ((i < start + m_max) && (i > start - m_max)); i += plus)
284 int dummy = (i % m_max);
285 if (!dummy) continue;
288 t_ptr = &m_list[t_idx];
290 /* Skip dead monsters */
291 if (!t_ptr->r_idx) continue;
293 /* Monster must be 'an enemy' */
294 if (!are_enemies(m_ptr, t_ptr)) continue;
296 /* Monster must be projectable */
297 if (!projectable(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx)) continue;
305 if (!success) return FALSE;
309 /* OK -- we've got a target */
312 tr_ptr = &r_info[t_ptr->r_idx];
314 /* Forget old counter attack target */
317 /* Extract the monster level */
318 rlev = ((r_ptr->level >= 1) ? r_ptr->level : 1);
320 /* Remove unimplemented spells */
322 f6 &= ~(RF6_WORLD | RF6_FORGET);
324 /* Remove unimplemented special moves */
325 if (f6 & RF6_SPECIAL)
327 if ((m_ptr->r_idx != MON_ROLENTO) && (r_ptr->d_char != 'B'))
328 f6 &= ~(RF6_SPECIAL);
331 if (in_no_magic_dungeon && !(r_ptr->flags2 & RF2_STUPID))
333 f4 &= (RF4_NOMAGIC_MASK);
334 f5 &= (RF5_NOMAGIC_MASK);
335 f6 &= (RF6_NOMAGIC_MASK);
338 if (p_ptr->inside_arena || p_ptr->inside_battle)
340 f4 &= ~(RF4_SUMMON_MASK);
341 f5 &= ~(RF5_SUMMON_MASK);
342 f6 &= ~(RF6_SUMMON_MASK | RF6_TELE_LEVEL);
344 if (m_ptr->r_idx == MON_ROLENTO) f6 &= ~(RF6_SPECIAL);
347 if (p_ptr->inside_battle && !one_in_(3))
352 if (m_idx == p_ptr->riding)
354 f4 &= ~(RF4_RIDING_MASK);
355 f5 &= ~(RF5_RIDING_MASK);
356 f6 &= ~(RF6_RIDING_MASK);
362 f6 &= ~(RF6_DARKNESS | RF6_TRAPS);
364 if (!(p_ptr->pet_extra_flags & PF_TELEPORT))
366 f6 &= ~(RF6_BLINK | RF6_TPORT | RF6_TELE_TO | RF6_TELE_AWAY | RF6_TELE_LEVEL);
369 if (!(p_ptr->pet_extra_flags & PF_ATTACK_SPELL))
371 f4 &= ~(RF4_ATTACK_MASK);
372 f5 &= ~(RF5_ATTACK_MASK);
373 f6 &= ~(RF6_ATTACK_MASK);
376 if (!(p_ptr->pet_extra_flags & PF_SUMMON_SPELL))
378 f4 &= ~(RF4_SUMMON_MASK);
379 f5 &= ~(RF5_SUMMON_MASK);
380 f6 &= ~(RF6_SUMMON_MASK);
383 /* Prevent collateral damage */
384 if (!(p_ptr->pet_extra_flags & PF_BALL_SPELL) && (m_idx != p_ptr->riding))
386 if ((f4 & (RF4_BALL_MASK & ~(RF4_ROCKET))) ||
387 (f5 & RF5_BALL_MASK) ||
388 (f6 & RF6_BALL_MASK))
393 get_project_point(m_ptr->fy, m_ptr->fx, &real_y, &real_x, 0L);
395 if (los(real_y, real_x, py, px))
397 int dist = distance(real_y, real_x, py, px);
401 f4 &= ~(RF4_BALL_MASK & ~(RF4_ROCKET));
402 f5 &= ~(RF5_BALL_MASK);
403 f6 &= ~(RF6_BALL_MASK);
407 f4 &= ~(RF4_BIG_BALL_MASK);
408 f5 &= ~(RF5_BIG_BALL_MASK);
409 f6 &= ~(RF6_BIG_BALL_MASK);
419 get_project_point(m_ptr->fy, m_ptr->fx, &real_y, &real_x, PROJECT_STOP);
420 if (los(real_y, real_x, py, px) && (distance(real_y, real_x, py, px) <= 2))
424 if (((f4 & RF4_BEAM_MASK) ||
425 (f5 & RF5_BEAM_MASK) ||
426 (f6 & RF6_BEAM_MASK)) &&
427 !direct_beam(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx, m_ptr))
429 f4 &= ~(RF4_BEAM_MASK);
430 f5 &= ~(RF5_BEAM_MASK);
431 f6 &= ~(RF6_BEAM_MASK);
434 if ((f4 & RF4_BREATH_MASK) ||
435 (f5 & RF5_BREATH_MASK) ||
436 (f6 & RF6_BREATH_MASK))
438 /* Expected breath radius */
439 int rad = (r_ptr->flags2 & RF2_POWERFUL) ? 3 : 2;
441 if (!breath_direct(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx, rad, FALSE, TRUE))
443 f4 &= ~(RF4_BREATH_MASK);
444 f5 &= ~(RF5_BREATH_MASK);
445 f6 &= ~(RF6_BREATH_MASK);
447 else if ((f4 & RF4_BR_DISI) &&
448 !breath_direct(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx, rad, TRUE, TRUE))
450 f4 &= ~(RF4_BR_DISI);
455 /* Special moves restriction */
456 if (f6 & RF6_SPECIAL)
458 if (m_ptr->r_idx == MON_ROLENTO)
460 if ((p_ptr->pet_extra_flags & (PF_ATTACK_SPELL | PF_SUMMON_SPELL)) != (PF_ATTACK_SPELL | PF_SUMMON_SPELL))
461 f6 &= ~(RF6_SPECIAL);
463 else if (r_ptr->d_char == 'B')
465 if ((p_ptr->pet_extra_flags & (PF_ATTACK_SPELL | PF_TELEPORT)) != (PF_ATTACK_SPELL | PF_TELEPORT))
466 f6 &= ~(RF6_SPECIAL);
468 else f6 &= ~(RF6_SPECIAL);
472 /* Remove some spells if necessary */
474 if (!(r_ptr->flags2 & RF2_STUPID))
476 /* Check for a clean bolt shot */
477 if (((f4 & RF4_BOLT_MASK) ||
478 (f5 & RF5_BOLT_MASK) ||
479 (f6 & RF6_BOLT_MASK)) &&
480 !clean_shot(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx, pet))
482 f4 &= ~(RF4_BOLT_MASK);
483 f5 &= ~(RF5_BOLT_MASK);
484 f6 &= ~(RF6_BOLT_MASK);
487 /* Check for a possible summon */
488 if (((f4 & RF4_SUMMON_MASK) ||
489 (f5 & RF5_SUMMON_MASK) ||
490 (f6 & RF6_SUMMON_MASK)) &&
491 !(summon_possible(t_ptr->fy, t_ptr->fx)))
493 /* Remove summoning spells */
494 f4 &= ~(RF4_SUMMON_MASK);
495 f5 &= ~(RF5_SUMMON_MASK);
496 f6 &= ~(RF6_SUMMON_MASK);
499 /* Check for a possible raise dead */
500 if ((f6 & RF6_RAISE_DEAD) && !raise_possible(m_ptr))
502 /* Remove raise dead spell */
503 f6 &= ~(RF6_RAISE_DEAD);
506 /* Special moves restriction */
507 if (f6 & RF6_SPECIAL)
509 if ((m_ptr->r_idx == MON_ROLENTO) && !summon_possible(t_ptr->fy, t_ptr->fx))
511 f6 &= ~(RF6_SPECIAL);
516 if (r_ptr->flags2 & RF2_SMART)
518 /* Hack -- allow "desperate" spells */
519 if ((m_ptr->hp < m_ptr->maxhp / 10) &&
520 (randint0(100) < 50))
522 /* Require intelligent spells */
523 f4 &= (RF4_INT_MASK);
524 f5 &= (RF5_INT_MASK);
525 f6 &= (RF6_INT_MASK);
528 /* Hack -- decline "teleport level" in some case */
529 if ((f6 & RF6_TELE_LEVEL) && TELE_LEVEL_IS_INEFF((t_idx == p_ptr->riding) ? 0 : t_idx))
531 f6 &= ~(RF6_TELE_LEVEL);
536 if (!f4 && !f5 && !f6) return FALSE;
538 /* Extract the "inate" spells */
539 for (k = 0; k < 32; k++)
541 if (f4 & (1L << k)) spell[num++] = k + 32 * 3;
544 /* Extract the "normal" spells */
545 for (k = 0; k < 32; k++)
547 if (f5 & (1L << k)) spell[num++] = k + 32 * 4;
550 /* Extract the "bizarre" spells */
551 for (k = 0; k < 32; k++)
553 if (f6 & (1L << k)) spell[num++] = k + 32 * 5;
557 if (!num) return (FALSE);
559 /* Stop if player is dead or gone */
560 if (!p_ptr->playing || p_ptr->is_dead) return (FALSE);
562 /* Handle "leaving" */
563 if (p_ptr->leaving) return (FALSE);
565 /* Get the monster name (or "it") */
566 monster_desc(m_name, m_ptr, 0x00);
569 /* Get the monster possessive ("his"/"her"/"its") */
570 monster_desc(m_poss, m_ptr, MD_PRON_VISIBLE | MD_POSSESSIVE);
573 /* Get the target's name (or "it") */
574 monster_desc(t_name, t_ptr, 0x00);
576 /* Choose a spell to cast */
577 thrown_spell = spell[randint0(num)];
580 see_either = (see_m || see_t);
581 see_both = (see_m && see_t);
583 /* Can the player be aware of this attack? */
584 known = (m_ptr->cdis <= MAX_SIGHT) || (t_ptr->cdis <= MAX_SIGHT);
586 if (p_ptr->riding && (m_idx == p_ptr->riding)) disturb(1, 0);
588 /* Check for spell failure (inate attacks never fail) */
589 if (!spell_is_inate(thrown_spell) && (in_no_magic_dungeon || (m_ptr->stunned && one_in_(2))))
594 msg_format("%^s¤Ï¼öʸ¤ò¾§¤¨¤è¤¦¤È¤·¤¿¤¬¼ºÇÔ¤·¤¿¡£", m_name);
596 msg_format("%^s tries to cast a spell, but fails.", m_name);
602 switch (thrown_spell)
611 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¶«¤ó¤À¡£", m_name, t_name);
613 msg_format("%^s shrieks at %s.", m_name, t_name);
647 msg_format("%^s¤¬²¿¤«¤ò¼Í¤Ã¤¿¡£", m_name);
649 msg_format("%^s shoots something.", m_name);
656 msg_format("%^s¤¬%s¤Ë¥í¥±¥Ã¥È¤òȯ¼Í¤·¤¿¡£", m_name, t_name);
658 msg_format("%^s fires a rocket at %s.", m_name, t_name);
669 dam = ((m_ptr->hp / 4) > 800 ? 800 : (m_ptr->hp / 4));
670 monst_breath_monst(m_idx, y, x, GF_ROCKET,
671 dam, 2, FALSE, MS_ROCKET, learnable);
684 msg_format("%^s¤¬´ñ̯¤Ê²»¤òȯ¤·¤¿¡£", m_name);
686 msg_format("%^s makes a strange noise.", m_name);
693 msg_format("%^s¤¬%s¤ËÌð¤òÊü¤Ã¤¿¡£", m_name, t_name);
695 msg_format("%^s fires an arrow at %s.", m_name, t_name);
708 dam = damroll(r_ptr->blow[0].d_dice, r_ptr->blow[0].d_side);
709 monst_bolt_monst(m_idx, y, x, GF_ARROW, dam, MS_SHOOT, learnable);
739 msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
741 msg_format("%^s breathes.", m_name);
748 msg_format("%^s¤¬%s¤Ë»À¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
750 msg_format("%^s breathes acid at %s.", m_name, t_name);
763 dam = ((m_ptr->hp / 3) > 1600 ? 1600 : (m_ptr->hp / 3));
764 monst_breath_monst(m_idx, y, x, GF_ACID,
765 dam,0, TRUE, MS_BR_ACID, learnable);
780 msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
782 msg_format("%^s breathes.", m_name);
789 msg_format("%^s¤¬%s¤Ë°ðºÊ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
791 msg_format("%^s breathes lightning at %s.", m_name, t_name);
804 dam = ((m_ptr->hp / 3) > 1600 ? 1600 : (m_ptr->hp / 3));
805 monst_breath_monst(m_idx, y, x, GF_ELEC,
806 dam,0, TRUE, MS_BR_ELEC, learnable);
821 msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
823 msg_format("%^s breathes.", m_name);
830 msg_format("%^s¤¬%s¤Ë²Ð±ê¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
832 msg_format("%^s breathes fire at %s.", m_name, t_name);
845 dam = ((m_ptr->hp / 3) > 1600 ? 1600 : (m_ptr->hp / 3));
846 monst_breath_monst(m_idx, y, x, GF_FIRE,
847 dam,0, TRUE, MS_BR_FIRE, learnable);
862 msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
864 msg_format("%^s breathes.", m_name);
871 msg_format("%^s¤¬%s¤ËÎ䵤¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
873 msg_format("%^s breathes frost at %s.", m_name, t_name);
886 dam = ((m_ptr->hp / 3) > 1600 ? 1600 : (m_ptr->hp / 3));
887 monst_breath_monst(m_idx, y, x, GF_COLD,
888 dam,0, TRUE, MS_BR_COLD, learnable);
902 msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
904 msg_format("%^s breathes.", m_name);
911 msg_format("%^s¤¬%s¤Ë¥¬¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
913 msg_format("%^s breathes gas at %s.", m_name, t_name);
926 dam = ((m_ptr->hp / 3) > 800 ? 800 : (m_ptr->hp / 3));
927 monst_breath_monst(m_idx, y, x, GF_POIS,
928 dam,0, TRUE, MS_BR_POIS, learnable);
943 msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
945 msg_format("%^s breathes.", m_name);
952 msg_format("%^s¤¬%s¤ËÃϹö¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
954 msg_format("%^s breathes nether at %s.", m_name, t_name);
967 dam = ((m_ptr->hp / 6) > 550 ? 550 : (m_ptr->hp / 6));
968 monst_breath_monst(m_idx, y, x, GF_NETHER,
969 dam,0, TRUE, MS_BR_NETHER, learnable);
984 msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
986 msg_format("%^s breathes.", m_name);
993 msg_format("%^s¤¬%s¤ËÁ®¸÷¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
995 msg_format("%^s breathes light at %s.", m_name, t_name);
1005 sound(SOUND_BREATH);
1008 dam = ((m_ptr->hp / 6) > 400 ? 400 : (m_ptr->hp / 6));
1009 monst_breath_monst(m_idx, y, x, GF_LITE,
1010 dam,0, TRUE, MS_BR_LITE, learnable);
1025 msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1027 msg_format("%^s breathes.", m_name);
1034 msg_format("%^s¤¬%s¤Ë°Å¹õ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
1036 msg_format("%^s breathes darkness at %s.", m_name, t_name);
1046 sound(SOUND_BREATH);
1049 dam = ((m_ptr->hp / 6) > 400 ? 400 : (m_ptr->hp / 6));
1050 monst_breath_monst(m_idx, y, x, GF_DARK,
1051 dam,0, TRUE, MS_BR_DARK, learnable);
1066 msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1068 msg_format("%^s breathes.", m_name);
1075 msg_format("%^s¤¬%s¤Ëº®Íð¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
1077 msg_format("%^s breathes confusion at %s.", m_name, t_name);
1087 sound(SOUND_BREATH);
1090 dam = ((m_ptr->hp / 6) > 450 ? 450 : (m_ptr->hp / 6));
1091 monst_breath_monst(m_idx, y, x, GF_CONFUSION,
1092 dam,0, TRUE, MS_BR_CONF, learnable);
1104 if (m_ptr->r_idx == MON_JAIAN)
1106 msg_format("¡Ö¥Ü¥©¥¨¡Á¡Á¡Á¡Á¡Á¡Á¡×");
1108 msg_format("'Booooeeeeee'");
1113 msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1115 msg_format("%^s breathes.", m_name);
1122 msg_format("%^s¤¬%s¤Ë¹ì²»¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
1124 msg_format("%^s breathes sound at %s.", m_name, t_name);
1134 sound(SOUND_BREATH);
1137 dam = ((m_ptr->hp / 6) > 450 ? 450 : (m_ptr->hp / 6));
1138 monst_breath_monst(m_idx, y, x, GF_SOUND,
1139 dam,0, TRUE, MS_BR_SOUND, learnable);
1154 msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1156 msg_format("%^s breathes.", m_name);
1163 msg_format("%^s¤¬%s¤Ë¥«¥ª¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
1165 msg_format("%^s breathes chaos at %s.", m_name, t_name);
1175 sound(SOUND_BREATH);
1178 dam = ((m_ptr->hp / 6) > 600 ? 600 : (m_ptr->hp / 6));
1179 monst_breath_monst(m_idx, y, x, GF_CHAOS,
1180 dam,0, TRUE, MS_BR_CHAOS, learnable);
1195 msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1197 msg_format("%^s breathes.", m_name);
1204 msg_format("%^s¤¬%s¤ËÎô²½¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
1206 msg_format("%^s breathes disenchantment at %s.", m_name, t_name);
1216 sound(SOUND_BREATH);
1219 dam = ((m_ptr->hp / 6) > 500 ? 500 : (m_ptr->hp / 6));
1220 monst_breath_monst(m_idx, y, x, GF_DISENCHANT,
1221 dam,0, TRUE, MS_BR_DISEN, learnable);
1236 msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1238 msg_format("%^s breathes.", m_name);
1245 msg_format("%^s¤¬%s¤Ë°ø²Ìº®Íð¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
1247 msg_format("%^s breathes nexus at %s.", m_name, t_name);
1257 sound(SOUND_BREATH);
1260 dam = ((m_ptr->hp / 3) > 250 ? 250 : (m_ptr->hp / 3));
1261 monst_breath_monst(m_idx, y, x, GF_NEXUS,
1262 dam,0, TRUE, MS_BR_NEXUS, learnable);
1277 msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1279 msg_format("%^s breathes.", m_name);
1286 msg_format("%^s¤¬%s¤Ë»þ´ÖµÕž¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
1288 msg_format("%^s breathes time at %s.", m_name, t_name);
1298 sound(SOUND_BREATH);
1301 dam = ((m_ptr->hp / 3) > 150 ? 150 : (m_ptr->hp / 3));
1302 monst_breath_monst(m_idx, y, x, GF_TIME,
1303 dam,0, TRUE, MS_BR_TIME, learnable);
1318 msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1320 msg_format("%^s breathes.", m_name);
1327 msg_format("%^s¤¬%s¤ËÃÙÆߤΥ֥쥹¤òÅǤ¤¤¿¡£", m_name, t_name);
1329 msg_format("%^s breathes inertia at %s.", m_name, t_name);
1339 sound(SOUND_BREATH);
1342 dam = ((m_ptr->hp / 6) > 200 ? 200 : (m_ptr->hp / 6));
1343 monst_breath_monst(m_idx, y, x, GF_INERTIA,
1344 dam,0, TRUE, MS_BR_INERTIA, learnable);
1359 msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1361 msg_format("%^s breathes.", m_name);
1368 msg_format("%^s¤¬%s¤Ë½ÅÎϤΥ֥쥹¤òÅǤ¤¤¿¡£", m_name, t_name);
1370 msg_format("%^s breathes gravity at %s.", m_name, t_name);
1380 sound(SOUND_BREATH);
1383 dam = ((m_ptr->hp / 3) > 200 ? 200 : (m_ptr->hp / 3));
1384 monst_breath_monst(m_idx, y, x, GF_GRAVITY,
1385 dam,0, TRUE, MS_BR_GRAVITY, learnable);
1397 if (m_ptr->r_idx == MON_BOTEI)
1399 msg_format("¡Ö¥ÜÄë¥Ó¥ë¥«¥Ã¥¿¡¼¡ª¡ª¡ª¡×");
1401 msg_format("'Boty-Build cutter!!!'");
1406 msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1408 msg_format("%^s breathes.", m_name);
1415 msg_format("%^s¤¬%s¤ËÇËÊҤΥ֥쥹¤òÅǤ¤¤¿¡£", m_name, t_name);
1417 msg_format("%^s breathes shards at %s.", m_name, t_name);
1427 sound(SOUND_BREATH);
1430 dam = ((m_ptr->hp / 6) > 500 ? 500 : (m_ptr->hp / 6));
1431 monst_breath_monst(m_idx, y, x, GF_SHARDS,
1432 dam,0, TRUE, MS_BR_SHARDS, learnable);
1447 msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1449 msg_format("%^s breathes.", m_name);
1456 msg_format("%^s¤¬%s¤Ë¥×¥é¥º¥Þ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
1458 msg_format("%^s breathes plasma at %s.", m_name, t_name);
1468 sound(SOUND_BREATH);
1471 dam = ((m_ptr->hp / 6) > 150 ? 150 : (m_ptr->hp / 6));
1472 monst_breath_monst(m_idx, y, x, GF_PLASMA,
1473 dam,0, TRUE, MS_BR_PLASMA, learnable);
1488 msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1490 msg_format("%^s breathes.", m_name);
1497 msg_format("%^s¤¬%s¤Ë¥Õ¥©¡¼¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
1499 msg_format("%^s breathes force at %s.", m_name, t_name);
1509 sound(SOUND_BREATH);
1512 dam = ((m_ptr->hp / 6) > 200 ? 200 : (m_ptr->hp / 6));
1513 monst_breath_monst(m_idx, y, x, GF_FORCE,
1514 dam,0, TRUE, MS_BR_FORCE, learnable);
1528 msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1530 msg_format("%^s breathes.", m_name);
1537 msg_format("%^s¤¬%s¤ËËâÎϤΥ֥쥹¤òÅǤ¤¤¿¡£", m_name, t_name);
1539 msg_format("%^s breathes mana at %s.", m_name, t_name);
1549 sound(SOUND_BREATH);
1552 dam = ((m_ptr->hp / 3) > 250 ? 250 : (m_ptr->hp / 3));
1553 monst_breath_monst(m_idx, y, x, GF_MANA,
1554 dam,0, TRUE, MS_BR_MANA, learnable);
1569 msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
1571 msg_format("%^s mumbles.", m_name);
1578 msg_format("%^s¤¬%s¤ËÊü¼Íǽµå¤òÊü¤Ã¤¿¡£", m_name, t_name);
1580 msg_format("%^s casts a ball of radiation at %s.", m_name, t_name);
1591 dam = (rlev + damroll(10, 6));
1592 monst_breath_monst(m_idx, y, x, GF_NUKE,
1593 dam, 2, FALSE, MS_BALL_NUKE, learnable);
1608 msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1610 msg_format("%^s breathes.", m_name);
1617 msg_format("%^s¤¬%s¤ËÊü¼ÍÀÇÑ´þʪ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
1619 msg_format("%^s breathes toxic waste at %s.", m_name, t_name);
1629 sound(SOUND_BREATH);
1632 dam = ((m_ptr->hp / 3) > 800 ? 800 : (m_ptr->hp / 3));
1633 monst_breath_monst(m_idx, y, x, GF_NUKE,
1634 dam,0, TRUE, MS_BR_NUKE, learnable);
1648 msg_format("%^s¤¬¶²¤í¤·¤²¤Ë¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
1650 msg_format("%^s mumbles frighteningly.", m_name);
1657 msg_format("%^s¤¬%s¤Ë½ã¥í¥°¥ë¥¹¤òÊü¤Ã¤¿¡£", m_name, t_name);
1659 msg_format("%^s invokes raw Logrus upon %s.", m_name, t_name);
1670 dam = (rlev * 2) + damroll(10, 10);
1671 monst_breath_monst(m_idx, y, x, GF_CHAOS,
1672 dam, 4, FALSE, MS_BALL_CHAOS, learnable);
1687 msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
1689 msg_format("%^s breathes.", m_name);
1696 msg_format("%^s¤¬%s¤Ëʬ²ò¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name, t_name);
1698 msg_format("%^s breathes disintegration at %s.", m_name, t_name);
1708 sound(SOUND_BREATH);
1711 dam = ((m_ptr->hp / 6) > 150 ? 150 : (m_ptr->hp / 6));
1712 monst_breath_monst(m_idx, y, x, GF_DISINTEGRATE,
1713 dam,0, TRUE, MS_BR_DISI, learnable);
1727 msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
1729 msg_format("%^s mumbles.", m_name);
1736 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
1738 msg_format("%^s casts an acid ball at %s.", m_name, t_name);
1749 dam = (randint1(rlev * 3) + 15) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
1750 monst_breath_monst(m_idx, y, x, GF_ACID, dam, 2, FALSE, MS_BALL_ACID, learnable);
1765 msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
1767 msg_format("%^s mumbles.", m_name);
1774 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
1776 msg_format("%^s casts a lightning ball at %s.", m_name, t_name);
1787 dam = (randint1(rlev * 3 / 2) + 8) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
1788 monst_breath_monst(m_idx, y, x, GF_ELEC, dam, 2, FALSE, MS_BALL_ELEC, learnable);
1800 if (m_ptr->r_idx == MON_ROLENTO)
1804 msg_format("%^s¤¬²¿¤«¤òÅꤲ¤¿¡£", m_name);
1806 msg_format("%^s¤¬%^s¤Ë¸þ¤«¤Ã¤Æ¼êÜØÃƤòÅꤲ¤¿¡£", m_name, t_name);
1809 msg_format("%^s throws something.", m_name);
1811 msg_format("%^s throws a hand grenade.", m_name);
1819 msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
1821 msg_format("%^s mumbles.", m_name);
1828 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
1830 msg_format("%^s casts a fire ball at %s.", m_name, t_name);
1842 dam = (randint1(rlev * 7 / 2) + 10) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
1843 monst_breath_monst(m_idx, y, x, GF_FIRE, dam, 2, FALSE, MS_BALL_FIRE, learnable);
1858 msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
1860 msg_format("%^s mumbles.", m_name);
1867 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥¢¥¤¥¹¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
1869 msg_format("%^s casts a frost ball at %s.", m_name, t_name);
1880 dam = (randint1(rlev * 3 / 2) + 10) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
1881 monst_breath_monst(m_idx, y, x, GF_COLD, dam, 2, FALSE, MS_BALL_COLD, learnable);
1896 msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
1898 msg_format("%^s mumbles.", m_name);
1905 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ°½±À¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
1907 msg_format("%^s casts a stinking cloud at %s.", m_name, t_name);
1918 dam = damroll(12, 2) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
1919 monst_breath_monst(m_idx, y, x, GF_POIS, dam, 2, FALSE, MS_BALL_POIS, learnable);
1934 msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
1936 msg_format("%^s mumbles.", m_name);
1943 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤ÆÃϹöµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
1945 msg_format("%^s casts a nether ball at %s.", m_name, t_name);
1956 dam = 50 + damroll(10, 10) + (rlev * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1));
1957 monst_breath_monst(m_idx, y, x, GF_NETHER, dam, 2, FALSE, MS_BALL_NETHER, learnable);
1972 msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
1974 msg_format("%^s mumbles.", m_name);
1981 msg_format("%^s¤¬%s¤ËÂФ·¤Æή¤ì¤ë¤è¤¦¤Ê¿È¿¶¤ê¤ò¤·¤¿¡£", m_name, t_name);
1983 msg_format("%^s gestures fluidly at %s.", m_name, t_name);
1987 msg_format("%^s¤Ï±²´¬¤Ë°û¤ß¹þ¤Þ¤ì¤¿¡£", t_name);
1989 msg_format("%^s is engulfed in a whirlpool.", t_name);
2000 dam = ((r_ptr->flags2 & RF2_POWERFUL) ? randint1(rlev * 3) : randint1(rlev * 2)) + 50;
2001 monst_breath_monst(m_idx, y, x, GF_WATER, dam, 4, FALSE, MS_BALL_WATER, learnable);
2016 msg_format("%^s¤¬²¿¤«¤òÎ϶¯¤¯¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
2018 msg_format("%^s mumbles powerfully.", m_name);
2025 msg_format("%^s¤¬%s¤ËÂФ·¤ÆËâÎϤÎÍò¤Î¼öʸ¤òÇ°¤¸¤¿¡£", m_name, t_name);
2027 msg_format("%^s invokes a mana storm upon %s.", m_name, t_name);
2038 dam = (rlev * 4) + 50 + damroll(10, 10);
2039 monst_breath_monst(m_idx, y, x, GF_MANA, dam, 4, FALSE, MS_BALL_MANA, learnable);
2054 msg_format("%^s¤¬²¿¤«¤òÎ϶¯¤¯¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
2056 msg_format("%^s mumbles powerfully.", m_name);
2063 msg_format("%^s¤¬%s¤ËÂФ·¤Æ°Å¹õ¤ÎÍò¤Î¼öʸ¤òÇ°¤¸¤¿¡£", m_name, t_name);
2065 msg_format("%^s invokes a darkness storm upon %s.", m_name, t_name);
2076 dam = (rlev * 4) + 50 + damroll(10, 10);
2077 monst_breath_monst(m_idx, y, x, GF_DARK, dam, 4, FALSE, MS_BALL_DARK, learnable);
2081 /* RF5_DRAIN_MANA */
2087 msg_format("%^s¤ÏÀº¿À¥¨¥Í¥ë¥®¡¼¤ò%s¤«¤éµÛ¤¤¤È¤Ã¤¿¡£", m_name, t_name);
2089 msg_format("%^s draws psychic energy from %s.", m_name, t_name);
2094 /* Heal the monster */
2095 if (m_ptr->hp < m_ptr->maxhp)
2097 if (!tr_ptr->flags4 && !tr_ptr->flags5 && !tr_ptr->flags6)
2102 msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2104 msg_format("%^s is unaffected!", t_name);
2112 int power = (randint1(rlev) / 2) + 1;
2115 m_ptr->hp += 6 * power;
2116 if (m_ptr->hp > m_ptr->maxhp) m_ptr->hp = m_ptr->maxhp;
2118 /* Redraw (later) if needed */
2119 if (p_ptr->health_who == m_idx) p_ptr->redraw |= (PR_HEALTH);
2120 if (p_ptr->riding == m_idx) p_ptr->redraw |= (PR_UHEALTH);
2122 /* Special message */
2126 msg_format("%^s¤Ïµ¤Ê¬¤¬Îɤµ¤½¤¦¤À¡£", m_name);
2128 msg_format("%^s appears healthier.", m_name);
2139 /* RF5_MIND_BLAST */
2144 msg_format("%^s¤Ï%s¤ò¤¸¤Ã¤Èâˤó¤À", m_name, t_name);
2146 msg_format("%^s gazes intently at %s.", m_name, t_name);
2151 dam = damroll(7, 7);
2152 /* Attempt a saving throw */
2153 if ((tr_ptr->flags1 & RF1_UNIQUE) ||
2154 (tr_ptr->flags3 & RF3_NO_CONF) ||
2155 (tr_ptr->flagsr & RFR_RES_ALL) ||
2156 (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10))
2158 /* No obvious effect */
2161 if (is_original_ap(t_ptr))
2163 /* Memorize a flag */
2164 if (tr_ptr->flagsr & RFR_RES_ALL) tr_ptr->r_flagsr |= (RFR_RES_ALL);
2165 if (tr_ptr->flags3 & RF3_NO_CONF) tr_ptr->r_flags3 |= (RF3_NO_CONF);
2169 msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2171 msg_format("%^s is unaffected!", t_name);
2181 msg_format("%^s¤ÏÀº¿À¹¶·â¤ò¿©¤é¤Ã¤¿¡£", t_name);
2183 msg_format("%^s is blasted by psionic energy.", t_name);
2188 t_ptr->confused += randint0(4) + 4;
2191 mon_take_hit_mon(t_idx, dam, &fear, "¤ÎÀº¿À¤ÏÊø²õ¤·¡¢ÆùÂΤÏÈ´¤±³Ì¤È¤Ê¤Ã¤¿¡£", m_idx);
2193 mon_take_hit_mon(t_idx, dam, &fear, " collapses, a mindless husk.", m_idx);
2201 /* RF5_BRAIN_SMASH */
2206 msg_format("%^s¤Ï%s¤ò¤¸¤Ã¤Èâˤó¤À", m_name, t_name);
2208 msg_format("%^s gazes intently at %s.", m_name, t_name);
2213 dam = damroll(12, 12);
2214 /* Attempt a saving throw */
2215 if ((tr_ptr->flags1 & RF1_UNIQUE) ||
2216 (tr_ptr->flags3 & RF3_NO_CONF) ||
2217 (tr_ptr->flagsr & RFR_RES_ALL) ||
2218 (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10))
2220 /* No obvious effect */
2223 if (is_original_ap(t_ptr))
2225 /* Memorize a flag */
2226 if (tr_ptr->flagsr & RFR_RES_ALL) tr_ptr->r_flagsr |= (RFR_RES_ALL);
2227 if (tr_ptr->flags3 & RF3_NO_CONF) tr_ptr->r_flags3 |= (RF3_NO_CONF);
2231 msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2233 msg_format("%^s is unaffected!", t_name);
2243 msg_format("%^s¤ÏÀº¿À¹¶·â¤ò¿©¤é¤Ã¤¿¡£", t_name);
2245 msg_format("%^s is blasted by psionic energy.", t_name);
2250 t_ptr->confused += randint0(4) + 4;
2251 t_ptr->slow = MIN(200, t_ptr->slow + 10);
2252 t_ptr->stunned += randint0(4) + 4;
2255 mon_take_hit_mon(t_idx, dam, &fear, "¤ÎÀº¿À¤ÏÊø²õ¤·¡¢ÆùÂΤÏÈ´¤±³Ì¤È¤Ê¤Ã¤¿¡£", m_idx);
2257 mon_take_hit_mon(t_idx, dam, &fear, " collapses, a mindless husk.", m_idx);
2272 msg_format("%^s¤Ï%s¤ò»Ø¤µ¤·¤Æ¼ö¤¤¤ò¤«¤±¤¿¡£", m_name, t_name);
2274 msg_format("%^s points at %s and curses.", m_name, t_name);
2284 dam = damroll(3, 8);
2285 if ((randint0(100 + rlev/2) < (tr_ptr->level + 35)) ||
2286 (tr_ptr->flagsr & RFR_RES_ALL))
2288 /* Memorize a flag */
2289 if (tr_ptr->flagsr & RFR_RES_ALL)
2291 if (is_original_ap(t_ptr)) tr_ptr->r_flagsr |= (RFR_RES_ALL);
2294 if (see_both) msg_format("%^s¤ÏÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡ª", t_name);
2296 if (see_both) msg_format("%^s resists!", t_name);
2302 mon_take_hit_mon(t_idx, dam, &fear, NULL, m_idx);
2316 msg_format("%^s¤Ï%s¤ò»Ø¤µ¤·¤Æ¶²¤í¤·¤²¤Ë¼ö¤¤¤ò¤«¤±¤¿¡£", m_name, t_name);
2318 msg_format("%^s points at %s and curses horribly.", m_name, t_name);
2328 dam = damroll(8, 8);
2329 if ((randint0(100 + rlev/2) < (tr_ptr->level + 35)) ||
2330 (tr_ptr->flagsr & RFR_RES_ALL))
2332 /* Memorize a flag */
2333 if (tr_ptr->flagsr & RFR_RES_ALL)
2335 if (is_original_ap(t_ptr)) tr_ptr->r_flagsr |= (RFR_RES_ALL);
2338 if (see_both) msg_format("%^s¤ÏÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡ª", t_name);
2340 if (see_both) msg_format("%^s resists!", t_name);
2346 mon_take_hit_mon(t_idx, dam, &fear, NULL, m_idx);
2360 msg_format("%^s¤Ï%s¤ò»Ø¤µ¤·¡¢¶²¤í¤·¤²¤Ë¼öʸ¤ò¾§¤¨¤¿¡ª", m_name, t_name);
2362 msg_format("%^s points at %s, incanting terribly!", m_name, t_name);
2372 dam = damroll(10, 15);
2373 if ((randint0(100 + rlev/2) < (tr_ptr->level + 35)) ||
2374 (tr_ptr->flagsr & RFR_RES_ALL))
2376 /* Memorize a flag */
2377 if (tr_ptr->flagsr & RFR_RES_ALL)
2379 if (is_original_ap(t_ptr)) tr_ptr->r_flagsr |= (RFR_RES_ALL);
2382 if (see_both) msg_format("%^s¤ÏÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡ª", t_name);
2384 if (see_both) msg_format("%^s resists!", t_name);
2390 mon_take_hit_mon(t_idx, dam, &fear, NULL, m_idx);
2404 msg_format("%^s¤¬%s¤ÎÈ빦¤òÆͤ¤¤Æ¡¢¡Ö¤ªÁ°¤Ï´û¤Ë»à¤ó¤Ç¤¤¤ë¡×¤È¶«¤ó¤À¡£", m_name, t_name);
2406 msg_format("%^s points at %s, screaming the word, 'DIE!'", m_name, t_name);
2416 dam = damroll(15, 15);
2417 if (((randint0(100 + rlev/2) < (tr_ptr->level + 35)) && (m_ptr->r_idx != MON_KENSHIROU)) ||
2418 (tr_ptr->flagsr & RFR_RES_ALL))
2420 /* Memorize a flag */
2421 if (tr_ptr->flagsr & RFR_RES_ALL)
2423 if (is_original_ap(t_ptr)) tr_ptr->r_flagsr |= (RFR_RES_ALL);
2426 if (see_both) msg_format("%^s¤ÏÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡ª", t_name);
2428 if (see_both) msg_format("%^s resists!", t_name);
2434 mon_take_hit_mon(t_idx, dam, &fear, NULL, m_idx);
2448 msg_format("%s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2450 msg_format("%^s casts an acid bolt at %s.", m_name, t_name);
2460 dam = (damroll(7, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
2461 monst_bolt_monst(m_idx, y, x, GF_ACID,
2462 dam, MS_BOLT_ACID, learnable);
2473 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2475 msg_format("%^s casts a lightning bolt at %s.", m_name, t_name);
2485 dam = (damroll(4, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
2486 monst_bolt_monst(m_idx, y, x, GF_ELEC,
2487 dam, MS_BOLT_ELEC, learnable);
2498 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2500 msg_format("%^s casts a fire bolt at %s.", m_name, t_name);
2510 dam = (damroll(9, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
2511 monst_bolt_monst(m_idx, y, x, GF_FIRE,
2512 dam, MS_BOLT_FIRE, learnable);
2523 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥¢¥¤¥¹¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2525 msg_format("%^s casts a frost bolt at %s.", m_name, t_name);
2535 dam = (damroll(6, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
2536 monst_bolt_monst(m_idx, y, x, GF_COLD,
2537 dam, MS_BOLT_COLD, learnable);
2552 msg_format("%^s¤¬²¿¤«¤òÎ϶¯¤¯¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
2554 msg_format("%^s mumbles powerfully.", m_name);
2561 msg_format("%^s¤¬%s¤ËÂФ·¤Æ¥¹¥¿¡¼¥Ð¡¼¥¹¥È¤Î¼öʸ¤òÇ°¤¸¤¿¡£", m_name, t_name);
2563 msg_format("%^s invokes a starburst upon %s.", m_name, t_name);
2574 dam = (rlev * 4) + 50 + damroll(10, 10);
2575 monst_breath_monst(m_idx, y, x, GF_LITE, dam, 4, FALSE, MS_STARBURST, learnable);
2586 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤ÆÃϹö¤ÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2588 msg_format("%^s casts a nether bolt at %s.", m_name, t_name);
2598 dam = 30 + damroll(5, 5) + (rlev * 4) / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3);
2599 monst_bolt_monst(m_idx, y, x, GF_NETHER,
2600 dam, MS_BOLT_NETHER, learnable);
2611 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥¦¥©¡¼¥¿¡¼¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2613 msg_format("%^s casts a water bolt at %s.", m_name, t_name);
2623 dam = damroll(10, 10) + (rlev * 3 / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3));
2624 monst_bolt_monst(m_idx, y, x, GF_WATER,
2625 dam, MS_BOLT_WATER, learnable);
2636 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤ÆËâÎϤÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2638 msg_format("%^s casts a mana bolt at %s.", m_name, t_name);
2648 dam = randint1(rlev * 7 / 2) + 50;
2649 monst_bolt_monst(m_idx, y, x, GF_MANA,
2650 dam, MS_BOLT_MANA, learnable);
2661 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥×¥é¥º¥Þ¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2663 msg_format("%^s casts a plasma bolt at %s.", m_name, t_name);
2673 dam = 10 + damroll(8, 7) + (rlev * 3 / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3));
2674 monst_bolt_monst(m_idx, y, x, GF_PLASMA,
2675 dam, MS_BOLT_PLASMA, learnable);
2686 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¶Ë´¨¤ÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2688 msg_format("%^s casts an ice bolt at %s.", m_name, t_name);
2698 dam = damroll(6, 6) + (rlev * 3 / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3));
2699 monst_bolt_monst(m_idx, y, x, GF_ICE,
2700 dam, MS_BOLT_ICE, learnable);
2711 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name, t_name);
2713 msg_format("%^s casts a magic missile at %s.", m_name, t_name);
2723 dam = damroll(2, 6) + (rlev / 3);
2724 monst_bolt_monst(m_idx, y, x, GF_MISSILE,
2725 dam, MS_MAGIC_MISSILE, learnable);
2736 msg_format("%^s¤¬¶²¤í¤·¤²¤Ê¸¸³Ð¤òºî¤ê½Ð¤·¤¿¡£", m_name, t_name);
2738 msg_format("%^s casts a fearful illusion in front of %s.", m_name, t_name);
2748 if (tr_ptr->flags3 & RF3_NO_FEAR)
2751 if (see_t) msg_format("%^s¤Ï¶²Éݤò´¶¤¸¤Ê¤¤¡£", t_name);
2753 if (see_t) msg_format("%^s refuses to be frightened.", t_name);
2757 else if (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10)
2760 if (see_t) msg_format("%^s¤Ï¶²Éݤò´¶¤¸¤Ê¤¤¡£", t_name);
2762 if (see_t) msg_format("%^s refuses to be frightened.", t_name);
2768 if (!t_ptr->monfear) fear = TRUE;
2770 t_ptr->monfear += randint0(4) + 4;
2784 msg_format("%s¤Ï¼öʸ¤ò¾§¤¨¤Æ%s¤ÎÌܤò¾Æ¤ÉÕ¤«¤»¤¿¡£", m_name, t_name);
2786 msg_format("%^s casts a spell, burning %s%s eyes.", m_name, t_name,
2787 (streq(t_name, "it") ? "s" : "'s"));
2797 /* Simulate blindness with confusion */
2798 if (tr_ptr->flags3 & RF3_NO_CONF)
2801 if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2803 if (see_t) msg_format("%^s is unaffected.", t_name);
2807 else if (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10)
2810 if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2812 if (see_t) msg_format("%^s is unaffected.", t_name);
2819 if (see_t) msg_format("%^s¤ÏÌܤ¬¸«¤¨¤Ê¤¯¤Ê¤Ã¤¿¡ª ", t_name);
2821 if (see_t) msg_format("%^s is blinded!", t_name);
2825 t_ptr->confused += 12 + (byte)randint0(4);
2839 msg_format("%^s¤¬%s¤ÎÁ°¤Ë¸¸ÏÇŪ¤Ê¸¸¤ò¤Ä¤¯¤ê½Ð¤·¤¿¡£", m_name, t_name);
2841 msg_format("%^s casts a mesmerizing illusion in front of %s.", m_name, t_name);
2851 if (tr_ptr->flags3 & RF3_NO_CONF)
2854 if (see_t) msg_format("%^s¤ÏÏǤ蘆¤ì¤Ê¤«¤Ã¤¿¡£", t_name);
2856 if (see_t) msg_format("%^s disbelieves the feeble spell.", t_name);
2860 else if (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10)
2863 if (see_t) msg_format("%^s¤ÏÏǤ蘆¤ì¤Ê¤«¤Ã¤¿¡£", t_name);
2865 if (see_t) msg_format("%^s disbelieves the feeble spell.", t_name);
2872 if (see_t) msg_format("%^s¤Ïº®Í𤷤¿¤è¤¦¤À¡£", t_name);
2874 if (see_t) msg_format("%^s seems confused.", t_name);
2878 t_ptr->confused += 12 + (byte)randint0(4);
2892 msg_format("%s¤¬%s¤Î¶ÚÆù¤«¤éÎϤòµÛ¤¤¤È¤Ã¤¿¡£", m_name, t_name);
2894 msg_format("%^s drains power from %s%s muscles.", m_name, t_name,
2895 (streq(t_name, "it") ? "s" : "'s"));
2905 if (tr_ptr->flags1 & RF1_UNIQUE)
2908 if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2910 if (see_t) msg_format("%^s is unaffected.", t_name);
2914 else if (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10)
2917 if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2919 if (see_t) msg_format("%^s is unaffected.", t_name);
2928 if (see_t) msg_format("%s¤ÎÆ°¤¤¬ÃÙ¤¯¤Ê¤Ã¤¿¡£", t_name);
2930 if (see_t) msg_format("%^s starts moving slower.", t_name);
2934 t_ptr->slow = MIN(200, t_ptr->slow + 50);
2948 msg_format("%^s¤Ï%s¤ò¤¸¤Ã¤È¸«¤Ä¤á¤¿¡£", m_name, t_name);
2950 msg_format("%^s stares intently at %s.", m_name, t_name);
2960 if ((tr_ptr->flags1 & RF1_UNIQUE) ||
2961 (tr_ptr->flags3 & RF3_NO_STUN))
2964 if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2966 if (see_t) msg_format("%^s is unaffected.", t_name);
2970 else if (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10)
2973 if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
2975 if (see_t) msg_format("%^s is unaffected.", t_name);
2982 if (see_t) msg_format("%^s¤ÏËãá㤷¤¿¡ª", t_name);
2984 if (see_t) msg_format("%^s is paralyzed!", t_name);
2988 t_ptr->stunned += randint1(4) + 4;
3003 msg_format("%^s¤¬¼«Ê¬¤ÎÂΤËÇ°¤òÁ÷¤Ã¤¿¡£", m_name);
3005 msg_format("%^s concentrates on %s body.", m_name, m_poss);
3015 /* Allow quick speed increases to base+10 */
3019 if (see_m) msg_format("%^s¤ÎÆ°¤¤¬Â®¤¯¤Ê¤Ã¤¿¡£", m_name);
3021 if (see_m) msg_format("%^s starts moving faster.", m_name);
3025 m_ptr->fast = MIN(200, m_ptr->fast + 100);
3026 if (p_ptr->riding == m_idx) p_ptr->update |= PU_BONUS;
3036 msg_format("%^s¤¬%s¤Ë<ÇËÌǤμê>¤òÊü¤Ã¤¿¡ª", m_name, t_name);
3038 msg_format("%^s invokes the Hand of Doom upon %s!", m_name, t_name);
3048 if ((tr_ptr->flags1 & RF1_UNIQUE) || (tr_ptr->flagsr & RFR_RES_ALL))
3050 /* Memorize a flag */
3051 if (tr_ptr->flagsr & RFR_RES_ALL)
3053 if (is_original_ap(t_ptr)) tr_ptr->r_flagsr |= (RFR_RES_ALL);
3056 if (see_both) msg_format("¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡ª", t_name);
3058 if (see_both) msg_format("^%s is unaffected!", t_name);
3064 if ((r_ptr->level + randint1(20)) >
3065 (tr_ptr->level + 10 + randint1(20)))
3067 t_ptr->hp = t_ptr->hp -
3068 (((s32b)((40 + randint1(20)) * t_ptr->hp)) / 100);
3070 if (t_ptr->hp < 1) t_ptr->hp = 1;
3075 if (see_both) msg_format("%^s¤ÏÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡ª", t_name);
3077 if (see_both) msg_format("%^s resists!", t_name);
3094 msg_format("%^s¤Ï¼«Ê¬¤Î½ý¤ËÇ°¤ò½¸Ã椷¤¿¡£", m_name);
3096 msg_format("%^s concentrates on %s wounds.", m_name, m_poss);
3107 m_ptr->hp += (rlev * 6);
3110 if (m_ptr->hp >= m_ptr->maxhp)
3113 m_ptr->hp = m_ptr->maxhp;
3120 msg_format("%^s¤Ï´°Á´¤Ë¼£¤Ã¤¿¡ª", m_name);
3122 msg_format("%^s looks completely healed!", m_name);
3133 /* Partially healed */
3139 msg_format("%^s¤ÏÂÎÎϤò²óÉü¤·¤¿¤è¤¦¤À¡£", m_name);
3141 msg_format("%^s looks healthier.", m_name);
3151 /* Redraw (later) if needed */
3152 if (p_ptr->health_who == m_idx) p_ptr->redraw |= (PR_HEALTH);
3153 if (p_ptr->riding == m_idx) p_ptr->redraw |= (PR_UHEALTH);
3163 if (see_m) msg_format("%^s¤Ïͦµ¤¤ò¼è¤êÌᤷ¤¿¡£", m_name);
3165 if (see_m) msg_format("%^s recovers %s courage.", m_name, m_poss);
3180 msg_format("%s¤Ï̵½ý¤Îµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name);
3182 msg_format("%^s casts a Globe of Invulnerability.", m_name);
3192 if (!m_ptr->invulner) m_ptr->invulner = randint1(4) + 4;
3194 if (p_ptr->health_who == m_idx) p_ptr->redraw |= (PR_HEALTH);
3195 if (p_ptr->riding == m_idx) p_ptr->redraw |= (PR_UHEALTH);
3203 msg_format("%^s¤¬½Ö»þ¤Ë¾Ã¤¨¤¿¡£", m_name);
3205 msg_format("%^s blinks away.", m_name);
3210 teleport_away(m_idx, 10, FALSE);
3219 msg_format("%^s¤¬¥Æ¥ì¥Ý¡¼¥È¤·¤¿¡£", m_name);
3221 msg_format("%^s teleports away.", m_name);
3225 teleport_away(m_idx, MAX_SIGHT * 2 + 5, FALSE);
3227 if (los(py, px, m_ptr->fy, m_ptr->fx) && !world_monster && see_m)
3229 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
3231 u32b flgs[TR_FLAG_SIZE];
3232 object_type *o_ptr = &inventory[i];
3234 if (cursed_p(o_ptr)) continue;
3236 object_flags(o_ptr, flgs);
3238 if((have_flag(flgs, TR_TELEPORT)) || (p_ptr->muta1 & MUT1_VTELEPORT) || (p_ptr->pclass == CLASS_IMITATOR))
3241 cptr msg = "¤Ä¤¤¤Æ¤¤¤¤Þ¤¹¤«¡©";
3243 cptr msg = "Do you follow it? ";
3246 if(get_check_strict(msg, CHECK_OKAY_CANCEL))
3250 teleport_player(200);
3252 msg_print("¼ºÇÔ¡ª");
3254 msg_print("Failed!");
3257 else teleport_player_to(m_ptr->fy, m_ptr->fx, TRUE);
3258 p_ptr->energy_need = ENERGY_NEED();
3270 if(m_ptr->r_idx = MON_DIO) who == 1;
3271 else if(m_ptr->r_idx = MON_WONG) who == 3;
3273 if(!process_the_world(randint1(2)+2, who, los(py, px, m_ptr->fy, m_ptr->fx))) return (FALSE);
3279 switch (m_ptr->r_idx)
3282 /* Moved to process_monster(), like multiplication */
3293 msg_format("%^s¤Ï¼êÜØÃƤò¤Ð¤é¤Þ¤¤¤¿¡£", m_name);
3295 msg_format("%^s throws some hand grenades.", m_name);
3305 int num = 1 + randint1(3);
3306 for (k = 0; k < num; k++)
3308 count += summon_named_creature(m_idx, y, x, MON_SHURYUUDAN, p_mode);
3312 if (known && !see_t && count)
3319 if (r_ptr->d_char == 'B')
3326 msg_format("%^s¤ÏÆÍÁ³µÞ¾å¾º¤·¤Æ»ë³¦¤«¤é¾Ã¤¨¤¿!", m_name);
3328 msg_format("%^s suddenly go out of your sight!", m_name);
3331 teleport_away(m_idx, 10, FALSE);
3332 p_ptr->update |= (PU_MONSTERS | PU_MON_LITE);
3341 msg_format("%^s¤¬%s¤òÄϤó¤Ç¶õÃ椫¤éÅꤲÍ¤¿¡£", m_name, t_name);
3343 msg_format("%^s holds %s, and drops from the sky.", m_name, t_name);
3353 dam = damroll(4, 8);
3355 if (t_idx == p_ptr->riding) teleport_player_to(m_ptr->fy, m_ptr->fx, FALSE);
3356 else teleport_monster_to(t_idx, m_ptr->fy, m_ptr->fx, 100);
3360 if (tr_ptr->flags7 & RF7_CAN_FLY)
3363 if (see_t) msg_format("%^s¤ÏÀŤ«¤ËÃåÃϤ·¤¿¡£", t_name);
3365 if (see_t) msg_format("%^s floats gently down to the ground.", t_name);
3371 if (see_t) msg_format("%^s¤ÏÃÏÌ̤ËᤤĤ±¤é¤ì¤¿¡£", t_name);
3373 if (see_t) msg_format("%^s crashed into the ground.", t_name);
3375 dam += damroll(6, 8);
3382 /* Mega hack -- this special action deals damage to the player. Therefore the code of "eyeeye" is necessary.
3385 get_damage = take_hit(DAMAGE_NOESCAPE, dam, m_name, -1);
3386 if (p_ptr->tim_eyeeye && get_damage > 0 && !p_ptr->is_dead)
3389 msg_format("¹¶·â¤¬%s¼«¿È¤ò½ý¤Ä¤±¤¿¡ª", m_name);
3391 char m_name_self[80];
3394 monster_desc(m_name_self, m_ptr, MD_PRON_VISIBLE | MD_POSSESSIVE | MD_OBJECTIVE);
3396 msg_format("The attack of %s has wounded %s!", m_name, m_name_self);
3398 project(0, 0, m_ptr->fy, m_ptr->fx, get_damage, GF_MISSILE, PROJECT_KILL, -1);
3399 set_tim_eyeeye(p_ptr->tim_eyeeye-5, TRUE);
3403 mon_take_hit_mon(t_idx, dam, &fear, extract_note_dies(real_r_ptr(t_ptr)), m_idx);
3408 /* Something is wrong */
3422 msg_format("%^s¤¬%s¤ò°ú¤Ìᤷ¤¿¡£", m_name, t_name);
3424 msg_format("%^s commands %s to return.", m_name, t_name);
3434 if (tr_ptr->flagsr & RFR_RES_TELE)
3436 if ((tr_ptr->flags1 & RF1_UNIQUE) || (tr_ptr->flagsr & RFR_RES_ALL))
3440 if (is_original_ap(t_ptr)) tr_ptr->r_flagsr |= RFR_RES_TELE;
3442 msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
3444 msg_format("%^s is unaffected!", t_name);
3449 resists_tele = TRUE;
3451 else if (tr_ptr->level > randint1(100))
3455 if (is_original_ap(t_ptr)) tr_ptr->r_flagsr |= RFR_RES_TELE;
3457 msg_format("%^s¤ÏÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡ª", t_name);
3459 msg_format("%^s resists!", t_name);
3464 resists_tele = TRUE;
3470 if (t_idx == p_ptr->riding) teleport_player_to(m_ptr->fy, m_ptr->fx, TRUE);
3471 else teleport_monster_to(t_idx, m_ptr->fy, m_ptr->fx, 100);
3484 msg_format("%^s¤Ï%s¤ò¥Æ¥ì¥Ý¡¼¥È¤µ¤»¤¿¡£", m_name, t_name);
3486 msg_format("%^s teleports %s away.", m_name, t_name);
3496 if (tr_ptr->flagsr & RFR_RES_TELE)
3498 if ((tr_ptr->flags1 & RF1_UNIQUE) || (tr_ptr->flagsr & RFR_RES_ALL))
3502 if (is_original_ap(t_ptr)) tr_ptr->r_flagsr |= RFR_RES_TELE;
3504 msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
3506 msg_format("%^s is unaffected!", t_name);
3511 resists_tele = TRUE;
3513 else if (tr_ptr->level > randint1(100))
3517 if (is_original_ap(t_ptr)) tr_ptr->r_flagsr |= RFR_RES_TELE;
3519 msg_format("%^s¤ÏÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡ª", t_name);
3521 msg_format("%^s resists!", t_name);
3526 resists_tele = TRUE;
3532 if (t_idx == p_ptr->riding) teleport_player(MAX_SIGHT * 2 + 5);
3533 else teleport_away(t_idx, MAX_SIGHT * 2 + 5, FALSE);
3539 /* RF6_TELE_LEVEL */
3546 msg_format("%^s¤¬%s¤Î¤ò»Ø¤µ¤·¤¿¡£", m_name, t_name);
3548 msg_format("%^s gestures at %s's feet.", m_name, t_name);
3557 if (tr_ptr->flagsr & (RFR_EFF_RES_NEXU_MASK | RFR_RES_TELE))
3560 if (see_t) msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", t_name);
3562 if (see_t) msg_format("%^s is unaffected!", t_name);
3565 else if ((tr_ptr->flags1 & RF1_QUESTOR) ||
3566 (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10))
3569 if (see_t) msg_format("%^s¤Ï¸úÎϤòÄ·¤ÍÊÖ¤·¤¿¡ª", t_name);
3571 if (see_t) msg_format("%^s resist the effects!", t_name);
3574 else teleport_level((t_idx == p_ptr->riding) ? 0 : t_idx);
3586 msg_format("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¸÷¤Î·õ¤òÊü¤Ã¤¿¡£", m_name, t_name);
3588 msg_format("%^s throw a Psycho-spear at %s.", m_name, t_name);
3598 dam = (r_ptr->flags2 & RF2_POWERFUL) ? (randint1(rlev * 2) + 180) : (randint1(rlev * 3 / 2) + 120);
3599 monst_beam_monst(m_idx, y, x, GF_PSY_SPEAR,
3600 dam, MS_PSY_SPEAR, learnable);
3610 msg_format("%^s¤¬°Å°Ç¤ÎÃæ¤Ç¼ê¤ò¿¶¤Ã¤¿¡£", m_name);
3612 msg_format("%^s gestures in shadow.", m_name);
3619 msg_format("%^s¤Ï°Å°Ç¤ËÊñ¤Þ¤ì¤¿¡£", t_name);
3621 msg_format("%^s is surrounded by darkness.", t_name);
3632 (void)project(m_idx, 3, y, x, 0, GF_DARK_WEAK, PROJECT_GRID | PROJECT_KILL | PROJECT_MONSTER, MS_DARKNESS);
3646 msg_format("%^s¤¬¼öʸ¤ò¾§¤¨¤Æ¼Ù°¤ËÈù¾Ð¤ó¤À¡£", m_name);
3648 msg_format("%^s casts a spell and cackles evilly.", m_name);
3654 msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
3656 msg_format("%^s mumbles.", m_name);
3661 trap_creation(y, x);
3667 /* Not implemented */
3670 /* RF6_RAISE_DEAD */
3678 if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
3680 if (blind) msg_format("%^s mumbles.", m_name);
3684 else msg_format("%^s¤¬»à¼ÔÉü³è¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name);
3686 else msg_format("%^s casts a spell to revive corpses.", m_name);
3694 animate_dead(m_idx, m_ptr->fy, m_ptr->fx);
3705 if (m_ptr->r_idx == MON_SERPENT || m_ptr->r_idx == MON_ZOMBI_SERPENT)
3708 msg_format("%^s¤¬¥À¥ó¥¸¥ç¥ó¤Î¼ç¤ò¾¤´¤·¤¿¡£", m_name);
3710 msg_format("%^s magically summons guardians of dungeons.", m_name);
3716 msg_format("%s¤¬ËâË¡¤Ç%s¤ò¾¤´¤·¤¿¡£", m_name,
3717 ((r_ptr->flags1 & RF1_UNIQUE) ? "¼ê²¼" : "Ãç´Ö"));
3719 msg_format("%^s magically summons %s %s.", m_name, m_poss,
3720 ((r_ptr->flags1 & RF1_UNIQUE) ? "minions" : "kin"));
3731 switch (m_ptr->r_idx)
3737 int num = 4 + randint1(3);
3738 for (k = 0; k < num; k++)
3740 count += summon_specific(m_idx, y, x, rlev, SUMMON_EAGLES, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | p_mode));
3747 int num = 2 + randint1(3);
3748 for (k = 0; k < num; k++)
3750 count += summon_named_creature(m_idx, y, x, MON_IE, p_mode);
3756 case MON_ZOMBI_SERPENT:
3757 if (r_info[MON_JORMUNGAND].cur_num < r_info[MON_JORMUNGAND].max_num && one_in_(6))
3762 msg_print("ÃÏÌ̤«¤é¿å¤¬¿á¤½Ð¤·¤¿¡ª");
3764 msg_print("Water blew off from the ground!");
3767 project(t_idx, 8, y, x, 3, GF_WATER_FLOW, PROJECT_GRID | PROJECT_HIDE, -1);
3771 int num = 2 + randint1(3);
3772 for (k = 0; k < num; k++)
3774 count += summon_specific(m_idx, y, x, rlev, SUMMON_GUARDIANS, (PM_ALLOW_GROUP | p_mode | PM_ALLOW_UNIQUE));
3781 int num = randint1(3);
3782 for (k = 0; k < num; k++)
3784 count += summon_named_creature(m_idx, y, x, MON_LOCKE_CLONE, p_mode);
3791 int num = 2 + randint1(3);
3792 for (k = 0; k < num; k++)
3794 count += summon_specific(m_idx, y, x, rlev, SUMMON_LOUSE, (PM_ALLOW_GROUP | p_mode));
3800 summon_kin_type = r_ptr->d_char;
3802 for (k = 0; k < 4; k++)
3804 count += summon_specific(m_idx, y, x, rlev, SUMMON_KIN, (PM_ALLOW_GROUP | p_mode));
3809 if (known && !see_t && count)
3825 msg_format("%^s¤¬¥µ¥¤¥Ð¡¼¥Ç¡¼¥â¥ó¤ò¾¤´¤·¤¿¡ª", m_name);
3827 msg_format("%^s magically summons Cyberdemons!", m_name);
3837 if (is_friendly(m_ptr))
3839 count += summon_specific(m_idx, y, x, rlev, SUMMON_CYBER, (PM_ALLOW_GROUP | p_mode));
3843 count += summon_cyber(m_idx, y, x);
3846 if (known && !see_t && count)
3862 msg_format("%^s¤¬ËâË¡¤ÇÃç´Ö¤ò¾¤´¤·¤¿¡ª", m_name);
3864 msg_format("%^s magically summons help!", m_name);
3874 count += summon_specific(m_idx, y, x, rlev, 0, (p_mode | u_mode));
3876 if (known && !see_t && count)
3883 /* RF6_S_MONSTERS */
3892 msg_format("%^s¤¬ËâË¡¤Ç¥â¥ó¥¹¥¿¡¼¤ò¾¤´¤·¤¿¡ª", m_name);
3894 msg_format("%^s magically summons monsters!", m_name);
3904 for (k = 0; k < s_num_6; k++)
3906 count += summon_specific(m_idx, y, x, rlev, 0, (PM_ALLOW_GROUP | p_mode | u_mode));
3909 if (known && !see_t && count)
3925 msg_format("%^s¤¬ËâË¡¤Ç¥¢¥ê¤ò¾¤´¤·¤¿¡£", m_name);
3927 msg_format("%^s magically summons ants.", m_name);
3937 for (k = 0; k < s_num_6; k++)
3939 count += summon_specific(m_idx, y, x, rlev, SUMMON_ANT, (PM_ALLOW_GROUP | p_mode));
3942 if (known && !see_t && count)
3958 msg_format("%^s¤¬ËâË¡¤Ç¥¯¥â¤ò¾¤´¤·¤¿¡£", m_name);
3960 msg_format("%^s magically summons spiders.", m_name);
3970 for (k = 0; k < s_num_6; k++)
3972 count += summon_specific(m_idx, y, x, rlev, SUMMON_SPIDER, (PM_ALLOW_GROUP | p_mode));
3975 if (known && !see_t && count)
3991 msg_format("%^s¤¬ËâË¡¤Ç¥Ï¥¦¥ó¥É¤ò¾¤´¤·¤¿¡£", m_name);
3993 msg_format("%^s magically summons hounds.", m_name);
4003 for (k = 0; k < s_num_4; k++)
4005 count += summon_specific(m_idx, y, x, rlev, SUMMON_HOUND, (PM_ALLOW_GROUP | p_mode));
4008 if (known && !see_t && count)
4024 msg_format("%^s¤¬ËâË¡¤Ç¥Ò¥É¥é¤ò¾¤´¤·¤¿¡£", m_name);
4026 msg_format("%^s magically summons hydras.", m_name);
4036 for (k = 0; k < s_num_4; k++)
4038 count += summon_specific(m_idx, y, x, rlev, SUMMON_HYDRA, (PM_ALLOW_GROUP | p_mode));
4041 if (known && !see_t && count)
4057 msg_format("%^s¤¬ËâË¡¤ÇÅ·»È¤ò¾¤´¤·¤¿¡ª", m_name);
4059 msg_format("%^s magically summons an angel!", m_name);
4072 if ((r_ptr->flags1 & RF1_UNIQUE) && !easy_band)
4074 num += r_ptr->level/40;
4077 for (k = 0; k < num; k++)
4079 count += summon_specific(m_idx, y, x, rlev, SUMMON_ANGEL, (PM_ALLOW_GROUP | p_mode));
4083 if (known && !see_t && count)
4099 msg_format("%^s¤¬ËâË¡¤Çº®Æ٤εÜÄ¤é¥Ç¡¼¥â¥ó¤ò¾¤´¤·¤¿¡ª", m_name);
4101 msg_format("%^s magically summons a demon from the Courts of Chaos!", m_name);
4111 for (k = 0; k < 1; k++)
4113 count += summon_specific(m_idx, y, x, rlev, SUMMON_DEMON, (PM_ALLOW_GROUP | p_mode));
4116 if (known && !see_t && count)
4132 msg_format("%s¤¬ËâË¡¤Ç¥¢¥ó¥Ç¥Ã¥É¤ò¾¤´¤·¤¿¡£", m_name);
4134 msg_format("%^s magically summons undead.", m_name);
4144 for (k = 0; k < 1; k++)
4146 count += summon_specific(m_idx, y, x, rlev, SUMMON_UNDEAD, (PM_ALLOW_GROUP | p_mode));
4149 if (known && !see_t && count)
4165 msg_format("%^s¤¬ËâË¡¤Ç¥É¥é¥´¥ó¤ò¾¤´¤·¤¿¡ª", m_name);
4167 msg_format("%^s magically summons a dragon!", m_name);
4177 for (k = 0; k < 1; k++)
4179 count += summon_specific(m_idx, y, x, rlev, SUMMON_DRAGON, (PM_ALLOW_GROUP | p_mode));
4182 if (known && !see_t && count)
4189 /* RF6_S_HI_UNDEAD */
4198 msg_format("%s¤¬ËâË¡¤Ç¥¢¥ó¥Ç¥Ã¥É¤ò¾¤´¤·¤¿¡£", m_name);
4200 msg_format("%^s magically summons undead.", m_name);
4210 for (k = 0; k < s_num_6; k++)
4212 count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_UNDEAD, (PM_ALLOW_GROUP | p_mode | u_mode));
4215 if (known && !see_t && count)
4222 /* RF6_S_HI_DRAGON */
4231 msg_format("%^s¤¬ËâË¡¤Ç¸ÅÂå¥É¥é¥´¥ó¤ò¾¤´¤·¤¿¡ª", m_name);
4233 msg_format("%^s magically summons ancient dragons!", m_name);
4243 for (k = 0; k < s_num_4; k++)
4245 count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_DRAGON, (PM_ALLOW_GROUP | p_mode | u_mode));
4248 if (known && !see_t && count)
4255 /* RF6_S_AMBERITES */
4264 msg_format("%^s¤¬¥¢¥ó¥Ð¡¼¤Î²¦Â²¤ò¾¤´¤·¤¿¡ª", m_name);
4266 msg_format("%^s magically summons Lords of Amber!", m_name);
4276 for (k = 0; k < s_num_4; k++)
4278 count += summon_specific(m_idx, y, x, rlev, SUMMON_AMBERITES, (PM_ALLOW_GROUP | p_mode | PM_ALLOW_UNIQUE));
4281 if (known && !see_t && count)
4297 msg_format("%^s¤¬ËâË¡¤ÇÆÃÊ̤ʶ¯Å¨¤ò¾¤´¤·¤¿¡ª", m_name);
4299 msg_format("%^s magically summons special opponents!", m_name);
4309 for (k = 0; k < s_num_4; k++)
4311 count += summon_specific(m_idx, y, x, rlev, SUMMON_UNIQUE, (PM_ALLOW_GROUP | p_mode | PM_ALLOW_UNIQUE));
4314 if (known && !see_t && count)
4325 if (tr_ptr->flags7 & RF7_HAS_LD_MASK) p_ptr->update |= (PU_MON_LITE);
4331 msg_format("%^s¤Ï¶²Éݤ·¤Æƨ¤²½Ð¤·¤¿¡ª", t_name);
4333 msg_format("%^s flees in terror!", t_name);
4338 if (see_m && maneable && !world_monster && !p_ptr->blind && (p_ptr->pclass == CLASS_IMITATOR))
4340 if (thrown_spell != 167) /* Not RF6_SPECIAL */
4342 if (p_ptr->mane_num == MAX_MANE)
4345 for (i = 0; i < p_ptr->mane_num - 1; i++)
4347 p_ptr->mane_spell[i] = p_ptr->mane_spell[i+1];
4348 p_ptr->mane_dam[i] = p_ptr->mane_dam[i+1];
4351 p_ptr->mane_spell[p_ptr->mane_num] = thrown_spell - 96;
4352 p_ptr->mane_dam[p_ptr->mane_num] = dam;
4356 p_ptr->redraw |= (PR_MANE);
4360 /* Remember what the monster did, if we saw it */
4361 if (see_m && is_original_ap(m_ptr))
4364 if (thrown_spell < 32*4)
4366 r_ptr->r_flags4 |= (1L << (thrown_spell - 32*3));
4367 if (r_ptr->r_cast_spell < MAX_UCHAR) r_ptr->r_cast_spell++;
4371 else if (thrown_spell < 32*5)
4373 r_ptr->r_flags5 |= (1L << (thrown_spell - 32*4));
4374 if (r_ptr->r_cast_spell < MAX_UCHAR) r_ptr->r_cast_spell++;
4378 else if (thrown_spell < 32*6)
4380 r_ptr->r_flags6 |= (1L << (thrown_spell - 32*5));
4381 if (r_ptr->r_cast_spell < MAX_UCHAR) r_ptr->r_cast_spell++;
4385 /* Always take note of monsters that kill you */
4386 if (p_ptr->is_dead && (r_ptr->r_deaths < MAX_SHORT) && !p_ptr->inside_arena)
4388 r_ptr->r_deaths++; /* Ignore appearance difference */
4391 /* A spell was cast */