OSDN Git Service

[Refactor] #37353 ペット処理を cmd4.c から cmd-pet.c/h へ分離。
[hengband/hengband.git] / src / melee2.c
index 314bf6a..e48c48a 100644 (file)
@@ -1,6 +1,6 @@
-/*!
+/*!
  * @file melee2.c
- * @brief ¥â¥ó¥¹¥¿¡¼¤ÎÆü쵻ǽ¤È°ÜÆ°½èÍý/ Monster spells and movement
+ * @brief モンスターの特殊技能と移動処理/ Monster spells and movement
  * @date 2014/01/17
  * @author
  * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke\n
  */
 
 #include "angband.h"
+#include "cmd-pet.h"
 
-#define SPEAK_CHANCE 8
-#define GRINDNOISE 20
-#define CYBERNOISE 20
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤¬Å¨¤ËÀ᤹ܶ¤ë¤¿¤á¤ÎÊý¸þ¤ò·è¤á¤ë /
+ * @brief モンスターが敵に接近するための方向を決める /
  * Calculate the direction to the next enemy
- * @param m_idx ¥â¥ó¥¹¥¿¡¼¤Î»²¾ÈID
- * @param mm °ÜÆ°¤¹¤ë¤Ù¤­Êý³ÑID¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
- * @return Êý¸þ¤¬³ÎÄꤷ¤¿¾ì¹çTRUE¡¢À᤹ܶ¤ëŨ¤¬¤½¤â¤½¤â¤¤¤Ê¤¤¾ì¹çFALSE¤òÊÖ¤¹
+ * @param m_idx モンスターの参照ID
+ * @param mm ç§»å\8b\95ã\81\99ã\82\8bã\81¹ã\81\8dæ\96¹è§\92IDã\82\92è¿\94ã\81\99å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @return 方向が確定した場合TRUE、接近する敵がそもそもいない場合FALSEを返す
  */
