- {
- int x, y;
- cave_type *c_ptr;
- feature_type *f_ptr, *mimic_f_ptr;
-
- if (!get_rep_dir2(&dir)) return FALSE;
- y = py + ddy[dir];
- x = px + ddx[dir];
- c_ptr = &cave[y][x];
- f_ptr = &f_info[c_ptr->feat];
- mimic_f_ptr = &f_info[get_feat_mimic(c_ptr)];
-
- if (music_singing_any()) stop_singing();
-
- if (!have_flag(mimic_f_ptr->flags, FF_HURT_ROCK))
- {
-#ifdef JP
- msg_print("¤³¤ÎÃÏ·Á¤Ï¿©¤Ù¤é¤ì¤Ê¤¤¡£");
-#else
- msg_print("You cannot eat this feature.");
-#endif
- break;
- }
- else if (have_flag(f_ptr->flags, FF_PERMANENT))
- {
-#ifdef JP
- msg_format("¤¤¤Æ¤Ã¡ª¤³¤Î%s¤Ï¤¢¤Ê¤¿¤Î»õ¤è¤ê¹Å¤¤¡ª", f_name + mimic_f_ptr->name);
-#else
- msg_format("Ouch! This %s is harder than your teeth!", f_name + mimic_f_ptr->name);
-#endif
- break;
- }
- else if (c_ptr->m_idx)
- {
- monster_type *m_ptr = &m_list[c_ptr->m_idx];
-#ifdef JP
- msg_print("²¿¤«¤¬¼ÙË⤷¤Æ¤¤¤Þ¤¹¡ª");
-#else
- msg_print("There's something in the way!");
-#endif
-
- if (!m_ptr->ml || !is_pet(m_ptr)) py_attack(y, x, 0);
- break;
- }
- else if (have_flag(f_ptr->flags, FF_TREE))
- {
-#ifdef JP
- msg_print("ÌÚ¤ÎÌ£¤Ï¹¥¤¤¸¤ã¤Ê¤¤¡ª");
-#else
- msg_print("You don't like the woody taste!");
-#endif
- break;
- }
- else if (have_flag(f_ptr->flags, FF_GLASS))
- {
-#ifdef JP
- msg_print("¥¬¥é¥¹¤ÎÌ£¤Ï¹¥¤¤¸¤ã¤Ê¤¤¡ª");
-#else
- msg_print("You don't like the glassy taste!");
-#endif
- break;
- }
- else if (have_flag(f_ptr->flags, FF_DOOR) || have_flag(f_ptr->flags, FF_CAN_DIG))
- {
- (void)set_food(p_ptr->food + 3000);
- }
- else if (have_flag(f_ptr->flags, FF_MAY_HAVE_GOLD) || have_flag(f_ptr->flags, FF_HAS_GOLD))
- {
- (void)set_food(p_ptr->food + 5000);
- }
- else
- {
-#ifdef JP
- msg_format("¤³¤Î%s¤Ï¤È¤Æ¤â¤ª¤¤¤·¤¤¡ª", f_name + mimic_f_ptr->name);
-#else
- msg_format("This %s is very filling!", f_name + mimic_f_ptr->name);
-#endif
- (void)set_food(p_ptr->food + 10000);
- }
-
- /* Destroy the wall */
- cave_alter_feat(y, x, FF_HURT_ROCK);
-
- /* Move the player */
- (void)move_player_effect(y, x, MPE_DONT_PICKUP);
- }