int ap_cnt;
int ac, rlev, pt;
char m_name[80], t_name[80];
- char temp[80];
+ char temp[MAX_NLEN];
bool blinked;
bool explode = FALSE, touched = FALSE, fear = FALSE;
int y_saver = t_ptr->fy;
/* Blink away */
if (blinked && m_ptr->r_idx)
{
- if (see_m)
+ if (teleport_barrier(m_idx))
{
+ if (see_m)
+ {
#ifdef JP
- msg_print("Å¥ËÀ¤Ï¾Ð¤Ã¤Æƨ¤²¤¿¡ª");
+ msg_print("Å¥ËÀ¤Ï¾Ð¤Ã¤Æƨ¤²...¤è¤¦¤È¤·¤¿¤¬¥Ð¥ê¥¢¤ËËɤ¬¤ì¤¿¡£");
#else
- msg_print("The thief flees laughing!");
+ msg_print("The thief flees laughing...? But magic barrier obstructs it.");
#endif
+ }
+ else if (known)
+ {
+ mon_fight = TRUE;
+ }
}
- else if (known)
+ else
{
- mon_fight = TRUE;
- }
+ if (see_m)
+ {
+#ifdef JP
+ msg_print("Å¥ËÀ¤Ï¾Ð¤Ã¤Æƨ¤²¤¿¡ª");
+#else
+ msg_print("The thief flees laughing!");
+#endif
+ }
+ else if (known)
+ {
+ mon_fight = TRUE;
+ }
- teleport_away(m_idx, MAX_SIGHT * 2 + 5, 0L);
+ teleport_away(m_idx, MAX_SIGHT * 2 + 5, 0L);
+ }
}
return TRUE;
}
}
+ /* Hex */
+ if (multiply_barrier(m_idx)) k = 8;
+
/* Hack -- multiply slower in crowded areas */
if ((k < 4) && (!k || !randint0(k * MON_MULT_ADJ)))
{
excise_object_idx(this_o_idx);
/* Forget mark */
- o_ptr->marked = 0;
+ o_ptr->marked &= OM_TOUCHED;
/* Forget location */
o_ptr->iy = o_ptr->ix = 0;
void monster_gain_exp(int m_idx, int s_idx)
{
- monster_type *m_ptr = &m_list[m_idx];
- monster_race *r_ptr = &r_info[m_ptr->r_idx];
- monster_race *s_ptr = &r_info[s_idx];
+ monster_type *m_ptr;
+ monster_race *r_ptr;
+ monster_race *s_ptr;
int new_exp;
+ /* Paranoia */
+ if (m_idx <= 0 || s_idx <= 0) return;
+
+ m_ptr = &m_list[m_idx];
+
+ /* Paranoia -- Skip dead monsters */
+ if (!m_ptr->r_idx) return;
+
+ r_ptr = &r_info[m_ptr->r_idx];
+ s_ptr = &r_info[s_idx];
+
if (p_ptr->inside_battle) return;
if (!r_ptr->next_exp) return;