-static bool get_enemy_dir(int m_idx, int *mm)
+static bool get_enemy_dir(MONSTER_IDX m_idx, int *mm)
 {
        int i;
        int x = 0, y = 0;
-       int t_idx;
+       IDX t_idx;
        int start;
        int plus = 1;
 
@@ -61,7 +59,7 @@ static bool get_enemy_dir(int m_idx, int *mm)
                /* Scan thru all monsters */
                for (i = start; ((i < start + m_max) && (i > start - m_max)); i+=plus)
                {
-                       int dummy = (i % m_max);
+                       IDX dummy = (i % m_max);
 
                        if (!dummy) continue;
 
@@ -185,16 +183,16 @@ static bool get_enemy_dir(int m_idx, int *mm)
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤¬Å¨¥â¥ó¥¹¥¿¡¼¤Ë¹Ô¤¦ÂÇ·â½èÍý /
+ * @brief モンスターが敵モンスターに行う打撃処理 /
  * Hack, based on mon_take_hit... perhaps all monster attacks on other monsters should use this?
- * @param m_idx ÌÜɸ¤È¤Ê¤ë¥â¥ó¥¹¥¿¡¼¤Î»²¾ÈID
- * @param dam ¥À¥á¡¼¥¸ÎÌ
- * @param fear ÌÜɸ¤È¤Ê¤ë¥â¥ó¥¹¥¿¡¼¤Î¶²¹²¾õÂÖ¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
- * @param note ÌÜɸ¥â¥ó¥¹¥¿¡¼¤¬»àË´¤·¤¿¾ì¹ç¤ÎÆÃÊÌ¥á¥Ã¥»¡¼¥¸(NULL¤Ê¤é¤Ðɸ½àɽ¼¨¤ò¹Ô¤¦)
- * @param who ÂÇ·â¤ò¹Ô¤Ã¤¿¥â¥ó¥¹¥¿¡¼¤Î»²¾ÈID
- * @return ¤Ê¤·
+ * @param m_idx 目標となるモンスターの参照ID
+ * @param dam ダメージ量
+ * @param fear ç\9b®æ¨\99ã\81¨ã\81ªã\82\8bã\83¢ã\83³ã\82¹ã\82¿ã\83¼ã\81®æ\81\90æ\85\8cç\8a¶æ\85\8bã\82\92è¿\94ã\81\99å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @param note 目標モンスターが死亡した場合の特別メッセージ(NULLならば標準表示を行う)
+ * @param who 打撃を行ったモンスターの参照ID
+ * @return なし
  */
-void mon_take_hit_mon(int m_idx, int dam, bool *fear, cptr note, int who)
+void mon_take_hit_mon(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note, IDX who)
 {
        monster_type    *m_ptr = &m_list[m_idx];
 
@@ -226,12 +224,7 @@ void mon_take_hit_mon(int m_idx, int dam, bool *fear, cptr note, int who)
        {
                if (seen)
                {
-#ifdef JP
-msg_format("%^s¤Ï¥À¥á¡¼¥¸¤ò¼õ¤±¤Ê¤¤¡£", m_name);
-#else
-                       msg_format("%^s is unharmed.", m_name);
-#endif
-
+                       msg_format(_("%^sはダメージを受けない。", "%^s is unharmed."), m_name);
                }
 
                return;
@@ -248,19 +241,14 @@ msg_format("%^s
                {
                        if (seen)
                        {
-#ifdef JP
-msg_format("%^s¤Ï¥À¥á¡¼¥¸¤ò¼õ¤±¤Ê¤¤¡£", m_name);
-#else
-                               msg_format("%^s is unharmed.", m_name);
-#endif
-
+                               msg_format(_("%^sはダメージを受けない。", "%^s is unharmed."), m_name);
                        }
                        return;
                }
        }
 
        /* Hurt it */
-       m_ptr->hp -= dam;
+       m_ptr->hp -= (s16b)dam;
 
        /* It is dead now... or is it? */
        if (m_ptr->hp < 0)
@@ -294,32 +282,17 @@ msg_format("%^s
                                /* Death by special attack */
                                else if (note)
                                {
-#ifdef JP
-msg_format("%^s%s", m_name, note);
-#else
-                                       msg_format("%^s%s", m_name, note);
-#endif
-
+                                       msg_format(_("%^s%s", "%^s%s"), m_name, note);
                                }
                                /* Death by normal attack -- nonliving monster */
                                else if (!monster_living(r_ptr))
                                {
-#ifdef JP
-msg_format("%^s¤ÏÇ˲õ¤µ¤ì¤¿¡£", m_name);
-#else
-                                       msg_format("%^s is destroyed.", m_name);
-#endif
-
+                                       msg_format(_("%^sは破壊された。", "%^s is destroyed."), m_name);
                                }
                                /* Death by normal attack -- living monster */
                                else
                                {
-#ifdef JP
-msg_format("%^s¤Ï»¦¤µ¤ì¤¿¡£", m_name);
-#else
-                                       msg_format("%^s is killed.", m_name);
-#endif
-
+                                       msg_format(_("%^sは殺された。", "%^s is killed."), m_name);
                                }
                        }
 
@@ -387,19 +360,13 @@ msg_format("%^s
 
        if (p_ptr->riding && (p_ptr->riding == m_idx) && (dam > 0))
        {
-               char m_name[80];
-
                /* Extract monster name */
                monster_desc(m_name, m_ptr, 0);
 
                if (m_ptr->hp > m_ptr->maxhp/3) dam = (dam + 1) / 2;
                if (rakuba((dam > 200) ? 200 : dam, FALSE))
                {
-#ifdef JP
-msg_format("%^s¤Ë¿¶¤êÍî¤È¤µ¤ì¤¿¡ª", m_name);
-#else
-                               msg_format("You have thrown off from %s!", m_name);
-#endif
+                       msg_format(_("%^sに振り落とされた!", "You have thrown off from %s!"), m_name);
                }
        }
 
@@ -409,10 +376,10 @@ msg_format("%^s
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤¬¥×¥ì¥¤¥ä¡¼¤«¤éƨÁö¤¹¤ë¤«¤É¤¦¤«¤òÊÖ¤¹ /
+ * @brief モンスターがプレイヤーから逃走するかどうかを返す /
  * Returns whether a given monster will try to run from the player.
- * @param m_idx Æ¨Áö¤¹¤ë¥â¥ó¥¹¥¿¡¼¤Î»²¾ÈID
- * @return ¥â¥ó¥¹¥¿¡¼¤¬¥×¥ì¥¤¥ä¡¼¤«¤éƨÁö¤¹¤ë¤Ê¤é¤ÐTRUE¤òÊÖ¤¹¡£
+ * @param m_idx 逃走するモンスターの参照ID
+ * @return モンスターがプレイヤーから逃走するならばTRUEを返す。
  * @details
  * Monsters will attempt to avoid very powerful players.  See below.\n
  *\n
@@ -424,7 +391,7 @@ msg_format("%^s
  * Note that this function is responsible for about one to five percent\n
  * of the processor use in normal conditions...\n
  */
-static int mon_will_run(int m_idx)
+static bool mon_will_run(MONSTER_IDX m_idx)
 {
        monster_type *m_ptr = &m_list[m_idx];
 
@@ -433,8 +400,8 @@ static int mon_will_run(int m_idx)
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
 
        u16b p_lev, m_lev;
-       u16b p_chp, p_mhp;
-       u16b m_chp, m_mhp;
+       HIT_POINT p_chp, p_mhp;
+       HIT_POINT m_chp, m_mhp;
        u32b p_val, m_val;
 
 #endif
@@ -491,14 +458,14 @@ static int mon_will_run(int m_idx)
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤¬¥×¥ì¥¤¥ä¡¼¤Ë¸þ¤±¤Æ±óµ÷Î¥¹¶·â¤ò¹Ô¤¦¤³¤È¤¬²Äǽ¤Ê¥Þ¥¹¤òÁöºº¤¹¤ë /
+ * @brief モンスターがプレイヤーに向けて遠距離攻撃を行うことが可能なマスを走査する /
  * Search spell castable grid
- * @param m_idx ¥â¥ó¥¹¥¿¡¼¤Î»²¾ÈID
- * @param yp Å¬¤·¤¿¥Þ¥¹¤ÎYºÂɸ¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
- * @param xp Å¬¤·¤¿¥Þ¥¹¤ÎXºÂɸ¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
- * @return Í­¸ú¤Ê¥Þ¥¹¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹
+ * @param m_idx モンスターの参照ID
+ * @param yp é\81©ã\81\97ã\81\9fã\83\9eã\82¹ã\81®Y座æ¨\99ã\82\92è¿\94ã\81\99å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @param xp é\81©ã\81\97ã\81\9fã\83\9eã\82¹ã\81®X座æ¨\99ã\82\92è¿\94ã\81\99å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @return 有効なマスがあった場合TRUEを返す
  */
-static bool get_moves_aux2(int m_idx, int *yp, int *xp)
+static bool get_moves_aux2(MONSTER_IDX m_idx, int *yp, int *xp)
 {
        int i, y, x, y1, x1, best = 999;
 
@@ -514,7 +481,7 @@ static bool get_moves_aux2(int m_idx, int *yp, int *xp)
        x1 = m_ptr->fx;
 
        /* Monster can already cast spell to player */
-       if (projectable(y1, x1, py, px)) return (FALSE);
+       if (projectable(y1, x1, p_ptr->y, p_ptr->x)) return (FALSE);
 
        /* Set current grid cost */
        now_cost = cave[y1][x1].cost;
@@ -557,7 +524,7 @@ static bool get_moves_aux2(int m_idx, int *yp, int *xp)
 
                if (now_cost < cost) continue;
 
-               if (!projectable(y, x, py, px)) continue;
+               if (!projectable(y, x, p_ptr->y, p_ptr->x)) continue;
 
                /* Accept louder sounds */
                if (best < cost) continue;
@@ -576,13 +543,13 @@ static bool get_moves_aux2(int m_idx, int *yp, int *xp)
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤¬¥×¥ì¥¤¥ä¡¼¤Ë¸þ¤±¤ÆÀ᤹ܶ¤ë¤³¤È¤¬²Äǽ¤Ê¥Þ¥¹¤òÁöºº¤¹¤ë /
+ * @brief モンスターがプレイヤーに向けて接近することが可能なマスを走査する /
  * Choose the "best" direction for "flowing"
- * @param m_idx ¥â¥ó¥¹¥¿¡¼¤Î»²¾ÈID
- * @param yp °ÜÆ°Àè¤Î¥Þ¥¹¤ÎYºÂɸ¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
- * @param xp °ÜÆ°Àè¤Î¥Þ¥¹¤ÎXºÂɸ¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
- * @param no_flow ¥â¥ó¥¹¥¿¡¼¤ËFLOW¥Õ¥é¥°¤¬·Ð¤Ã¤Æ¤¤¤Ê¤¤¾õÂÖ¤ÇTRUE
- * @return Í­¸ú¤Ê¥Þ¥¹¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹
+ * @param m_idx モンスターの参照ID
+ * @param yp ç§»å\8b\95å\85\88ã\81®ã\83\9eã\82¹ã\81®Y座æ¨\99ã\82\92è¿\94ã\81\99å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @param xp ç§»å\8b\95å\85\88ã\81®ã\83\9eã\82¹ã\81®X座æ¨\99ã\82\92è¿\94ã\81\99å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @param no_flow モンスターにFLOWフラグが経っていない状態でTRUE
+ * @return 有効なマスがあった場合TRUEを返す
  * @details
  * Note that ghosts and rock-eaters are never allowed to "flow",\n
  * since they should move directly towards the player.\n
@@ -603,7 +570,7 @@ static bool get_moves_aux2(int m_idx, int *yp, int *xp)
  * being close enough to chase directly.  I have no idea what will\n
  * happen if you combine "smell" with low "aaf" values.\n
  */
-static bool get_moves_aux(int m_idx, int *yp, int *xp, bool no_flow)
+static bool get_moves_aux(MONSTER_IDX m_idx, int *yp, int *xp, bool no_flow)
 {
        int i, y, x, y1, x1, best;
 
@@ -615,8 +582,8 @@ static bool get_moves_aux(int m_idx, int *yp, int *xp, bool no_flow)
 
        /* Can monster cast attack spell? */
        if (r_ptr->flags4 & (RF4_ATTACK_MASK) ||
-           r_ptr->flags5 & (RF5_ATTACK_MASK) ||
-           r_ptr->flags6 & (RF6_ATTACK_MASK))
+           r_ptr->a_ability_flags1 & (RF5_ATTACK_MASK) ||
+           r_ptr->a_ability_flags2 & (RF6_ATTACK_MASK))
        {
                /* Can move spell castable grid? */
                if (get_moves_aux2(m_idx, yp, xp)) return (TRUE);
@@ -634,7 +601,7 @@ static bool get_moves_aux(int m_idx, int *yp, int *xp, bool no_flow)
        x1 = m_ptr->fx;
 
        /* Hack -- Player can see us, run towards him */
-       if (player_has_los_bold(y1, x1) && projectable(py, px, y1, x1)) return (FALSE);
+       if (player_has_los_bold(y1, x1) && projectable(p_ptr->y, p_ptr->x, y1, x1)) return (FALSE);
 
        /* Monster grid */
        c_ptr = &cave[y1][x1];
@@ -649,7 +616,7 @@ static bool get_moves_aux(int m_idx, int *yp, int *xp, bool no_flow)
        else if (c_ptr->when)
        {
                /* Too old smell */
-               if (cave[py][px].when - c_ptr->when > 127) return (FALSE);
+               if (cave[p_ptr->y][p_ptr->x].when - c_ptr->when > 127) return (FALSE);
 
                use_scent = TRUE;
                best = 0;
@@ -698,8 +665,8 @@ static bool get_moves_aux(int m_idx, int *yp, int *xp, bool no_flow)
                }
 
                /* Hack -- Save the "twiddled" location */
-               (*yp) = py + 16 * ddy_ddd[i];
-               (*xp) = px + 16 * ddx_ddd[i];
+               (*yp) = p_ptr->y + 16 * ddy_ddd[i];
+               (*xp) = p_ptr->x + 16 * ddx_ddd[i];
        }
 
        /* No legal move (?) */
@@ -711,18 +678,18 @@ static bool get_moves_aux(int m_idx, int *yp, int *xp, bool no_flow)
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤¬¥×¥ì¥¤¥ä¡¼¤«¤éƨÁö¤¹¤ë¤³¤È¤¬²Äǽ¤Ê¥Þ¥¹¤òÁöºº¤¹¤ë /
+ * @brief モンスターがプレイヤーから逃走することが可能なマスを走査する /
  * Provide a location to flee to, but give the player a wide berth.
- * @param m_idx ¥â¥ó¥¹¥¿¡¼¤Î»²¾ÈID
- * @param yp °ÜÆ°Àè¤Î¥Þ¥¹¤ÎYºÂɸ¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
- * @param xp °ÜÆ°Àè¤Î¥Þ¥¹¤ÎXºÂɸ¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
- * @return Í­¸ú¤Ê¥Þ¥¹¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹
+ * @param m_idx モンスターの参照ID
+ * @param yp ç§»å\8b\95å\85\88ã\81®ã\83\9eã\82¹ã\81®Y座æ¨\99ã\82\92è¿\94ã\81\99å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @param xp ç§»å\8b\95å\85\88ã\81®ã\83\9eã\82¹ã\81®X座æ¨\99ã\82\92è¿\94ã\81\99å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @return 有効なマスがあった場合TRUEを返す
  * @details
  * A monster may wish to flee to a location that is behind the player,\n
  * but instead of heading directly for it, the monster should "swerve"\n
  * around the player so that he has a smaller chance of getting hit.\n
  */
-static bool get_fear_moves_aux(int m_idx, int *yp, int *xp)
+static bool get_fear_moves_aux(MONSTER_IDX m_idx, int *yp, int *xp)
 {
        int y, x, y1, x1, fy, fx, gy = 0, gx = 0;
        int score = -1;
@@ -920,12 +887,12 @@ static sint *dist_offsets_x[10] =
 };
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤¬Æ¨¤²¹þ¤á¤ë°ÂÁ´¤ÊÃÏÅÀ¤òÊÖ¤¹ /
+ * @brief モンスターが逃げ込める安全な地点を返す /
  * Choose a "safe" location near a monster for it to run toward.
- * @param m_idx ¥â¥ó¥¹¥¿¡¼¤Î»²¾ÈID
- * @param yp °ÜÆ°Àè¤Î¥Þ¥¹¤ÎYºÂɸ¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
- * @param xp °ÜÆ°Àè¤Î¥Þ¥¹¤ÎXºÂɸ¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
- * @return Í­¸ú¤Ê¥Þ¥¹¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹
+ * @param m_idx モンスターの参照ID
+ * @param yp ç§»å\8b\95å\85\88ã\81®ã\83\9eã\82¹ã\81®Y座æ¨\99ã\82\92è¿\94ã\81\99å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @param xp ç§»å\8b\95å\85\88ã\81®ã\83\9eã\82¹ã\81®X座æ¨\99ã\82\92è¿\94ã\81\99å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @return 有効なマスがあった場合TRUEを返す
  * @details
  * A location is "safe" if it can be reached quickly and the player\n
  * is not able to fire into it (it isn't a "clean shot").  So, this will\n
@@ -937,7 +904,7 @@ static sint *dist_offsets_x[10] =
  *\n
  * Return TRUE if a safe location is available.\n
  */
-static bool find_safety(int m_idx, int *yp, int *xp)
+static bool find_safety(MONSTER_IDX m_idx, int *yp, int *xp)
 {
        monster_type *m_ptr = &m_list[m_idx];
 
@@ -986,10 +953,10 @@ static bool find_safety(int m_idx, int *yp, int *xp)
                        }
 
                        /* Check for absence of shot (more or less) */
-                       if (!projectable(py, px, y, x))
+                       if (!projectable(p_ptr->y, p_ptr->x, y, x))
                        {
                                /* Calculate distance from player */
-                               dis = distance(y, x, py, px);
+                               dis = distance(y, x, p_ptr->y, p_ptr->x);
 
                                /* Remember if further than previous */
                                if (dis > gdis)
@@ -1019,19 +986,19 @@ static bool find_safety(int m_idx, int *yp, int *xp)
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤¬±£¤ìÀø¤á¤ëÃÏÅÀ¤òÊÖ¤¹ /
+ * @brief モンスターが隠れ潜める地点を返す /
  * Choose a good hiding place near a monster for it to run toward.
- * @param m_idx ¥â¥ó¥¹¥¿¡¼¤Î»²¾ÈID
- * @param yp °ÜÆ°Àè¤Î¥Þ¥¹¤ÎYºÂɸ¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
- * @param xp °ÜÆ°Àè¤Î¥Þ¥¹¤ÎXºÂɸ¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
- * @return Í­¸ú¤Ê¥Þ¥¹¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹
+ * @param m_idx モンスターの参照ID
+ * @param yp ç§»å\8b\95å\85\88ã\81®ã\83\9eã\82¹ã\81®Y座æ¨\99ã\82\92è¿\94ã\81\99å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @param xp ç§»å\8b\95å\85\88ã\81®ã\83\9eã\82¹ã\81®X座æ¨\99ã\82\92è¿\94ã\81\99å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @return 有効なマスがあった場合TRUEを返す
  * @details
  * Pack monsters will use this to "ambush" the player and lure him out\n
  * of corridors into open space so they can swarm him.\n
  *\n
  * Return TRUE if a good location is available.\n
  */
-static bool find_hiding(int m_idx, int *yp, int *xp)
+static bool find_hiding(MONSTER_IDX m_idx, int *yp, int *xp)
 {
        monster_type *m_ptr = &m_list[m_idx];
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
@@ -1066,10 +1033,10 @@ static bool find_hiding(int m_idx, int *yp, int *xp)
                        if (!monster_can_enter(y, x, r_ptr, 0)) continue;
 
                        /* Check for hidden, available grid */
-                       if (!projectable(py, px, y, x) && clean_shot(fy, fx, y, x, FALSE))
+                       if (!projectable(p_ptr->y, p_ptr->x, y, x) && clean_shot(fy, fx, y, x, FALSE))
                        {
                                /* Calculate distance from player */
-                               dis = distance(y, x, py, px);
+                               dis = distance(y, x, p_ptr->y, p_ptr->x);
 
                                /* Remember if closer than previous */
                                if (dis < gdis && dis >= 2)
@@ -1099,20 +1066,20 @@ static bool find_hiding(int m_idx, int *yp, int *xp)
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤Î°ÜÆ°Êý¸þ¤òÊÖ¤¹ /
+ * @brief モンスターの移動方向を返す /
  * Choose "logical" directions for monster movement
- * @param m_idx ¥â¥ó¥¹¥¿¡¼¤Î»²¾ÈID
- * @param mm °ÜÆ°Êý¸þ¤òÊÖ¤¹Êý¸þID¤Î»²¾È¥Ý¥¤¥ó¥¿
- * @return Í­¸úÊý¸þ¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹
+ * @param m_idx モンスターの参照ID
+ * @param mm ç§»å\8b\95æ\96¹å\90\91ã\82\92è¿\94ã\81\99æ\96¹å\90\91IDã\81®å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @return 有効方向があった場合TRUEを返す
  */
-static bool get_moves(int m_idx, int *mm)
+static bool get_moves(MONSTER_IDX m_idx, int *mm)
 {
        monster_type *m_ptr = &m_list[m_idx];
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
-       int          y, ay, x, ax;
+       int          y = 0, ay, x = 0, ax;
        int          move_val = 0;
-       int          y2 = py;
-       int          x2 = px;
+       int          y2 = p_ptr->y;
+       int          x2 = p_ptr->x;
        bool         done = FALSE;
        bool         will_run = mon_will_run(m_idx);
        cave_type    *c_ptr;
@@ -1139,7 +1106,7 @@ static bool get_moves(int m_idx, int *mm)
 
        if (!done && !will_run && is_hostile(m_ptr) &&
            (r_ptr->flags1 & RF1_FRIENDS) &&
-           ((los(m_ptr->fy, m_ptr->fx, py, px) && projectable(m_ptr->fy, m_ptr->fx, py, px)) ||
+           ((los(m_ptr->fy, m_ptr->fx, p_ptr->y, p_ptr->x) && projectable(m_ptr->fy, m_ptr->fx, p_ptr->y, p_ptr->x)) ||
            (cave[m_ptr->fy][m_ptr->fx].dist < MAX_SIGHT / 2)))
        {
        /*
@@ -1154,8 +1121,8 @@ static bool get_moves(int m_idx, int *mm)
                        /* Count room grids next to player */
                        for (i = 0; i < 8; i++)
                        {
-                               int xx = px + ddx_ddd[i];
-                               int yy = py + ddy_ddd[i];
+                               int xx = p_ptr->x + ddx_ddd[i];
+                               int yy = p_ptr->y + ddy_ddd[i];
 
                                if (!in_bounds2(yy, xx)) continue;
 
@@ -1168,8 +1135,8 @@ static bool get_moves(int m_idx, int *mm)
                                        room++;
                                }
                        }
-                       if (cave[py][px].info & CAVE_ROOM) room -= 2;
-                       if (!r_ptr->flags4 && !r_ptr->flags5 && !r_ptr->flags6) room -= 2;
+                       if (cave[p_ptr->y][p_ptr->x].info & CAVE_ROOM) room -= 2;
+                       if (!r_ptr->flags4 && !r_ptr->a_ability_flags1 && !r_ptr->a_ability_flags2) room -= 2;
 
                        /* Not in a room and strong player */
                        if (room < (8 * (p_ptr->chp + p_ptr->csp)) /
@@ -1189,15 +1156,15 @@ static bool get_moves(int m_idx, int *mm)
                        for (i = 0; i < 8; i++)
                        {
                                /* Pick squares near player (semi-randomly) */
-                               y2 = py + ddy_ddd[(m_idx + i) & 7];
-                               x2 = px + ddx_ddd[(m_idx + i) & 7];
+                               y2 = p_ptr->y + ddy_ddd[(m_idx + i) & 7];
+                               x2 = p_ptr->x + ddx_ddd[(m_idx + i) & 7];
 
                                /* Already there? */
                                if ((m_ptr->fy == y2) && (m_ptr->fx == x2))
                                {
                                        /* Attack the player */
-                                       y2 = py;
-                                       x2 = px;
+                                       y2 = p_ptr->y;
+                                       x2 = p_ptr->x;
 
                                        break;
                                }
@@ -1433,12 +1400,12 @@ static bool get_moves(int m_idx, int *mm)
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤«¤éŨ¥â¥ó¥¹¥¿¡¼¤Ø¤ÎÌ¿ÃæȽÄê
- * @param power ÂÇ·â°À­¤Ë¤è¤ë´ðËÜÌ¿ÃæÃÍ
- * @param level ¹¶·â¦¥â¥ó¥¹¥¿¡¼¤Î¥ì¥Ù¥ë
- * @param ac ÌÜɸ¥â¥ó¥¹¥¿¡¼¤ÎAC
- * @param stun ¹¶·â¦¥â¥ó¥¹¥¿¡¼¤¬Û¯Û°¾õÂ֤ʤéTRUE¤òÊÖ¤¹
- * @return Ì¿Ãæ¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
+ * @brief モンスターから敵モンスターへの命中判定
+ * @param power 打撃属性による基本命中値
+ * @param level 攻撃側モンスターのレベル
+ * @param ac 目標モンスターのAC
+ * @param stun 攻撃側モンスターが朦朧状態ならTRUEを返す
+ * @return 命中ならばTRUEを返す
  */
 static int check_hit2(int power, int level, int ac, int stun)
 {
@@ -1470,12 +1437,12 @@ static int check_hit2(int power, int level, int ac, int stun)
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤«¤éŨ¥â¥ó¥¹¥¿¡¼¤Ø¤ÎÂǷ⹶·â½èÍý
- * @param m_idx ¹¶·â¦¥â¥ó¥¹¥¿¡¼¤Î»²¾ÈID
- * @param t_idx ÌÜɸ¦¥â¥ó¥¹¥¿¡¼¤Î»²¾ÈID
- * @return ¼ÂºÝ¤ËÂÇ·â½èÍý¤¬¹Ô¤ï¤ì¤¿¾ì¹çTRUE¤òÊÖ¤¹
+ * @brief モンスターから敵モンスターへの打撃攻撃処理
+ * @param m_idx 攻撃側モンスターの参照ID
+ * @param t_idx 目標側モンスターの参照ID
+ * @return 実際に打撃処理が行われた場合TRUEを返す
  */
-static bool monst_attack_monst(int m_idx, int t_idx)
+static bool monst_attack_monst(MONSTER_IDX m_idx, IDX t_idx)
 {
        monster_type    *m_ptr = &m_list[m_idx];
        monster_type    *t_ptr = &m_list[t_idx];
@@ -1536,8 +1503,8 @@ static bool monst_attack_monst(int m_idx, int t_idx)
        {
                bool obvious = FALSE;
 
-               int power = 0;
-               int damage = 0;
+               HIT_POINT power = 0;
+               HIT_POINT damage = 0;
 
                cptr act = NULL;
 
@@ -1579,179 +1546,104 @@ static bool monst_attack_monst(int m_idx, int t_idx)
                        {
                        case RBM_HIT:
                                {
-#ifdef JP
-act = "%s¤ò²¥¤Ã¤¿¡£";
-#else
-                                       act = "hits %s.";
-#endif
-
+                                       act = _("%sを殴った。", "hits %s.");
                                        touched = TRUE;
                                        break;
                                }
 
                        case RBM_TOUCH:
                                {
-#ifdef JP
-act = "%s¤ò¿¨¤Ã¤¿¡£";
-#else
-                                       act = "touches %s.";
-#endif
-
+                                       act = _("%sを触った。", "touches %s.");
                                        touched = TRUE;
                                        break;
                                }
 
                        case RBM_PUNCH:
                                {
-#ifdef JP
-act = "%s¤ò¥Ñ¥ó¥Á¤·¤¿¡£";
-#else
-                                       act = "punches %s.";
-#endif
-
+                                       act = _("%sをパンチした。", "punches %s.");
                                        touched = TRUE;
                                        break;
                                }
 
                        case RBM_KICK:
                                {
-#ifdef JP
-act = "%s¤ò½³¤Ã¤¿¡£";
-#else
-                                       act = "kicks %s.";
-#endif
-
+                                       act = _("%sを蹴った。", "kicks %s.");
                                        touched = TRUE;
                                        break;
                                }
 
                        case RBM_CLAW:
                                {
-#ifdef JP
-act = "%s¤ò¤Ò¤Ã¤«¤¤¤¿¡£";
-#else
-                                       act = "claws %s.";
-#endif
-
+                                       act = _("%sをひっかいた。", "claws %s.");
                                        touched = TRUE;
                                        break;
                                }
 
                        case RBM_BITE:
                                {
-#ifdef JP
-act = "%s¤ò³ú¤ó¤À¡£";
-#else
-                                       act = "bites %s.";
-#endif
-
+                                       act = _("%sを噛んだ。", "bites %s.");
                                        touched = TRUE;
                                        break;
                                }
 
                        case RBM_STING:
                                {
-#ifdef JP
-act = "%s¤ò»É¤·¤¿¡£";
-#else
-                                       act = "stings %s.";
-#endif
-
+                                       act = _("%sを刺した。", "stings %s.");
                                        touched = TRUE;
                                        break;
                                }
 
                        case RBM_SLASH:
                                {
-#ifdef JP
-act = "%s¤ò»Â¤Ã¤¿¡£";
-#else
-                                       act = "slashes %s.";
-#endif
-
+                                       act = _("%sを斬った。", "slashes %s.");
                                        break;
                                }
 
                        case RBM_BUTT:
                                {
-#ifdef JP
-act = "%s¤ò³Ñ¤ÇÆͤ¤¤¿¡£";
-#else
-                                       act = "butts %s.";
-#endif
-
+                                       act = _("%sを角で突いた。", "butts %s.");
                                        touched = TRUE;
                                        break;
                                }
 
                        case RBM_CRUSH:
                                {
-#ifdef JP
-act = "%s¤ËÂÎÅö¤ê¤·¤¿¡£";
-#else
-                                       act = "crushes %s.";
-#endif
-
+                                       act = _("%sに体当りした。", "crushes %s.");
                                        touched = TRUE;
                                        break;
                                }
 
                        case RBM_ENGULF:
                                {
-#ifdef JP
-act = "%s¤ò°û¤ß¹þ¤ó¤À¡£";
-#else
-                                       act = "engulfs %s.";
-#endif
-
+                                       act = _("%sを飲み込んだ。", "engulfs %s.");
                                        touched = TRUE;
                                        break;
                                }
 
                        case RBM_CHARGE:
                                {
-#ifdef JP
-act = "%s¤ËÀÁµá½ñ¤ò¤è¤³¤·¤¿¡£";
-#else
-                                       act = "charges %s.";
-#endif
-
+                                       act = _("%sに請求書をよこした。", "charges %s.");
                                        touched = TRUE;
                                        break;
                                }
 
                        case RBM_CRAWL:
                                {
-#ifdef JP
-act = "%s¤ÎÂΤξå¤òÇ礤²ó¤Ã¤¿¡£";
-#else
-                                       act = "crawls on %s.";
-#endif
-
+                                       act = _("%sの体の上を這い回った。", "crawls on %s.");
                                        touched = TRUE;
                                        break;
                                }
 
                        case RBM_DROOL:
                                {
-#ifdef JP
-act = "%s¤Ë¤è¤À¤ì¤ò¤¿¤é¤·¤¿¡£";
-#else
-                                       act = "drools on %s.";
-#endif
-
+                                       act = _("%sによだれをたらした。", "drools on %s.");
                                        touched = FALSE;
                                        break;
                                }
 
                        case RBM_SPIT:
                                {
-#ifdef JP
-act = "%s¤ËÂäòÅǤ¤¤¿¡£";
-#else
-                                       act = "spits on %s.";
-#endif
-
+                                       act = _("%sに唾を吐いた。", "spits on %s.");
                                        touched = FALSE;
                                        break;
                                }
@@ -1759,12 +1651,7 @@ act = "%s
                        case RBM_EXPLODE:
                                {
                                        if (see_either) disturb(1, 1);
-#ifdef JP
-act = "Çúȯ¤·¤¿¡£";
-#else
-                                       act = "explodes.";
-#endif
-
+                                       act = _("爆発した。", "explodes.");
                                        explode = TRUE;
                                        touched = FALSE;
                                        break;
@@ -1772,96 +1659,56 @@ act = "
 
                        case RBM_GAZE:
                                {
-#ifdef JP
-act = "%s¤ò¤Ë¤é¤ó¤À¡£";
-#else
-                                       act = "gazes at %s.";
-#endif
-
+                                       act = _("%sをにらんだ。", "gazes at %s.");
                                        touched = FALSE;
                                        break;
                                }
 
                        case RBM_WAIL:
                                {
-#ifdef JP
-act = "%s¤Ëµã¤­¤Ä¤¤¤¿¡£";
-#else
-                                       act = "wails at %s.";
-#endif
-
+                                       act = _("%sに泣きついた。", "wails at %s.");
                                        touched = FALSE;
                                        break;
                                }
 
                        case RBM_SPORE:
                                {
-#ifdef JP
-act = "%s¤Ë˦»Ò¤òÈô¤Ð¤·¤¿¡£";
-#else
-                                       act = "releases spores at %s.";
-#endif
-
+                                       act = _("%sに胞子を飛ばした。", "releases spores at %s.");
                                        touched = FALSE;
                                        break;
                                }
 
                        case RBM_XXX4:
                                {
-#ifdef JP
-act = "%s¤ËXXX4¤òÈô¤Ð¤·¤¿¡£";
-#else
-                                       act = "projects XXX4's at %s.";
-#endif
-
+                                       act = _("%sにXXX4を飛ばした。", "projects XXX4's at %s.");
                                        touched = FALSE;
                                        break;
                                }
 
                        case RBM_BEG:
                                {
-#ifdef JP
-act = "%s¤Ë¶â¤ò¤»¤¬¤ó¤À¡£";
-#else
-                                       act = "begs %s for money.";
-#endif
-
+                                       act = _("%sに金をせがんだ。", "begs %s for money.");
                                        touched = FALSE;
                                        break;
                                }
 
                        case RBM_INSULT:
                                {
-#ifdef JP
-act = "%s¤òÉî¿«¤·¤¿¡£";
-#else
-                                       act = "insults %s.";
-#endif
-
+                                       act = _("%sを侮辱した。", "insults %s.");
                                        touched = FALSE;
                                        break;
                                }
 
                        case RBM_MOAN:
                                {
-#ifdef JP
-act = "%s¤Ë¤à¤«¤Ã¤Æ¤¦¤á¤¤¤¿¡£";
-#else
-                                       act = "moans at %s.";
-#endif
-
+                                       act = _("%sにむかってうめいた。", "moans at %s.");
                                        touched = FALSE;
                                        break;
                                }
 
                        case RBM_SHOW:
                                {
-#ifdef JP
-act = "%s¤Ë¤à¤«¤Ã¤Æ²Î¤Ã¤¿¡£";
-#else
-                                       act = "sings to %s.";
-#endif
-
+                                       act = _("%sにむかって歌った。", "sings to %s.");
                                        touched = FALSE;
                                        break;
                                }
@@ -1873,7 +1720,7 @@ act = "%s
 #ifdef JP
                                if (do_silly_attack) act = silly_attacks2[randint0(MAX_SILLY_ATTACK)];
                                strfmt(temp, act, t_name);
-                               msg_format("%^s¤Ï%s", m_name, temp);
+                               msg_format("%^s%s", m_name, temp);
 #else
                                if (do_silly_attack)
                                {
@@ -1990,12 +1837,12 @@ act = "%s
                                break;
 
                        case RBE_DR_LIFE:
-                               pt = GF_OLD_DRAIN;
+                               pt = GF_HYPODYNAMIA;
                                effect_type = BLOW_EFFECT_TYPE_HEAL;
                                break;
 
                        case RBE_INERTIA:
-                               pt = GF_INERTIA;
+                               pt = GF_INERTIAL;
                                break;
 
                        case RBE_STUN:
@@ -2046,11 +1893,7 @@ act = "%s
                                                /* Special message */
                                                if (see_m && did_heal)
                                                {
-#ifdef JP
-                                                       msg_format("%s¤ÏÂÎÎϤò²óÉü¤·¤¿¤è¤¦¤À¡£", m_name);
-#else
-                                                       msg_format("%^s appears healthier.", m_name);
-#endif
+                                                       msg_format(_("%sは体力を回復したようだ。", "%^s appears healthier."), m_name);
                                                }
                                        }
                                        break;
@@ -2065,11 +1908,7 @@ act = "%s
                                                {
                                                        if (see_either)
                                                        {
-#ifdef JP
-                                                               msg_format("%^s¤ÏÆÍÁ³Ç®¤¯¤Ê¤Ã¤¿¡ª", m_name);
-#else
-                                                               msg_format("%^s is suddenly very hot!", m_name);
-#endif
+                                                               msg_format(_("%^sは突然熱くなった!", "%^s is suddenly very hot!"), m_name);
                                                        }
                                                        if (m_ptr->ml && is_original_ap_and_seen(t_ptr)) tr_ptr->r_flags2 |= RF2_AURA_FIRE;
                                                        project(t_idx, 0, m_ptr->fy, m_ptr->fx,
@@ -2090,11 +1929,7 @@ act = "%s
                                                {
                                                        if (see_either)
                                                        {
-#ifdef JP
-                                                               msg_format("%^s¤ÏÆÍÁ³´¨¤¯¤Ê¤Ã¤¿¡ª", m_name);
-#else
-                                                               msg_format("%^s is suddenly very cold!", m_name);
-#endif
+                                                               msg_format(_("%^sは突然寒くなった!", "%^s is suddenly very cold!"), m_name);
                                                        }
                                                        if (m_ptr->ml && is_original_ap_and_seen(t_ptr)) tr_ptr->r_flags3 |= RF3_AURA_COLD;
                                                        project(t_idx, 0, m_ptr->fy, m_ptr->fx,
@@ -2115,11 +1950,7 @@ act = "%s
                                                {
                                                        if (see_either)
                                                        {
-#ifdef JP
-                                                               msg_format("%^s¤ÏÅÅ·â¤ò¿©¤é¤Ã¤¿¡ª", m_name);
-#else
-                                                               msg_format("%^s gets zapped!", m_name);
-#endif
+                                                               msg_format(_("%^sは電撃を食らった!", "%^s gets zapped!"), m_name);
                                                        }
                                                        if (m_ptr->ml && is_original_ap_and_seen(t_ptr)) tr_ptr->r_flags2 |= RF2_AURA_ELEC;
                                                        project(t_idx, 0, m_ptr->fy, m_ptr->fx,
@@ -2163,7 +1994,7 @@ act = "%s
                                        {
                                                /* Message */
 #ifdef JP
-                                               msg_format("%s¤Ï%^s¤Î¹¶·â¤ò¤«¤ï¤·¤¿¡£", t_name,m_name);
+                                               msg_format("%sは%^sの攻撃をかわした。", t_name,m_name);
 #else
                                                msg_format("%^s misses %s.", m_name, t_name);
 #endif
@@ -2196,13 +2027,7 @@ act = "%s
 
                /* Cancel Invulnerability */
                (void)set_monster_invulner(m_idx, 0, FALSE);
-
-#ifdef JP
-               mon_take_hit_mon(m_idx, m_ptr->hp + 1, &fear, "¤ÏÇúȯ¤·¤ÆÊ´¡¹¤Ë¤Ê¤Ã¤¿¡£", m_idx);
-#else
-               mon_take_hit_mon(m_idx, m_ptr->hp + 1, &fear, " explodes into tiny shreds.", m_idx);
-#endif
-
+               mon_take_hit_mon(m_idx, m_ptr->hp + 1, &fear, _("は爆発して粉々になった。", " explodes into tiny shreds."), m_idx);
                blinked = FALSE;
        }
 
@@ -2213,11 +2038,7 @@ act = "%s
                {
                        if (see_m)
                        {
-#ifdef JP
-                               msg_print("Å¥ËÀ¤Ï¾Ð¤Ã¤Æƨ¤²...¤è¤¦¤È¤·¤¿¤¬¥Ð¥ê¥¢¤ËËɤ¬¤ì¤¿¡£");
-#else
-                               msg_print("The thief flees laughing...? But magic barrier obstructs it.");
-#endif
+                               msg_print(_("泥棒は笑って逃げ...ようとしたがバリアに防がれた。", "The thief flees laughing...? But magic barrier obstructs it."));
                        }
                        else if (known)
                        {
@@ -2228,11 +2049,7 @@ act = "%s
                {
                        if (see_m)
                        {
-#ifdef JP
-                               msg_print("Å¥ËÀ¤Ï¾Ð¤Ã¤Æƨ¤²¤¿¡ª");
-#else
-                               msg_print("The thief flees laughing!");
-#endif
+                               msg_print(_("泥棒は笑って逃げた!", "The thief flees laughing!"));
                        }
                        else if (known)
                        {
@@ -2256,10 +2073,10 @@ static bool check_hp_for_feat_destruction(feature_type *f_ptr, monster_type *m_p
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼Ã±ÂΤΣ±¥¿¡¼¥ó¹ÔÆ°½èÍý¥á¥¤¥ó¥ë¡¼¥Á¥ó /
+ * @brief モンスター単体の1ターン行動処理メインルーチン /
  * Process a monster
- * @param m_idx ¹ÔÆ°¥â¥ó¥¹¥¿¡¼¤Î»²¾ÈID
- * @return ¤Ê¤·
+ * @param m_idx 行動モンスターの参照ID
+ * @return なし
  * @details
  * The monster is known to be within 100 grids of the player\n
  *\n
@@ -2284,13 +2101,14 @@ static bool check_hp_for_feat_destruction(feature_type *f_ptr, monster_type *m_p
  *\n
  * A "direction" of "5" means "pick a random direction".\n
  */
-static void process_monster(int m_idx)
+static void process_monster(MONSTER_IDX m_idx)
 {
        monster_type    *m_ptr = &m_list[m_idx];
        monster_race    *r_ptr = &r_info[m_ptr->r_idx];
        monster_race    *ap_r_ptr = &r_info[m_ptr->ap_r_idx];
 
-       int             i, d, oy, ox, ny, nx;
+       int             i, d;
+       POSITION        oy, ox, ny, nx;
 
        int             mm[8];
 
@@ -2326,7 +2144,7 @@ static void process_monster(int m_idx)
                if (rakuba(0, TRUE))
                {
 #ifdef JP
-                       msg_print("ÃÏÌ̤ËÍî¤È¤µ¤ì¤¿¡£");
+                       msg_print("地面に落とされた。");
 #else
                        char m_name[80];
                        monster_desc(m_name, &m_list[p_ptr->riding], 0);
@@ -2363,12 +2181,7 @@ static void process_monster(int m_idx)
 
                        /* Acquire the monster name */
                        monster_desc(m_name, m_ptr, 0);
-
-#ifdef JP
-                       msg_format("%s¤Ï¾Ã¤¨µî¤Ã¤¿¡ª", m_name);
-#else
-                       msg_format("%^s disappears!", m_name);
-#endif
+                       msg_format(_("%sは消え去った!", "%^s disappears!"), m_name);
                }
 
                if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname)
@@ -2407,11 +2220,7 @@ static void process_monster(int m_idx)
                                monster_desc(m_name, m_ptr, 0);
 
                                /* Oops */
-#ifdef JP
-                               msg_format("%s¤Ï¾Ã¤¨µî¤Ã¤¿¡ª", m_name);
-#else
-                               msg_format("%^s disappears!", m_name);
-#endif
+                               msg_format(_("%sは消え去った!", "%^s disappears!"), m_name);
                        }
 
                        /* Generate treasure, etc */
@@ -2422,11 +2231,7 @@ static void process_monster(int m_idx)
 
                        if (sad)
                        {
-#ifdef JP
-                               msg_print("¾¯¤·¤Î´ÖÈᤷ¤¤µ¤Ê¬¤Ë¤Ê¤Ã¤¿¡£");
-#else
-                               msg_print("You feel sad for a moment.");
-#endif
+                               msg_print(_("少しの間悲しい気分になった。", "You feel sad for a moment."));
                        }
 
                        return;
@@ -2434,11 +2239,7 @@ static void process_monster(int m_idx)
        }
 
        if (m_ptr->r_idx == MON_SHURYUUDAN)
-#ifdef JP
-               mon_take_hit_mon(m_idx, 1, &fear, "¤ÏÇúȯ¤·¤ÆÊ´¡¹¤Ë¤Ê¤Ã¤¿¡£", m_idx);
-#else
-               mon_take_hit_mon(m_idx, 1, &fear, " explodes into tiny shreds.", m_idx);
-#endif
+               mon_take_hit_mon(m_idx, 1, &fear, _("は爆発して粉々になった。", " explodes into tiny shreds."), m_idx);
 
        if ((is_pet(m_ptr) || is_friendly(m_ptr)) && ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL)) && !p_ptr->inside_battle)
        {
@@ -2451,11 +2252,8 @@ static void process_monster(int m_idx)
 
                        if (is_riding_mon && riding_pinch < 2)
                        {
-#ifdef JP
-                               msg_format("%s¤Ï½ý¤ÎÄˤµ¤Î;¤ê¤¢¤Ê¤¿¤Î«Çû¤«¤éƨ¤ì¤è¤¦¤È¤·¤Æ¤¤¤ë¡£", m_name);
-#else
-                               msg_format("%^s seems to be in so much pain, and trying to escape from your restriction.", m_name);
-#endif
+                               msg_format(_("%sは傷の痛さの余りあなたの束縛から逃れようとしている。",
+                                                        "%^s seems to be in so much pain, and trying to escape from your restriction."), m_name);
                                riding_pinch++;
                                disturb(1, 1);
                        }
@@ -2463,48 +2261,27 @@ static void process_monster(int m_idx)
                        {
                                if (is_riding_mon)
                                {
-#ifdef JP
-                                       msg_format("%s¤Ï¤¢¤Ê¤¿¤Î«Çû¤«¤éæ½Ð¤·¤¿¡£", m_name);
-#else
-                                       msg_format("%^s succeeded to escape from your restriction!", m_name);
-#endif
+                                       msg_format(_("%sはあなたの束縛から脱出した。", "%^s succeeded to escape from your restriction!"), m_name);
                                        if (rakuba(-1, FALSE))
                                        {
-#ifdef JP
-                                               msg_print("ÃÏÌ̤ËÍî¤È¤µ¤ì¤¿¡£");
-#else
-                                               msg_print("You have fallen from riding pet.");
-#endif
+                                               msg_print(_("地面に落とされた。", "You have fallen from riding pet."));
                                        }
                                }
 
                                if (see_m)
                                {
                                        if ((r_ptr->flags2 & RF2_CAN_SPEAK) && (m_ptr->r_idx != MON_GRIP) && (m_ptr->r_idx != MON_WOLF) && (m_ptr->r_idx != MON_FANG) &&
-                                           player_has_los_bold(m_ptr->fy, m_ptr->fx) && projectable(m_ptr->fy, m_ptr->fx, py, px))
+                                           player_has_los_bold(m_ptr->fy, m_ptr->fx) && projectable(m_ptr->fy, m_ptr->fx, p_ptr->y, p_ptr->x))
                                        {
-#ifdef JP
-                                               msg_format("%^s¡Ö¥Ô¥ó¥Á¤À¡ªÂàµÑ¤µ¤»¤Æ¤â¤é¤¦¡ª¡×", m_name);
-#else
-                                               msg_format("%^s says 'It is the pinch! I will retreat'.", m_name);
-#endif
+                                               msg_format(_("%^s「ピンチだ!退却させてもらう!」", "%^s says 'It is the pinch! I will retreat'."), m_name);
                                        }
-#ifdef JP
-                                       msg_format("%^s¤¬¥Æ¥ì¥Ý¡¼¥È¡¦¥ì¥Ù¥ë¤Î´¬Êª¤òÆɤó¤À¡£", m_name);
-                                       msg_format("%^s¤¬¾Ã¤¨µî¤Ã¤¿¡£", m_name);
-#else
-                                       msg_format("%^s read a scroll of teleport level.", m_name);
-                                       msg_format("%^s disappears.", m_name);
-#endif
+                                       msg_format(_("%^sがテレポート・レベルの巻物を読んだ。", "%^s read a scroll of teleport level."), m_name);
+                                       msg_format(_("%^sが消え去った。", "%^s disappears."), m_name);
                                }
 
                                if (is_riding_mon && rakuba(-1, FALSE))
                                {
-#ifdef JP
-                                       msg_print("ÃÏÌ̤ËÍî¤È¤µ¤ì¤¿¡£");
-#else
-                                       msg_print("You have fallen from riding pet.");
-#endif
+                                       msg_print(_("地面に落とされた。", "You have fallen from riding pet."));
                                }
 
                                /* Check for quest completion */
@@ -2542,11 +2319,7 @@ static void process_monster(int m_idx)
                        monster_desc(m_name, m_ptr, 0);
 
                        /* Dump a message */
-#ifdef JP
-                       msg_format("%^s¤¬Ìܤò³Ð¤Þ¤·¤¿¡£", m_name);
-#else
-                       msg_format("%^s wakes up.", m_name);
-#endif
+                       msg_format(_("%^sが目を覚ました。", "%^s wakes up."), m_name);
                }
 
                /* Hack -- Count the wakings */
@@ -2589,11 +2362,7 @@ static void process_monster(int m_idx)
                {
                        char m_name[80];
                        monster_desc(m_name, m_ptr, is_pet(m_ptr) ? MD_ASSUME_VISIBLE : 0);
-#ifdef JP
-                       msg_format("%^s¤ÏÆÍÁ³Å¨¤Ë¤Þ¤ï¤Ã¤¿¡ª", m_name);
-#else
-                       msg_format("%^s suddenly becomes hostile!", m_name);
-#endif
+                       msg_format(_("%^sは突然敵にまわった!", "%^s suddenly becomes hostile!"), m_name);
                }
 
                set_hostile(m_ptr);
@@ -2643,7 +2412,7 @@ static void process_monster(int m_idx)
        }
 
 
-       if (r_ptr->flags6 & RF6_SPECIAL)
+       if (r_ptr->a_ability_flags2 & RF6_SPECIAL)
        {
                /* Hack -- Ohmu scatters molds! */
                if (m_ptr->r_idx == MON_OHMU)
@@ -2658,7 +2427,7 @@ static void process_monster(int m_idx)
 
                                        for (k = 0; k < 6; k++)
                                        {
-                                               if (summon_specific(m_idx, m_ptr->fy, m_ptr->fx, rlev, SUMMON_BIZARRE1, (PM_ALLOW_GROUP | p_mode)))
+                                               if (summon_specific(m_idx, m_ptr->fy, m_ptr->fx, rlev, SUMMON_MOLD, (PM_ALLOW_GROUP | p_mode)))
                                                {
                                                        if (m_list[hack_m_idx_ii].ml) count++;
                                                }
@@ -2679,18 +2448,14 @@ static void process_monster(int m_idx)
                    !m_ptr->ml && (m_ptr->cdis <= MAX_SIGHT))
                {
                        if (disturb_minor) disturb(FALSE, FALSE);
-#ifdef JP
-                       msg_print("½Å¸ü¤Ê­²»¤¬Ê¹¤³¤¨¤¿¡£");
-#else
-                       msg_print("You hear heavy steps.");
-#endif
+                       msg_print(_("重厚な足音が聞こえた。", "You hear heavy steps."));
                }
 
                /* Some monsters can speak */
                if ((ap_r_ptr->flags2 & RF2_CAN_SPEAK) && aware &&
                    one_in_(SPEAK_CHANCE) &&
                    player_has_los_bold(oy, ox) &&
-                   projectable(oy, ox, py, px))
+                   projectable(oy, ox, p_ptr->y, p_ptr->x))
                {
                        char m_name[80];
                        char monmessage[1024];
@@ -2700,47 +2465,22 @@ static void process_monster(int m_idx)
                        if (m_ptr->ml)
                                monster_desc(m_name, m_ptr, 0);
                        else
-#ifdef JP
-                               strcpy(m_name, "¤½¤ì");
-#else
-                               strcpy(m_name, "It");
-#endif
+                               strcpy(m_name, _("それ", "It"));
 
                        /* Select the file for monster quotes */
                        if (MON_MONFEAR(m_ptr))
-#ifdef JP
-                               filename = "monfear_j.txt";
-#else
-                               filename = "monfear.txt";
-#endif
+                               filename = _("monfear_j.txt", "monfear.txt");
                        else if (is_pet(m_ptr))
-#ifdef JP
-                               filename = "monpet_j.txt";
-#else
-                               filename = "monpet.txt";
-#endif
+                               filename = _("monpet_j.txt", "monpet.txt");
                        else if (is_friendly(m_ptr))
-#ifdef JP
-                               filename = "monfrien_j.txt";
-#else
-                               filename = "monfrien.txt";
-#endif
+                               filename = _("monfrien_j.txt", "monfrien.txt");
                        else
-#ifdef JP
-                               filename = "monspeak_j.txt";
-#else
-                               filename = "monspeak.txt";
-#endif
+                               filename = _("monspeak_j.txt", "monspeak.txt");
                        /* Get the monster line */
                        if (get_rnd_line(filename, m_ptr->ap_r_idx, monmessage) == 0)
                        {
                                /* Say something */
-#ifdef JP
-msg_format("%^s%s", m_name, monmessage);
-#else
-                               msg_format("%^s %s", m_name, monmessage);
-#endif
-
+                               msg_format(_("%^s%s", "%^s %s"), m_name, monmessage);
                        }
                }
        }
@@ -2876,7 +2616,7 @@ msg_format("%^s%s", m_name, monmessage);
                                (void)get_moves(m_idx, mm);
 
                                /* Restore the leash */
-                               p_ptr->pet_follow_distance = dis;
+                               p_ptr->pet_follow_distance = (s16b)dis;
                        }
                }
        }
@@ -3030,17 +2770,9 @@ msg_format("%^s%s", m_name, monmessage);
                                {
                                        /* Message */
                                        if (have_flag(f_ptr->flags, FF_GLASS))
-#ifdef JP
-                                               msg_print("¥¬¥é¥¹¤¬ºÕ¤±¤ë²»¤¬¤·¤¿¡ª");
-#else
-                                               msg_print("You hear a glass was crashed!");
-#endif
+                                               msg_print(_("ガラスが砕ける音がした!", "You hear a glass was crashed!"));
                                        else
-#ifdef JP
-                                               msg_print("¥É¥¢¤ò᤭³«¤±¤ë²»¤¬¤·¤¿¡ª");
-#else
-                                               msg_print("You hear a door burst open!");
-#endif
+                                               msg_print(_("ドアを叩き開ける音がした!", "You hear a door burst open!"));
 
                                        /* Disturb (sometimes) */
                                        if (disturb_minor) disturb(0, 0);
@@ -3100,11 +2832,7 @@ msg_format("%^s%s", m_name, monmessage);
                                /* Describe observable breakage */
                                if (c_ptr->info & CAVE_MARK)
                                {
-#ifdef JP
-                                       msg_print("¼é¤ê¤Î¥ë¡¼¥ó¤¬²õ¤ì¤¿¡ª");
-#else
-                                       msg_print("The rune of protection is broken!");
-#endif
+                                       msg_print(_("守りのルーンが壊れた!", "The rune of protection is broken!"));
                                }
 
                                /* Forget the rune */
@@ -3136,22 +2864,13 @@ msg_format("%^s%s", m_name, monmessage);
                                        /* Describe observable breakage */
                                        if (c_ptr->info & CAVE_MARK)
                                        {
-#ifdef JP
-                                               msg_print("¥ë¡¼¥ó¤¬Çúȯ¤·¤¿¡ª");
-#else
-                                               msg_print("The rune explodes!");
-#endif
-
+                                               msg_print(_("ルーンが爆発した!", "The rune explodes!"));
                                                project(0, 2, ny, nx, 2 * (p_ptr->lev + damroll(7, 7)), GF_MANA, (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP | PROJECT_NO_HANGEKI), -1);
                                        }
                                }
                                else
                                {
-#ifdef JP
-                                       msg_print("Çúȯ¤Î¥ë¡¼¥ó¤Ï²ò½ü¤µ¤ì¤¿¡£");
-#else
-                                       msg_print("An explosive rune was disarmed.");
-#endif
+                                       msg_print(_("爆発のルーンは解除された。", "An explosive rune was disarmed."));
                                }
 
                                /* Forget the rune */
@@ -3282,17 +3001,9 @@ msg_format("%^s%s", m_name, monmessage);
                        if (one_in_(GRINDNOISE))
                        {
                                if (have_flag(f_ptr->flags, FF_GLASS))
-#ifdef JP
-                                       msg_print("²¿¤«¤ÎºÕ¤±¤ë²»¤¬Ê¹¤³¤¨¤ë¡£");
-#else
-                                       msg_print("There is a crashing sound.");
-#endif
+                                       msg_print(_("何かの砕ける音が聞こえる。", "There is a crashing sound."));
                                else
-#ifdef JP
-                                       msg_print("¥®¥·¥®¥·¤¤¤¦²»¤¬Ê¹¤³¤¨¤ë¡£");
-#else
-                                       msg_print("There is a grinding sound.");
-#endif
+                                       msg_print(_("ギシギシいう音が聞こえる。", "There is a grinding sound."));
                        }
 
                        cave_alter_feat(ny, nx, FF_HURT_DISI);
@@ -3378,7 +3089,7 @@ msg_format("%^s%s", m_name, monmessage);
                                }
 
                                /* Hack -- Update the new location */
-                               c_ptr->m_idx = m_idx;
+                               c_ptr->m_idx = (s16b)m_idx;
 
                                /* Move the monster */
                                m_ptr->fy = ny;
@@ -3405,7 +3116,7 @@ msg_format("%^s%s", m_name, monmessage);
                        /* Possible disturb */
                        if (m_ptr->ml &&
                            (disturb_move ||
-                            (disturb_near && (m_ptr->mflag & MFLAG_VIEW) && projectable(py, px, m_ptr->fy, m_ptr->fx)) ||
+                            (disturb_near && (m_ptr->mflag & MFLAG_VIEW) && projectable(p_ptr->y, p_ptr->x, m_ptr->fy, m_ptr->fx)) ||
                             (disturb_high && ap_r_ptr->r_tkills && ap_r_ptr->level >= p_ptr->lev)))
                        {
                                /* Disturb */
@@ -3494,11 +3205,7 @@ msg_format("%^s%s", m_name, monmessage);
                                                        if (m_ptr->ml && player_can_see_bold(ny, nx))
                                                        {
                                                                /* Dump a message */
-#ifdef JP
-                                                               msg_format("%^s¤Ï%s¤ò½¦¤ª¤¦¤È¤·¤¿¤¬¡¢¤À¤á¤À¤Ã¤¿¡£", m_name, o_name);
-#else
-                                                               msg_format("%^s tries to pick up %s, but fails.", m_name, o_name);
-#endif
+                                                               msg_format(_("%^sは%sを拾おうとしたが、だめだった。", "%^s tries to pick up %s, but fails."), m_name, o_name);
                                                        }
                                                }
                                        }
@@ -3513,11 +3220,7 @@ msg_format("%^s%s", m_name, monmessage);
                                                if (player_can_see_bold(ny, nx))
                                                {
                                                        /* Dump a message */
-#ifdef JP
-                                                       msg_format("%^s¤¬%s¤ò½¦¤Ã¤¿¡£", m_name, o_name);
-#else
-                                                       msg_format("%^s picks up %s.", m_name, o_name);
-#endif
+                                                       msg_format(_("%^sが%sを拾った。", "%^s picks up %s."), m_name, o_name);
                                                }
 
                                                /* Excise the object */
@@ -3530,7 +3233,7 @@ msg_format("%^s%s", m_name, monmessage);
                                                o_ptr->iy = o_ptr->ix = 0;
 
                                                /* Memorize monster */
-                                               o_ptr->held_m_idx = m_idx;
+                                               o_ptr->held_m_idx = (s16b)m_idx;
 
                                                /* Build a stack */
                                                o_ptr->next_o_idx = m_ptr->hold_o_idx;
@@ -3549,11 +3252,7 @@ msg_format("%^s%s", m_name, monmessage);
                                                if (player_has_los_bold(ny, nx))
                                                {
                                                        /* Dump a message */
-#ifdef JP
-                                                       msg_format("%^s¤¬%s¤òÇ˲õ¤·¤¿¡£", m_name, o_name);
-#else
-                                                       msg_format("%^s destroys %s.", m_name, o_name);
-#endif
+                                                       msg_format(_("%^sが%sを破壊した。", "%^s destroys %s."), m_name, o_name);
                                                }
 
                                                /* Delete the object */
@@ -3644,11 +3343,7 @@ msg_format("%^s%s", m_name, monmessage);
                        monster_desc(m_name, m_ptr, 0);
 
                        /* Dump a message */
-#ifdef JP
-                       msg_format("%^s¤ÏÀ襤¤ò·è°Õ¤·¤¿¡ª", m_name);
-#else
-                       msg_format("%^s turns to fight!", m_name);
-#endif
+                       msg_format(_("%^sは戦いを決意した!", "%^s turns to fight!"), m_name);
                }
 
                if (m_ptr->ml) chg_virtue(V_COMPASSION, -1);
@@ -3658,9 +3353,9 @@ msg_format("%^s%s", m_name, monmessage);
 }
 
 /*!
- * @brief Á´¥â¥ó¥¹¥¿¡¼¤Î¥¿¡¼¥ó´ÉÍý¥á¥¤¥ó¥ë¡¼¥Á¥ó /
+ * @brief 全モンスターのターン管理メインルーチン /
  * Process all the "live" monsters, once per game turn.
- * @return ¤Ê¤·
+ * @return なし
  * @details
  * During each game turn, we scan through the list of all the "live" monsters,\n
  * (backwards, so we can excise any "freshly dead" monsters), energizing each\n
@@ -3693,8 +3388,8 @@ msg_format("%^s%s", m_name, monmessage);
  */
 void process_monsters(void)
 {
-       int             i;
-       int             fx, fy;
+       IDX i;
+       POSITION fx, fy;
 
        bool            test;
 
@@ -3803,19 +3498,19 @@ void process_monsters(void)
                }
 
                /* Handle "sight" and "aggravation" */
-               else if ((m_ptr->cdis <= MAX_SIGHT) &&
+        else if ((m_ptr->cdis <= MAX_SIGHT || p_ptr->inside_battle) &&
                        (player_has_los_bold(fy, fx) || (p_ptr->cursed & TRC_AGGRAVATE)))
                {
                        /* We can "see" or "feel" the player */
                        test = TRUE;
                }
 
-#if 0 /* (cave[py][px].when == cave[fy][fx].when) is always FALSE... */
+#if 0 /* (cave[p_ptr->y][p_ptr->x].when == cave[fy][fx].when) is always FALSE... */
                /* Hack -- Monsters can "smell" the player from far away */
                /* Note that most monsters have "aaf" of "20" or so */
                else if (!(m_ptr->mflag2 & MFLAG2_NOFLOW) &&
-                       cave_have_flag_bold(py, px, FF_MOVE) &&
-                       (cave[py][px].when == cave[fy][fx].when) &&
+                       cave_have_flag_bold(p_ptr->y, p_ptr->x, FF_MOVE) &&
+                       (cave[p_ptr->y][p_ptr->x].when == cave[fy][fx].when) &&
                        (cave[fy][fx].dist < MONSTER_FLOW_DEPTH) &&
                        (cave[fy][fx].dist < r_ptr->aaf))
                {
@@ -3902,12 +3597,12 @@ void process_monsters(void)
 }
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤Î»þ¸Â¥¹¥Æ¡¼¥¿¥¹¤ò¼èÆÀ¤¹¤ë
- * @return m_idx ¥â¥ó¥¹¥¿¡¼¤Î»²¾ÈID
- * @return mproc_type ¥â¥ó¥¹¥¿¡¼¤Î»þ¸Â¥¹¥Æ¡¼¥¿¥¹ID
- * @return »Ä¤ê¥¿¡¼¥óÃÍ
+ * @brief モンスターの時限ステータスを取得する
+ * @return m_idx モンスターの参照ID
+ * @return mproc_type ã\83¢ã\83³ã\82¹ã\82¿ã\83¼ã\81®æ\99\82é\99\90ã\82¹ã\83\86ã\83¼ã\82¿ã\82¹ID
+ * @return 残りターン値
  */
-int get_mproc_idx(int m_idx, int mproc_type)
+int get_mproc_idx(MONSTER_IDX m_idx, int mproc_type)
 {
        s16b *cur_mproc_list = mproc_list[mproc_type];
        int i;
@@ -3921,24 +3616,24 @@ int get_mproc_idx(int m_idx, int mproc_type)
 }
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤Î»þ¸Â¥¹¥Æ¡¼¥¿¥¹¥ê¥¹¥È¤òÄɲ乤ë
- * @return m_idx ¥â¥ó¥¹¥¿¡¼¤Î»²¾ÈID
- * @return mproc_type Äɲä·¤¿¤¤¥â¥ó¥¹¥¿¡¼¤Î»þ¸Â¥¹¥Æ¡¼¥¿¥¹ID
- * @return ¤Ê¤·
+ * @brief モンスターの時限ステータスリストを追加する
+ * @return m_idx モンスターの参照ID
+ * @return mproc_type è¿½å\8a ã\81\97ã\81\9fã\81\84ã\83¢ã\83³ã\82¹ã\82¿ã\83¼ã\81®æ\99\82é\99\90ã\82¹ã\83\86ã\83¼ã\82¿ã\82¹ID
+ * @return なし
  */
-static void mproc_add(int m_idx, int mproc_type)
+static void mproc_add(MONSTER_IDX m_idx, int mproc_type)
 {
-       if (mproc_max[mproc_type] < max_m_idx) mproc_list[mproc_type][mproc_max[mproc_type]++] = m_idx;
+       if (mproc_max[mproc_type] < max_m_idx) mproc_list[mproc_type][mproc_max[mproc_type]++] = (s16b)m_idx;
 }
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤Î»þ¸Â¥¹¥Æ¡¼¥¿¥¹¥ê¥¹¥È¤òºï½ü
- * @return m_idx ¥â¥ó¥¹¥¿¡¼¤Î»²¾ÈID
- * @return mproc_type ºï½ü¤·¤¿¤¤¥â¥ó¥¹¥¿¡¼¤Î»þ¸Â¥¹¥Æ¡¼¥¿¥¹ID
- * @return ¤Ê¤·
+ * @brief モンスターの時限ステータスリストを削除
+ * @return m_idx モンスターの参照ID
+ * @return mproc_type å\89\8aé\99¤ã\81\97ã\81\9fã\81\84ã\83¢ã\83³ã\82¹ã\82¿ã\83¼ã\81®æ\99\82é\99\90ã\82¹ã\83\86ã\83¼ã\82¿ã\82¹ID
+ * @return なし
  */
-static void mproc_remove(int m_idx, int mproc_type)
+static void mproc_remove(MONSTER_IDX m_idx, int mproc_type)
 {
        int mproc_idx = get_mproc_idx(m_idx, mproc_type);
        if (mproc_idx >= 0) mproc_list[mproc_type][mproc_idx] = mproc_list[mproc_type][--mproc_max[mproc_type]];
@@ -3946,13 +3641,14 @@ static void mproc_remove(int m_idx, int mproc_type)
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤Î»þ¸Â¥¹¥Æ¡¼¥¿¥¹¥ê¥¹¥È¤ò½é´ü²½¤¹¤ë / Initialize monster process
- * @return ¤Ê¤·
+ * @brief モンスターの時限ステータスリストを初期化する / Initialize monster process
+ * @return なし
  */
 void mproc_init(void)
 {
        monster_type *m_ptr;
-       int          i, cmi;
+       MONSTER_IDX i;
+       int cmi;
 
        /* Reset "mproc_max[]" */
        for (cmi = 0; cmi < MAX_MTIMED; cmi++) mproc_max[cmi] = 0;
@@ -3975,13 +3671,13 @@ void mproc_init(void)
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤Î¿ç̲¾õÂÖÃͤò¥»¥Ã¥È¤¹¤ë /
+ * @brief モンスターの睡眠状態値をセットする /
  * Set "m_ptr->mtimed[MTIMED_CSLEEP]", notice observable changes
- * @param m_idx ¥â¥ó¥¹¥¿¡¼»²¾ÈID
- * @param v ¥»¥Ã¥È¤¹¤ëÃÍ
- * @return ÊÌÅÓ¹¹¿·½èÍý¤¬É¬Íפʾì¹çTRUE¤òÊÖ¤¹
+ * @param m_idx モンスター参照ID
+ * @param v セットする値
+ * @return 別途更新処理が必要な場合TRUEを返す
  */
-bool set_monster_csleep(int m_idx, int v)
+bool set_monster_csleep(MONSTER_IDX m_idx, int v)
 {
        monster_type *m_ptr = &m_list[m_idx];
        bool notice = FALSE;
@@ -4010,7 +3706,7 @@ bool set_monster_csleep(int m_idx, int v)
        }
 
        /* Use the value */
-       m_ptr->mtimed[MTIMED_CSLEEP] = v;
+       m_ptr->mtimed[MTIMED_CSLEEP] = (s16b)v;
 
        if (!notice) return FALSE;
 
@@ -4028,13 +3724,13 @@ bool set_monster_csleep(int m_idx, int v)
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤Î²Ã®¾õÂÖÃͤò¥»¥Ã¥È /
+ * @brief モンスターの加速状態値をセット /
  * Set "m_ptr->mtimed[MTIMED_FAST]", notice observable changes
- * @param m_idx ¥â¥ó¥¹¥¿¡¼»²¾ÈID
- * @param v ¥»¥Ã¥È¤¹¤ëÃÍ
- * @return ÊÌÅÓ¹¹¿·½èÍý¤¬É¬Íפʾì¹çTRUE¤òÊÖ¤¹
+ * @param m_idx モンスター参照ID
+ * @param v セットする値
+ * @return 別途更新処理が必要な場合TRUEを返す
  */
-bool set_monster_fast(int m_idx, int v)
+bool set_monster_fast(MONSTER_IDX m_idx, int v)
 {
        monster_type *m_ptr = &m_list[m_idx];
        bool notice = FALSE;
@@ -4063,7 +3759,7 @@ bool set_monster_fast(int m_idx, int v)
        }
 
        /* Use the value */
-       m_ptr->mtimed[MTIMED_FAST] = v;
+       m_ptr->mtimed[MTIMED_FAST] = (s16b)v;
 
        if (!notice) return FALSE;
 
@@ -4076,7 +3772,7 @@ bool set_monster_fast(int m_idx, int v)
 /*
  * Set "m_ptr->mtimed[MTIMED_SLOW]", notice observable changes
  */
-bool set_monster_slow(int m_idx, int v)
+bool set_monster_slow(MONSTER_IDX m_idx, int v)
 {
        monster_type *m_ptr = &m_list[m_idx];
        bool notice = FALSE;
@@ -4105,7 +3801,7 @@ bool set_monster_slow(int m_idx, int v)
        }
 
        /* Use the value */
-       m_ptr->mtimed[MTIMED_SLOW] = v;
+       m_ptr->mtimed[MTIMED_SLOW] = (s16b)v;
 
        if (!notice) return FALSE;
 
@@ -4116,13 +3812,13 @@ bool set_monster_slow(int m_idx, int v)
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤ÎÛ¯Û°¾õÂÖÃͤò¥»¥Ã¥È /
+ * @brief モンスターの朦朧状態値をセット /
  * Set "m_ptr->mtimed[MTIMED_STUNNED]", notice observable changes
- * @param m_idx ¥â¥ó¥¹¥¿¡¼»²¾ÈID
- * @param v ¥»¥Ã¥È¤¹¤ëÃÍ
- * @return ÊÌÅÓ¹¹¿·½èÍý¤¬É¬Íפʾì¹çTRUE¤òÊÖ¤¹
+ * @param m_idx モンスター参照ID
+ * @param v セットする値
+ * @return 別途更新処理が必要な場合TRUEを返す
  */
-bool set_monster_stunned(int m_idx, int v)
+bool set_monster_stunned(MONSTER_IDX m_idx, int v)
 {
        monster_type *m_ptr = &m_list[m_idx];
        bool notice = FALSE;
@@ -4151,20 +3847,20 @@ bool set_monster_stunned(int m_idx, int v)
        }
 
        /* Use the value */
-       m_ptr->mtimed[MTIMED_STUNNED] = v;
+       m_ptr->mtimed[MTIMED_STUNNED] = (s16b)v;
 
        return notice;
 }
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤Îº®Íð¾õÂÖÃͤò¥»¥Ã¥È /
+ * @brief モンスターの混乱状態値をセット /
  * Set "m_ptr->mtimed[MTIMED_CONFUSED]", notice observable changes
- * @param m_idx ¥â¥ó¥¹¥¿¡¼»²¾ÈID
- * @param v ¥»¥Ã¥È¤¹¤ëÃÍ
- * @return ÊÌÅÓ¹¹¿·½èÍý¤¬É¬Íפʾì¹çTRUE¤òÊÖ¤¹
+ * @param m_idx モンスター参照ID
+ * @param v セットする値
+ * @return 別途更新処理が必要な場合TRUEを返す
  */
-bool set_monster_confused(int m_idx, int v)
+bool set_monster_confused(MONSTER_IDX m_idx, int v)
 {
        monster_type *m_ptr = &m_list[m_idx];
        bool notice = FALSE;
@@ -4193,20 +3889,20 @@ bool set_monster_confused(int m_idx, int v)
        }
 
        /* Use the value */
-       m_ptr->mtimed[MTIMED_CONFUSED] = v;
+       m_ptr->mtimed[MTIMED_CONFUSED] = (s16b)v;
 
        return notice;
 }
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤Î¶²¹²¾õÂÖÃͤò¥»¥Ã¥È /
+ * @brief モンスターの恐慌状態値をセット /
  * Set "m_ptr->mtimed[MTIMED_MONFEAR]", notice observable changes
- * @param m_idx ¥â¥ó¥¹¥¿¡¼»²¾ÈID
- * @param v ¥»¥Ã¥È¤¹¤ëÃÍ
- * @return ÊÌÅÓ¹¹¿·½èÍý¤¬É¬Íפʾì¹çTRUE¤òÊÖ¤¹
+ * @param m_idx モンスター参照ID
+ * @param v セットする値
+ * @return 別途更新処理が必要な場合TRUEを返す
  */
-bool set_monster_monfear(int m_idx, int v)
+bool set_monster_monfear(MONSTER_IDX m_idx, int v)
 {
        monster_type *m_ptr = &m_list[m_idx];
        bool notice = FALSE;
@@ -4235,7 +3931,7 @@ bool set_monster_monfear(int m_idx, int v)
        }
 
        /* Use the value */
-       m_ptr->mtimed[MTIMED_MONFEAR] = v;
+       m_ptr->mtimed[MTIMED_MONFEAR] = (s16b)v;
 
        if (!notice) return FALSE;
 
@@ -4251,14 +3947,14 @@ bool set_monster_monfear(int m_idx, int v)
 
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤Î̵Ũ¾õÂÖÃͤò¥»¥Ã¥È /
+ * @brief モンスターの無敵状態値をセット /
  * Set "m_ptr->mtimed[MTIMED_INVULNER]", notice observable changes
- * @param m_idx ¥â¥ó¥¹¥¿¡¼»²¾ÈID
- * @param v ¥»¥Ã¥È¤¹¤ëÃÍ
- * @param energy_need TRUE¤Ê¤é¤Ð̵Ũ²ò½ü»þ¤Ë¹ÔÆ°¥¿¡¼¥ó¾ÃÈñ¤ò¹Ô¤¦
- * @return ÊÌÅÓ¹¹¿·½èÍý¤¬É¬Íפʾì¹çTRUE¤òÊÖ¤¹
+ * @param m_idx モンスター参照ID
+ * @param v セットする値
+ * @param energy_need TRUEならば無敵解除時に行動ターン消費を行う
+ * @return 別途更新処理が必要な場合TRUEを返す
  */
-bool set_monster_invulner(int m_idx, int v, bool energy_need)
+bool set_monster_invulner(MONSTER_IDX m_idx, int v, bool energy_need)
 {
        monster_type *m_ptr = &m_list[m_idx];
        bool notice = FALSE;
@@ -4288,7 +3984,7 @@ bool set_monster_invulner(int m_idx, int v, bool energy_need)
        }
 
        /* Use the value */
-       m_ptr->mtimed[MTIMED_INVULNER] = v;
+       m_ptr->mtimed[MTIMED_INVULNER] = (s16b)v;
 
        if (!notice) return FALSE;
 
@@ -4306,12 +4002,12 @@ bool set_monster_invulner(int m_idx, int v, bool energy_need)
 static u32b csleep_noise;
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤Î³Æ¼ï¾õÂÖÃͤò»þ´Ö·Ð²á¤Ë¤è¤ê¹¹¿·¤¹¤ë¥µ¥Ö¥ë¡¼¥Á¥ó
- * @param m_idx ¥â¥ó¥¹¥¿¡¼»²¾ÈID
- * @param mtimed_idx ¹¹¿·¤¹¤ë¥â¥ó¥¹¥¿¡¼¤Î»þ¸Â¥¹¥Æ¡¼¥¿¥¹ID
- * @return ¤Ê¤·
+ * @brief モンスターの各種状態値を時間経過により更新するサブルーチン
+ * @param m_idx モンスター参照ID
+ * @param mtimed_idx æ\9b´æ\96°ã\81\99ã\82\8bã\83¢ã\83³ã\82¹ã\82¿ã\83¼ã\81®æ\99\82é\99\90ã\82¹ã\83\86ã\83¼ã\82¿ã\82¹ID
+ * @return なし
  */
-static void process_monsters_mtimed_aux(int m_idx, int mtimed_idx)
+static void process_monsters_mtimed_aux(MONSTER_IDX m_idx, int mtimed_idx)
 {
        monster_type *m_ptr = &m_list[m_idx];
 
@@ -4385,11 +4081,7 @@ static void process_monsters_mtimed_aux(int m_idx, int mtimed_idx)
                                                monster_desc(m_name, m_ptr, 0);
 
                                                /* Dump a message */
-#ifdef JP
-                                               msg_format("%^s¤¬Ìܤò³Ð¤Þ¤·¤¿¡£", m_name);
-#else
-                                               msg_format("%^s wakes up.", m_name);
-#endif
+                                               msg_format(_("%^sが目を覚ました。", "%^s wakes up."), m_name);
                                        }
 
                                        if (is_original_ap_and_seen(m_ptr))
@@ -4415,11 +4107,7 @@ static void process_monsters_mtimed_aux(int m_idx, int mtimed_idx)
                                monster_desc(m_name, m_ptr, 0);
 
                                /* Dump a message */
-#ifdef JP
-                               msg_format("%^s¤Ï¤â¤¦²Ã®¤µ¤ì¤Æ¤¤¤Ê¤¤¡£", m_name);
-#else
-                               msg_format("%^s is no longer fast.", m_name);
-#endif
+                               msg_format(_("%^sはもう加速されていない。", "%^s is no longer fast."), m_name);
                        }
                }
                break;
@@ -4436,11 +4124,7 @@ static void process_monsters_mtimed_aux(int m_idx, int mtimed_idx)
                                monster_desc(m_name, m_ptr, 0);
 
                                /* Dump a message */
-#ifdef JP
-                               msg_format("%^s¤Ï¤â¤¦¸ºÂ®¤µ¤ì¤Æ¤¤¤Ê¤¤¡£", m_name);
-#else
-                               msg_format("%^s is no longer slow.", m_name);
-#endif
+                               msg_format(_("%^sはもう減速されていない。", "%^s is no longer slow."), m_name);
                        }
                }
                break;
@@ -4461,11 +4145,7 @@ static void process_monsters_mtimed_aux(int m_idx, int mtimed_idx)
                                monster_desc(m_name, m_ptr, 0);
 
                                /* Dump a message */
-#ifdef JP
-                               msg_format("%^s¤ÏÛ¯Û°¾õÂÖ¤«¤éΩ¤Áľ¤Ã¤¿¡£", m_name);
-#else
-                               msg_format("%^s is no longer stunned.", m_name);
-#endif
+                               msg_format(_("%^sは朦朧状態から立ち直った。", "%^s is no longer stunned."), m_name);
                        }
                }
                break;
@@ -4484,11 +4164,7 @@ static void process_monsters_mtimed_aux(int m_idx, int mtimed_idx)
                                monster_desc(m_name, m_ptr, 0);
 
                                /* Dump a message */
-#ifdef JP
-                               msg_format("%^s¤Ïº®Í𤫤éΩ¤Áľ¤Ã¤¿¡£", m_name);
-#else
-                               msg_format("%^s is no longer confused.", m_name);
-#endif
+                               msg_format(_("%^sは混乱から立ち直った。", "%^s is no longer confused."), m_name);
                        }
                }
                break;
@@ -4513,7 +4189,7 @@ static void process_monsters_mtimed_aux(int m_idx, int mtimed_idx)
 
                                /* Dump a message */
 #ifdef JP
-                               msg_format("%^s¤Ïͦµ¤¤ò¼è¤êÌᤷ¤¿¡£", m_name);
+                               msg_format("%^sは勇気を取り戻した。", m_name);
 #else
                                msg_format("%^s recovers %s courage.", m_name, m_poss);
 #endif
@@ -4533,11 +4209,7 @@ static void process_monsters_mtimed_aux(int m_idx, int mtimed_idx)
                                monster_desc(m_name, m_ptr, 0);
 
                                /* Dump a message */
-#ifdef JP
-                               msg_format("%^s¤Ï¤â¤¦ÌµÅ¨¤Ç¤Ê¤¤¡£", m_name);
-#else
-                               msg_format("%^s is no longer invulnerable.", m_name);
-#endif
+                               msg_format(_("%^sはもう無敵でない。", "%^s is no longer invulnerable."), m_name);
                        }
                }
                break;
@@ -4546,9 +4218,9 @@ static void process_monsters_mtimed_aux(int m_idx, int mtimed_idx)
 
 
 /*!
- * @brief Á´¥â¥ó¥¹¥¿¡¼¤Î³Æ¼ï¾õÂÖÃͤò»þ´Ö·Ð²á¤Ë¤è¤ê¹¹¿·¤¹¤ë¥á¥¤¥ó¥ë¡¼¥Á¥ó
- * @param mtimed_idx ¹¹¿·¤¹¤ë¥â¥ó¥¹¥¿¡¼¤Î»þ¸Â¥¹¥Æ¡¼¥¿¥¹ID
- * @return ¤Ê¤·
+ * @brief 全モンスターの各種状態値を時間経過により更新するメインルーチン
+ * @param mtimed_idx æ\9b´æ\96°ã\81\99ã\82\8bã\83¢ã\83³ã\82¹ã\82¿ã\83¼ã\81®æ\99\82é\99\90ã\82¹ã\83\86ã\83¼ã\82¿ã\82¹ID
+ * @return なし
  * @details
  * Process the counters of monsters (once per 10 game turns)\n
  * These functions are to process monsters' counters same as player's.
@@ -4570,11 +4242,11 @@ void process_monsters_mtimed(int mtimed_idx)
 }
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤Ø¤ÎËâÎϾõî½èÍý
- * @param m_idx ËâÎϾõî¤ò¼õ¤±¤ë¥â¥ó¥¹¥¿¡¼¤Î»²¾ÈID
- * @return ¤Ê¤·
+ * @brief モンスターへの魔力消去処理
+ * @param m_idx 魔力消去を受けるモンスターの参照ID
+ * @return なし
  */
-void dispel_monster_status(int m_idx)
+void dispel_monster_status(MONSTER_IDX m_idx)
 {
        monster_type *m_ptr = &m_list[m_idx];
        char         m_name[80];
@@ -4582,36 +4254,24 @@ void dispel_monster_status(int m_idx)
        monster_desc(m_name, m_ptr, 0);
        if (set_monster_invulner(m_idx, 0, TRUE))
        {
-#ifdef JP
-               if (m_ptr->ml) msg_format("%s¤Ï¤â¤¦ÌµÅ¨¤Ç¤Ï¤Ê¤¤¡£", m_name);
-#else
-               if (m_ptr->ml) msg_format("%^s is no longer invulnerable.", m_name);
-#endif
+               if (m_ptr->ml) msg_format(_("%sはもう無敵ではない。", "%^s is no longer invulnerable."), m_name);
        }
        if (set_monster_fast(m_idx, 0))
        {
-#ifdef JP
-               if (m_ptr->ml) msg_format("%s¤Ï¤â¤¦²Ã®¤µ¤ì¤Æ¤¤¤Ê¤¤¡£", m_name);
-#else
-               if (m_ptr->ml) msg_format("%^s is no longer fast.", m_name);
-#endif
+               if (m_ptr->ml) msg_format(_("%sはもう加速されていない。", "%^s is no longer fast."), m_name);
        }
        if (set_monster_slow(m_idx, 0))
        {
-#ifdef JP
-               if (m_ptr->ml) msg_format("%s¤Ï¤â¤¦¸ºÂ®¤µ¤ì¤Æ¤¤¤Ê¤¤¡£", m_name);
-#else
-               if (m_ptr->ml) msg_format("%^s is no longer slow.", m_name);
-#endif
+               if (m_ptr->ml) msg_format(_("%sはもう減速されていない。", "%^s is no longer slow."), m_name);
        }
 }
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤Î»þ´ÖÄä»ß½èÍý
- * @param num »þ´ÖÄä»ß¤ò¹Ô¤Ã¤¿Å¨¤¬¹ÔÆ°¤Ç¤­¤ë²ó¿ô
- * @param who »þ´ÖÄä»ß½èÍý¤Î¼çÂÎID
- * @param vs_player TRUE¤Ê¤é¤Ð»þ´ÖÄä»ß³«»Ï½èÍý¤ò¹Ô¤¦
- * @return »þ´ÖÄä»ß¤¬¹Ô¤ï¤ì¤Æ¤¤¤ë¾õÂ֤ʤé¤ÐTRUE¤òÊÖ¤¹
+ * @brief モンスターの時間停止処理
+ * @param num 時間停止を行った敵が行動できる回数
+ * @param who 時間停止処理の主体ID
+ * @param vs_player TRUEならば時間停止開始処理を行う
+ * @return 時間停止が行われている状態ならばTRUEを返す
  */
 bool process_the_world(int num, int who, bool vs_player)
 {
@@ -4625,17 +4285,9 @@ bool process_the_world(int num, int who, bool vs_player)
                monster_desc(m_name, m_ptr, 0);
 
                if (who == 1)
-#ifdef JP
-                       msg_print("¡Ö¡Ø¥¶¡¦¥ï¡¼¥ë¥É¡Ù¡ª»þ¤Ï»ß¤Þ¤Ã¤¿¡ª¡×");
-#else
-                       msg_format("%s yells 'The World! Time has stopped!'", m_name);
-#endif
+                       msg_format(_("「『ザ・ワールド』!時は止まった!」", "%s yells 'The World! Time has stopped!'"), m_name);
                else if (who == 3)
-#ifdef JP
-                       msg_print("¡Ö»þ¤è¡ª¡×");
-#else
-                       msg_format("%s yells 'Time!'", m_name);
-#endif
+                       msg_format(_("「時よ!」", "%s yells 'Time!'"), m_name);
                else msg_print("hek!");
 
                msg_print(NULL);
@@ -4679,13 +4331,9 @@ bool process_the_world(int num, int who, bool vs_player)
        p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
 
        world_monster = 0;
-       if (vs_player || (player_has_los_bold(m_ptr->fy, m_ptr->fx) && projectable(py, px, m_ptr->fy, m_ptr->fx)))
+       if (vs_player || (player_has_los_bold(m_ptr->fy, m_ptr->fx) && projectable(p_ptr->y, p_ptr->x, m_ptr->fy, m_ptr->fx)))
        {
-#ifdef JP
-               msg_print("¡Ö»þ¤ÏÆ°¤­¤À¤¹¡Ä¡×");
-#else
-               msg_print("You feel time flowing around you once more.");
-#endif
+               msg_print(_("「時は動きだす…」", "You feel time flowing around you once more."));
                msg_print(NULL);
        }
 
@@ -4695,12 +4343,12 @@ bool process_the_world(int num, int who, bool vs_player)
 }
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼¤Î·Ð¸³ÃͼèÆÀ½èÍý
- * @param m_idx ·Ð¸³ÃͤòÆÀ¤ë¥â¥ó¥¹¥¿¡¼¤Î»²¾ÈID
- * @param s_idx ·âÇˤµ¤ì¤¿¥â¥ó¥¹¥¿¡¼¼ï²¤Î»²¾ÈID
- * @return ¤Ê¤·
+ * @brief モンスターの経験値取得処理
+ * @param m_idx 経験値を得るモンスターの参照ID
+ * @param s_idx 撃破されたモンスター種族の参照ID
+ * @return なし
  */
-void monster_gain_exp(int m_idx, int s_idx)
+void monster_gain_exp(MONSTER_IDX m_idx, IDX s_idx)
 {
        monster_type *m_ptr;
        monster_race *r_ptr;
@@ -4796,20 +4444,11 @@ void monster_gain_exp(int m_idx, int s_idx)
                                                hallu_race = &r_info[randint1(max_r_idx - 1)];
                                        }
                                        while (!hallu_race->name || (hallu_race->flags1 & RF1_UNIQUE));
-
-#ifdef JP
-                                       msg_format("%s¤Ï%s¤Ë¿Ê²½¤·¤¿¡£", m_name, r_name + hallu_race->name);
-#else
-                                       msg_format("%^s evolved into %s.", m_name, r_name + hallu_race->name);
-#endif
+                                       msg_format(_("%sは%sに進化した。", "%^s evolved into %s."), m_name, r_name + hallu_race->name);
                                }
                                else
                                {
-#ifdef JP
-                                       msg_format("%s¤Ï%s¤Ë¿Ê²½¤·¤¿¡£", m_name, r_name + r_ptr->name);
-#else
-                                       msg_format("%^s evolved into %s.", m_name, r_name + r_ptr->name);
-#endif
+                                       msg_format(_("%sは%sに進化した。", "%^s evolved into %s."), m_name, r_name + r_ptr->name);
                                }
                        }