3 * @brief ¥â¥ó¥¹¥¿¡¼ËâË¡¤Î¼ÂÁõ(ÂÐ¥â¥ó¥¹¥¿¡¼½èÍý) / Monster spells (attack monster)
6 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke\n
7 * This software may be copied and distributed for educational, research,\n
8 * and not for profit purposes provided that this copyright and statement\n
9 * are included in all such copies. Other copyrights may also apply.\n
10 * 2014 Deskull rearranged comment for Doxygen.\n
17 * @brief ¥â¥ó¥¹¥¿¡¼¤¬Å¨ÂÐ¥â¥ó¥¹¥¿¡¼¤Ë¥Ó¡¼¥à¤òÅö¤Æ¤ë¤³¤È²Äǽ¤«¤òȽÄꤹ¤ë /
18 * Determine if a beam spell will hit the target.
19 * @param y1 »ÏÅÀ¤ÎYºÂɸ
20 * @param x1 »ÏÅÀ¤ÎXºÂɸ
21 * @param y2 ÌÜɸ¤ÎYºÂɸ
22 * @param x2 ÌÜɸ¤ÎXºÂɸ
23 * @param m_ptr »ÈÍѤ¹¤ë¥â¥ó¥¹¥¿¡¼¤Î¹½Â¤Âλ²¾È¥Ý¥¤¥ó¥¿
24 * @return ¥Ó¡¼¥à¤¬Åþã²Äǽ¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
26 static bool direct_beam(int y1, int x1, int y2, int x2, monster_type *m_ptr)
34 bool is_friend = is_pet(m_ptr);
36 /* Check the projection path */
37 grid_n = project_path(grid_g, MAX_RANGE, y1, x1, y2, x2, PROJECT_THRU);
39 /* No grid is ever projectable from itself */
40 if (!grid_n) return (FALSE);
42 for (i = 0; i < grid_n; i++)
44 y = GRID_Y(grid_g[i]);
45 x = GRID_X(grid_g[i]);
47 if (y == y2 && x == x2)
49 else if (is_friend && cave[y][x].m_idx > 0 &&
50 !are_enemies(m_ptr, &m_list[cave[y][x].m_idx]))
52 /* Friends don't shoot friends */
56 if (is_friend && player_bold(y, x))
65 * @brief ¥â¥ó¥¹¥¿¡¼¤¬Å¨ÂÐ¥â¥ó¥¹¥¿¡¼¤ËľÀܥ֥쥹¤òÅö¤Æ¤ë¤³¤È¤¬²Äǽ¤«¤òȽÄꤹ¤ë /
66 * Determine if a breath will hit the target.
67 * @param y1 »ÏÅÀ¤ÎYºÂɸ
68 * @param x1 »ÏÅÀ¤ÎXºÂɸ
69 * @param y2 ÌÜɸ¤ÎYºÂɸ
70 * @param x2 ÌÜɸ¤ÎXºÂɸ
72 * @param typ ¸ú²Ì°ÀID
73 * @param is_friend TRUE¤Ê¤é¤Ð¡¢¥×¥ì¥¤¥ä¡¼¤ò´¬¤¹þ¤à»þ¤Ë¥Ö¥ì¥¹¤ÎȽÄê¤òFALSE¤Ë¤¹¤ë¡£
74 * @return ¥Ö¥ì¥¹¤òľÀÜÅö¤Æ¤é¤ì¤ë¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
76 static bool breath_direct(int y1, int x1, int y2, int x2, int rad, int typ, bool is_friend)
78 /* Must be the same as projectable() */
90 byte gx[1024], gy[1024];
105 case GF_DISINTEGRATE:
113 /* Check the projection path */
114 grid_n = project_path(grid_g, MAX_RANGE, y1, x1, y2, x2, flg);
116 /* Project along the path */
117 for (i = 0; i < grid_n; ++i)
119 int ny = GRID_Y(grid_g[i]);
120 int nx = GRID_X(grid_g[i]);
122 if (flg & PROJECT_DISI)
124 /* Hack -- Balls explode before reaching walls */
125 if (cave_stop_disintegration(ny, nx)) break;
127 else if (flg & PROJECT_LOS)
129 /* Hack -- Balls explode before reaching walls */
130 if (!cave_los_bold(ny, nx)) break;
134 /* Hack -- Balls explode before reaching walls */
135 if (!cave_have_flag_bold(ny, nx, FF_PROJECT)) break;
138 /* Save the "blast epicenter" */
147 if (flg & PROJECT_DISI)
149 if (in_disintegration_range(y1, x1, y2, x2) && (distance(y1, x1, y2, x2) <= rad)) hit2 = TRUE;
150 if (in_disintegration_range(y1, x1, py, px) && (distance(y1, x1, py, px) <= rad)) hityou = TRUE;
152 else if (flg & PROJECT_LOS)
154 if (los(y1, x1, y2, x2) && (distance(y1, x1, y2, x2) <= rad)) hit2 = TRUE;
155 if (los(y1, x1, py, px) && (distance(y1, x1, py, px) <= rad)) hityou = TRUE;
159 if (projectable(y1, x1, y2, x2) && (distance(y1, x1, y2, x2) <= rad)) hit2 = TRUE;
160 if (projectable(y1, x1, py, px) && (distance(y1, x1, py, px) <= rad)) hityou = TRUE;
165 breath_shape(grid_g, grid_n, &grids, gx, gy, gm, &gm_rad, rad, y1, x1, y, x, typ);
167 for (i = 0; i < grids; i++)
169 /* Extract the location */
173 if ((y == y2) && (x == x2)) hit2 = TRUE;
174 if (player_bold(y, x)) hityou = TRUE;
178 if (!hit2) return FALSE;
179 if (is_friend && hityou) return FALSE;
185 * @brief ¥â¥ó¥¹¥¿¡¼¤¬ÆüìǽÎϤÎÌÜɸÃÏÅÀ¤ò·è¤á¤ë½èÍý /
186 * Get the actual center point of ball spells (rad > 1) (originally from TOband)
187 * @param sy »ÏÅÀ¤ÎYºÂɸ
188 * @param sx »ÏÅÀ¤ÎXºÂɸ
189 * @param ty ÌÜɸYºÂɸ¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
190 * @param tx ÌÜɸXºÂɸ¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
191 * @param flg ȽÄê¤Î¥Õ¥é¥°ÇÛÎó
194 void get_project_point(int sy, int sx, int *ty, int *tx, int flg)
199 path_n = project_path(path_g, MAX_RANGE, sy, sx, *ty, *tx, flg);
204 /* Project along the path */
205 for (i = 0; i < path_n; i++)
207 sy = GRID_Y(path_g[i]);
208 sx = GRID_X(path_g[i]);
210 /* Hack -- Balls explode before reaching walls */
211 if (!cave_have_flag_bold(sy, sx, FF_PROJECT)) break;
219 * @brief ¥â¥ó¥¹¥¿¡¼¤¬Å¨¥â¥ó¥¹¥¿¡¼¤ËËâÎϾõî¤ò»È¤¦¤«¤É¤¦¤«¤òÊÖ¤¹ /
220 * Check should monster cast dispel spell at other monster.
221 * @param m_idx ½Ñ¼Ô¤Î¥â¥ó¥¹¥¿¡¼ID
222 * @param t_idx ÌÜɸ¤Î¥â¥ó¥¹¥¿¡¼ID
223 * @return ËâÎϾõî¤ò»È¤¦¤Ù¤¤Ê¤é¤ÐTRUE¤òÊѤ¨¤¹¡£
225 static bool dispel_check_monster(int m_idx, int t_idx)
227 monster_type *t_ptr = &m_list[t_idx];
230 if (MON_INVULNER(t_ptr)) return TRUE;
233 if (t_ptr->mspeed < 135)
235 if (MON_FAST(t_ptr)) return TRUE;
239 if (t_idx == p_ptr->riding)
241 if (dispel_check(m_idx)) return TRUE;
244 /* No need to cast dispel spell */
249 * @brief ¥â¥ó¥¹¥¿¡¼¤¬Å¨¥â¥ó¥¹¥¿¡¼¤ËÆüìǽÎϤò»È¤¦½èÍý¤Î¥á¥¤¥ó¥ë¡¼¥Á¥ó /
250 * Monster tries to 'cast a spell' (or breath, etc) at another monster.
251 * @param m_idx ½Ñ¼Ô¤Î¥â¥ó¥¹¥¿¡¼ID
252 * @return ¼ÂºÝ¤ËÆüìǽÎϤò»È¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹
254 * The player is only disturbed if able to be affected by the spell.
256 bool monst_spell_monst(int m_idx)
260 int thrown_spell, count = 0;
266 int s_num_6 = (easy_band ? 2 : 6);
267 int s_num_4 = (easy_band ? 1 : 4);
268 int rad = 0; //For elemental balls
270 byte spell[96], num = 0;
279 monster_type *m_ptr = &m_list[m_idx];
280 monster_type *t_ptr = NULL;
282 monster_race *r_ptr = &r_info[m_ptr->r_idx];
283 monster_race *tr_ptr = NULL;
287 bool wake_up = FALSE;
290 bool blind = (p_ptr->blind ? TRUE : FALSE);
292 bool see_m = is_seen(m_ptr);
293 bool maneable = player_has_los_bold(m_ptr->fy, m_ptr->fx);
298 bool pet = is_pet(m_ptr);
300 bool in_no_magic_dungeon = (d_info[dungeon_type].flags1 & DF1_NO_MAGIC) && dun_level
301 && (!p_ptr->inside_quest || is_fixed_quest_idx(p_ptr->inside_quest));
303 bool can_use_lite_area = FALSE;
307 bool resists_tele = FALSE;
309 /* Prepare flags for summoning */
310 if (!pet) u_mode |= PM_ALLOW_UNIQUE;
312 /* Cannot cast spells when confused */
313 if (MON_CONFUSED(m_ptr)) return (FALSE);
315 /* Extract the racial spell flags */
320 /* Target is given for pet? */
321 if (pet_t_m_idx && pet)
324 t_ptr = &m_list[t_idx];
326 /* Cancel if not projectable (for now) */
327 if ((m_idx == t_idx) || !projectable(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx))
333 /* Is there counter attack target? */
334 if (!t_idx && m_ptr->target_y)
336 t_idx = cave[m_ptr->target_y][m_ptr->target_x].m_idx;
340 t_ptr = &m_list[t_idx];
342 /* Cancel if neither enemy nor a given target */
343 if ((m_idx == t_idx) ||
344 ((t_idx != pet_t_m_idx) && !are_enemies(m_ptr, t_ptr)))
349 /* Allow only summoning etc.. if not projectable */
350 else if (!projectable(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx))
352 f4 &= (RF4_INDIRECT_MASK);
353 f5 &= (RF5_INDIRECT_MASK);
354 f6 &= (RF6_INDIRECT_MASK);
359 /* Look for enemies normally */
362 bool success = FALSE;
364 if (p_ptr->inside_battle)
366 start = randint1(m_max-1) + m_max;
367 if (randint0(2)) plus = -1;
369 else start = m_max + 1;
371 /* Scan thru all monsters */
372 for (i = start; ((i < start + m_max) && (i > start - m_max)); i += plus)
374 int dummy = (i % m_max);
375 if (!dummy) continue;
378 t_ptr = &m_list[t_idx];
380 /* Skip dead monsters */
381 if (!t_ptr->r_idx) continue;
383 /* Monster must be 'an enemy' */
384 if ((m_idx == t_idx) || !are_enemies(m_ptr, t_ptr)) continue;
386 /* Monster must be projectable */
387 if (!projectable(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx)) continue;
395 if (!success) return FALSE;
399 /* OK -- we've got a target */
402 tr_ptr = &r_info[t_ptr->r_idx];
404 /* Forget old counter attack target */
407 /* Extract the monster level */
408 rlev = ((r_ptr->level >= 1) ? r_ptr->level : 1);
410 /* Remove unimplemented spells */
411 f6 &= ~(RF6_WORLD | RF6_TRAPS | RF6_FORGET);
413 if (f4 & RF4_BR_LITE)
415 if (!los(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx))
416 f4 &= ~(RF4_BR_LITE);
419 /* Remove unimplemented special moves */
420 if (f6 & RF6_SPECIAL)
422 if ((m_ptr->r_idx != MON_ROLENTO) && (r_ptr->d_char != 'B'))
423 f6 &= ~(RF6_SPECIAL);
426 if (f6 & RF6_DARKNESS)
428 bool vs_ninja = (p_ptr->pclass == CLASS_NINJA) && !is_hostile(t_ptr);
431 !(r_ptr->flags3 & (RF3_UNDEAD | RF3_HURT_LITE)) &&
432 !(r_ptr->flags7 & RF7_DARK_MASK))
433 can_use_lite_area = TRUE;
435 if (!(r_ptr->flags2 & RF2_STUPID))
437 if (d_info[dungeon_type].flags1 & DF1_DARKNESS) f6 &= ~(RF6_DARKNESS);
438 else if (vs_ninja && !can_use_lite_area) f6 &= ~(RF6_DARKNESS);
442 if (in_no_magic_dungeon && !(r_ptr->flags2 & RF2_STUPID))
444 f4 &= (RF4_NOMAGIC_MASK);
445 f5 &= (RF5_NOMAGIC_MASK);
446 f6 &= (RF6_NOMAGIC_MASK);
449 if (p_ptr->inside_arena || p_ptr->inside_battle)
451 f4 &= ~(RF4_SUMMON_MASK);
452 f5 &= ~(RF5_SUMMON_MASK);
453 f6 &= ~(RF6_SUMMON_MASK | RF6_TELE_LEVEL);
455 if (m_ptr->r_idx == MON_ROLENTO) f6 &= ~(RF6_SPECIAL);
458 if (p_ptr->inside_battle && !one_in_(3))
463 if (m_idx == p_ptr->riding)
465 f4 &= ~(RF4_RIDING_MASK);
466 f5 &= ~(RF5_RIDING_MASK);
467 f6 &= ~(RF6_RIDING_MASK);
473 f6 &= ~(RF6_DARKNESS | RF6_TRAPS);
475 if (!(p_ptr->pet_extra_flags & PF_TELEPORT))
477 f6 &= ~(RF6_BLINK | RF6_TPORT | RF6_TELE_TO | RF6_TELE_AWAY | RF6_TELE_LEVEL);
480 if (!(p_ptr->pet_extra_flags & PF_ATTACK_SPELL))
482 f4 &= ~(RF4_ATTACK_MASK);
483 f5 &= ~(RF5_ATTACK_MASK);
484 f6 &= ~(RF6_ATTACK_MASK);
487 if (!(p_ptr->pet_extra_flags & PF_SUMMON_SPELL))
489 f4 &= ~(RF4_SUMMON_MASK);
490 f5 &= ~(RF5_SUMMON_MASK);
491 f6 &= ~(RF6_SUMMON_MASK);
494 /* Prevent collateral damage */
495 if (!(p_ptr->pet_extra_flags & PF_BALL_SPELL) && (m_idx != p_ptr->riding))
497 if ((f4 & (RF4_BALL_MASK & ~(RF4_ROCKET))) ||
498 (f5 & RF5_BALL_MASK) ||
499 (f6 & RF6_BALL_MASK))
504 get_project_point(m_ptr->fy, m_ptr->fx, &real_y, &real_x, 0L);
506 if (projectable(real_y, real_x, py, px))
508 int dist = distance(real_y, real_x, py, px);
512 f4 &= ~(RF4_BALL_MASK & ~(RF4_ROCKET));
513 f5 &= ~(RF5_BALL_MASK);
514 f6 &= ~(RF6_BALL_MASK);
518 f4 &= ~(RF4_BIG_BALL_MASK);
519 f5 &= ~(RF5_BIG_BALL_MASK);
520 f6 &= ~(RF6_BIG_BALL_MASK);
523 else if (f5 & RF5_BA_LITE)
525 if ((distance(real_y, real_x, py, px) <= 4) && los(real_y, real_x, py, px))
526 f5 &= ~(RF5_BA_LITE);
535 get_project_point(m_ptr->fy, m_ptr->fx, &real_y, &real_x, PROJECT_STOP);
536 if (projectable(real_y, real_x, py, px) && (distance(real_y, real_x, py, px) <= 2))
540 if (((f4 & RF4_BEAM_MASK) ||
541 (f5 & RF5_BEAM_MASK) ||
542 (f6 & RF6_BEAM_MASK)) &&
543 !direct_beam(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx, m_ptr))
545 f4 &= ~(RF4_BEAM_MASK);
546 f5 &= ~(RF5_BEAM_MASK);
547 f6 &= ~(RF6_BEAM_MASK);
550 if ((f4 & RF4_BREATH_MASK) ||
551 (f5 & RF5_BREATH_MASK) ||
552 (f6 & RF6_BREATH_MASK))
554 /* Expected breath radius */
555 int rad = (r_ptr->flags2 & RF2_POWERFUL) ? 3 : 2;
557 if (!breath_direct(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx, rad, 0, TRUE))
559 f4 &= ~(RF4_BREATH_MASK);
560 f5 &= ~(RF5_BREATH_MASK);
561 f6 &= ~(RF6_BREATH_MASK);
563 else if ((f4 & RF4_BR_LITE) &&
564 !breath_direct(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx, rad, GF_LITE, TRUE))
566 f4 &= ~(RF4_BR_LITE);
568 else if ((f4 & RF4_BR_DISI) &&
569 !breath_direct(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx, rad, GF_DISINTEGRATE, TRUE))
571 f4 &= ~(RF4_BR_DISI);
576 /* Special moves restriction */
577 if (f6 & RF6_SPECIAL)
579 if (m_ptr->r_idx == MON_ROLENTO)
581 if ((p_ptr->pet_extra_flags & (PF_ATTACK_SPELL | PF_SUMMON_SPELL)) != (PF_ATTACK_SPELL | PF_SUMMON_SPELL))
582 f6 &= ~(RF6_SPECIAL);
584 else if (r_ptr->d_char == 'B')
586 if ((p_ptr->pet_extra_flags & (PF_ATTACK_SPELL | PF_TELEPORT)) != (PF_ATTACK_SPELL | PF_TELEPORT))
587 f6 &= ~(RF6_SPECIAL);
589 else f6 &= ~(RF6_SPECIAL);
593 /* Remove some spells if necessary */
595 if (!(r_ptr->flags2 & RF2_STUPID))
597 /* Check for a clean bolt shot */
598 if (((f4 & RF4_BOLT_MASK) ||
599 (f5 & RF5_BOLT_MASK) ||
600 (f6 & RF6_BOLT_MASK)) &&
601 !clean_shot(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx, pet))
603 f4 &= ~(RF4_BOLT_MASK);
604 f5 &= ~(RF5_BOLT_MASK);
605 f6 &= ~(RF6_BOLT_MASK);
608 /* Check for a possible summon */
609 if (((f4 & RF4_SUMMON_MASK) ||
610 (f5 & RF5_SUMMON_MASK) ||
611 (f6 & RF6_SUMMON_MASK)) &&
612 !(summon_possible(t_ptr->fy, t_ptr->fx)))
614 /* Remove summoning spells */
615 f4 &= ~(RF4_SUMMON_MASK);
616 f5 &= ~(RF5_SUMMON_MASK);
617 f6 &= ~(RF6_SUMMON_MASK);
621 if ((f4 & RF4_DISPEL) && !dispel_check_monster(m_idx, t_idx))
623 /* Remove dispel spell */
627 /* Check for a possible raise dead */
628 if ((f6 & RF6_RAISE_DEAD) && !raise_possible(m_ptr))
630 /* Remove raise dead spell */
631 f6 &= ~(RF6_RAISE_DEAD);
634 /* Special moves restriction */
635 if (f6 & RF6_SPECIAL)
637 if ((m_ptr->r_idx == MON_ROLENTO) && !summon_possible(t_ptr->fy, t_ptr->fx))
639 f6 &= ~(RF6_SPECIAL);
644 if (r_ptr->flags2 & RF2_SMART)
646 /* Hack -- allow "desperate" spells */
647 if ((m_ptr->hp < m_ptr->maxhp / 10) &&
648 (randint0(100) < 50))
650 /* Require intelligent spells */
651 f4 &= (RF4_INT_MASK);
652 f5 &= (RF5_INT_MASK);
653 f6 &= (RF6_INT_MASK);
656 /* Hack -- decline "teleport level" in some case */
657 if ((f6 & RF6_TELE_LEVEL) && TELE_LEVEL_IS_INEFF((t_idx == p_ptr->riding) ? 0 : t_idx))
659 f6 &= ~(RF6_TELE_LEVEL);
664 if (!f4 && !f5 && !f6) return FALSE;
666 /* Extract the "inate" spells */
667 for (k = 0; k < 32; k++)
669 if (f4 & (1L << k)) spell[num++] = k + 32 * 3;
672 /* Extract the "normal" spells */
673 for (k = 0; k < 32; k++)
675 if (f5 & (1L << k)) spell[num++] = k + 32 * 4;
678 /* Extract the "bizarre" spells */
679 for (k = 0; k < 32; k++)
681 if (f6 & (1L << k)) spell[num++] = k + 32 * 5;
685 if (!num) return (FALSE);
687 /* Stop if player is dead or gone */
688 if (!p_ptr->playing || p_ptr->is_dead) return (FALSE);
690 /* Handle "leaving" */
691 if (p_ptr->leaving) return (FALSE);
693 /* Get the monster name (or "it") */
694 monster_desc(m_name, m_ptr, 0x00);
697 /* Get the monster possessive ("his"/"her"/"its") */
698 monster_desc(m_poss, m_ptr, MD_PRON_VISIBLE | MD_POSSESSIVE);
701 /* Get the target's name (or "it") */
702 monster_desc(t_name, t_ptr, 0x00);
704 /* Choose a spell to cast */
705 thrown_spell = spell[randint0(num)];
707 see_t = is_seen(t_ptr);
708 see_either = (see_m || see_t);
710 /* Can the player be aware of this attack? */
711 known = (m_ptr->cdis <= MAX_SIGHT) || (t_ptr->cdis <= MAX_SIGHT);
713 if (p_ptr->riding && (m_idx == p_ptr->riding)) disturb(1, 1);
715 /* Check for spell failure (inate attacks never fail) */
716 if (!spell_is_inate(thrown_spell) && (in_no_magic_dungeon || (MON_STUNNED(m_ptr) && one_in_(2))))
720 if (see_m) msg_format(_("%^s¤Ï¼öʸ¤ò¾§¤¨¤è¤¦¤È¤·¤¿¤¬¼ºÇÔ¤·¤¿¡£",
721 "%^s tries to cast a spell, but fails."), m_name);
726 /* Hex: Anti Magic Barrier */
727 if (!spell_is_inate(thrown_spell) && magic_barrier(m_idx))
729 if (see_m) msg_format(_("È¿ËâË¡¥Ð¥ê¥¢¤¬%^s¤Î¼öʸ¤ò¤«¤¾Ã¤·¤¿¡£",
730 "Anti magic barrier cancels the spell which %^s casts."), m_name);
734 can_remember = is_original_ap_and_seen(m_ptr);
736 switch (thrown_spell)
738 case 96 + 0: spell_RF4_SHRIEK(m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_SHRIEK */
739 case 96 + 1: return FALSE; /* RF4_XXX1 */
740 case 96 + 2: spell_RF4_DISPEL(m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_DISPEL */
741 case 96 + 3: dam = spell_RF4_ROCKET(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_ROCKET */
742 case 96 + 4: dam = spell_RF4_SHOOT(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_SHOOT */
743 case 96 + 5: return FALSE; /* RF4_XXX2 */
744 case 96 + 6: return FALSE; /* RF4_XXX3 */
745 case 96 + 7: return FALSE; /* RF4_XXX4 */
746 case 96 + 8: dam = spell_RF4_BREATH(GF_ACID, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_ACID */
747 case 96 + 9: dam = spell_RF4_BREATH(GF_ELEC, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_ELEC */
748 case 96 + 10: dam = spell_RF4_BREATH(GF_FIRE, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_FIRE */
749 case 96 + 11: dam = spell_RF4_BREATH(GF_COLD, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_COLD */
750 case 96 + 12: dam = spell_RF4_BREATH(GF_POIS, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_POIS */
751 case 96 + 13: dam = spell_RF4_BREATH(GF_NETHER, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_NETH */
752 case 96 + 14: dam = spell_RF4_BREATH(GF_LITE, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_LITE */
753 case 96 + 15: dam = spell_RF4_BREATH(GF_DARK, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_DARK */
754 case 96 + 16: dam = spell_RF4_BREATH(GF_CONFUSION, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_CONF */
755 case 96 + 17: dam = spell_RF4_BREATH(GF_SOUND, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_SOUN */
756 case 96 + 18: dam = spell_RF4_BREATH(GF_CHAOS, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_CHAO */
757 case 96 + 19: dam = spell_RF4_BREATH(GF_DISENCHANT, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_DISE */
758 case 96 + 20: dam = spell_RF4_BREATH(GF_NEXUS, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_NEXU */
759 case 96 + 21: dam = spell_RF4_BREATH(GF_TIME, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_TIME */
760 case 96 + 22: dam = spell_RF4_BREATH(GF_INERTIA, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_INER */
761 case 96 + 23: dam = spell_RF4_BREATH(GF_GRAVITY, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_GRAV */
762 case 96 + 24: dam = spell_RF4_BREATH(GF_SHARDS, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_SHAR */
763 case 96 + 25: dam = spell_RF4_BREATH(GF_PLASMA, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_PLAS */
764 case 96 + 26: dam = spell_RF4_BREATH(GF_FORCE, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_WALL */
765 case 96 + 27: dam = spell_RF4_BREATH(GF_MANA, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_MANA */
766 case 96 + 28: dam = spell_RF4_BA_NUKE(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BA_NUKE */
767 case 96 + 29: dam = spell_RF4_BREATH(GF_NUKE, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_NUKE */
768 case 96 + 30: dam = spell_RF4_BA_CHAO(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BA_CHAO */
769 case 96 + 31: dam = spell_RF4_BREATH(GF_DISINTEGRATE, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_DISI */
770 case 128 + 0: dam = spell_RF5_BA_ACID(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BA_ACID */
771 case 128 + 1: dam = spell_RF5_BA_ELEC(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BA_ELEC */
772 case 128 + 2: dam = spell_RF5_BA_FIRE(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BA_FIRE */
773 case 128 + 3: dam = spell_RF5_BA_COLD(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BA_COLD */
774 case 128 + 4: dam = spell_RF5_BA_POIS(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BA_POIS */
775 case 128 + 5: dam = spell_RF5_BA_NETH(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BA_NETH */
776 case 128 + 6: dam = spell_RF5_BA_WATE(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BA_WATE */
777 case 128 + 7: dam = spell_RF5_BA_MANA(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BA_MANA */
778 case 128 + 8: dam = spell_RF5_BA_DARK(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BA_DARK */
779 case 128 + 9: dam = spell_RF5_DRAIN_MANA(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_DRAIN_MANA */
780 case 128 + 10: dam = spell_RF5_MIND_BLAST(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_MIND_BLAST */
781 case 128 + 11: dam = spell_RF5_BRAIN_SMASH(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BRAIN_SMASH */
782 case 128 + 12: dam = spell_RF5_CAUSE_1(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_CAUSE_1 */
783 case 128 + 13: dam = spell_RF5_CAUSE_2(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_CAUSE_2 */
784 case 128 + 14: dam = spell_RF5_CAUSE_3(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_CAUSE_3 */
785 case 128 + 15: dam = spell_RF5_CAUSE_4(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_CAUSE_4 */
786 case 128 + 16: dam = spell_RF5_BO_ACID(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BO_ACID */
787 case 128 + 17: dam = spell_RF5_BO_ELEC(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BO_ELEC */
788 case 128 + 18: dam = spell_RF5_BO_FIRE(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BO_FIRE */
789 case 128 + 19: dam = spell_RF5_BO_COLD(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BO_COLD */
790 case 128 + 20: dam = spell_RF5_BA_LITE(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BA_LITE */
791 case 128 + 21: dam = spell_RF5_BO_NETH(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BO_NETH */
792 case 128 + 22: dam = spell_RF5_BO_WATE(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BO_WATE */
793 case 128 + 23: dam = spell_RF5_BO_MANA(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BO_MANA */
794 case 128 + 24: dam = spell_RF5_BO_PLAS(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BO_PLAS */
795 case 128 + 25: dam = spell_RF5_BO_ICEE(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BO_ICEE */
796 case 128 + 26: dam = spell_RF5_MISSILE(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_MISSILE */
804 msg_format(_("%^s¤¬¶²¤í¤·¤²¤Ê¸¸³Ð¤òºî¤ê½Ð¤·¤¿¡£",
805 "%^s casts a fearful illusion in front of %s."), m_name, t_name);
813 if (tr_ptr->flags3 & RF3_NO_FEAR)
815 if (see_t) msg_format(_("%^s¤Ï¶²Éݤò´¶¤¸¤Ê¤¤¡£",
816 "%^s refuses to be frightened."), t_name);
819 else if (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10)
821 if (see_t) msg_format(_("%^s¤Ï¶²Éݤò´¶¤¸¤Ê¤¤¡£",
822 "%^s refuses to be frightened."), t_name);
826 if (set_monster_monfear(t_idx, MON_MONFEAR(t_ptr) + randint0(4) + 4)) fear = TRUE;
839 _(msg_format("%s¤Ï¼öʸ¤ò¾§¤¨¤Æ%s¤ÎÌܤò¾Æ¤ÉÕ¤«¤»¤¿¡£", m_name, t_name),
840 msg_format("%^s casts a spell, burning %s%s eyes.", m_name, t_name,
841 (streq(t_name, "it") ? "s" : "'s")));
850 /* Simulate blindness with confusion */
851 if (tr_ptr->flags3 & RF3_NO_CONF)
853 if (see_t) msg_format(_("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", "%^s is unaffected."), t_name);
855 else if (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10)
857 if (see_t) msg_format(_("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", "%^s is unaffected."), t_name);
861 if (see_t) msg_format(_("%^s¤ÏÌܤ¬¸«¤¨¤Ê¤¯¤Ê¤Ã¤¿¡ª ", "%^s is blinded!"), t_name);
863 (void)set_monster_confused(t_idx, MON_CONFUSED(t_ptr) + 12 + randint0(4));
876 msg_format(_("%^s¤¬%s¤ÎÁ°¤Ë¸¸ÏÇŪ¤Ê¸¸¤ò¤Ä¤¯¤ê½Ð¤·¤¿¡£",
877 "%^s casts a mesmerizing illusion in front of %s."), m_name, t_name);
885 if (tr_ptr->flags3 & RF3_NO_CONF)
887 if (see_t) msg_format(_("%^s¤ÏÏǤ蘆¤ì¤Ê¤«¤Ã¤¿¡£",
888 "%^s disbelieves the feeble spell."), t_name);
890 else if (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10)
892 if (see_t) msg_format(_("%^s¤ÏÏǤ蘆¤ì¤Ê¤«¤Ã¤¿¡£",
893 "%^s disbelieves the feeble spell."), t_name);
897 if (see_t) msg_format(_("%^s¤Ïº®Í𤷤¿¤è¤¦¤À¡£",
898 "%^s seems confused."), t_name);
900 (void)set_monster_confused(t_idx, MON_CONFUSED(t_ptr) + 12 + randint0(4));
913 _(msg_format("%s¤¬%s¤Î¶ÚÆù¤«¤éÎϤòµÛ¤¤¤È¤Ã¤¿¡£", m_name, t_name),
914 msg_format("%^s drains power from %s%s muscles.", m_name, t_name,
915 (streq(t_name, "it") ? "s" : "'s")));
923 if (tr_ptr->flags1 & RF1_UNIQUE)
925 if (see_t) msg_format(_("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£",
926 "%^s is unaffected."), t_name);
928 else if (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10)
930 if (see_t) msg_format(_("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£",
931 "%^s is unaffected."), t_name);
935 if (set_monster_slow(t_idx, MON_SLOW(t_ptr) + 50))
937 if (see_t) msg_format(_("%s¤ÎÆ°¤¤¬ÃÙ¤¯¤Ê¤Ã¤¿¡£",
938 "%^s starts moving slower."), t_name);
952 msg_format(_("%^s¤Ï%s¤ò¤¸¤Ã¤È¸«¤Ä¤á¤¿¡£", "%^s stares intently at %s."), m_name, t_name);
960 if ((tr_ptr->flags1 & RF1_UNIQUE) ||
961 (tr_ptr->flags3 & RF3_NO_STUN))
963 if (see_t) msg_format(_("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", "%^s is unaffected."), t_name);
965 else if (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10)
967 if (see_t) msg_format(_("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", "%^s is unaffected."), t_name);
971 if (see_t) msg_format(_("%^s¤ÏËãá㤷¤¿¡ª", "%^s is paralyzed!"), t_name);
973 (void)set_monster_stunned(t_idx, MON_STUNNED(t_ptr) + randint1(4) + 4);
987 msg_format(_("%^s¤¬¼«Ê¬¤ÎÂΤËÇ°¤òÁ÷¤Ã¤¿¡£", "%^s concentrates on %s body."), m_name);
995 /* Allow quick speed increases to base+10 */
996 if (set_monster_fast(m_idx, MON_FAST(m_ptr) + 100))
998 if (see_m) msg_format(_("%^s¤ÎÆ°¤¤¬Â®¤¯¤Ê¤Ã¤¿¡£", "%^s starts moving faster."), m_name);
1008 msg_format(_("%^s¤¬%s¤Ë<ÇËÌǤμê>¤òÊü¤Ã¤¿¡ª", "%^s invokes the Hand of Doom upon %s!"), m_name, t_name);
1016 dam = 20; /* Dummy power */
1017 breath(y, x, m_idx,GF_HAND_DOOM, dam, 0, FALSE, MS_HAND_DOOM, MONSTER_TO_MONSTER);
1027 msg_format(_("%^s¤Ï¼«Ê¬¤Î½ý¤ËÇ°¤ò½¸Ã椷¤¿¡£", "%^s concentrates on %s wounds."), m_name);
1036 m_ptr->hp += (rlev * 6);
1039 if (m_ptr->hp >= m_ptr->maxhp)
1042 m_ptr->hp = m_ptr->maxhp;
1048 msg_format(_("%^s¤Ï´°Á´¤Ë¼£¤Ã¤¿¡ª", "%^s looks completely healed!"), m_name);
1057 /* Partially healed */
1062 msg_format(_("%^s¤ÏÂÎÎϤò²óÉü¤·¤¿¤è¤¦¤À¡£", "%^s looks healthier."), m_name);
1070 /* Redraw (later) if needed */
1071 if (p_ptr->health_who == m_idx) p_ptr->redraw |= (PR_HEALTH);
1072 if (p_ptr->riding == m_idx) p_ptr->redraw |= (PR_UHEALTH);
1075 if (MON_MONFEAR(m_ptr))
1078 (void)set_monster_monfear(m_idx, 0);
1081 if (see_m) msg_format(_("%^s¤Ïͦµ¤¤ò¼è¤êÌᤷ¤¿¡£", "%^s recovers %s courage."), m_name);
1093 msg_format(_("%s¤Ï̵½ý¤Îµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£", "%^s casts a Globe of Invulnerability."), m_name);
1101 if (!MON_INVULNER(m_ptr)) (void)set_monster_invulner(m_idx, randint1(4) + 4, FALSE);
1106 if (teleport_barrier(m_idx))
1110 msg_format(_("ËâË¡¤Î¥Ð¥ê¥¢¤¬%^s¤Î¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤷¤¿¡£", "Magic barrier obstructs teleporting of %^s."), m_name);
1117 msg_format(_("%^s¤¬½Ö»þ¤Ë¾Ã¤¨¤¿¡£", "%^s blinks away."), m_name);
1119 teleport_away(m_idx, 10, 0L);
1125 if (teleport_barrier(m_idx))
1129 msg_format(_("ËâË¡¤Î¥Ð¥ê¥¢¤¬%^s¤Î¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤷¤¿¡£", "Magic barrier obstructs teleporting of %^s."), m_name);
1136 msg_format(_("%^s¤¬¥Æ¥ì¥Ý¡¼¥È¤·¤¿¡£", "%^s teleports away."), m_name);
1138 teleport_away_followable(m_idx);
1146 if(m_ptr->r_idx = MON_DIO) who == 1;
1147 else if(m_ptr->r_idx = MON_WONG) who == 3;
1149 if(!process_the_world(randint1(2)+2, who, player_has_los_bold(m_ptr->fy, m_ptr->fx))) return (FALSE);
1155 switch (m_ptr->r_idx)
1158 /* Moved to process_monster(), like multiplication */
1168 msg_format(_("%^s¤Ï¼êÜØÃƤò¤Ð¤é¤Þ¤¤¤¿¡£", "%^s throws some hand grenades."), m_name);
1177 int num = 1 + randint1(3);
1178 for (k = 0; k < num; k++)
1180 count += summon_named_creature(m_idx, y, x, MON_SHURYUUDAN, 0);
1184 if (known && !see_t && count)
1191 if (r_ptr->d_char == 'B')
1197 msg_format(_("%^s¤ÏÆÍÁ³µÞ¾å¾º¤·¤Æ»ë³¦¤«¤é¾Ã¤¨¤¿!", "%^s suddenly go out of your sight!"), m_name);
1199 teleport_away(m_idx, 10, TELEPORT_NONMAGICAL);
1200 p_ptr->update |= (PU_MONSTERS);
1208 msg_format(_("%^s¤¬%s¤òÄϤó¤Ç¶õÃ椫¤éÅꤲÍî¤È¤·¤¿¡£", "%^s holds %s, and drops from the sky."), m_name, t_name);
1216 dam = damroll(4, 8);
1218 if (t_idx == p_ptr->riding) teleport_player_to(m_ptr->fy, m_ptr->fx, TELEPORT_NONMAGICAL | TELEPORT_PASSIVE);
1219 else teleport_monster_to(t_idx, m_ptr->fy, m_ptr->fx, 100, TELEPORT_NONMAGICAL | TELEPORT_PASSIVE);
1223 if (tr_ptr->flags7 & RF7_CAN_FLY)
1225 if (see_t) msg_format(_("%^s¤ÏÀŤ«¤ËÃåÃϤ·¤¿¡£", "%^s floats gently down to the ground."), t_name);
1229 if (see_t) msg_format(_("%^s¤ÏÃÏÌ̤ËᤤĤ±¤é¤ì¤¿¡£", "%^s crashed into the ground."), t_name);
1231 dam += damroll(6, 8);
1234 if (p_ptr->riding == t_idx)
1238 /* Mega hack -- this special action deals damage to the player. Therefore the code of "eyeeye" is necessary.
1241 get_damage = take_hit(DAMAGE_NOESCAPE, dam, m_name, -1);
1242 if (p_ptr->tim_eyeeye && get_damage > 0 && !p_ptr->is_dead)
1244 char m_name_self[80];
1247 monster_desc(m_name_self, m_ptr, MD_PRON_VISIBLE | MD_POSSESSIVE | MD_OBJECTIVE);
1249 _(msg_format("¹¶·â¤¬%s¼«¿È¤ò½ý¤Ä¤±¤¿¡ª", m_name),
1250 msg_format("The attack of %s has wounded %s!", m_name, m_name_self));
1252 project(0, 0, m_ptr->fy, m_ptr->fx, get_damage, GF_MISSILE, PROJECT_KILL, -1);
1253 set_tim_eyeeye(p_ptr->tim_eyeeye-5, TRUE);
1257 mon_take_hit_mon(t_idx, dam, &fear, extract_note_dies(real_r_ptr(t_ptr)), m_idx);
1262 /* Something is wrong */
1275 msg_format(_("%^s¤¬%s¤ò°ú¤Ìᤷ¤¿¡£", "%^s commands %s to return."), m_name, t_name);
1283 if (tr_ptr->flagsr & RFR_RES_TELE)
1285 if ((tr_ptr->flags1 & RF1_UNIQUE) || (tr_ptr->flagsr & RFR_RES_ALL))
1287 if (is_original_ap_and_seen(t_ptr)) tr_ptr->r_flagsr |= RFR_RES_TELE;
1290 msg_format(_("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", "%^s is unaffected!"), t_name);
1293 resists_tele = TRUE;
1295 else if (tr_ptr->level > randint1(100))
1297 if (is_original_ap_and_seen(t_ptr)) tr_ptr->r_flagsr |= RFR_RES_TELE;
1300 msg_format(_("%^s¤ÏÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡ª", "%^s resists!"), t_name);
1303 resists_tele = TRUE;
1309 if (t_idx == p_ptr->riding) teleport_player_to(m_ptr->fy, m_ptr->fx, TELEPORT_PASSIVE);
1310 else teleport_monster_to(t_idx, m_ptr->fy, m_ptr->fx, 100, TELEPORT_PASSIVE);
1322 msg_format(_("%^s¤Ï%s¤ò¥Æ¥ì¥Ý¡¼¥È¤µ¤»¤¿¡£", "%^s teleports %s away."), m_name, t_name);
1330 if (tr_ptr->flagsr & RFR_RES_TELE)
1332 if ((tr_ptr->flags1 & RF1_UNIQUE) || (tr_ptr->flagsr & RFR_RES_ALL))
1334 if (is_original_ap_and_seen(t_ptr)) tr_ptr->r_flagsr |= RFR_RES_TELE;
1337 msg_format(_("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", "%^s is unaffected!"), t_name);
1340 resists_tele = TRUE;
1342 else if (tr_ptr->level > randint1(100))
1344 if (is_original_ap_and_seen(t_ptr)) tr_ptr->r_flagsr |= RFR_RES_TELE;
1347 msg_format(_("%^s¤ÏÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡ª", "%^s resists!"), t_name);
1350 resists_tele = TRUE;
1356 if (t_idx == p_ptr->riding) teleport_player_away(m_idx, MAX_SIGHT * 2 + 5);
1357 else teleport_away(t_idx, MAX_SIGHT * 2 + 5, TELEPORT_PASSIVE);
1363 /* RF6_TELE_LEVEL */
1369 msg_format(_("%^s¤¬%s¤Î¤ò»Ø¤µ¤·¤¿¡£", "%^s gestures at %s's feet."), m_name, t_name);
1377 if (tr_ptr->flagsr & (RFR_EFF_RES_NEXU_MASK | RFR_RES_TELE))
1379 if (see_t) msg_format(_("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", "%^s is unaffected!"), t_name);
1381 else if ((tr_ptr->flags1 & RF1_QUESTOR) ||
1382 (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10))
1384 if (see_t) msg_format(_("%^s¤Ï¸úÎϤòÄ·¤ÍÊÖ¤·¤¿¡ª", "%^s resist the effects!"), t_name);
1386 else teleport_level((t_idx == p_ptr->riding) ? 0 : t_idx);
1397 msg_format(_("%^s¤¬%s¤Ë¸þ¤«¤Ã¤Æ¸÷¤Î·õ¤òÊü¤Ã¤¿¡£", "%^s throw a Psycho-spear at %s."), m_name, t_name);
1405 dam = (r_ptr->flags2 & RF2_POWERFUL) ? (randint1(rlev * 2) + 180) : (randint1(rlev * 3 / 2) + 120);
1406 beam(m_idx, y, x, GF_PSY_SPEAR, dam, MS_PSY_SPEAR, MONSTER_TO_MONSTER);
1415 if (can_use_lite_area)
1417 msg_format(_("%^s¤¬ÊÕ¤ê¤òÌÀ¤ë¤¯¾È¤é¤·¤¿¡£", "%^s cast a spell to light up."), m_name);
1421 msg_format(_("%^s¤¬°Å°Ç¤ÎÃæ¤Ç¼ê¤ò¿¶¤Ã¤¿¡£", "%^s gestures in shadow."), m_name);
1426 if (can_use_lite_area)
1428 msg_format(_("%^s¤ÏÇò¤¤¸÷¤ËÊñ¤Þ¤ì¤¿¡£", "%^s is surrounded by a white light."), t_name);
1432 msg_format(_("%^s¤Ï°Å°Ç¤ËÊñ¤Þ¤ì¤¿¡£", "%^s is surrounded by darkness."), t_name);
1442 if (can_use_lite_area)
1444 (void)project(m_idx, 3, y, x, 0, GF_LITE_WEAK, PROJECT_GRID | PROJECT_KILL, -1);
1449 (void)project(m_idx, 3, y, x, 0, GF_DARK_WEAK, PROJECT_GRID | PROJECT_KILL, MS_DARKNESS);
1462 msg_format(_("%^s¤¬¼öʸ¤ò¾§¤¨¤Æ¼Ù°¤ËÈù¾Ð¤ó¤À¡£", "%^s casts a spell and cackles evilly."), m_name);
1466 msg_format(_("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", "%^s mumbles."), m_name);
1470 trap_creation(y, x);
1474 /* Not implemented */
1480 /* Not implemented */
1483 /* RF6_RAISE_DEAD */
1492 msg_format(_("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", "%^s mumbles."), m_name);
1496 msg_format(_("%^s¤¬»à¼ÔÉü³è¤Î¼öʸ¤ò¾§¤¨¤¿¡£", "%^s casts a spell to revive corpses."), m_name);
1504 animate_dead(m_idx, m_ptr->fy, m_ptr->fx);
1515 if (m_ptr->r_idx == MON_SERPENT || m_ptr->r_idx == MON_ZOMBI_SERPENT)
1517 msg_format(_("%^s¤¬¥À¥ó¥¸¥ç¥ó¤Î¼ç¤ò¾¤´¤·¤¿¡£", "%^s magically summons guardians of dungeons."), m_name);
1521 _(msg_format("%s¤¬ËâË¡¤Ç%s¤ò¾¤´¤·¤¿¡£", m_name, ((r_ptr->flags1 & RF1_UNIQUE) ? "¼ê²¼" : "Ãç´Ö")),
1522 msg_format("%^s magically summons %s %s.", m_name, m_poss, ((r_ptr->flags1 & RF1_UNIQUE) ? "minions" : "kin")));
1532 switch (m_ptr->r_idx)
1538 int num = 4 + randint1(3);
1539 for (k = 0; k < num; k++)
1541 count += summon_specific(m_idx, y, x, rlev, SUMMON_EAGLES, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
1548 int num = 2 + randint1(3);
1549 for (k = 0; k < num; k++)
1551 count += summon_named_creature(m_idx, y, x, MON_IE, 0);
1557 case MON_ZOMBI_SERPENT:
1558 if (r_info[MON_JORMUNGAND].cur_num < r_info[MON_JORMUNGAND].max_num && one_in_(6))
1562 msg_print(_("ÃÏÌ̤«¤é¿å¤¬¿á¤½Ð¤·¤¿¡ª", "Water blew off from the ground!"));
1564 project(t_idx, 8, y, x, 3, GF_WATER_FLOW, PROJECT_GRID | PROJECT_HIDE, -1);
1568 int num = 2 + randint1(3);
1569 for (k = 0; k < num; k++)
1571 count += summon_specific(m_idx, y, x, rlev, SUMMON_GUARDIANS, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
1578 int num = randint1(3);
1579 for (k = 0; k < num; k++)
1581 count += summon_named_creature(m_idx, y, x, MON_LOCKE_CLONE, 0);
1588 int num = 2 + randint1(3);
1589 for (k = 0; k < num; k++)
1591 count += summon_specific(m_idx, y, x, rlev, SUMMON_LOUSE, (PM_ALLOW_GROUP));
1597 summon_kin_type = r_ptr->d_char;
1599 for (k = 0; k < 4; k++)
1601 count += summon_specific(m_idx, y, x, rlev, SUMMON_KIN, (PM_ALLOW_GROUP));
1606 if (known && !see_t && count)
1621 msg_format(_("%^s¤¬¥µ¥¤¥Ð¡¼¥Ç¡¼¥â¥ó¤ò¾¤´¤·¤¿¡ª", "%^s magically summons Cyberdemons!"), m_name);
1629 if (is_friendly(m_ptr))
1631 count += summon_specific(m_idx, y, x, rlev, SUMMON_CYBER, (PM_ALLOW_GROUP));
1635 count += summon_cyber(m_idx, y, x);
1638 if (known && !see_t && count)
1653 msg_format(_("%^s¤¬ËâË¡¤ÇÃç´Ö¤ò¾¤´¤·¤¿¡ª", "%^s magically summons help!"), m_name);
1661 count += summon_specific(m_idx, y, x, rlev, 0, (u_mode));
1663 if (known && !see_t && count)
1670 /* RF6_S_MONSTERS */
1678 msg_format(_("%^s¤¬ËâË¡¤Ç¥â¥ó¥¹¥¿¡¼¤ò¾¤´¤·¤¿¡ª", "%^s magically summons monsters!"), m_name);
1686 for (k = 0; k < s_num_6; k++)
1688 count += summon_specific(m_idx, y, x, rlev, 0, (PM_ALLOW_GROUP | u_mode));
1691 if (known && !see_t && count)
1706 msg_format(_("%^s¤¬ËâË¡¤Ç¥¢¥ê¤ò¾¤´¤·¤¿¡£", "%^s magically summons ants."), m_name);
1714 for (k = 0; k < s_num_6; k++)
1716 count += summon_specific(m_idx, y, x, rlev, SUMMON_ANT, (PM_ALLOW_GROUP));
1719 if (known && !see_t && count)
1734 msg_format(_("%^s¤¬ËâË¡¤Ç¥¯¥â¤ò¾¤´¤·¤¿¡£", "%^s magically summons spiders."), m_name);
1742 for (k = 0; k < s_num_6; k++)
1744 count += summon_specific(m_idx, y, x, rlev, SUMMON_SPIDER, (PM_ALLOW_GROUP));
1747 if (known && !see_t && count)
1762 msg_format(_("%^s¤¬ËâË¡¤Ç¥Ï¥¦¥ó¥É¤ò¾¤´¤·¤¿¡£", "%^s magically summons hounds."), m_name);
1770 for (k = 0; k < s_num_4; k++)
1772 count += summon_specific(m_idx, y, x, rlev, SUMMON_HOUND, (PM_ALLOW_GROUP));
1775 if (known && !see_t && count)
1790 msg_format(_("%^s¤¬ËâË¡¤Ç¥Ò¥É¥é¤ò¾¤´¤·¤¿¡£", "%^s magically summons hydras."), m_name);
1798 for (k = 0; k < s_num_4; k++)
1800 count += summon_specific(m_idx, y, x, rlev, SUMMON_HYDRA, (PM_ALLOW_GROUP));
1803 if (known && !see_t && count)
1818 msg_format(_("%^s¤¬ËâË¡¤ÇÅ·»È¤ò¾¤´¤·¤¿¡ª", "%^s magically summons an angel!"), m_name);
1829 if ((r_ptr->flags1 & RF1_UNIQUE) && !easy_band)
1831 num += r_ptr->level/40;
1834 for (k = 0; k < num; k++)
1836 count += summon_specific(m_idx, y, x, rlev, SUMMON_ANGEL, (PM_ALLOW_GROUP));
1840 if (known && !see_t && count)
1855 msg_format(_("%^s¤¬ËâË¡¤Çº®Æ٤εÜÄ¤é¥Ç¡¼¥â¥ó¤ò¾¤´¤·¤¿¡ª",
1856 "%^s magically summons a demon from the Courts of Chaos!"), m_name);
1864 for (k = 0; k < 1; k++)
1866 count += summon_specific(m_idx, y, x, rlev, SUMMON_DEMON, (PM_ALLOW_GROUP));
1869 if (known && !see_t && count)
1884 msg_format(_("%s¤¬ËâË¡¤Ç¥¢¥ó¥Ç¥Ã¥É¤ò¾¤´¤·¤¿¡£", "%^s magically summons undead."), m_name);
1892 for (k = 0; k < 1; k++)
1894 count += summon_specific(m_idx, y, x, rlev, SUMMON_UNDEAD, (PM_ALLOW_GROUP));
1897 if (known && !see_t && count)
1912 msg_format(_("%^s¤¬ËâË¡¤Ç¥É¥é¥´¥ó¤ò¾¤´¤·¤¿¡ª", "%^s magically summons a dragon!"), m_name);
1920 for (k = 0; k < 1; k++)
1922 count += summon_specific(m_idx, y, x, rlev, SUMMON_DRAGON, (PM_ALLOW_GROUP));
1925 if (known && !see_t && count)
1932 /* RF6_S_HI_UNDEAD */
1940 msg_format(_("%s¤¬ËâË¡¤Ç¥¢¥ó¥Ç¥Ã¥É¤ò¾¤´¤·¤¿¡£", "%^s magically summons undead."), m_name);
1948 for (k = 0; k < s_num_6; k++)
1950 count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_UNDEAD, (PM_ALLOW_GROUP | u_mode));
1953 if (known && !see_t && count)
1960 /* RF6_S_HI_DRAGON */
1968 msg_format(_("%^s¤¬ËâË¡¤Ç¸ÅÂå¥É¥é¥´¥ó¤ò¾¤´¤·¤¿¡ª", "%^s magically summons ancient dragons!"), m_name);
1976 for (k = 0; k < s_num_4; k++)
1978 count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_DRAGON, (PM_ALLOW_GROUP | u_mode));
1981 if (known && !see_t && count)
1988 /* RF6_S_AMBERITES */
1996 msg_format(_("%^s¤¬¥¢¥ó¥Ð¡¼¤Î²¦Â²¤ò¾¤´¤·¤¿¡ª", "%^s magically summons Lords of Amber!"), m_name);
2004 for (k = 0; k < s_num_4; k++)
2006 count += summon_specific(m_idx, y, x, rlev, SUMMON_AMBERITES, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
2009 if (known && !see_t && count)
2024 msg_format(_("%^s¤¬ËâË¡¤ÇÆÃÊ̤ʶ¯Å¨¤ò¾¤´¤·¤¿¡ª", "%^s magically summons special opponents!"), m_name);
2032 for (k = 0; k < s_num_4; k++)
2034 count += summon_specific(m_idx, y, x, rlev, SUMMON_UNIQUE, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
2038 int non_unique_type = SUMMON_HI_UNDEAD;
2040 if ((m_ptr->sub_align & (SUB_ALIGN_GOOD | SUB_ALIGN_EVIL)) == (SUB_ALIGN_GOOD | SUB_ALIGN_EVIL))
2041 non_unique_type = 0;
2042 else if (m_ptr->sub_align & SUB_ALIGN_GOOD)
2043 non_unique_type = SUMMON_ANGEL;
2045 for (k = count; k < s_num_4; k++)
2047 count += summon_specific(m_idx, y, x, rlev, non_unique_type, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
2051 if (known && !see_t && count)
2059 if (wake_up) (void)set_monster_csleep(t_idx, 0);
2063 msg_format(_("%^s¤Ï¶²Éݤ·¤Æƨ¤²½Ð¤·¤¿¡ª", "%^s flees in terror!"), t_name);
2066 if (m_ptr->ml && maneable && !world_monster && !p_ptr->blind && (p_ptr->pclass == CLASS_IMITATOR))
2068 if (thrown_spell != 167) /* Not RF6_SPECIAL */
2070 if (p_ptr->mane_num == MAX_MANE)
2073 for (i = 0; i < p_ptr->mane_num - 1; i++)
2075 p_ptr->mane_spell[i] = p_ptr->mane_spell[i+1];
2076 p_ptr->mane_dam[i] = p_ptr->mane_dam[i+1];
2079 p_ptr->mane_spell[p_ptr->mane_num] = thrown_spell - 96;
2080 p_ptr->mane_dam[p_ptr->mane_num] = dam;
2084 p_ptr->redraw |= (PR_IMITATION);
2088 /* Remember what the monster did, if we saw it */
2092 if (thrown_spell < 32*4)
2094 r_ptr->r_flags4 |= (1L << (thrown_spell - 32*3));
2095 if (r_ptr->r_cast_spell < MAX_UCHAR) r_ptr->r_cast_spell++;
2099 else if (thrown_spell < 32*5)
2101 r_ptr->r_flags5 |= (1L << (thrown_spell - 32*4));
2102 if (r_ptr->r_cast_spell < MAX_UCHAR) r_ptr->r_cast_spell++;
2106 else if (thrown_spell < 32*6)
2108 r_ptr->r_flags6 |= (1L << (thrown_spell - 32*5));
2109 if (r_ptr->r_cast_spell < MAX_UCHAR) r_ptr->r_cast_spell++;
2113 /* Always take note of monsters that kill you */
2114 if (p_ptr->is_dead && (r_ptr->r_deaths < MAX_SHORT) && !p_ptr->inside_arena)
2116 r_ptr->r_deaths++; /* Ignore appearance difference */
2119 /* A spell was cast */