OSDN Git Service

#37287 (2.2.0.40) cmd1.c内のC4457警告に対応。 / Deal C4457 warning in cmd1.c.
[hengband/hengband.git] / src / monster2.c
index d9b6c1f..ded6882 100644 (file)
@@ -1,48 +1,51 @@
-/* File: monster2.c */
-
-/*
+/*!
+ * @file monster2.c
+ * @brief モンスター処理 / misc code for monsters
+ * @date 2014/07/08
+ * @author
  * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
- *
  * This software may be copied and distributed for educational, research,
  * and not for profit purposes provided that this copyright and statement
  * are included in all such copies.  Other copyrights may also apply.
+ * 2014 Deskull rearranged comment for Doxygen.
  */
 
-/* Purpose: misc code for monsters */
-
 #include "angband.h"
 
-#define HORDE_NOGOOD 0x01
-#define HORDE_NOEVIL 0x02
+#define HORDE_NOGOOD 0x01 /*!< (未実装フラグ)HORDE生成でGOODなモンスターの生成を禁止する? */
+#define HORDE_NOEVIL 0x02 /*!< (未実装フラグ)HORDE生成でEVILなモンスターの生成を禁止する? */
 
-bool is_kage = FALSE;
 
+/*!
+ * @var horror_desc
+ * @brief ELDRITCH HORROR効果時のモンスターの形容メッセージ(通常時)
+ */
 cptr horror_desc[MAX_SAN_HORROR] =
 {
 #ifdef JP
-       "´÷¤Þ¤ï¤·¤¤",
-       "ÄìÃΤì¤Ì",
-       "¤¾¤Ã¤È¤¹¤ë",
-       "ÇËÌÇŪ¤Ê",
-       "ËÁÆÂŪ¤Ê",
-
-       "¤¤¤ä¤Ê",
-       "¶²¤í¤·¤¤",
-       "ÉÔ·é¤Ê",
-       "ÍƼϤΤʤ¤",
-       "¤ª¤¾¤Þ¤·¤¤",
-
-       "ÃϹö¤Î",
-       "¿È¤ÎÌÓ¤â¤è¤À¤Ä",
-       "ÃϹö¤Î",
-       "´÷¤Þ¤ï¤·¤¤",
-       "°­Ì´¤Î¤è¤¦¤Ê",
-
-       "·ù°­¤ò´¶¤¸¤ë",
-       "ȳÅö¤¿¤ê¤Ê",
-       "¶²¤¤",
-       "ÉÔ¾ô¤Ê",
-       "¸À¤¦¤â¤ª¤¾¤Þ¤·¤¤",
+       "忌まわしい",
+       "底知れぬ",
+       "ぞっとする",
+       "破滅的な",
+       "冒涜的な",
+
+       "いやな",
+       "恐ろしい",
+       "不潔な",
+       "容赦のない",
+       "おぞましい",
+
+       "地獄の",
+       "身の毛もよだつ",
+       "地獄の",
+       "忌まわしい",
+       "悪夢のような",
+
+       "嫌悪を感じる",
+       "罰当たりな",
+       "恐い",
+       "不浄な",
+       "言うもおぞましい",
 #else
        "abominable",
        "abysmal",
@@ -71,35 +74,39 @@ cptr horror_desc[MAX_SAN_HORROR] =
 
 };
 
+/*!
+ * @var funny_desc
+ * @brief ELDRITCH HORROR効果時のモンスターの形容メッセージ(幻覚状態時)
+ */
 cptr funny_desc[MAX_SAN_FUNNY] =
 {
 #ifdef JP
-       "´ÖÈ´¤±¤Ê",
-       "³ê·Î¤Ê",
-       "¤Ð¤«¤é¤·¤¤",
-       "̵̣´¥Áç¤Ê",
-       "Çϼ¯¤²¤¿",
-
-       "¾Ð¤¨¤ë",
-       "¤Ð¤«¤Ð¤«¤·¤¤",
-       "¤Ö¤Ã¤È¤ó¤À",
-       "¤¤¤«¤·¤¿",
-       "¥Ý¥¹¥È¥â¥À¥ó¤Ê",
-
-       "¥Õ¥¡¥ó¥¿¥¹¥Æ¥£¥Ã¥¯¤Ê",
-       "¥À¥À¥¤¥º¥àŪ¤Ê",
-       "¥­¥å¥Ó¥º¥àŪ¤Ê",
-       "±§ÃèŪ¤Ê",
-       "Âî±Û¤·¤¿",
-
-       "Íý²òÉÔǽ¤Ê",
-       "¤â¤Î¤¹¤´¤¤",
-       "¶Ã¤¯¤Ù¤­",
-       "¿®¤¸¤é¤ì¤Ê¤¤",
-       "¥«¥ª¥Æ¥£¥Ã¥¯¤Ê",
-
-       "ÌîÀ­Åª¤Ê",
-       "Èó¾ï¼±¤Ê",
+       "間抜けな",
+       "滑稽な",
+       "ばからしい",
+       "無味乾燥な",
+       "馬鹿げた",
+
+       "笑える",
+       "ばかばかしい",
+       "ぶっとんだ",
+       "いかした",
+       "ポストモダンな",
+
+       "ファンタスティックな",
+       "ダダイズム的な",
+       "キュビズム的な",
+       "宇宙的な",
+       "卓越した",
+
+       "理解不能な",
+       "ものすごい",
+       "驚くべき",
+       "信じられない",
+       "カオティックな",
+
+       "野性的な",
+       "非常識な",
 #else
        "silly",
        "hilarious",
@@ -131,15 +138,19 @@ cptr funny_desc[MAX_SAN_FUNNY] =
 
 };
 
+/*!
+ * @var funny_comments
+ * @brief ELDRITCH HORROR効果時の幻覚時間延長を示す錯乱表現
+ */
 cptr funny_comments[MAX_SAN_COMMENT] =
 {
 #ifdef JP
   /* nuke me */
-       "ºÇ¹â¤À¤¼¡ª",
-       "¤¦¤Ò¤ç¡¼¡ª",
-       "¤¤¤«¤¹¤¼¡ª",
-       "¤¹¤ó¤Ð¤é¤·¤¤¡ª",
-       "¤Ö¤Ã¤È¤Ó¡¼¡ª"
+       "最高だぜ!",
+       "うひょー!",
+       "いかすぜ!",
+       "すんばらしい!",
+       "ぶっとびー!"
 #else
        "Wow, cosmic, man!",
        "Rad!",
@@ -151,8 +162,12 @@ cptr funny_comments[MAX_SAN_COMMENT] =
 };
 
 
-/*
- * Set the target of counter attack
+/*!
+ * @brief モンスターの目標地点をセットする / Set the target of counter attack
+ * @param m_ptr モンスターの参照ポインタ
+ * @param y 目標y座標
+ * @param x 目標x座標
+ * @return なし
  */
 void set_target(monster_type *m_ptr, int y, int x)
 {
@@ -161,8 +176,10 @@ void set_target(monster_type *m_ptr, int y, int x)
 }
 
 
-/*
- * Reset the target of counter attack
+/*!
+ * @brief モンスターの目標地点をリセットする / Reset the target of counter attack
+ * @param m_ptr モンスターの参照ポインタ
+ * @return なし
  */
 void reset_target(monster_type *m_ptr)
 {
@@ -170,8 +187,10 @@ void reset_target(monster_type *m_ptr)
 }
 
 
-/*
- *  Extract monster race pointer of a monster's true form
+/*!
+ * @brief モンスターの真の種族を返す / Extract monster race pointer of a monster's true form
+ * @param m_ptr モンスターの参照ポインタ
+ * @return 本当のモンスター種族参照ポインタ
  */
 monster_race *real_r_ptr(monster_type *m_ptr)
 {
@@ -192,9 +211,12 @@ monster_race *real_r_ptr(monster_type *m_ptr)
 }
 
 
-/*
- * Delete a monster by index.
- *
+/*!
+ * @brief モンスター配列からモンスターを消去する / Delete a monster by index.
+ * @param i 消去するモンスターのID
+ * @return なし
+ * @details
+ * モンスターを削除するとそのモンスターが拾っていたアイテムも同時に削除される。 /
  * When a monster is deleted, all of its objects are deleted.
  */
 void delete_monster_idx(int i)
@@ -219,6 +241,14 @@ void delete_monster_idx(int i)
        /* Hack -- count the number of "reproducers" */
        if (r_ptr->flags2 & (RF2_MULTIPLY)) num_repro--;
 
+       if (MON_CSLEEP(m_ptr)) (void)set_monster_csleep(i, 0);
+       if (MON_FAST(m_ptr)) (void)set_monster_fast(i, 0);
+       if (MON_SLOW(m_ptr)) (void)set_monster_slow(i, 0);
+       if (MON_STUNNED(m_ptr)) (void)set_monster_stunned(i, 0);
+       if (MON_CONFUSED(m_ptr)) (void)set_monster_confused(i, 0);
+       if (MON_MONFEAR(m_ptr)) (void)set_monster_monfear(i, 0);
+       if (MON_INVULNER(m_ptr)) (void)set_monster_invulner(i, 0, FALSE);
+
 
        /* Hack -- remove target monster */
        if (i == target_who) target_who = 0;
@@ -245,14 +275,19 @@ void delete_monster_idx(int i)
                /* Acquire next object */
                next_o_idx = o_ptr->next_o_idx;
 
-               /* Hack -- efficiency */
-               o_ptr->held_m_idx = 0;
+               /*
+                * o_ptr->held_m_idx is needed in delete_object_idx()
+                * to prevent calling lite_spot()
+                */
 
                /* Delete the object */
                delete_object_idx(this_o_idx);
        }
 
 
+       if (is_pet(m_ptr)) check_pets_num_and_align(m_ptr, FALSE);
+
+
        /* Wipe the Monster */
        (void)WIPE(m_ptr, monster_type);
 
@@ -263,12 +298,16 @@ void delete_monster_idx(int i)
        lite_spot(y, x);
 
        /* Update some things */
-       p_ptr->update |= (PU_MON_LITE);
+       if (r_ptr->flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
+               p_ptr->update |= (PU_MON_LITE);
 }
 
 
-/*
- * Delete the monster, if any, at a given location
+/*!
+ * @brief 指定位置に存在するモンスターを削除する / Delete the monster, if any, at a given location
+ * @param x 削除位置x座標
+ * @param y 削除位置y座標
+ * @return なし
  */
 void delete_monster(int y, int x)
 {
@@ -285,12 +324,15 @@ void delete_monster(int y, int x)
 }
 
 
-/*
- * Move an object from index i1 to index i2 in the object list
+/*!
+ * @brief モンスター情報を配列内移動する / Move an object from index i1 to index i2 in the object list
+ * @param i1 配列移動元添字
+ * @param i2 配列移動先添字
+ * @return なし
  */
 static void compact_monsters_aux(int i1, int i2)
 {
-       int y, x;
+       int y, x, i;
 
        cave_type *c_ptr;
 
@@ -344,18 +386,37 @@ static void compact_monsters_aux(int i1, int i2)
        /* Hack -- Update the health bar */
        if (p_ptr->health_who == i1) health_track(i2);
 
+       /* Hack -- Update parent index */
+       if (is_pet(m_ptr))
+       {
+               for (i = 1; i < m_max; i++)
+               {
+                       monster_type *m2_ptr = &m_list[i];
+
+                       if (m2_ptr->parent_m_idx == i1)
+                               m2_ptr->parent_m_idx = i2;
+               }
+       }
+
        /* Structure copy */
-       COPY(&m_list[i2], &m_list[i1], monster_type);
+       (void)COPY(&m_list[i2], &m_list[i1], monster_type);
 
        /* Wipe the hole */
        (void)WIPE(&m_list[i1], monster_type);
 
+       for (i = 0; i < MAX_MTIMED; i++)
+       {
+               int mproc_idx = get_mproc_idx(i1, i);
+               if (mproc_idx >= 0) mproc_list[i][mproc_idx] = i2;
+       }
 }
 
 
-/*
- * Compact and Reorder the monster list
- *
+/*!
+ * @brief モンスター情報配列を圧縮する / Compact and Reorder the monster list
+ * @param size 圧縮後のモンスター件数目標
+ * @return なし
+ * @details
  * This function can be very dangerous, use with caution!
  *
  * When actually "compacting" monsters, we base the saving throw
@@ -371,11 +432,7 @@ void compact_monsters(int size)
        int             cur_lev, cur_dis, chance;
 
        /* Message (only if compacting) */
-#ifdef JP
-       if (size) msg_print("¥â¥ó¥¹¥¿¡¼¾ðÊó¤ò°µ½Ì¤·¤Æ¤¤¤Þ¤¹...");
-#else
-       if (size) msg_print("Compacting monsters...");
-#endif
+       if (size) msg_print(_("モンスター情報を圧縮しています...", "Compacting monsters..."));
 
 
        /* Compact at least 'size' objects */
@@ -417,6 +474,14 @@ void compact_monsters(int size)
                        /* All monsters get a saving throw */
                        if (randint0(100) < chance) continue;
 
+                       if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname)
+                       {
+                               char m_name[80];
+
+                               monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
+                               do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_COMPACT, m_name);
+                       }
+
                        /* Delete the monster */
                        delete_monster_idx(i);
 
@@ -444,9 +509,10 @@ void compact_monsters(int size)
 }
 
 
-/*
- * Delete/Remove all the monsters when the player leaves the level
- *
+/*!
+ * @brief プレイヤーのフロア離脱に伴う全モンスター配列の消去 / Delete/Remove all the monsters when the player leaves the level
+ * @return なし
+ * @details
  * This is an efficient method of simulating multiple calls to the
  * "delete_monster()" function, with no visual effects.
  */
@@ -461,12 +527,14 @@ void wipe_m_list(void)
                {
                        r_info[MON_BANOR].max_num = 0;
                        r_info[MON_BANOR].r_pkills++;
+                       r_info[MON_BANOR].r_akills++;
                        if (r_info[MON_BANOR].r_tkills < MAX_SHORT) r_info[MON_BANOR].r_tkills++;
                }
                if (r_info[MON_LUPART].max_num)
                {
                        r_info[MON_LUPART].max_num = 0;
                        r_info[MON_LUPART].r_pkills++;
+                       r_info[MON_LUPART].r_akills++;
                        if (r_info[MON_LUPART].r_tkills < MAX_SHORT) r_info[MON_LUPART].r_tkills++;
                }
        }
@@ -479,9 +547,6 @@ void wipe_m_list(void)
                /* Skip dead monsters */
                if (!m_ptr->r_idx) continue;
 
-               /* Hack -- Reduce the racial counter */
-               real_r_ptr(m_ptr)->cur_num = 0;
-
                /* Monster is gone */
                cave[m_ptr->fy][m_ptr->fx].m_idx = 0;
 
@@ -490,12 +555,24 @@ void wipe_m_list(void)
 
        }
 
+       /*
+        * Wiping racial counters of all monsters and incrementing of racial
+        * counters of monsters in party_mon[] are required to prevent multiple
+        * generation of unique monster who is the minion of player.
+        */
+
+       /* Hack -- Wipe the racial counter of all monster races */
+       for (i = 1; i < max_r_idx; i++) r_info[i].cur_num = 0;
+
        /* Reset "m_max" */
        m_max = 1;
 
        /* Reset "m_cnt" */
        m_cnt = 0;
 
+       /* Reset "mproc_max[]" */
+       for (i = 0; i < MAX_MTIMED; i++) mproc_max[i] = 0;
+
        /* Hack -- reset "reproducer" count */
        num_repro = 0;
 
@@ -509,9 +586,10 @@ void wipe_m_list(void)
 }
 
 
-/*
- * Acquires and returns the index of a "free" monster.
- *
+/*!
+ * @brief モンスター配列の空きを探す / Acquires and returns the index of a "free" monster.
+ * @return 利用可能なモンスター配列の添字
+ * @details
  * This routine should almost never fail, but it *can* happen.
  */
 s16b m_pop(void)
@@ -556,12 +634,7 @@ s16b m_pop(void)
 
 
        /* Warn the player (except during dungeon creation) */
-#ifdef JP
-       if (character_dungeon) msg_print("¥â¥ó¥¹¥¿¡¼¤¬Â¿¤¹¤®¤ë¡ª");
-#else
-       if (character_dungeon) msg_print("Too many monsters!");
-#endif
-
+       if (character_dungeon) msg_print(_("モンスターが多すぎる!", "Too many monsters!"));
 
        /* Try not to crash */
        return (0);
@@ -570,26 +643,33 @@ s16b m_pop(void)
 
 
 
-/*
- * Hack -- the "type" of the current "summon specific"
+/*!
+ * @var summon_specific_type
+ * @brief 召喚条件を指定するグローバル変数 / Hack -- the "type" of the current "summon specific"
+ * @todo summon_specific_typeグローバル変数の除去と関数引数への代替を行う
  */
 static int summon_specific_type = 0;
 
 
-/*
- * Hack -- the index of the summoning monster
+/*!
+ * @var summon_specific_who
+ * @brief 召喚を行ったプレイヤーあるいはモンスターのIDを示すグローバル変数 / Hack -- the index of the summoning monster
+ * @todo summon_specific_who グローバル変数の除去と関数引数への代替を行う
  */
 static int summon_specific_who = -1;
 
-
-/*
- * Hack -- the hostility of the summoned monster
+/*!
+ * @var summon_unique_okay
+ * @brief 召喚対象にユニークを含めるかを示すグローバル変数 / summoning unique enable
+ * @todo summon_unique_okay グローバル変数の除去と関数引数への代替を行う
  */
-static bool summon_specific_hostile = TRUE;
-
 static bool summon_unique_okay = FALSE;
 
-
+/*!
+ * @brief 指定されたモンスター種族がsummon_specific_typeで指定された召喚条件に合うかどうかを返す
+ * @return 召喚条件が一致するならtrue
+ * @details
+ */
 static bool summon_specific_aux(int r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
@@ -681,35 +761,29 @@ static bool summon_specific_aux(int r_idx)
                        break;
                }
 
-               case SUMMON_BIZARRE1:
+               case SUMMON_MOLD:
                {
                        okay = (r_ptr->d_char == 'm');
                        break;
                }
-               case SUMMON_BIZARRE2:
+               case SUMMON_BAT:
                {
                        okay = (r_ptr->d_char == 'b');
                        break;
                }
-               case SUMMON_BIZARRE3:
+               case SUMMON_QUYLTHULG:
                {
                        okay = (r_ptr->d_char == 'Q');
                        break;
                }
 
-               case SUMMON_BIZARRE4:
-               {
-                       okay = (r_ptr->d_char == 'v');
-                       break;
-               }
-
-               case SUMMON_BIZARRE5:
+               case SUMMON_COIN_MIMIC:
                {
                        okay = (r_ptr->d_char == '$');
                        break;
                }
 
-               case SUMMON_BIZARRE6:
+               case SUMMON_MIMIC:
                {
                        okay = ((r_ptr->d_char == '!') ||
                                 (r_ptr->d_char == '?') ||
@@ -754,26 +828,25 @@ static bool summon_specific_aux(int r_idx)
                case SUMMON_ANIMAL_RANGER:
                {
                        okay = ((r_ptr->flags3 & (RF3_ANIMAL)) &&
-                              (strchr("abcflqrwBCHIJKMRS", r_ptr->d_char)) &&
+                              (my_strchr("abcflqrwBCHIJKMRS", r_ptr->d_char)) &&
                               !(r_ptr->flags3 & (RF3_DRAGON)) &&
                               !(r_ptr->flags3 & (RF3_EVIL)) &&
                               !(r_ptr->flags3 & (RF3_UNDEAD)) &&
                               !(r_ptr->flags3 & (RF3_DEMON)) &&
                               !(r_ptr->flags2 & (RF2_MULTIPLY)) &&
-                              !(r_ptr->flags4 || r_ptr->flags5 || r_ptr->flags6));
+                              !(r_ptr->flags4 || r_ptr->a_ability_flags1 || r_ptr->a_ability_flags2));
                        break;
                }
 
                case SUMMON_HI_DRAGON_LIVING:
                {
-                       okay = ((r_ptr->d_char == 'D') &&
-                              !(r_ptr->flags3 & (RF3_DEMON | RF3_UNDEAD | RF3_NONLIVING)));
+                       okay = ((r_ptr->d_char == 'D') && monster_living(r_ptr));
                        break;
                }
 
                case SUMMON_LIVING:
                {
-                       okay = (!(r_ptr->flags3 & (RF3_DEMON | RF3_UNDEAD | RF3_NONLIVING)));
+                       okay = monster_living(r_ptr);
                        break;
                }
 
@@ -827,7 +900,7 @@ static bool summon_specific_aux(int r_idx)
 
                        for (i = 0; i < 4; i++)
                                if (r_ptr->blow[i].method == RBM_EXPLODE) okay = TRUE;
-                       okay = (okay && (!(r_ptr->flags3 & (RF3_DEMON | RF3_UNDEAD | RF3_NONLIVING))));
+                       okay = (okay && monster_living(r_ptr));
                        break;
                }
 
@@ -893,13 +966,18 @@ static bool summon_specific_aux(int r_idx)
        return (bool)(okay ? TRUE : FALSE);
 }
 
-
+/*!
+ * @var chameleon_change_m_idx
+ * @brief カメレオンの変身先モンスターIDを受け渡すためのグローバル変数
+ * @todo 変数渡しの問題などもあるができればchameleon_change_m_idxのグローバル変数を除去し、関数引き渡しに移行すること
+ */
 static int chameleon_change_m_idx = 0;
 
 
-/*
- * Some dungeon types restrict the possible monsters.
- * Return TRUE is the monster is OK and FALSE otherwise
+/*!
+ * @brief 指定されたモンスター種族がダンジョンの制限にかかるかどうかをチェックする / Some dungeon types restrict the possible monsters.
+ * @param r_idx チェックするモンスター種族ID
+ * @return 召喚条件が一致するならtrue / Return TRUE is the monster is OK and FALSE otherwise
  */
 static bool restrict_monster_to_dungeon(int r_idx)
 {
@@ -916,16 +994,16 @@ static bool restrict_monster_to_dungeon(int r_idx)
                if (r_idx != MON_CHAMELEON &&
                    r_ptr->freq_spell && 
                    !(r_ptr->flags4 & RF4_NOMAGIC_MASK) &&
-                   !(r_ptr->flags5 & RF5_NOMAGIC_MASK) &&
-                   !(r_ptr->flags6 & RF6_NOMAGIC_MASK))
+                   !(r_ptr->a_ability_flags1 & RF5_NOMAGIC_MASK) &&
+                   !(r_ptr->a_ability_flags2 & RF6_NOMAGIC_MASK))
                        return FALSE;
        }
        if (d_ptr->flags1 & DF1_NO_MELEE)
        {
                if (r_idx == MON_CHAMELEON) return TRUE;
                if (!(r_ptr->flags4 & (RF4_BOLT_MASK | RF4_BEAM_MASK | RF4_BALL_MASK)) &&
-                   !(r_ptr->flags5 & (RF5_BOLT_MASK | RF5_BEAM_MASK | RF5_BALL_MASK | RF5_CAUSE_1 | RF5_CAUSE_2 | RF5_CAUSE_3 | RF5_CAUSE_4 | RF5_MIND_BLAST | RF5_BRAIN_SMASH)) &&
-                   !(r_ptr->flags6 & (RF6_BOLT_MASK | RF6_BEAM_MASK | RF6_BALL_MASK)))
+                   !(r_ptr->a_ability_flags1 & (RF5_BOLT_MASK | RF5_BEAM_MASK | RF5_BALL_MASK | RF5_CAUSE_1 | RF5_CAUSE_2 | RF5_CAUSE_3 | RF5_CAUSE_4 | RF5_MIND_BLAST | RF5_BRAIN_SMASH)) &&
+                   !(r_ptr->a_ability_flags2 & (RF6_BOLT_MASK | RF6_BEAM_MASK | RF6_BALL_MASK)))
                        return FALSE;
        }
        if (d_ptr->flags1 & DF1_BEGINNER)
@@ -934,214 +1012,164 @@ static bool restrict_monster_to_dungeon(int r_idx)
                        return FALSE;
        }
 
-       if (d_ptr->special_div == 64) return TRUE;
+       if (d_ptr->special_div >= 64) return TRUE;
        if (summon_specific_type && !(d_ptr->flags1 & DF1_CHAMELEON)) return TRUE;
 
-       if(d_ptr->mode == DUNGEON_MODE_AND)
+       switch (d_ptr->mode)
        {
+       case DUNGEON_MODE_AND:
                if (d_ptr->mflags1)
                {
-                       if((d_ptr->mflags1 & r_ptr->flags1) != d_ptr->mflags1)
+                       if ((d_ptr->mflags1 & r_ptr->flags1) != d_ptr->mflags1)
                                return FALSE;
                }
                if (d_ptr->mflags2)
                {
-                       if((d_ptr->mflags2 & r_ptr->flags2) != d_ptr->mflags2)
+                       if ((d_ptr->mflags2 & r_ptr->flags2) != d_ptr->mflags2)
                                return FALSE;
                }
                if (d_ptr->mflags3)
                {
-                       if((d_ptr->mflags3 & r_ptr->flags3) != d_ptr->mflags3)
+                       if ((d_ptr->mflags3 & r_ptr->flags3) != d_ptr->mflags3)
                                return FALSE;
                }
                if (d_ptr->mflags4)
                {
-                       if((d_ptr->mflags4 & r_ptr->flags4) != d_ptr->mflags4)
+                       if ((d_ptr->mflags4 & r_ptr->flags4) != d_ptr->mflags4)
                                return FALSE;
                }
-               if (d_ptr->mflags5)
+               if (d_ptr->m_a_ability_flags1)
                {
-                       if((d_ptr->mflags5 & r_ptr->flags5) != d_ptr->mflags5)
+                       if ((d_ptr->m_a_ability_flags1 & r_ptr->a_ability_flags1) != d_ptr->m_a_ability_flags1)
                                return FALSE;
                }
-               if (d_ptr->mflags6)
+               if (d_ptr->m_a_ability_flags2)
                {
-                       if((d_ptr->mflags6 & r_ptr->flags6) != d_ptr->mflags6)
+                       if ((d_ptr->m_a_ability_flags2 & r_ptr->a_ability_flags2) != d_ptr->m_a_ability_flags2)
                                return FALSE;
                }
                if (d_ptr->mflags7)
                {
-                       if((d_ptr->mflags7 & r_ptr->flags7) != d_ptr->mflags7)
+                       if ((d_ptr->mflags7 & r_ptr->flags7) != d_ptr->mflags7)
                                return FALSE;
                }
                if (d_ptr->mflags8)
                {
-                       if((d_ptr->mflags8 & r_ptr->flags8) != d_ptr->mflags8)
+                       if ((d_ptr->mflags8 & r_ptr->flags8) != d_ptr->mflags8)
                                return FALSE;
                }
                if (d_ptr->mflags9)
                {
-                       if((d_ptr->mflags9 & r_ptr->flags9) != d_ptr->mflags9)
+                       if ((d_ptr->mflags9 & r_ptr->flags9) != d_ptr->mflags9)
                                return FALSE;
                }
-               for(a = 0; a < 5; a++)
-                       if(d_ptr->r_char[a] && (d_ptr->r_char[a] != r_ptr->d_char)) return FALSE;
-       }
-       else if(d_ptr->mode == DUNGEON_MODE_NAND)
-       {
-               byte ok[9 + 5], i = 0, j = 0;
+               if (d_ptr->mflagsr)
+               {
+                       if ((d_ptr->mflagsr & r_ptr->flagsr) != d_ptr->mflagsr)
+                               return FALSE;
+               }
+               for (a = 0; a < 5; a++)
+                       if (d_ptr->r_char[a] && (d_ptr->r_char[a] != r_ptr->d_char)) return FALSE;
 
+               return TRUE;
+
+       case DUNGEON_MODE_NAND:
                if (d_ptr->mflags1)
                {
-                       i++;
-                       if(d_ptr->mflags1 & r_ptr->flags1)
-                               ok[0] = 1;
+                       if ((d_ptr->mflags1 & r_ptr->flags1) != d_ptr->mflags1)
+                               return TRUE;
                }
                if (d_ptr->mflags2)
                {
-                       i++;
-                       if(d_ptr->mflags2 & r_ptr->flags2)
-                               ok[1] = 1;
+                       if ((d_ptr->mflags2 & r_ptr->flags2) != d_ptr->mflags2)
+                               return TRUE;
                }
                if (d_ptr->mflags3)
                {
-                       i++;
-                       if(d_ptr->mflags3 & r_ptr->flags3)
-                               ok[2] = 1;
+                       if ((d_ptr->mflags3 & r_ptr->flags3) != d_ptr->mflags3)
+                               return TRUE;
                }
                if (d_ptr->mflags4)
                {
-                       i++;
-                       if(d_ptr->mflags4 & r_ptr->flags4)
-                               ok[3] = 1;
+                       if ((d_ptr->mflags4 & r_ptr->flags4) != d_ptr->mflags4)
+                               return TRUE;
                }
-               if (d_ptr->mflags5)
+               if (d_ptr->m_a_ability_flags1)
                {
-                       i++;
-                       if(d_ptr->mflags5 & r_ptr->flags5)
-                               ok[4] = 1;
+                       if ((d_ptr->m_a_ability_flags1 & r_ptr->a_ability_flags1) != d_ptr->m_a_ability_flags1)
+                               return TRUE;
                }
-               if (d_ptr->mflags6)
+               if (d_ptr->m_a_ability_flags2)
                {
-                       i++;
-                       if(d_ptr->mflags6 & r_ptr->flags6)
-                               ok[5] = 1;
+                       if ((d_ptr->m_a_ability_flags2 & r_ptr->a_ability_flags2) != d_ptr->m_a_ability_flags2)
+                               return TRUE;
                }
                if (d_ptr->mflags7)
                {
-                       i++;
-                       if(d_ptr->mflags7 & r_ptr->flags7)
-                               ok[6] = 1;
+                       if ((d_ptr->mflags7 & r_ptr->flags7) != d_ptr->mflags7)
+                               return TRUE;
                }
                if (d_ptr->mflags8)
                {
-                       i++;
-                       if(d_ptr->mflags8 & r_ptr->flags8)
-                               ok[7] = 1;
+                       if ((d_ptr->mflags8 & r_ptr->flags8) != d_ptr->mflags8)
+                               return TRUE;
                }
                if (d_ptr->mflags9)
                {
-                       i++;
-                       if(d_ptr->mflags9 & r_ptr->flags9)
-                               ok[8] = 1;
-               }
-
-               for(a = 0; a < 5; a++)
-               {
-                       if(d_ptr->r_char[a])
-                       {
-                               i++;
-                               if (d_ptr->r_char[a] != r_ptr->d_char) ok[9 + a] = 1;
-                       }
+                       if ((d_ptr->mflags9 & r_ptr->flags9) != d_ptr->mflags9)
+                               return TRUE;
                }
-
-               j = ok[0] + ok[1] + ok[2] + ok[3] + ok[4] + ok[5] + ok[6] + ok[7] + ok[8] + ok[9] + ok[10] + ok[11] + ok[12] + ok[13];
-
-               if(i == j) return FALSE;
-       }
-       else if(d_ptr->mode == DUNGEON_MODE_OR)
-       {
-               byte ok = FALSE, i;
-               s32b flag;
-
-               for(i = 0; i < 32; i++)
+               if (d_ptr->mflagsr)
                {
-                       flag = d_ptr->mflags1 & (1 << i);
-                       if(r_ptr->flags1 & flag) ok = TRUE;
-
-                       flag = d_ptr->mflags2 & (1 << i);
-                       if(r_ptr->flags2 & flag) ok = TRUE;
-
-                       flag = d_ptr->mflags3 & (1 << i);
-                       if(r_ptr->flags3 & flag) ok = TRUE;
-
-                       flag = d_ptr->mflags4 & (1 << i);
-                       if(r_ptr->flags4 & flag) ok = TRUE;
-
-                       flag = d_ptr->mflags5 & (1 << i);
-                       if(r_ptr->flags5 & flag) ok = TRUE;
-
-                       flag = d_ptr->mflags6 & (1 << i);
-                       if(r_ptr->flags6 & flag) ok = TRUE;
-
-                       flag = d_ptr->mflags7 & (1 << i);
-                       if(r_ptr->flags7 & flag) ok = TRUE;
-
-                       flag = d_ptr->mflags8 & (1 << i);
-                       if(r_ptr->flags8 & flag) ok = TRUE;
-
-                       flag = d_ptr->mflags9 & (1 << i);
-                       if(r_ptr->flags9 & flag) ok = TRUE;
+                       if ((d_ptr->mflagsr & r_ptr->flagsr) != d_ptr->mflagsr)
+                               return TRUE;
                }
-               for(a = 0; a < 5; a++)
-                       if(d_ptr->r_char[a] == r_ptr->d_char) ok = TRUE;
-
-               return ok;
-       }
-       else if(d_ptr->mode == DUNGEON_MODE_NOR)
-       {
-               byte ok = TRUE, i;
-               s32b flag;
-
-               for(i = 0; i < 32; i++)
-               {
-                       flag = d_ptr->mflags1 & (1 << i);
-                       if(r_ptr->flags1 & flag) ok = FALSE;
+               for (a = 0; a < 5; a++)
+                       if (d_ptr->r_char[a] && (d_ptr->r_char[a] != r_ptr->d_char)) return TRUE;
 
-                       flag = d_ptr->mflags2 & (1 << i);
-                       if(r_ptr->flags2 & flag) ok = FALSE;
-
-                       flag = d_ptr->mflags3 & (1 << i);
-                       if(r_ptr->flags3 & flag) ok = FALSE;
-
-                       flag = d_ptr->mflags4 & (1 << i);
-                       if(r_ptr->flags4 & flag) ok = FALSE;
-
-                       flag = d_ptr->mflags5 & (1 << i);
-                       if(r_ptr->flags5 & flag) ok = FALSE;
+               return FALSE;
 
-                       flag = d_ptr->mflags6 & (1 << i);
-                       if(r_ptr->flags6 & flag) ok = FALSE;
+       case DUNGEON_MODE_OR:
+               if (r_ptr->flags1 & d_ptr->mflags1) return TRUE;
+               if (r_ptr->flags2 & d_ptr->mflags2) return TRUE;
+               if (r_ptr->flags3 & d_ptr->mflags3) return TRUE;
+               if (r_ptr->flags4 & d_ptr->mflags4) return TRUE;
+               if (r_ptr->a_ability_flags1 & d_ptr->m_a_ability_flags1) return TRUE;
+               if (r_ptr->a_ability_flags2 & d_ptr->m_a_ability_flags2) return TRUE;
+               if (r_ptr->flags7 & d_ptr->mflags7) return TRUE;
+               if (r_ptr->flags8 & d_ptr->mflags8) return TRUE;
+               if (r_ptr->flags9 & d_ptr->mflags9) return TRUE;
+               if (r_ptr->flagsr & d_ptr->mflagsr) return TRUE;
+               for (a = 0; a < 5; a++)
+                       if (d_ptr->r_char[a] == r_ptr->d_char) return TRUE;
 
-                       flag = d_ptr->mflags7 & (1 << i);
-                       if(r_ptr->flags7 & flag) ok = FALSE;
+               return FALSE;
 
-                       flag = d_ptr->mflags8 & (1 << i);
-                       if(r_ptr->flags8 & flag) ok = FALSE;
+       case DUNGEON_MODE_NOR:
+               if (r_ptr->flags1 & d_ptr->mflags1) return FALSE;
+               if (r_ptr->flags2 & d_ptr->mflags2) return FALSE;
+               if (r_ptr->flags3 & d_ptr->mflags3) return FALSE;
+               if (r_ptr->flags4 & d_ptr->mflags4) return FALSE;
+               if (r_ptr->a_ability_flags1 & d_ptr->m_a_ability_flags1) return FALSE;
+               if (r_ptr->a_ability_flags2 & d_ptr->m_a_ability_flags2) return FALSE;
+               if (r_ptr->flags7 & d_ptr->mflags7) return FALSE;
+               if (r_ptr->flags8 & d_ptr->mflags8) return FALSE;
+               if (r_ptr->flags9 & d_ptr->mflags9) return FALSE;
+               if (r_ptr->flagsr & d_ptr->mflagsr) return FALSE;
+               for (a = 0; a < 5; a++)
+                       if (d_ptr->r_char[a] == r_ptr->d_char) return FALSE;
 
-                       flag = d_ptr->mflags9 & (1 << i);
-                       if(r_ptr->flags9 & flag) ok = FALSE;
-               }
-               for(a = 0; a < 5; a++)
-                       if(d_ptr->r_char[a] == r_ptr->d_char) ok = FALSE;
-               return ok;
+               return TRUE;
        }
 
        return TRUE;
 }
 
-/*
- * Apply a "monster restriction function" to the "monster allocation table"
+/*!
+ * @brief モンスター生成制限関数最大2つから / Apply a "monster restriction function" to the "monster allocation table"
+ * @param monster_hook 制限関数1
+ * @param monster_hook2 制限関数2
+ * @return エラーコード
  */
 errr get_mon_num_prep(monster_hook_type monster_hook,
                                          monster_hook_type monster_hook2)
@@ -1179,7 +1207,7 @@ errr get_mon_num_prep(monster_hook_type monster_hook,
 
                        if (r_ptr->flags7 & RF7_GUARDIAN)
                                continue;
-               
+
                        /* Depth Monsters never appear out of depth */
                        if ((r_ptr->flags1 & (RF1_FORCE_DEPTH)) &&
                            (r_ptr->level > dun_level))
@@ -1189,7 +1217,7 @@ errr get_mon_num_prep(monster_hook_type monster_hook,
                /* Accept this monster */
                entry->prob2 = entry->prob1;
 
-               if (dun_level && (!p_ptr->inside_quest || p_ptr->inside_quest < MIN_RANDOM_QUEST) && !restrict_monster_to_dungeon(entry->index) && !p_ptr->inside_battle)
+               if (dun_level && (!p_ptr->inside_quest || is_fixed_quest_idx(p_ptr->inside_quest)) && !restrict_monster_to_dungeon(entry->index) && !p_ptr->inside_battle)
                {
                        int hoge = entry->prob2 * d_info[dungeon_type].special_div;
                        entry->prob2 = hoge / 64;
@@ -1201,7 +1229,11 @@ errr get_mon_num_prep(monster_hook_type monster_hook,
        return (0);
 }
 
-
+/*!
+ * @brief 平方根を切り捨て整数で返す
+ * @param n 数値
+ * @return 平方根
+ */
 static int mysqrt(int n)
 {
        int tmp = n>>1;
@@ -1239,7 +1271,11 @@ static int mysqrt(int n)
        return kaeriti;
 }
 
-/*
+/*!
+ * @brief 生成モンスター種族を1種生成テーブルから選択する
+ * @param level 生成階
+ * @return 選択されたモンスター生成種族
+ * @details
  * Choose a monster race that seems "appropriate" to the given level
  *
  * This function uses the "prob2" field of the "monster allocation table",
@@ -1264,41 +1300,29 @@ static int mysqrt(int n)
 s16b get_mon_num(int level)
 {
        int                     i, j, p;
-
        int                     r_idx;
-
        long            value, total;
-
        monster_race    *r_ptr;
-
        alloc_entry             *table = alloc_race_table;
 
        int pls_kakuritu, pls_level;
-       int hoge=mysqrt(level*10000L);
+       int delay = mysqrt(level * 10000L) + 400L;
 
        if (level > MAX_DEPTH - 1) level = MAX_DEPTH - 1;
 
-       if ((dungeon_turn > hoge*(TURNS_PER_TICK*500L)) && !level)
-       {
-               pls_kakuritu = MAX(2, NASTY_MON-((dungeon_turn/(TURNS_PER_TICK*2500L)-hoge/10)));
-               pls_level = MIN(8,3 + dungeon_turn/(TURNS_PER_TICK*20000L)-hoge/40);
-       }
-       else
-       {
-               pls_kakuritu = NASTY_MON;
-               pls_level = 2;
-       }
+       pls_kakuritu = MAX(NASTY_MON_MAX, NASTY_MON_BASE - ((dungeon_turn / (TURNS_PER_TICK * 5000L) - delay / 10)));
+       pls_level    = MIN(NASTY_MON_PLUS_MAX, 3 + dungeon_turn / (TURNS_PER_TICK * 40000L) - delay / 40 + MIN(5, level / 10)) ;
 
        if (d_info[dungeon_type].flags1 & DF1_MAZE)
        {
-               pls_kakuritu = MIN(pls_kakuritu/2, pls_kakuritu-10);
+               pls_kakuritu = MIN(pls_kakuritu / 2, pls_kakuritu - 10);
                if (pls_kakuritu < 2) pls_kakuritu = 2;
                pls_level += 2;
                level += 3;
        }
 
        /* Boost the level */
-       if ((level > 0) && !p_ptr->inside_battle && !(d_info[dungeon_type].flags1 & DF1_BEGINNER))
+       if (!p_ptr->inside_battle && !(d_info[dungeon_type].flags1 & DF1_BEGINNER))
        {
                /* Nightmare mode allows more out-of depth monsters */
                if (ironman_nightmare && !randint0(pls_kakuritu))
@@ -1312,25 +1336,11 @@ s16b get_mon_num(int level)
                        if (!randint0(pls_kakuritu))
                        {
                                /* Pick a level bonus */
-                               int d = MIN(5, level/10) + pls_level;
-
-                               /* Boost the level */
-                               level += d;
-                       }
-
-                       /* Occasional "nasty" monster */
-                       if (!randint0(pls_kakuritu))
-                       {
-                               /* Pick a level bonus */
-                               int d = MIN(5, level/10) + pls_level;
-
-                               /* Boost the level */
-                               level += d;
+                               level += pls_level;
                        }
                }
        }
 
-
        /* Reset total */
        total = 0L;
 
@@ -1353,7 +1363,7 @@ s16b get_mon_num(int level)
                {
                        /* Hack -- "unique" monsters must be "unique" */
                        if (((r_ptr->flags1 & (RF1_UNIQUE)) ||
-                            (r_ptr->flags7 & (RF7_UNIQUE_7))) &&
+                            (r_ptr->flags7 & (RF7_NAZGUL))) &&
                            (r_ptr->cur_num >= r_ptr->max_num))
                        {
                                continue;
@@ -1382,7 +1392,6 @@ s16b get_mon_num(int level)
        /* No legal monsters */
        if (total <= 0) return (0);
 
-
        /* Pick a monster */
        value = randint0(total);
 
@@ -1396,7 +1405,6 @@ s16b get_mon_num(int level)
                value = value - table[i].prob3;
        }
 
-
        /* Power boost */
        p = randint0(100);
 
@@ -1451,12 +1459,13 @@ s16b get_mon_num(int level)
 }
 
 
-
-
-
-/*
- * Build a string describing a monster in some way.
- *
+/*!
+ * @brief モンスターの呼称を作成する / Build a string describing a monster in some way.
+ * @param desc 記述出力先の文字列参照ポインタ
+ * @param m_ptr モンスターの参照ポインタ
+ * @param mode 呼称オプション
+ * @return なし
+ * @details
  * We can correctly describe monsters based on their visibility.
  * We can force all monsters to be treated as visible or invisible.
  * We can build nominatives, objectives, possessives, or reflexives.
@@ -1482,24 +1491,26 @@ s16b get_mon_num(int level)
  * so that "char desc[80];" is sufficiently large for any result.
  *
  * Mode Flags:
- *   0x01 --> Objective (or Reflexive)
- *   0x02 --> Possessive (or Reflexive)
- *   0x04 --> Use indefinites for hidden monsters ("something")
- *   0x08 --> Use indefinites for visible monsters ("a kobold")
- *   0x10 --> Pronominalize hidden monsters
- *   0x20 --> Pronominalize visible monsters
- *   0x40 --> Assume the monster is hidden
- *   0x80 --> Assume the monster is visible
- *  0x100 --> Chameleon's true name
- *  0x200 --> Ignore hallucination, and penetrate shape change
+ *  MD_OBJECTIVE      --> Objective (or Reflexive)
+ *  MD_POSSESSIVE     --> Possessive (or Reflexive)
+ *  MD_INDEF_HIDDEN   --> Use indefinites for hidden monsters ("something")
+ *  MD_INDEF_VISIBLE  --> Use indefinites for visible monsters ("a kobold")
+ *  MD_PRON_HIDDEN    --> Pronominalize hidden monsters
+ *  MD_PRON_VISIBLE   --> Pronominalize visible monsters
+ *  MD_ASSUME_HIDDEN  --> Assume the monster is hidden
+ *  MD_ASSUME_VISIBLE --> Assume the monster is visible
+ *  MD_TRUE_NAME      --> Chameleon's true name
+ *  MD_IGNORE_HALLU   --> Ignore hallucination, and penetrate shape change
  *
  * Useful Modes:
- *   0x00 --> Full nominative name ("the kobold") or "it"
- *   0x04 --> Full nominative name ("the kobold") or "something"
- *   0x80 --> Genocide resistance name ("the kobold")
- *   0x88 --> Killing name ("a kobold")
- *   0x22 --> Possessive, genderized if visable ("his") or "its"
- *   0x23 --> Reflexive, genderized if visable ("himself") or "itself"
+ *  0x00 --> Full nominative name ("the kobold") or "it"
+ *  MD_INDEF_HIDDEN --> Full nominative name ("the kobold") or "something"
+ *  MD_ASSUME_VISIBLE --> Genocide resistance name ("the kobold")
+ *  MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE --> Killing name ("a kobold")
+ *  MD_PRON_VISIBLE | MD_POSSESSIVE
+ *    --> Possessive, genderized if visable ("his") or "its"
+ *  MD_PRON_VISIBLE | MD_POSSESSIVE | MD_OBJECTIVE
+ *    --> Reflexive, genderized if visable ("himself") or "itself"
  */
 void monster_desc(char *desc, monster_type *m_ptr, int mode)
 {
@@ -1514,21 +1525,16 @@ void monster_desc(char *desc, monster_type *m_ptr, int mode)
 
        r_ptr = &r_info[m_ptr->ap_r_idx];
 
-       /* Mode of 0x100 will reveal Chameleon's true name */
-       if (mode & 0x100) name = (r_name + real_r_ptr(m_ptr)->name);
+       /* Mode of MD_TRUE_NAME will reveal Chameleon's true name */
+       if (mode & MD_TRUE_NAME) name = (r_name + real_r_ptr(m_ptr)->name);
        else name = (r_name + r_ptr->name);
 
        /* Are we hallucinating? (Idea from Nethack...) */
-       if (p_ptr->image && !(mode & 0x200))
+       if (p_ptr->image && !(mode & MD_IGNORE_HALLU))
        {
                if (one_in_(2))
                {
-#ifdef JP
-if (!get_rnd_line("silly_j.txt", m_ptr->r_idx, silly_name))
-#else
-                       if (!get_rnd_line("silly.txt", m_ptr->r_idx, silly_name))
-#endif
-
+                       if (!get_rnd_line(_("silly_j.txt", "silly.txt"), m_ptr->r_idx, silly_name))
                                named = TRUE;
                }
 
@@ -1540,7 +1546,7 @@ if (!get_rnd_line("silly_j.txt", m_ptr->r_idx, silly_name))
                        {
                                hallu_race = &r_info[randint1(max_r_idx - 1)];
                        }
-                       while (hallu_race->flags1 & RF1_UNIQUE);
+                       while (!hallu_race->name || (hallu_race->flags1 & RF1_UNIQUE));
 
                        strcpy(silly_name, (r_name + hallu_race->name));
                }
@@ -1550,10 +1556,10 @@ if (!get_rnd_line("silly_j.txt", m_ptr->r_idx, silly_name))
        }
 
        /* Can we "see" it (exists + forced, or visible + not unforced) */
-       seen = (m_ptr && ((mode & 0x80) || (!(mode & 0x40) && m_ptr->ml)));
+       seen = (m_ptr && ((mode & MD_ASSUME_VISIBLE) || (!(mode & MD_ASSUME_HIDDEN) && m_ptr->ml)));
 
        /* Sexed Pronouns (seen and allowed, or unseen and allowed) */
-       pron = (m_ptr && ((seen && (mode & 0x20)) || (!seen && (mode & 0x10))));
+       pron = (m_ptr && ((seen && (mode & MD_PRON_VISIBLE)) || (!seen && (mode & MD_PRON_HIDDEN))));
 
 
        /* First, try using pronouns, or describing hidden monsters */
@@ -1571,81 +1577,75 @@ if (!get_rnd_line("silly_j.txt", m_ptr->r_idx, silly_name))
 
 
                /* Assume simple result */
-#ifdef JP
-               res = "²¿¤«";
-#else
-               res = "it";
-#endif
-
+               res = _("何か", "it");
 
                /* Brute force: split on the possibilities */
-               switch (kind + (mode & 0x07))
+               switch (kind + (mode & (MD_INDEF_HIDDEN | MD_POSSESSIVE | MD_OBJECTIVE)))
                {
                        /* Neuter, or unknown */
 #ifdef JP
-                       case 0x00: res = "²¿¤«"; break;
-                       case 0x01: res = "²¿¤«"; break;
-                       case 0x02: res = "²¿¤«¤Î"; break;
-                       case 0x03: res = "²¿¤«¼«¿È"; break;
-                       case 0x04: res = "²¿¤«"; break;
-                       case 0x05: res = "²¿¤«"; break;
-                       case 0x06: res = "²¿¤«"; break;
-                       case 0x07: res = "¤½¤ì¼«¿È"; break;
+                       case 0x00:                                                    res = "何か"; break;
+                       case 0x00 + (MD_OBJECTIVE):                                   res = "何か"; break;
+                       case 0x00 + (MD_POSSESSIVE):                                  res = "何かの"; break;
+                       case 0x00 + (MD_POSSESSIVE | MD_OBJECTIVE):                   res = "何か自身"; break;
+                       case 0x00 + (MD_INDEF_HIDDEN):                                res = "何か"; break;
+                       case 0x00 + (MD_INDEF_HIDDEN | MD_OBJECTIVE):                 res = "何か"; break;
+                       case 0x00 + (MD_INDEF_HIDDEN | MD_POSSESSIVE):                res = "何か"; break;
+                       case 0x00 + (MD_INDEF_HIDDEN | MD_POSSESSIVE | MD_OBJECTIVE): res = "それ自身"; break;
 #else
-                       case 0x00: res = "it"; break;
-                       case 0x01: res = "it"; break;
-                       case 0x02: res = "its"; break;
-                       case 0x03: res = "itself"; break;
-                       case 0x04: res = "something"; break;
-                       case 0x05: res = "something"; break;
-                       case 0x06: res = "something's"; break;
-                       case 0x07: res = "itself"; break;
+                       case 0x00:                                                    res = "it"; break;
+                       case 0x00 + (MD_OBJECTIVE):                                   res = "it"; break;
+                       case 0x00 + (MD_POSSESSIVE):                                  res = "its"; break;
+                       case 0x00 + (MD_POSSESSIVE | MD_OBJECTIVE):                   res = "itself"; break;
+                       case 0x00 + (MD_INDEF_HIDDEN):                                res = "something"; break;
+                       case 0x00 + (MD_INDEF_HIDDEN | MD_OBJECTIVE):                 res = "something"; break;
+                       case 0x00 + (MD_INDEF_HIDDEN | MD_POSSESSIVE):                res = "something's"; break;
+                       case 0x00 + (MD_INDEF_HIDDEN | MD_POSSESSIVE | MD_OBJECTIVE): res = "itself"; break;
 #endif
 
 
                        /* Male (assume human if vague) */
 #ifdef JP
-                       case 0x10: res = "Èà"; break;
-                       case 0x11: res = "Èà"; break;
-                       case 0x12: res = "Èà¤Î"; break;
-                       case 0x13: res = "È༫¿È"; break;
-                       case 0x14: res = "狼"; break;
-                       case 0x15: res = "狼"; break;
-                       case 0x16: res = "狼¤Î"; break;
-                       case 0x17: res = "È༫¿È"; break;
+                       case 0x10:                                                    res = "彼"; break;
+                       case 0x10 + (MD_OBJECTIVE):                                   res = "彼"; break;
+                       case 0x10 + (MD_POSSESSIVE):                                  res = "彼の"; break;
+                       case 0x10 + (MD_POSSESSIVE | MD_OBJECTIVE):                   res = "彼自身"; break;
+                       case 0x10 + (MD_INDEF_HIDDEN):                                res = "誰か"; break;
+                       case 0x10 + (MD_INDEF_HIDDEN | MD_OBJECTIVE):                 res = "誰か"; break;
+                       case 0x10 + (MD_INDEF_HIDDEN | MD_POSSESSIVE):                res = "誰かの"; break;
+                       case 0x10 + (MD_INDEF_HIDDEN | MD_POSSESSIVE | MD_OBJECTIVE): res = "彼自身"; break;
 #else
-                       case 0x10: res = "he"; break;
-                       case 0x11: res = "him"; break;
-                       case 0x12: res = "his"; break;
-                       case 0x13: res = "himself"; break;
-                       case 0x14: res = "someone"; break;
-                       case 0x15: res = "someone"; break;
-                       case 0x16: res = "someone's"; break;
-                       case 0x17: res = "himself"; break;
+                       case 0x10:                                                    res = "he"; break;
+                       case 0x10 + (MD_OBJECTIVE):                                   res = "him"; break;
+                       case 0x10 + (MD_POSSESSIVE):                                  res = "his"; break;
+                       case 0x10 + (MD_POSSESSIVE | MD_OBJECTIVE):                   res = "himself"; break;
+                       case 0x10 + (MD_INDEF_HIDDEN):                                res = "someone"; break;
+                       case 0x10 + (MD_INDEF_HIDDEN | MD_OBJECTIVE):                 res = "someone"; break;
+                       case 0x10 + (MD_INDEF_HIDDEN | MD_POSSESSIVE):                res = "someone's"; break;
+                       case 0x10 + (MD_INDEF_HIDDEN | MD_POSSESSIVE | MD_OBJECTIVE): res = "himself"; break;
 #endif
 
 
                        /* Female (assume human if vague) */
 #ifdef JP
-                       case 0x20: res = "Èà½÷"; break;
-                       case 0x21: res = "Èà½÷"; break;
-                       case 0x22: res = "Èà½÷¤Î"; break;
-                       case 0x23: res = "Èà½÷¼«¿È"; break;
-                       case 0x24: res = "狼"; break;
-                       case 0x25: res = "狼"; break;
-                       case 0x26: res = "狼¤Î"; break;
-                       case 0x27: res = "Èà½÷¼«¿È"; break;
+                       case 0x20:                                                    res = "彼女"; break;
+                       case 0x20 + (MD_OBJECTIVE):                                   res = "彼女"; break;
+                       case 0x20 + (MD_POSSESSIVE):                                  res = "彼女の"; break;
+                       case 0x20 + (MD_POSSESSIVE | MD_OBJECTIVE):                   res = "彼女自身"; break;
+                       case 0x20 + (MD_INDEF_HIDDEN):                                res = "誰か"; break;
+                       case 0x20 + (MD_INDEF_HIDDEN | MD_OBJECTIVE):                 res = "誰か"; break;
+                       case 0x20 + (MD_INDEF_HIDDEN | MD_POSSESSIVE):                res = "誰かの"; break;
+                       case 0x20 + (MD_INDEF_HIDDEN | MD_POSSESSIVE | MD_OBJECTIVE): res = "彼女自身"; break;
 #else
-                       case 0x20: res = "she"; break;
-                       case 0x21: res = "her"; break;
-                       case 0x22: res = "her"; break;
-                       case 0x23: res = "herself"; break;
-                       case 0x24: res = "someone"; break;
-                       case 0x25: res = "someone"; break;
-                       case 0x26: res = "someone's"; break;
-                       case 0x27: res = "herself"; break;
+                       case 0x20:                                                    res = "she"; break;
+                       case 0x20 + (MD_OBJECTIVE):                                   res = "her"; break;
+                       case 0x20 + (MD_POSSESSIVE):                                  res = "her"; break;
+                       case 0x20 + (MD_POSSESSIVE | MD_OBJECTIVE):                   res = "herself"; break;
+                       case 0x20 + (MD_INDEF_HIDDEN):                                res = "someone"; break;
+                       case 0x20 + (MD_INDEF_HIDDEN | MD_OBJECTIVE):                 res = "someone"; break;
+                       case 0x20 + (MD_INDEF_HIDDEN | MD_POSSESSIVE):                res = "someone's"; break;
+                       case 0x20 + (MD_INDEF_HIDDEN | MD_POSSESSIVE | MD_OBJECTIVE): res = "herself"; break;
 #endif
-
                }
 
                /* Copy the result */
@@ -1654,19 +1654,18 @@ if (!get_rnd_line("silly_j.txt", m_ptr->r_idx, silly_name))
 
 
        /* Handle visible monsters, "reflexive" request */
-       else if ((mode & 0x02) && (mode & 0x01))
+       else if ((mode & (MD_POSSESSIVE | MD_OBJECTIVE)) == (MD_POSSESSIVE | MD_OBJECTIVE))
        {
                /* The monster is visible, so use its gender */
 #ifdef JP
-               if (r_ptr->flags1 & (RF1_FEMALE)) strcpy(desc, "Èà½÷¼«¿È");
-               else if (r_ptr->flags1 & (RF1_MALE)) strcpy(desc, "È༫¿È");
-               else strcpy(desc, "¤½¤ì¼«¿È");
+               if (r_ptr->flags1 & (RF1_FEMALE)) strcpy(desc, "彼女自身");
+               else if (r_ptr->flags1 & (RF1_MALE)) strcpy(desc, "彼自身");
+               else strcpy(desc, "それ自身");
 #else
                if (r_ptr->flags1 & RF1_FEMALE) strcpy(desc, "herself");
                else if (r_ptr->flags1 & RF1_MALE) strcpy(desc, "himself");
                else strcpy(desc, "itself");
 #endif
-
        }
 
 
@@ -1674,60 +1673,65 @@ if (!get_rnd_line("silly_j.txt", m_ptr->r_idx, silly_name))
        else
        {
                /* Tanuki? */
-               if (is_pet(m_ptr) && m_ptr->ap_r_idx != m_ptr->r_idx)
+               if (is_pet(m_ptr) && !is_original_ap(m_ptr))
                {
 #ifdef JP
-                               char *t;
-                               strcpy(buf, name);
-                               t = buf;
-                               while(strncmp(t, "¡Ù", 2) && *t) t++;
-                               if (*t)
-                               {
-                                       *t = '\0';
-                                       (void)sprintf(desc, "%s¡©¡Ù", buf);
-                               }
-                               else
-                                       (void)sprintf(desc, "%s¡©", name);
+                       char *t;
+                       strcpy(buf, name);
+                       t = buf;
+                       while(strncmp(t, "』", 2) && *t) t++;
+                       if (*t)
+                       {
+                               *t = '\0';
+                               (void)sprintf(desc, "%s?』", buf);
+                       }
+                       else
+                               (void)sprintf(desc, "%s?", name);
 #else
-                               (void)sprintf(desc, "%s?", name);
+                       (void)sprintf(desc, "%s?", name);
 #endif
                }
                else
 
                /* It could be a Unique */
-               if ((r_ptr->flags1 & RF1_UNIQUE) && !(p_ptr->image && !(mode & 0x200)))
+               if ((r_ptr->flags1 & RF1_UNIQUE) && !(p_ptr->image && !(mode & MD_IGNORE_HALLU)))
                {
                        /* Start with the name (thus nominative and objective) */
-                       if ((m_ptr->mflag2 & MFLAG2_CHAMELEON) && !(mode & 0x100))
+                       if ((m_ptr->mflag2 & MFLAG2_CHAMELEON) && !(mode & MD_TRUE_NAME))
                        {
 #ifdef JP
                                char *t;
                                strcpy(buf, name);
                                t = buf;
-                               while(strncmp(t, "¡Ù", 2) && *t) t++;
+                               while (strncmp(t, "』", 2) && *t) t++;
                                if (*t)
                                {
                                        *t = '\0';
-                                       (void)sprintf(desc, "%s¡©¡Ù", buf);
+                                       (void)sprintf(desc, "%s?』", buf);
                                }
                                else
-                                       (void)sprintf(desc, "%s¡©", name);
+                                       (void)sprintf(desc, "%s", name);
 #else
                                (void)sprintf(desc, "%s?", name);
 #endif
                        }
-                       else if ((cave[m_ptr->fy][m_ptr->fx].m_idx == p_ptr->riding) || !p_ptr->inside_battle)
-                               (void)strcpy(desc, name);
+
+                       /* Inside monster arena, and it is not your mount */
+                       else if (p_ptr->inside_battle &&
+                                !(p_ptr->riding && (&m_list[p_ptr->riding] == m_ptr)))
+                       {
+                               /* It is a fake unique monster */
+                               (void)sprintf(desc, _("%sもどき", "fake %s"), name);
+                       }
+
                        else
-#ifdef JP
-                               (void)sprintf(desc, "%s¤â¤É¤­", name);
-#else
-                               (void)sprintf(desc, "fake %s", name);
-#endif
+                       {
+                               (void)strcpy(desc, name);
+                       }
                }
 
                /* It could be an indefinite monster */
-               else if (mode & 0x08)
+               else if (mode & MD_INDEF_VISIBLE)
                {
                        /* XXX Check plurality for "some" */
 
@@ -1746,88 +1750,59 @@ if (!get_rnd_line("silly_j.txt", m_ptr->r_idx, silly_name))
                {
                        /* Definite monsters need a definite article */
                        if (is_pet(m_ptr))
-#ifdef JP
-                               (void)strcpy(desc, "¤¢¤Ê¤¿¤Î");
-#else
-                               (void)strcpy(desc, "your ");
-#endif
-
+                               (void)strcpy(desc, _("あなたの", "your "));
                        else
-#ifdef JP
-                               (void)strcpy(desc, "");
-#else
-                               (void)strcpy(desc, "the ");
-#endif
+                               (void)strcpy(desc, _("", "the "));
 
                        (void)strcat(desc, name);
                }
 
                if (m_ptr->nickname)
                {
-#ifdef JP
-                       sprintf(buf,"¡Ö%s¡×",quark_str(m_ptr->nickname));
-#else
-                       sprintf(buf," called %s",quark_str(m_ptr->nickname));
-#endif
+                       sprintf(buf,_("「%s」", " called %s"),quark_str(m_ptr->nickname));
                        strcat(desc,buf);
                }
 
-               if ((m_ptr->fy == py) && (m_ptr->fx == px))
+               if (p_ptr->riding && (&m_list[p_ptr->riding] == m_ptr))
                {
-#ifdef JP
-                       strcat(desc,"(¾èÇÏÃæ)");
-#else
-                       strcat(desc,"(riding)");
-#endif
+                       strcat(desc,_("(乗馬中)", "(riding)"));
                }
 
-               if ((mode & 0x200) && (m_ptr->mflag2 & MFLAG2_CHAMELEON))
+               if ((mode & MD_IGNORE_HALLU) && (m_ptr->mflag2 & MFLAG2_CHAMELEON))
                {
                        if (r_ptr->flags1 & RF1_UNIQUE)
                        {
-#ifdef JP
-                               strcat(desc,"(¥«¥á¥ì¥ª¥ó¤Î²¦)");
-#else
-                               strcat(desc,"(Chameleon Lord)");
-#endif
+                               strcat(desc,_("(カメレオンの王)", "(Chameleon Lord)"));
                        }
                        else
                        {
-#ifdef JP
-                               strcat(desc,"(¥«¥á¥ì¥ª¥ó)");
-#else
-                               strcat(desc,"(Chameleon)");
-#endif
+                               strcat(desc,_("(カメレオン)", "(Chameleon)"));
                        }
                }
 
-               if ((mode & 0x200) && m_ptr->ap_r_idx != m_ptr->r_idx)
+               if ((mode & MD_IGNORE_HALLU) && !is_original_ap(m_ptr))
                {
                        strcat(desc, format("(%s)", r_name + r_info[m_ptr->r_idx].name));
                }
 
                /* Handle the Possessive as a special afterthought */
-               if (mode & 0x02)
+               if (mode & MD_POSSESSIVE)
                {
                        /* XXX Check for trailing "s" */
                        
                        /* Simply append "apostrophe" and "s" */
-#ifdef JP
-                       (void)strcat(desc, "¤Î");
-#else
-                       (void)strcat(desc, "'s");
-#endif
-
+                       (void)strcat(desc, _("の", "'s"));
                }
        }
 }
 
 
 
-
-/*
- * Learn about a monster (by "probing" it)
- *
+/*!
+ * @brief モンスターの調査による思い出補完処理 / Learn about a monster (by "probing" it)
+ * @param r_idx 補完されるモンスター種族ID
+ * @return 明らかになった情報の度数
+ * @details
  * Return the number of new flags learnt.  -Mogami-
  */
 int lore_do_probe(int r_idx)
@@ -1840,7 +1815,7 @@ int lore_do_probe(int r_idx)
        if (r_ptr->r_wake != MAX_UCHAR) n++;
        if (r_ptr->r_ignore != MAX_UCHAR) n++;
        r_ptr->r_wake = r_ptr->r_ignore = MAX_UCHAR;
-                               
+
        /* Observe "maximal" attacks */
        for (i = 0; i < 4; i++)
        {
@@ -1852,9 +1827,9 @@ int lore_do_probe(int r_idx)
                        r_ptr->r_blows[i] = MAX_UCHAR;
                }
        }
-                               
+
        /* Maximal drops */
-       tmp_byte = 
+       tmp_byte =
                (((r_ptr->flags1 & RF1_DROP_4D2) ? 8 : 0) +
                 ((r_ptr->flags1 & RF1_DROP_3D2) ? 6 : 0) +
                 ((r_ptr->flags1 & RF1_DROP_2D2) ? 4 : 0) +
@@ -1873,11 +1848,11 @@ int lore_do_probe(int r_idx)
                if (r_ptr->r_drop_gold != tmp_byte) n++;
                r_ptr->r_drop_gold = tmp_byte;
        }
-                               
+
        /* Observe many spells */
        if (r_ptr->r_cast_spell != MAX_UCHAR) n++;
        r_ptr->r_cast_spell = MAX_UCHAR;
-                               
+
        /* Count unknown flags */
        for (i = 0; i < 32; i++)
        {
@@ -1890,9 +1865,11 @@ int lore_do_probe(int r_idx)
                if (!(r_ptr->r_flags4 & (1L << i)) &&
                    (r_ptr->flags4 & (1L << i))) n++;
                if (!(r_ptr->r_flags5 & (1L << i)) &&
-                   (r_ptr->flags5 & (1L << i))) n++;
+                   (r_ptr->a_ability_flags1 & (1L << i))) n++;
                if (!(r_ptr->r_flags6 & (1L << i)) &&
-                   (r_ptr->flags6 & (1L << i))) n++;
+                   (r_ptr->a_ability_flags2 & (1L << i))) n++;
+               if (!(r_ptr->r_flagsr & (1L << i)) &&
+                   (r_ptr->flagsr & (1L << i))) n++;
 
                /* r_flags7 is actually unused */
 #if 0
@@ -1906,8 +1883,9 @@ int lore_do_probe(int r_idx)
        r_ptr->r_flags2 = r_ptr->flags2;
        r_ptr->r_flags3 = r_ptr->flags3;
        r_ptr->r_flags4 = r_ptr->flags4;
-       r_ptr->r_flags5 = r_ptr->flags5;
-       r_ptr->r_flags6 = r_ptr->flags6;
+       r_ptr->r_flags5 = r_ptr->a_ability_flags1;
+       r_ptr->r_flags6 = r_ptr->a_ability_flags2;
+       r_ptr->r_flagsr = r_ptr->flagsr;
 
        /* r_flags7 is actually unused */
        /* r_ptr->r_flags7 = r_ptr->flags7; */
@@ -1928,9 +1906,13 @@ int lore_do_probe(int r_idx)
 }
 
 
-/*
- * Take note that the given monster just dropped some treasure
- *
+/*!
+ * @brief モンスターの撃破に伴うドロップ情報の保管処理 / Take note that the given monster just dropped some treasure
+ * @param m_idx モンスター情報のID
+ * @param num_item 手に入れたアイテム数
+ * @param num_gold 手に入れた財宝の単位数
+ * @return なし
+ * @details
  * Note that learning the "GOOD"/"GREAT" flags gives information
  * about the treasure (even when the monster is killed for the first
  * time, such as uniques, and the treasure has not been examined yet).
@@ -1947,6 +1929,9 @@ void lore_treasure(int m_idx, int num_item, int num_gold)
 
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
 
+       /* If the monster doesn't have original appearance, don't note */
+       if (!is_original_ap(m_ptr)) return;
+
        /* Note the number of things dropped */
        if (num_item > r_ptr->r_drop_item) r_ptr->r_drop_item = num_item;
        if (num_gold > r_ptr->r_drop_gold) r_ptr->r_drop_gold = num_gold;
@@ -1964,7 +1949,12 @@ void lore_treasure(int m_idx, int num_item, int num_gold)
 }
 
 
-
+/*!
+ * @brief ELDRITCH_HORRORによるプレイヤーの精神破壊処理
+ * @param m_ptr ELDRITCH_HORRORを引き起こしたモンスターの参照ポインタ
+ * @param necro 暗黒領域魔法の詠唱失敗によるものならばTRUEを返す
+ * @return なし
+ */
 void sanity_blast(monster_type *m_ptr, bool necro)
 {
        bool happened = FALSE;
@@ -1972,10 +1962,10 @@ void sanity_blast(monster_type *m_ptr, bool necro)
 
        if (p_ptr->inside_battle || !character_dungeon) return;
 
-       if (!necro)
+       if (!necro && m_ptr)
        {
-               char            m_name[80];
-               monster_race    *r_ptr = &r_info[m_ptr->r_idx];
+               char m_name[80];
+               monster_race *r_ptr = &r_info[m_ptr->ap_r_idx];
 
                power = r_ptr->level / 2;
 
@@ -1997,8 +1987,6 @@ void sanity_blast(monster_type *m_ptr, bool necro)
                if (!(r_ptr->flags2 & RF2_ELDRITCH_HORROR))
                        return; /* oops */
 
-
-
                if (is_pet(m_ptr))
                        return; /* Pet eldritch horrors are safe most of the time */
 
@@ -2013,14 +2001,13 @@ void sanity_blast(monster_type *m_ptr, bool necro)
                {
                        /* Something silly happens... */
 #ifdef JP
-                       msg_format("%s%s¤Î´é¤ò¸«¤Æ¤·¤Þ¤Ã¤¿¡ª",
+                       msg_format("%s%sの顔を見てしまった!",
                                funny_desc[randint0(MAX_SAN_FUNNY)], m_name);
 #else
                        msg_format("You behold the %s visage of %s!",
                                funny_desc[randint0(MAX_SAN_FUNNY)], m_name);
 #endif
 
-
                        if (one_in_(3))
                        {
                                msg_print(funny_comments[randint0(MAX_SAN_COMMENT)]);
@@ -2032,7 +2019,7 @@ void sanity_blast(monster_type *m_ptr, bool necro)
 
                /* Something frightening happens... */
 #ifdef JP
-               msg_format("%s%s¤Î´é¤ò¸«¤Æ¤·¤Þ¤Ã¤¿¡ª",
+               msg_format("%s%sの顔を見てしまった!",
                        horror_desc[randint0(MAX_SAN_HORROR)], m_name);
 #else
                msg_format("You behold the %s visage of %s!",
@@ -2053,14 +2040,98 @@ void sanity_blast(monster_type *m_ptr, bool necro)
                        if (saving_throw(25 + p_ptr->lev)) return;
                }
        }
-       else
+       else if(!necro)
        {
-#ifdef JP
-msg_print("¥Í¥¯¥í¥Î¥ß¥³¥ó¤òÆɤó¤ÇÀµµ¤¤ò¼º¤Ã¤¿¡ª");
-#else
-               msg_print("Your sanity is shaken by reading the Necronomicon!");
+               monster_race *r_ptr;
+               char m_name[80];
+               cptr desc;
+
+               get_mon_num_prep(get_nightmare, NULL);
+
+               r_ptr = &r_info[get_mon_num(MAX_DEPTH)];
+               power = r_ptr->level + 10;
+               desc = r_name + r_ptr->name;
+
+               get_mon_num_prep(NULL, NULL);
+
+               /* Describe it */
+#ifndef JP
+               if (!(r_ptr->flags1 & RF1_UNIQUE))
+                       sprintf(m_name, "%s %s", (is_a_vowel(desc[0]) ? "an" : "a"), desc);
+               else
 #endif
+               sprintf(m_name, "%s", desc);
+
+               if (!(r_ptr->flags1 & RF1_UNIQUE))
+               {
+                       if (r_ptr->flags1 & RF1_FRIENDS) power /= 2;
+               }
+               else power *= 2;
+
+               if (saving_throw(p_ptr->skill_sav * 100 / power))
+               {
+                       msg_format(_("夢の中で%sに追いかけられた。", "%^s chases you through your dreams."), m_name);
+                       /* Safe */
+                       return;
+               }
+
+               if (p_ptr->image)
+               {
+                       /* Something silly happens... */
+                       msg_format(_("%s%sの顔を見てしまった!", "You behold the %s visage of %s!"),
+                                               funny_desc[randint0(MAX_SAN_FUNNY)], m_name);
+
+                       if (one_in_(3))
+                       {
+                               msg_print(funny_comments[randint0(MAX_SAN_COMMENT)]);
+                               p_ptr->image = p_ptr->image + randint1(r_ptr->level);
+                       }
+
+                       /* Never mind; we can't see it clearly enough */
+                       return;
+               }
+
+               /* Something frightening happens... */
+               msg_format(_("%s%sの顔を見てしまった!", "You behold the %s visage of %s!"),
+                                 horror_desc[randint0(MAX_SAN_HORROR)], desc);
 
+               r_ptr->r_flags2 |= RF2_ELDRITCH_HORROR;
+
+               if (!p_ptr->mimic_form)
+               {
+                       switch (p_ptr->prace)
+                       {
+                       /* Demons may make a saving throw */
+                       case RACE_IMP:
+                       case RACE_DEMON:
+                               if (saving_throw(20 + p_ptr->lev)) return;
+                               break;
+                       /* Undead may make a saving throw */
+                       case RACE_SKELETON:
+                       case RACE_ZOMBIE:
+                       case RACE_SPECTRE:
+                       case RACE_VAMPIRE:
+                               if (saving_throw(10 + p_ptr->lev)) return;
+                               break;
+                       }
+               }
+               else
+               {
+                       /* Demons may make a saving throw */
+                       if (mimic_info[p_ptr->mimic_form].MIMIC_FLAGS & MIMIC_IS_DEMON)
+                       {
+                               if (saving_throw(20 + p_ptr->lev)) return;
+                       }
+                       /* Undead may make a saving throw */
+                       else if (mimic_info[p_ptr->mimic_form].MIMIC_FLAGS & MIMIC_IS_UNDEAD)
+                       {
+                               if (saving_throw(10 + p_ptr->lev)) return;
+                       }
+               }
+       }
+       else
+       {
+               msg_print(_("ネクロノミコンを読んで正気を失った!", "Your sanity is shaken by reading the Necronomicon!"));
        }
 
        if (!saving_throw(p_ptr->skill_sav - power)) /* Mind blast */
@@ -2108,11 +2179,7 @@ msg_print("
        {
 
                if (lose_all_info())
-#ifdef JP
-msg_print("¤¢¤Þ¤ê¤Î¶²ÉݤËÁ´¤Æ¤Î¤³¤È¤ò˺¤ì¤Æ¤·¤Þ¤Ã¤¿¡ª");
-#else
-                       msg_print("You forget everything in your utmost terror!");
-#endif
+                       msg_print(_("あまりの恐怖に全てのことを忘れてしまった!", "You forget everything in your utmost terror!"));
 
                return;
        }
@@ -2140,29 +2207,16 @@ msg_print("
                                {
                                        if ((p_ptr->stat_use[A_INT] < 4) && (p_ptr->stat_use[A_WIS] < 4))
                                        {
-#ifdef JP
-msg_print("¤¢¤Ê¤¿¤Ï´°àú¤ÊÇϼ¯¤Ë¤Ê¤Ã¤¿¤è¤¦¤Êµ¤¤¬¤·¤¿¡£¤·¤«¤·¤½¤ì¤Ï¸µ¡¹¤À¤Ã¤¿¡£");
-#else
-                                               msg_print("You turn into an utter moron!");
-#endif
+                                               msg_print(_("あなたは完璧な馬鹿になったような気がした。しかしそれは元々だった。", "You turn into an utter moron!"));
                                        }
                                        else
                                        {
-#ifdef JP
-msg_print("¤¢¤Ê¤¿¤Ï´°àú¤ÊÇϼ¯¤Ë¤Ê¤Ã¤¿¡ª");
-#else
-                                               msg_print("You turn into an utter moron!");
-#endif
+                                               msg_print(_("あなたは完璧な馬鹿になった!", "You turn into an utter moron!"));
                                        }
 
                                        if (p_ptr->muta3 & MUT3_HYPER_INT)
                                        {
-#ifdef JP
-msg_print("¤¢¤Ê¤¿¤ÎǾ¤ÏÀ¸ÂÎ¥³¥ó¥Ô¥å¡¼¥¿¤Ç¤Ï¤Ê¤¯¤Ê¤Ã¤¿¡£");
-#else
-                                               msg_print("Your brain is no longer a living computer.");
-#endif
-
+                                               msg_print(_("あなたの脳は生体コンピュータではなくなった。", "Your brain is no longer a living computer."));
                                                p_ptr->muta3 &= ~(MUT3_HYPER_INT);
                                        }
                                        p_ptr->muta3 |= MUT3_MORONIC;
@@ -2181,22 +2235,12 @@ msg_print("
                        case 11:
                                if (!(p_ptr->muta2 & MUT2_COWARDICE) && !p_ptr->resist_fear)
                                {
-#ifdef JP
-msg_print("¤¢¤Ê¤¿¤Ï¥Ñ¥é¥Î¥¤¥¢¤Ë¤Ê¤Ã¤¿¡ª");
-#else
-                                       msg_print("You become paranoid!");
-#endif
-
+                                       msg_print(_("あなたはパラノイアになった!", "You become paranoid!"));
 
                                        /* Duh, the following should never happen, but anyway... */
                                        if (p_ptr->muta3 & MUT3_FEARLESS)
                                        {
-#ifdef JP
-msg_print("¤¢¤Ê¤¿¤Ï¤â¤¦¶²¤ìÃΤ餺¤Ç¤Ï¤Ê¤¯¤Ê¤Ã¤¿¡£");
-#else
-                                               msg_print("You are no longer fearless.");
-#endif
-
+                                               msg_print(_("あなたはもう恐れ知らずではなくなった。", "You are no longer fearless."));
                                                p_ptr->muta3 &= ~(MUT3_FEARLESS);
                                        }
 
@@ -2216,12 +2260,7 @@ msg_print("
                        case 21:
                                if (!(p_ptr->muta2 & MUT2_HALLU) && !p_ptr->resist_chaos)
                                {
-#ifdef JP
-msg_print("¸¸³Ð¤ò¤Ò¤­µ¯¤³¤¹Àº¿ÀºøÍð¤Ë´Ù¤Ã¤¿¡ª");
-#else
-                                       msg_print("You are afflicted by a hallucinatory insanity!");
-#endif
-
+                                       msg_print(_("幻覚をひき起こす精神錯乱に陥った!", "You are afflicted by a hallucinatory insanity!"));
                                        p_ptr->muta2 |= MUT2_HALLU;
                                        happened = TRUE;
                                }
@@ -2229,12 +2268,7 @@ msg_print("
                        default:
                                if (!(p_ptr->muta2 & MUT2_BERS_RAGE))
                                {
-#ifdef JP
-msg_print("·ãÎõ¤Ê´¶¾ð¤Îȯºî¤Ë¤ª¤½¤ï¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡ª");
-#else
-                                       msg_print("You become subject to fits of berserk rage!");
-#endif
-
+                                       msg_print(_("激烈な感情の発作におそわれるようになった!", "You become subject to fits of berserk rage!"));
                                        p_ptr->muta2 |= MUT2_BERS_RAGE;
                                        happened = TRUE;
                                }
@@ -2246,10 +2280,12 @@ msg_print("
        handle_stuff();
 }
 
-
-/*
- * This function updates the monster record of the given monster
- *
+/*!
+ * @brief モンスターの各情報を更新する / This function updates the monster record of the given monster
+ * @param m_idx 更新するモンスター情報のID
+ * @param full プレイヤーとの距離更新を行うならばtrue
+ * @return なし
+ * @details
  * This involves extracting the distance to the player (if requested),
  * and then checking for visibility (natural, infravision, see-invis,
  * telepathy), updating the monster visibility flag, redrawing (or
@@ -2326,6 +2362,9 @@ void update_mon(int m_idx, bool full)
        /* Seen by vision */
        bool easy = FALSE;
 
+       /* Non-Ninja player in the darkness */
+       bool in_darkness = (d_info[dungeon_type].flags1 & DF1_DARKNESS) && !p_ptr->see_nocto;
+
        /* Do disturb? */
        if (disturb_high)
        {
@@ -2339,8 +2378,8 @@ void update_mon(int m_idx, bool full)
        if (full)
        {
                /* Distance components */
-               int dy = (py > fy) ? (py - fy) : (fy - py);
-               int dx = (px > fx) ? (px - fx) : (fx - px);
+               int dy = (p_ptr->y > fy) ? (p_ptr->y - fy) : (fy - p_ptr->y);
+               int dx = (p_ptr->x > fx) ? (p_ptr->x - fx) : (fx - p_ptr->x);
 
                /* Approximate distance */
                d = (dy > dx) ? (dy + (dx>>1)) : (dx + (dy>>1));
@@ -2363,32 +2402,36 @@ void update_mon(int m_idx, bool full)
 
 
        /* Detected */
-       if (m_ptr->mflag & (MFLAG_MARK)) flag = TRUE;
+       if (m_ptr->mflag2 & (MFLAG2_MARK)) flag = TRUE;
 
 
        /* Nearby */
-       if (d <= ((d_info[dungeon_type].flags1 & DF1_DARKNESS) ? MAX_SIGHT / 2 : MAX_SIGHT))
+       if (d <= (in_darkness ? MAX_SIGHT / 2 : MAX_SIGHT))
        {
-               if (!(d_info[dungeon_type].flags1 & DF1_DARKNESS) || (d <= MAX_SIGHT / 4))
+               if (!in_darkness || (d <= MAX_SIGHT / 4))
                {
                        if (p_ptr->special_defense & KATA_MUSOU)
                        {
                                /* Detectable */
                                flag = TRUE;
 
-                               /* Hack -- Memorize mental flags */
-                               if (r_ptr->flags2 & (RF2_SMART)) r_ptr->r_flags2 |= (RF2_SMART);
-                               if (r_ptr->flags2 & (RF2_STUPID)) r_ptr->r_flags2 |= (RF2_STUPID);
+                               if (is_original_ap(m_ptr) && !p_ptr->image)
+                               {
+                                       /* Hack -- Memorize mental flags */
+                                       if (r_ptr->flags2 & (RF2_SMART)) r_ptr->r_flags2 |= (RF2_SMART);
+                                       if (r_ptr->flags2 & (RF2_STUPID)) r_ptr->r_flags2 |= (RF2_STUPID);
+                               }
                        }
 
                        /* Basic telepathy */
+                       /* Snipers get telepathy when they concentrate deeper */
                        else if (p_ptr->telepathy)
                        {
                                /* Empty mind, no telepathy */
                                if (r_ptr->flags2 & (RF2_EMPTY_MIND))
                                {
                                        /* Memorize flags */
-                                       r_ptr->r_flags2 |= (RF2_EMPTY_MIND);
+                                       if (is_original_ap(m_ptr) && !p_ptr->image) r_ptr->r_flags2 |= (RF2_EMPTY_MIND);
                                }
 
                                /* Weird mind, occasional telepathy */
@@ -2400,12 +2443,15 @@ void update_mon(int m_idx, bool full)
                                                /* Detectable */
                                                flag = TRUE;
 
-                                               /* Memorize flags */
-                                               r_ptr->r_flags2 |= (RF2_WEIRD_MIND);
+                                               if (is_original_ap(m_ptr) && !p_ptr->image)
+                                               {
+                                                       /* Memorize flags */
+                                                       r_ptr->r_flags2 |= (RF2_WEIRD_MIND);
 
-                                               /* Hack -- Memorize mental flags */
-                                               if (r_ptr->flags2 & (RF2_SMART)) r_ptr->r_flags2 |= (RF2_SMART);
-                                               if (r_ptr->flags2 & (RF2_STUPID)) r_ptr->r_flags2 |= (RF2_STUPID);
+                                                       /* Hack -- Memorize mental flags */
+                                                       if (r_ptr->flags2 & (RF2_SMART)) r_ptr->r_flags2 |= (RF2_SMART);
+                                                       if (r_ptr->flags2 & (RF2_STUPID)) r_ptr->r_flags2 |= (RF2_STUPID);
+                                               }
                                        }
                                }
 
@@ -2415,9 +2461,12 @@ void update_mon(int m_idx, bool full)
                                        /* Detectable */
                                        flag = TRUE;
 
-                                       /* Hack -- Memorize mental flags */
-                                       if (r_ptr->flags2 & (RF2_SMART)) r_ptr->r_flags2 |= (RF2_SMART);
-                                       if (r_ptr->flags2 & (RF2_STUPID)) r_ptr->r_flags2 |= (RF2_STUPID);
+                                       if (is_original_ap(m_ptr) && !p_ptr->image)
+                                       {
+                                               /* Hack -- Memorize mental flags */
+                                               if (r_ptr->flags2 & (RF2_SMART)) r_ptr->r_flags2 |= (RF2_SMART);
+                                               if (r_ptr->flags2 & (RF2_STUPID)) r_ptr->r_flags2 |= (RF2_STUPID);
+                                       }
                                }
                        }
 
@@ -2425,99 +2474,85 @@ void update_mon(int m_idx, bool full)
                        if ((p_ptr->esp_animal) && (r_ptr->flags3 & (RF3_ANIMAL)))
                        {
                                flag = TRUE;
-                               r_ptr->r_flags3 |= (RF3_ANIMAL);
-
+                               if (is_original_ap(m_ptr) && !p_ptr->image) r_ptr->r_flags3 |= (RF3_ANIMAL);
                        }
 
                        /* Magical sensing */
                        if ((p_ptr->esp_undead) && (r_ptr->flags3 & (RF3_UNDEAD)))
                        {
                                flag = TRUE;
-                               r_ptr->r_flags3 |= (RF3_UNDEAD);
-
+                               if (is_original_ap(m_ptr) && !p_ptr->image) r_ptr->r_flags3 |= (RF3_UNDEAD);
                        }
 
                        /* Magical sensing */
                        if ((p_ptr->esp_demon) && (r_ptr->flags3 & (RF3_DEMON)))
                        {
                                flag = TRUE;
-                               r_ptr->r_flags3 |= (RF3_DEMON);
-
+                               if (is_original_ap(m_ptr) && !p_ptr->image) r_ptr->r_flags3 |= (RF3_DEMON);
                        }
 
                        /* Magical sensing */
                        if ((p_ptr->esp_orc) && (r_ptr->flags3 & (RF3_ORC)))
                        {
                                flag = TRUE;
-                               r_ptr->r_flags3 |= (RF3_ORC);
-
+                               if (is_original_ap(m_ptr) && !p_ptr->image) r_ptr->r_flags3 |= (RF3_ORC);
                        }
 
                        /* Magical sensing */
                        if ((p_ptr->esp_troll) && (r_ptr->flags3 & (RF3_TROLL)))
                        {
                                flag = TRUE;
-                               r_ptr->r_flags3 |= (RF3_TROLL);
-
+                               if (is_original_ap(m_ptr) && !p_ptr->image) r_ptr->r_flags3 |= (RF3_TROLL);
                        }
 
                        /* Magical sensing */
                        if ((p_ptr->esp_giant) && (r_ptr->flags3 & (RF3_GIANT)))
                        {
                                flag = TRUE;
-                               r_ptr->r_flags3 |= (RF3_GIANT);
-
+                               if (is_original_ap(m_ptr) && !p_ptr->image) r_ptr->r_flags3 |= (RF3_GIANT);
                        }
 
                        /* Magical sensing */
                        if ((p_ptr->esp_dragon) && (r_ptr->flags3 & (RF3_DRAGON)))
                        {
                                flag = TRUE;
-                               r_ptr->r_flags3 |= (RF3_DRAGON);
-
+                               if (is_original_ap(m_ptr) && !p_ptr->image) r_ptr->r_flags3 |= (RF3_DRAGON);
                        }
 
                        /* Magical sensing */
                        if ((p_ptr->esp_human) && (r_ptr->flags2 & (RF2_HUMAN)))
                        {
                                flag = TRUE;
-                               r_ptr->r_flags2 |= (RF2_HUMAN);
-
+                               if (is_original_ap(m_ptr) && !p_ptr->image) r_ptr->r_flags2 |= (RF2_HUMAN);
                        }
 
                        /* Magical sensing */
                        if ((p_ptr->esp_evil) && (r_ptr->flags3 & (RF3_EVIL)))
                        {
                                flag = TRUE;
-                               r_ptr->r_flags3 |= (RF3_EVIL);
-
+                               if (is_original_ap(m_ptr) && !p_ptr->image) r_ptr->r_flags3 |= (RF3_EVIL);
                        }
 
                        /* Magical sensing */
                        if ((p_ptr->esp_good) && (r_ptr->flags3 & (RF3_GOOD)))
                        {
                                flag = TRUE;
-                               r_ptr->r_flags3 |= (RF3_GOOD);
-
+                               if (is_original_ap(m_ptr) && !p_ptr->image) r_ptr->r_flags3 |= (RF3_GOOD);
                        }
 
                        /* Magical sensing */
-                       if ((p_ptr->esp_nonliving) && 
-                           (r_ptr->flags3 & (RF3_NONLIVING)) &&
-                           !(r_ptr->flags3 & (RF3_DEMON)) &&
-                           !(r_ptr->flags3 & (RF3_UNDEAD)))
+                       if ((p_ptr->esp_nonliving) &&
+                           ((r_ptr->flags3 & (RF3_DEMON | RF3_UNDEAD | RF3_NONLIVING)) == RF3_NONLIVING))
                        {
                                flag = TRUE;
-                               r_ptr->r_flags3 |= (RF3_NONLIVING);
-
+                               if (is_original_ap(m_ptr) && !p_ptr->image) r_ptr->r_flags3 |= (RF3_NONLIVING);
                        }
 
                        /* Magical sensing */
                        if ((p_ptr->esp_unique) && (r_ptr->flags1 & (RF1_UNIQUE)))
                        {
                                flag = TRUE;
-                               r_ptr->r_flags1 |= (RF1_UNIQUE);
-
+                               if (is_original_ap(m_ptr) && !p_ptr->image) r_ptr->r_flags1 |= (RF1_UNIQUE);
                        }
                }
 
@@ -2527,11 +2562,18 @@ void update_mon(int m_idx, bool full)
                        bool do_invisible = FALSE;
                        bool do_cold_blood = FALSE;
 
+                       /* Snipers can see targets in darkness when they concentrate deeper */
+                       if (p_ptr->concent >= CONCENT_RADAR_THRESHOLD)
+                       {
+                               /* Easy to see */
+                               easy = flag = TRUE;
+                       }
+
                        /* Use "infravision" */
                        if (d <= p_ptr->see_infra)
                        {
                                /* Handle "cold blooded" monsters */
-                               if (r_ptr->flags2 & (RF2_COLD_BLOOD))
+                               if ((r_ptr->flags2 & (RF2_COLD_BLOOD | RF2_AURA_FIRE)) == RF2_COLD_BLOOD)
                                {
                                        /* Take note */
                                        do_cold_blood = TRUE;
@@ -2573,9 +2615,12 @@ void update_mon(int m_idx, bool full)
                        /* Visible */
                        if (flag)
                        {
-                               /* Memorize flags */
-                               if (do_invisible) r_ptr->r_flags2 |= (RF2_INVISIBLE);
-                               if (do_cold_blood) r_ptr->r_flags2 |= (RF2_COLD_BLOOD);
+                               if (is_original_ap(m_ptr) && !p_ptr->image)
+                               {
+                                       /* Memorize flags */
+                                       if (do_invisible) r_ptr->r_flags2 |= (RF2_INVISIBLE);
+                                       if (do_cold_blood) r_ptr->r_flags2 |= (RF2_COLD_BLOOD);
+                               }
                        }
                }
        }
@@ -2598,22 +2643,25 @@ void update_mon(int m_idx, bool full)
                        if (p_ptr->riding == m_idx) p_ptr->redraw |= (PR_UHEALTH);
 
                        /* Hack -- Count "fresh" sightings */
-                       if ((m_ptr->ap_r_idx == MON_KAGE) && (r_info[MON_KAGE].r_sights < MAX_SHORT))
-                               r_info[MON_KAGE].r_sights++;
-                       else if (m_ptr->ap_r_idx == m_ptr->r_idx && 
-                                r_ptr->r_sights < MAX_SHORT) r_ptr->r_sights++;
+                       if (!p_ptr->image)
+                       {
+                               if ((m_ptr->ap_r_idx == MON_KAGE) && (r_info[MON_KAGE].r_sights < MAX_SHORT))
+                                       r_info[MON_KAGE].r_sights++;
+                               else if (is_original_ap(m_ptr) && (r_ptr->r_sights < MAX_SHORT))
+                                       r_ptr->r_sights++;
+                       }
 
                        /* Eldritch Horror */
-                       if (r_ptr->flags2 & RF2_ELDRITCH_HORROR)
+                       if (r_info[m_ptr->ap_r_idx].flags2 & RF2_ELDRITCH_HORROR)
                        {
                                sanity_blast(m_ptr, FALSE);
                        }
 
                        /* Disturb on appearance */
-                       if (disturb_near && (projectable(m_ptr->fy, m_ptr->fx, py, px) && projectable(py, px, m_ptr->fy, m_ptr->fx)))
+                       if (disturb_near && (projectable(m_ptr->fy, m_ptr->fx, p_ptr->y, p_ptr->x) && projectable(p_ptr->y, p_ptr->x, m_ptr->fy, m_ptr->fx)))
                        {
                                if (disturb_pets || is_hostile(m_ptr))
-                                       disturb(1, 0);
+                                       disturb(1, 1);
                        }
                }
        }
@@ -2638,7 +2686,7 @@ void update_mon(int m_idx, bool full)
                        if (do_disturb)
                        {
                                if (disturb_pets || is_hostile(m_ptr))
-                                       disturb(1, 0);
+                                       disturb(1, 1);
                        }
                }
        }
@@ -2657,7 +2705,7 @@ void update_mon(int m_idx, bool full)
                        if (do_disturb)
                        {
                                if (disturb_pets || is_hostile(m_ptr))
-                                       disturb(1, 0);
+                                       disturb(1, 1);
                        }
                }
        }
@@ -2675,15 +2723,17 @@ void update_mon(int m_idx, bool full)
                        if (do_disturb)
                        {
                                if (disturb_pets || is_hostile(m_ptr))
-                                       disturb(1, 0);
+                                       disturb(1, 1);
                        }
                }
        }
 }
 
 
-/*
- * This function simply updates all the (non-dead) monsters (see above).
+/*!
+ * @brief 単純に生存している全モンスターの更新処理を行う / This function simply updates all the (non-dead) monsters (see above).
+ * @param full 距離更新を行うならtrue
+ * @return なし
  */
 void update_monsters(bool full)
 {
@@ -2703,8 +2753,10 @@ void update_monsters(bool full)
 }
 
 
-/*
- * Hack -- the index of the summoning monster
+/*!
+ * @brief カメレオンの王の変身対象となるモンスターかどうか判定する / Hack -- the index of the summoning monster
+ * @param r_idx モンスター種族ID
+ * @return 対象にできるならtrueを返す
  */
 static bool monster_hook_chameleon_lord(int r_idx)
 {
@@ -2720,27 +2772,28 @@ static bool monster_hook_chameleon_lord(int r_idx)
        if ((r_ptr->blow[0].method == RBM_EXPLODE) || (r_ptr->blow[1].method == RBM_EXPLODE) || (r_ptr->blow[2].method == RBM_EXPLODE) || (r_ptr->blow[3].method == RBM_EXPLODE))
                return FALSE;
 
-       if (!monster_can_cross_terrain(cave[m_ptr->fy][m_ptr->fx].feat, r_ptr)) return FALSE;
+       if (!monster_can_cross_terrain(cave[m_ptr->fy][m_ptr->fx].feat, r_ptr, 0)) return FALSE;
 
        /* Not born */
        if (!(old_r_ptr->flags7 & RF7_CHAMELEON))
        {
-               if ((m_ptr->sub_align & SUB_ALIGN_EVIL) && (r_ptr->flags3 & RF3_GOOD)) return FALSE;
-               if ((m_ptr->sub_align & SUB_ALIGN_GOOD) && (r_ptr->flags3 & RF3_EVIL)) return FALSE;
+               if (monster_has_hostile_align(m_ptr, 0, 0, r_ptr)) return FALSE;
        }
 
        /* Born now */
        else if (summon_specific_who > 0)
        {
-               monster_type *sm_ptr = &m_list[summon_specific_who];
-
-               if ((sm_ptr->sub_align & SUB_ALIGN_EVIL) && (r_ptr->flags3 & RF3_GOOD)) return FALSE;
-               if ((sm_ptr->sub_align & SUB_ALIGN_GOOD) && (r_ptr->flags3 & RF3_EVIL)) return FALSE;
+               if (monster_has_hostile_align(&m_list[summon_specific_who], 0, 0, r_ptr)) return FALSE;
        }
 
        return TRUE;
 }
 
+/*!
+ * @brief カメレオンの変身対象となるモンスターかどうか判定する / Hack -- the index of the summoning monster
+ * @param r_idx モンスター種族ID
+ * @return 対象にできるならtrueを返す
+ */
 static bool monster_hook_chameleon(int r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
@@ -2754,7 +2807,7 @@ static bool monster_hook_chameleon(int r_idx)
        if ((r_ptr->blow[0].method == RBM_EXPLODE) || (r_ptr->blow[1].method == RBM_EXPLODE) || (r_ptr->blow[2].method == RBM_EXPLODE) || (r_ptr->blow[3].method == RBM_EXPLODE))
                return FALSE;
 
-       if (!monster_can_cross_terrain(cave[m_ptr->fy][m_ptr->fx].feat, r_ptr)) return FALSE;
+       if (!monster_can_cross_terrain(cave[m_ptr->fy][m_ptr->fx].feat, r_ptr, 0)) return FALSE;
 
        /* Not born */
        if (!(old_r_ptr->flags7 & RF7_CHAMELEON))
@@ -2767,23 +2820,27 @@ static bool monster_hook_chameleon(int r_idx)
        /* Born now */
        else if (summon_specific_who > 0)
        {
-               monster_type *sm_ptr = &m_list[summon_specific_who];
-
-               if ((sm_ptr->sub_align & SUB_ALIGN_EVIL) && (r_ptr->flags3 & RF3_GOOD)) return FALSE;
-               if ((sm_ptr->sub_align & SUB_ALIGN_GOOD) && (r_ptr->flags3 & RF3_EVIL)) return FALSE;
+               if (monster_has_hostile_align(&m_list[summon_specific_who], 0, 0, r_ptr)) return FALSE;
        }
 
        return (*(get_monster_hook()))(r_idx);
 }
 
-
+/*!
+ * @brief モンスターの変身処理
+ * @param m_idx 変身処理を受けるモンスター情報のID
+ * @param born 生成時の初変身先指定ならばtrue
+ * @param r_idx 旧モンスター種族のID
+ * @return なし
+ */
 void choose_new_monster(int m_idx, bool born, int r_idx)
 {
-       int oldmaxhp, i;
+       int oldmaxhp;
        monster_type *m_ptr = &m_list[m_idx];
        monster_race *r_ptr;
        char old_m_name[80];
        bool old_unique = FALSE;
+       int old_r_idx = m_ptr->r_idx;
 
        if (r_info[m_ptr->r_idx].flags1 & RF1_UNIQUE)
                old_unique = TRUE;
@@ -2820,10 +2877,19 @@ void choose_new_monster(int m_idx, bool born, int r_idx)
                if (!r_idx) return;
        }
 
+       if (is_pet(m_ptr)) check_pets_num_and_align(m_ptr, FALSE);
+
        m_ptr->r_idx = r_idx;
        m_ptr->ap_r_idx = r_idx;
        update_mon(m_idx, FALSE);
        lite_spot(m_ptr->fy, m_ptr->fx);
+
+       if ((r_info[old_r_idx].flags7 & (RF7_LITE_MASK | RF7_DARK_MASK)) ||
+           (r_ptr->flags7 & (RF7_LITE_MASK | RF7_DARK_MASK)))
+               p_ptr->update |= (PU_MON_LITE);
+
+       if (is_pet(m_ptr)) check_pets_num_and_align(m_ptr, TRUE);
+
        if (born)
        {
                /* Sub-alignment of a chameleon */
@@ -2840,31 +2906,13 @@ void choose_new_monster(int m_idx, bool born, int r_idx)
        {
                char m_name[80];
                monster_desc(m_name, m_ptr, 0);
-#ifdef JP
-               msg_format("ÆÍÁ³%s¤¬ÊѿȤ·¤¿¡£", old_m_name);
-#else
-               msg_format("Suddenly, %s transforms!", old_m_name);
-#endif
+               msg_format(_("突然%sが変身した。", "Suddenly, %s transforms!"), old_m_name);
                if (!(r_ptr->flags7 & RF7_RIDING))
-#ifdef JP
-                       if (rakuba(0, TRUE)) msg_print("ÃÏÌ̤ËÍî¤È¤µ¤ì¤¿¡£");
-#else
-                       if (rakuba(0, TRUE)) msg_format("You have fallen from %s.", m_name);
-#endif
+                       if (rakuba(0, TRUE)) msg_format(_("地面に落とされた。", "You have fallen from %s."), m_name);
        }
 
        /* Extract the monster base speed */
-       m_ptr->mspeed = r_ptr->speed;
-       /* Hack -- small racial variety */
-       /* Allow some small variation per monster */
-       if(one_in_(4)){
-               i = extract_energy[r_ptr->speed] / 3;
-               if (i) m_ptr->mspeed += rand_spread(0, i);
-       }
-       else{
-               i = extract_energy[r_ptr->speed] / 10;
-               if (i) m_ptr->mspeed += rand_spread(0, i);
-       }
+       m_ptr->mspeed = get_mspeed(r_ptr);
 
        oldmaxhp = m_ptr->max_maxhp;
        /* Assign maximal hitpoints */
@@ -2876,13 +2924,27 @@ void choose_new_monster(int m_idx, bool born, int r_idx)
        {
                m_ptr->max_maxhp = damroll(r_ptr->hdice, r_ptr->hside);
        }
+
+       /* Monsters have double hitpoints in Nightmare mode */
+       if (ironman_nightmare)
+       {
+               u32b hp = m_ptr->max_maxhp * 2L;
+               m_ptr->max_maxhp = (s16b)MIN(30000, hp);
+       }
+
        m_ptr->maxhp = (long)(m_ptr->maxhp * m_ptr->max_maxhp) / oldmaxhp;
+       if (m_ptr->maxhp < 1) m_ptr->maxhp = 1;
        m_ptr->hp = (long)(m_ptr->hp * m_ptr->max_maxhp) / oldmaxhp;
+       
+       /* reset dealt_damage */
+       m_ptr->dealt_damage = 0;
 }
 
 
-/*
- *  Hook for Tanuki
+/*!
+ * @brief たぬきの変身対象となるモンスターかどうか判定する / Hook for Tanuki
+ * @param r_idx モンスター種族ID
+ * @return 対象にできるならtrueを返す
  */
 static bool monster_hook_tanuki(int r_idx)
 {
@@ -2900,8 +2962,10 @@ static bool monster_hook_tanuki(int r_idx)
 }
 
 
-/*
- *  Set initial racial appearance of a monster
+/*!
+ * @brief モンスターの表層IDを設定する / Set initial racial appearance of a monster
+ * @param r_idx モンスター種族ID
+ * @return モンスター種族の表層ID
  */
 static int initial_r_appearance(int r_idx)
 {
@@ -2925,9 +2989,39 @@ static int initial_r_appearance(int r_idx)
 }
 
 
-/*
- * Attempt to place a monster of the given race at the given location.
- *
+/*!
+ * @brief モンスターの個体加速を設定する / Get initial monster speed
+ * @param r_ptr モンスター種族の参照ポインタ
+ * @return 加速値
+ */
+byte get_mspeed(monster_race *r_ptr)
+{
+       /* Extract the monster base speed */
+       int mspeed = r_ptr->speed;
+
+       /* Hack -- small racial variety */
+       if (!(r_ptr->flags1 & RF1_UNIQUE) && !p_ptr->inside_arena)
+       {
+               /* Allow some small variation per monster */
+               int i = SPEED_TO_ENERGY(r_ptr->speed) / (one_in_(4) ? 3 : 10);
+               if (i) mspeed += rand_spread(0, i);
+       }
+
+       if (mspeed > 199) mspeed = 199;
+
+       return (byte)mspeed;
+}
+
+
+/*!
+ * @brief モンスターを一体生成する / Attempt to place a monster of the given race at the given location.
+ * @param who 召喚を行ったモンスターID
+ * @param y 生成位置y座標
+ * @param x 生成位置x座標
+ * @param r_idx 生成モンスター種族
+ * @param mode 生成オプション
+ * @return 成功したらtrue
+ * @details 
  * To give the player a sporting chance, any monster that appears in
  * line-of-sight and is extremely dangerous can be marked as
  * "FORCE_SLEEP", which will cause them to be placed with low energy,
@@ -2944,59 +3038,48 @@ static int initial_r_appearance(int r_idx)
  * This is the only function which may place a monster in the dungeon,
  * except for the savefile loading code.
  */
-bool place_monster_one(int who, int y, int x, int r_idx, u32b mode)
+static bool place_monster_one(int who, int y, int x, int r_idx, u32b mode)
 {
-       int                     i;
-
-       cave_type               *c_ptr;
-
+       /* Access the location */
+       cave_type               *c_ptr = &cave[y][x];
        monster_type    *m_ptr;
-
        monster_race    *r_ptr = &r_info[r_idx];
-
        cptr            name = (r_name + r_ptr->name);
 
+       int cmi;
+
        /* DO NOT PLACE A MONSTER IN THE SMALL SCALE WILDERNESS !!! */
-       if(p_ptr->wild_mode) return FALSE;
+       if (p_ptr->wild_mode) return FALSE;
 
        /* Verify location */
        if (!in_bounds(y, x)) return (FALSE);
 
-       /* Require empty space (if not ghostly) */
-       if (!(!dun_level && (cave[y][x].feat == FEAT_MOUNTAIN) && ((r_ptr->flags8 & RF8_WILD_MOUNTAIN) || (r_ptr->flags7 & RF7_CAN_FLY))) &&
-           !(cave_empty_bold2(y, x) || (mode & PM_IGNORE_TERRAIN)) &&
-           !((r_ptr->flags2 & RF2_PASS_WALL) &&
-             !(cave_perma_bold(y, x) || cave[y][x].m_idx ||
-               ((y == py) && (x == px))))) return (FALSE);
-
        /* Paranoia */
        if (!r_idx) return (FALSE);
 
        /* Paranoia */
        if (!r_ptr->name) return (FALSE);
 
-       /* Nor on the Pattern */
-       if ((cave[y][x].feat >= FEAT_PATTERN_START)
-        && (cave[y][x].feat <= FEAT_PATTERN_XTRA2))
-               return (FALSE);
-
-       if (!(mode & PM_IGNORE_TERRAIN) &&
-           !monster_can_cross_terrain(cave[y][x].feat, r_ptr))
+       if (!(mode & PM_IGNORE_TERRAIN))
        {
-               return FALSE;
+               /* Not on the Pattern */
+               if (pattern_tile(y, x)) return FALSE;
+
+               /* Require empty space (if not ghostly) */
+               if (!monster_can_enter(y, x, r_ptr, 0)) return FALSE;
        }
 
        if (!p_ptr->inside_battle)
        {
                /* Hack -- "unique" monsters must be "unique" */
                if (((r_ptr->flags1 & (RF1_UNIQUE)) ||
-                    (r_ptr->flags7 & (RF7_UNIQUE_7))) &&
+                    (r_ptr->flags7 & (RF7_NAZGUL))) &&
                    (r_ptr->cur_num >= r_ptr->max_num))
                {
                        /* Cannot create */
                        return (FALSE);
                }
-               
+
                if ((r_ptr->flags7 & (RF7_UNIQUE2)) &&
                    (r_ptr->cur_num >= 1))
                {
@@ -3008,7 +3091,7 @@ bool place_monster_one(int who, int y, int x, int r_idx, u32b mode)
                        if (r_info[MON_BANOR].cur_num > 0) return FALSE;
                        if (r_info[MON_LUPART].cur_num > 0) return FALSE;
                }
-               
+
                /* Depth monsters may NOT be created out of depth, unless in Nightmare mode */
                if ((r_ptr->flags1 & (RF1_FORCE_DEPTH)) && (dun_level < r_ptr->level) &&
                    (!ironman_nightmare || (r_ptr->flags1 & (RF1_QUESTOR))))
@@ -3018,10 +3101,10 @@ bool place_monster_one(int who, int y, int x, int r_idx, u32b mode)
                }
        }
 
-       if(quest_number(dun_level))
+       if (quest_number(dun_level))
        {
                int hoge = quest_number(dun_level);
-               if((quest[hoge].type == QUEST_TYPE_KILL_LEVEL) || (quest[hoge].type == QUEST_TYPE_RANDOM))
+               if ((quest[hoge].type == QUEST_TYPE_KILL_LEVEL) || (quest[hoge].type == QUEST_TYPE_RANDOM))
                {
                        if(r_idx == quest[hoge].r_idx)
                        {
@@ -3040,9 +3123,6 @@ bool place_monster_one(int who, int y, int x, int r_idx, u32b mode)
                }
        }
 
-       /* Access the location */
-       c_ptr = &cave[y][x];
-
        if (is_glyph_grid(c_ptr))
        {
                if (randint1(BREAK_GLYPH) < (r_ptr->level+20))
@@ -3050,12 +3130,7 @@ bool place_monster_one(int who, int y, int x, int r_idx, u32b mode)
                        /* 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 */
@@ -3078,30 +3153,14 @@ msg_print("
                if (r_ptr->flags1 & (RF1_UNIQUE))
                {
                        /* Message for cheaters */
-#ifdef JP
-                       if (cheat_hear) msg_format("¿¼ÁؤΥæ¥Ë¡¼¥¯¡¦¥â¥ó¥¹¥¿¡¼ (%s)¡£", name);
-#else
-                       if (cheat_hear) msg_format("Deep Unique (%s).", name);
-#endif
-
-
-                       /* Boost rating by twice delta-depth */
-                       rating += (r_ptr->level - dun_level) * 2;
+                       if (cheat_hear) msg_format(_("深層のユニーク・モンスター (%s)。", "Deep Unique (%s)."), name);
                }
 
                /* Normal monsters */
                else
                {
                        /* Message for cheaters */
-#ifdef JP
-                       if (cheat_hear) msg_format("¿¼ÁؤΥâ¥ó¥¹¥¿¡¼ (%s)¡£", name);
-#else
-                       if (cheat_hear) msg_format("Deep Monster (%s).", name);
-#endif
-
-
-                       /* Boost rating by delta-depth */
-                       rating += (r_ptr->level - dun_level);
+                       if (cheat_hear) msg_format(_("深層のモンスター (%s)。", "Deep Monster (%s)."), name);
                }
        }
 
@@ -3109,15 +3168,10 @@ msg_print("
        else if (r_ptr->flags1 & (RF1_UNIQUE))
        {
                /* Unique monsters induce message */
-#ifdef JP
-               if (cheat_hear) msg_format("¥æ¥Ë¡¼¥¯¡¦¥â¥ó¥¹¥¿¡¼ (%s)¡£", name);
-#else
-               if (cheat_hear) msg_format("Unique (%s).", name);
-#endif
-
+               if (cheat_hear) msg_format(_("ユニーク・モンスター (%s)。", "Unique (%s)."), name);
        }
 
-       if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_UNIQUE_7) || (r_ptr->level < 10)) is_kage = FALSE;
+       if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL) || (r_ptr->level < 10)) mode &= ~PM_KAGE;
 
        /* Make a new monster */
        c_ptr->m_idx = m_pop();
@@ -3134,6 +3188,19 @@ msg_print("
        m_ptr->r_idx = r_idx;
        m_ptr->ap_r_idx = initial_r_appearance(r_idx);
 
+       /* No flags */
+       m_ptr->mflag = 0;
+       m_ptr->mflag2 = 0;
+
+       /* Hack -- Appearance transfer */
+       if ((mode & PM_MULTIPLY) && (who > 0) && !is_original_ap(&m_list[who]))
+       {
+               m_ptr->ap_r_idx = m_list[who].ap_r_idx;
+
+               /* Hack -- Shadower spawns Shadower */
+               if (m_list[who].mflag2 & MFLAG2_KAGE) m_ptr->mflag2 |= MFLAG2_KAGE;
+       }
+
        /* Sub-alignment of a monster */
        if ((who > 0) && !(r_ptr->flags3 & (RF3_EVIL | RF3_GOOD)))
                m_ptr->sub_align = m_list[who].sub_align;
@@ -3149,10 +3216,8 @@ msg_print("
        m_ptr->fx = x;
 
 
-       /* No "damage" yet */
-       m_ptr->stunned = 0;
-       m_ptr->confused = 0;
-       m_ptr->monfear = 0;
+       /* No "timed status" yet */
+       for (cmi = 0; cmi < MAX_MTIMED; cmi++) m_ptr->mtimed[cmi] = 0;
 
        /* Unknown distance */
        m_ptr->cdis = 0;
@@ -3163,22 +3228,29 @@ msg_print("
 
        m_ptr->exp = 0;
 
-       /* No flags */
-       m_ptr->mflag = 0;
-       m_ptr->mflag2 = 0;
+
+       /* Your pet summons its pet. */
+       if (who > 0 && is_pet(&m_list[who]))
+       {
+               mode |= PM_FORCE_PET;
+               m_ptr->parent_m_idx = who;
+       }
+       else
+       {
+               m_ptr->parent_m_idx = 0;
+       }
 
        if (r_ptr->flags7 & RF7_CHAMELEON)
        {
                choose_new_monster(c_ptr->m_idx, TRUE, 0);
                r_ptr = &r_info[m_ptr->r_idx];
                m_ptr->mflag2 |= MFLAG2_CHAMELEON;
-               rating++;
 
                /* Hack - Set sub_align to neutral when the Chameleon Lord is generated as "GUARDIAN" */
                if ((r_ptr->flags1 & RF1_UNIQUE) && (who <= 0))
                        m_ptr->sub_align = SUB_ALIGN_NEUTRAL;
        }
-       else if (is_kage)
+       else if ((mode & PM_KAGE) && !(mode & PM_FORCE_PET))
        {
                m_ptr->ap_r_idx = MON_KAGE;
                m_ptr->mflag2 |= MFLAG2_KAGE;
@@ -3198,21 +3270,17 @@ msg_print("
        else if ((r_ptr->flags7 & RF7_FRIENDLY) ||
                 (mode & PM_FORCE_FRIENDLY) || is_friendly_idx(who))
        {
-               if (!(p_ptr->align >= 0 && (r_ptr->flags3 & RF3_EVIL)) &&
-                   !(p_ptr->align < 0 && (r_ptr->flags3 & RF3_GOOD)))
-               {
-                       set_friendly(m_ptr);
-               }
+               if (!monster_has_hostile_align(NULL, 0, -1, r_ptr)) set_friendly(m_ptr);
        }
 
        /* Assume no sleeping */
-       m_ptr->csleep = 0;
+       m_ptr->mtimed[MTIMED_CSLEEP] = 0;
 
        /* Enforce sleeping if needed */
        if ((mode & PM_ALLOW_SLEEP) && r_ptr->sleep && !ironman_nightmare)
        {
                int val = r_ptr->sleep;
-               m_ptr->csleep = ((val * 2) + randint1(val * 10));
+               (void)set_monster_csleep(c_ptr->m_idx, (val * 2) + randint1(val * 10));
        }
 
        /* Assign maximal hitpoints */
@@ -3239,28 +3307,16 @@ msg_print("
        if (m_ptr->r_idx == MON_WOUNDED_BEAR)
                m_ptr->hp = m_ptr->maxhp / 2;
        else m_ptr->hp = m_ptr->maxhp;
+       
+       
+       /* dealt damage is 0 at initial*/
+       m_ptr->dealt_damage = 0;
 
 
        /* Extract the monster base speed */
-       m_ptr->mspeed = r_ptr->speed;
-
-       /* Hack -- small racial variety */
-       if (!(r_ptr->flags1 & RF1_UNIQUE) && !p_ptr->inside_arena)
-       {
-               /* Allow some small variation per monster */
-         if(one_in_(4)){
-               i = extract_energy[r_ptr->speed] / 3;
-               if (i) m_ptr->mspeed += rand_spread(0, i);
-         }
-         else{
-               i = extract_energy[r_ptr->speed] / 10;
-               if (i) m_ptr->mspeed += rand_spread(0, i);
-         }
-       }
-
-       if (mode & PM_HASTE) m_ptr->fast = 100;
+       m_ptr->mspeed = get_mspeed(r_ptr);
 
-       if (m_ptr->mspeed > 199) m_ptr->mspeed = 199;
+       if (mode & PM_HASTE) (void)set_monster_fast(c_ptr->m_idx, 100);
 
        /* Give a random starting energy */
        if (!ironman_nightmare)
@@ -3291,6 +3347,11 @@ msg_print("
        }
 
 
+       if (r_ptr->flags7 & RF7_SELF_LD_MASK)
+               p_ptr->update |= (PU_MON_LITE);
+       else if ((r_ptr->flags7 & RF7_HAS_LD_MASK) && !MON_CSLEEP(m_ptr))
+               p_ptr->update |= (PU_MON_LITE);
+
        /* Update the monster */
        update_mon(c_ptr->m_idx, TRUE);
 
@@ -3303,15 +3364,18 @@ msg_print("
         * A unique monster move from old saved floor.
         */
        if (character_dungeon &&
-           ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_UNIQUE_7)))
+           ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL)))
                real_r_ptr(m_ptr)->floor_id = p_ptr->floor_id;
 
        /* Hack -- Count the number of "reproducers" */
        if (r_ptr->flags2 & RF2_MULTIPLY) num_repro++;
 
-
        /* Hack -- Notice new multi-hued monsters */
-       if (r_ptr->flags1 & RF1_ATTR_MULTI) shimmer_monsters = TRUE;
+       {
+               monster_race *ap_r_ptr = &r_info[m_ptr->ap_r_idx];
+               if (ap_r_ptr->flags1 & (RF1_ATTR_MULTI | RF1_SHAPECHANGER))
+                       shimmer_monsters = TRUE;
+       }
 
        if (p_ptr->warning && character_dungeon)
        {
@@ -3322,49 +3386,28 @@ msg_print("
                        char o_name[MAX_NLEN];
 
                        if (r_ptr->level > p_ptr->lev + 30)
-#ifdef JP
-                               color = "¹õ¤¯";
-#else
-                               color = "black";
-#endif
+                               color = _("黒く", "black");
                        else if (r_ptr->level > p_ptr->lev + 15)
-#ifdef JP
-                               color = "»ç¿§¤Ë";
-#else
-                               color = "purple";
-#endif
+                               color = _("紫色に", "purple");
                        else if (r_ptr->level > p_ptr->lev + 5)
-#ifdef JP
-                               color = "¥ë¥Ó¡¼¿§¤Ë";
-#else
-                               color = "deep red";
-#endif
+                               color = _("ルビー色に", "deep red");
                        else if (r_ptr->level > p_ptr->lev - 5)
-#ifdef JP
-                               color = "ÀÖ¤¯";
-#else
-                               color = "red";
-#endif
+                               color = _("赤く", "red");
                        else if (r_ptr->level > p_ptr->lev - 15)
-#ifdef JP
-                               color = "¥Ô¥ó¥¯¿§¤Ë";
-#else
-                               color = "pink";
-#endif
+                               color = _("ピンク色に", "pink");
                        else
-#ifdef JP
-                               color = "Çò¤¯";
-#else
-                               color = "white";
-#endif
+                               color = _("白く", "white");
 
                        o_ptr = choose_warning_item();
-                       object_desc(o_name, o_ptr, FALSE, 0);
-#ifdef JP
-                       msg_format("%s¤Ï%s¸÷¤Ã¤¿¡£",o_name, color);
-#else
-                       msg_format("%s glows %s.",o_name, color);
-#endif
+                       if (o_ptr)
+                       {
+                               object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
+                               msg_format(_("%sは%s光った。", "%s glows %s."), o_name, color);
+                       }
+                       else
+                       {
+                               msg_format(_("%s光る物が頭に浮かんだ。", "An %s image forms in your mind."), color);
+                       }
                }
        }
 
@@ -3376,22 +3419,13 @@ msg_print("
                        /* 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, y, x, 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 */
@@ -3410,13 +3444,21 @@ msg_print("
 }
 
 
-/*
- *  improved version of scatter() for place monster
- */
 
-#define MON_SCAT_MAXD 10
+#define MON_SCAT_MAXD 10 /*!< mon_scatter()関数によるモンスター配置で許される中心からの最大距離 */
 
-static bool mon_scatter(int *yp, int *xp, int y, int x, int max_dist)
+/*!
+ * @brief モンスター1体を目標地点に可能ながり近い位置に生成する / improved version of scatter() for place monster
+ * @param r_idx 生成モンスター種族
+ * @param yp 結果生成位置y座標
+ * @param xp 結果生成位置x座標
+ * @param y 中心生成位置y座標
+ * @param x 中心生成位置x座標
+ * @param max_dist 生成位置の最大半径
+ * @return 成功したらtrue
+ *  
+ */
+static bool mon_scatter(int r_idx, int *yp, int *xp, int y, int x, int max_dist)
 {
        int place_x[MON_SCAT_MAXD];
        int place_y[MON_SCAT_MAXD];
@@ -3431,39 +3473,47 @@ static bool mon_scatter(int *yp, int *xp, int y, int x, int max_dist)
                num[i] = 0;
 
        for (nx = x - max_dist; nx <= x + max_dist; nx++)
+       {
                for (ny = y - max_dist; ny <= y + max_dist; ny++)
                {
                        /* Ignore annoying locations */
                        if (!in_bounds(ny, nx)) continue;
-                       
-                       /* Require "line of sight" */
-                       if (!los(y, x, ny, nx)) continue;
-                       
-                       /* Walls and Monsters block flow */
-                       if (!cave_empty_bold2(ny, nx)) continue;
-                       if (cave[ny][nx].m_idx) continue;
-                       if ((ny == py) && (nx == px)) continue;
-                                               
-                       /* ... nor on the Pattern */
-                       if ((cave[ny][nx].feat >= FEAT_PATTERN_START) &&
-                           (cave[ny][nx].feat <= FEAT_PATTERN_XTRA2))
-                               continue;
-                       
+
+                       /* Require "line of projection" */
+                       if (!projectable(y, x, ny, nx)) continue;
+
+                       if (r_idx > 0)
+                       {
+                               monster_race *r_ptr = &r_info[r_idx];
+
+                               /* Require empty space (if not ghostly) */
+                               if (!monster_can_enter(ny, nx, r_ptr, 0))
+                                       continue;
+                       }
+                       else
+                       {
+                               /* Walls and Monsters block flow */
+                               if (!cave_empty_bold2(ny, nx)) continue;
+
+                               /* ... nor on the Pattern */
+                               if (pattern_tile(ny, nx)) continue;
+                       }
+
                        i = distance(y, x, ny, nx);
 
                        if (i > max_dist)
                                continue;
-                       
+
                        num[i]++;
 
                        /* random swap */
-                       if(one_in_(num[i]))
+                       if (one_in_(num[i]))
                        {
                                place_x[i] = nx;
                                place_y[i] = ny;
                        }
-                       
                }
+       }
 
        i = 0;
        while (i < MON_SCAT_MAXD && 0 == num[i])
@@ -3477,21 +3527,22 @@ static bool mon_scatter(int *yp, int *xp, int y, int x, int max_dist)
        return TRUE;
 }
 
+#define GROUP_MAX 32 /*!< place_monster_group() 関数によるモンスターのGROUP生成時の配置最大数 / Maximum size of a group of monsters */
 
-/*
- * Maximum size of a group of monsters
- */
-#define GROUP_MAX      32
-
-
-/*
- * Attempt to place a "group" of monsters around the given location
+/*!
+ * @brief モンスターを目標地点に集団生成する / Attempt to place a "group" of monsters around the given location
+ * @param who 召喚主のモンスター情報ID
+ * @param y 中心生成位置y座標
+ * @param x 中心生成位置x座標
+ * @param r_idx 生成モンスター種族
+ * @param mode 生成オプション
+ * @return 成功したらtrue
  */
 static bool place_monster_group(int who, int y, int x, int r_idx, u32b mode)
 {
        monster_race *r_ptr = &r_info[r_idx];
 
-       int old, n, i;
+       int n, i;
        int total = 0, extra = 0;
 
        int hack_n = 0;
@@ -3530,9 +3581,6 @@ static bool place_monster_group(int who, int y, int x, int r_idx, u32b mode)
        if (total > GROUP_MAX) total = GROUP_MAX;
 
 
-       /* Save the rating */
-       old = rating;
-
        /* Start on the monster */
        hack_n = 1;
        hack_x[0] = x;
@@ -3566,25 +3614,31 @@ static bool place_monster_group(int who, int y, int x, int r_idx, u32b mode)
                }
        }
 
-       /* Hack -- restore the rating */
-       rating = old;
-
 
        /* Success */
        return (TRUE);
 }
 
-
-/*
- * Hack -- help pick an escort type
+/*!
+ * @var place_monster_idx
+ * @brief 護衛対象となるモンスター種族IDを渡すグローバル変数 / Hack -- help pick an escort type
+ * @todo 関数ポインタの都合を配慮しながら、グローバル変数place_monster_idxを除去し、関数引数化する
  */
 static int place_monster_idx = 0;
+
+/*!
+ * @var place_monster_m_idx
+ * @brief 護衛対象となるモンスターIDを渡すグローバル変数 / Hack -- help pick an escort type
+ * @todo 関数ポインタの都合を配慮しながら、グローバル変数place_monster_m_idxを除去し、関数引数化する
+ */
 static int place_monster_m_idx = 0;
 
-/*
- * Hack -- help pick an escort type
+/*!
+ * @brief モンスター種族が召喚主の護衛となれるかどうかをチェックする / Hack -- help pick an escort type
+ * @param r_idx チェックするモンスター種族のID
+ * @return 護衛にできるならばtrue
  */
-static bool place_monster_okay(int r_idx)
+static bool place_monster_can_escort(int r_idx)
 {
        monster_race *r_ptr = &r_info[place_monster_idx];
        monster_type *m_ptr = &m_list[place_monster_m_idx];
@@ -3592,7 +3646,7 @@ static bool place_monster_okay(int r_idx)
        monster_race *z_ptr = &r_info[r_idx];
 
        /* Hack - Escorts have to have the same dungeon flag */
-       if (monster_dungeon(place_monster_idx) != monster_dungeon(r_idx)) return (FALSE);
+       if (mon_hook_dungeon(place_monster_idx) != mon_hook_dungeon(r_idx)) return (FALSE);
 
        /* Require similar "race" */
        if (z_ptr->d_char != r_ptr->d_char) return (FALSE);
@@ -3607,15 +3661,11 @@ static bool place_monster_okay(int r_idx)
        if (place_monster_idx == r_idx) return (FALSE);
 
        /* Skip different alignment */
-       if (((m_ptr->sub_align & SUB_ALIGN_EVIL) && (z_ptr->flags3 & RF3_GOOD)) ||
-           ((m_ptr->sub_align & SUB_ALIGN_GOOD) && (z_ptr->flags3 & RF3_EVIL)))
-               return FALSE;
+       if (monster_has_hostile_align(m_ptr, 0, 0, z_ptr)) return FALSE;
 
        if (r_ptr->flags7 & RF7_FRIENDLY)
        {
-               if (((p_ptr->align < 0) && (z_ptr->flags3 & RF3_GOOD)) ||
-                   ((p_ptr->align > 0) && (z_ptr->flags3 & RF3_EVIL)))
-                       return FALSE;
+               if (monster_has_hostile_align(NULL, 1, -1, z_ptr)) return FALSE;
        }
 
        if ((r_ptr->flags7 & RF7_CHAMELEON) && !(z_ptr->flags7 & RF7_CHAMELEON))
@@ -3626,9 +3676,15 @@ static bool place_monster_okay(int r_idx)
 }
 
 
-/*
- * Attempt to place a monster of the given race at the given location
- *
+/*!
+ * @brief 一般的なモンスター生成処理のサブルーチン / Attempt to place a monster of the given race at the given location
+ * @param who 召喚主のモンスター情報ID
+ * @param y 生成地点y座標
+ * @param x 生成地点x座標
+ * @param r_idx 生成するモンスターの種族ID
+ * @param mode 生成オプション
+ * @return 生成に成功したらtrue
+ * @details
  * Note that certain monsters are now marked as requiring "friends".
  * These monsters, if successfully placed, and if the "grp" parameter
  * is TRUE, will be surrounded by a "group" of identical monsters.
@@ -3646,23 +3702,33 @@ static bool place_monster_okay(int r_idx)
  */
 bool place_monster_aux(int who, int y, int x, int r_idx, u32b mode)
 {
-       int             i;
+       int             i, j, n;
        monster_race    *r_ptr = &r_info[r_idx];
 
-       if (one_in_(333) && !(mode & PM_NO_KAGE) && !(mode & PM_FORCE_PET))
-               is_kage = TRUE;
-       else
-               is_kage = FALSE;
+       if (!(mode & PM_NO_KAGE) && one_in_(333))
+               mode |= PM_KAGE;
 
        /* Place one monster, or fail */
        if (!place_monster_one(who, y, x, r_idx, mode)) return (FALSE);
 
-
        /* Require the "group" flag */
        if (!(mode & PM_ALLOW_GROUP)) return (TRUE);
 
        place_monster_m_idx = hack_m_idx_ii;
 
+       /* Reinforcement */
+       for(i = 0; i < 6; i++)
+       {
+               if(!r_ptr->reinforce_id[i]) break;
+               n = damroll(r_ptr->reinforce_dd[i], r_ptr->reinforce_ds[i]);
+               for(j = 0; j < n; j++)
+               {
+                       int nx, ny, d = 7;
+                       scatter(&ny, &nx, y, x, d, 0);
+                       (void)place_monster_one(place_monster_m_idx, ny, nx, r_ptr->reinforce_id[i], mode);
+               }
+       }
+
        /* Friends for certain monsters */
        if (r_ptr->flags1 & (RF1_FRIENDS))
        {
@@ -3670,7 +3736,6 @@ bool place_monster_aux(int who, int y, int x, int r_idx, u32b mode)
                (void)place_monster_group(who, y, x, r_idx, mode);
        }
 
-
        /* Escorts for certain monsters */
        if (r_ptr->flags1 & (RF1_ESCORT))
        {
@@ -3689,7 +3754,7 @@ bool place_monster_aux(int who, int y, int x, int r_idx, u32b mode)
                        if (!cave_empty_bold2(ny, nx)) continue;
 
                        /* Prepare allocation table */
-                       get_mon_num_prep(place_monster_okay, get_monster_hook2(ny, nx));
+                       get_mon_num_prep(place_monster_can_escort, get_monster_hook2(ny, nx));
 
                        /* Pick a random race */
                        z = get_mon_num(r_ptr->level);
@@ -3714,11 +3779,12 @@ bool place_monster_aux(int who, int y, int x, int r_idx, u32b mode)
        return (TRUE);
 }
 
-
-/*
- * Hack -- attempt to place a monster at the given location
- *
- * Attempt to find a monster appropriate to the "monster_level"
+/*!
+ * @brief 一般的なモンスター生成処理のメインルーチン / Attempt to place a monster of the given race at the given location
+ * @param y 生成地点y座標
+ * @param x 生成地点x座標
+ * @param mode 生成オプション
+ * @return 生成に成功したらtrue
  */
 bool place_monster(int y, int x, u32b mode)
 {
@@ -3743,6 +3809,12 @@ bool place_monster(int y, int x, u32b mode)
 
 #ifdef MONSTER_HORDES
 
+/*!
+ * @brief 指定地点に1種類のモンスター種族による群れを生成する
+ * @param y 生成地点y座標
+ * @param x 生成地点x座標
+ * @return 生成に成功したらtrue
+ */
 bool alloc_horde(int y, int x)
 {
        monster_race *r_ptr = NULL;
@@ -3803,79 +3875,90 @@ bool alloc_horde(int y, int x)
 #endif /* MONSTER_HORDES */
 
 
-
-/*
- * Attempt to allocate a random monster in the dungeon.
- *
- * Place the monster at least "dis" distance from the player.
- *
- * Use "slp" to choose the initial "sleep" status
- *
- * Use "monster_level" for the monster level
+/*!
+ * @brief ダンジョンの主生成を試みる / Put the Guardian
+ * @param def_val 現在の主の生成状態
+ * @return 生成に成功したらtrue
  */
-bool alloc_monster(int dis, u32b mode)
+bool alloc_guardian(bool def_val)
 {
-       int                     y = 0, x = 0;
-       int         attempts_left = 10000;
        int guardian = d_info[dungeon_type].final_guardian;
 
-       /* Put an Guardian */
-       if(guardian && d_info[dungeon_type].maxdepth == dun_level && r_info[guardian].cur_num < r_info[guardian].max_num )
+       if (guardian && (d_info[dungeon_type].maxdepth == dun_level) && (r_info[guardian].cur_num < r_info[guardian].max_num))
        {
                int oy;
                int ox;
-               int try = 4000;
+               int try_count = 4000;
 
                /* Find a good position */
-               while(try)
+               while (try_count)
                {
                        /* Get a random spot */
                        oy = randint1(cur_hgt - 4) + 2;
                        ox = randint1(cur_wid - 4) + 2;
 
                        /* Is it a good spot ? */
-                       if (cave_empty_bold2(oy, ox) && monster_can_cross_terrain(cave[oy][ox].feat, &r_info[guardian]))
+                       if (cave_empty_bold2(oy, ox) && monster_can_cross_terrain(cave[oy][ox].feat, &r_info[guardian], 0))
                        {
                                /* Place the guardian */
-                               if (place_monster_aux(0, oy, ox, guardian, (PM_ALLOW_GROUP | PM_NO_KAGE | PM_NO_PET))) break;
+                               if (place_monster_aux(0, oy, ox, guardian, (PM_ALLOW_GROUP | PM_NO_KAGE | PM_NO_PET))) return TRUE;
                        }
-                       /* One less try */
-                       try--;
+
+                       /* One less try count */
+                       try_count--;
                }
+
+               return FALSE;
        }
 
+       return def_val;
+}
 
-       /* Find a legal, distant, unoccupied, space */
-       while (attempts_left--)
-       {
-               /* Pick a location */
-               y = randint0(cur_hgt);
-               x = randint0(cur_wid);
+
+/*!
+ * @brief ダンジョンの初期配置モンスターを生成1回生成する / Attempt to allocate a random monster in the dungeon.
+ * @param dis プレイヤーから離れるべき最低距離
+ * @param mode 生成オプション
+ * @return 生成に成功したらtrue
+ * @details
+ * Place the monster at least "dis" distance from the player.
+ * Use "slp" to choose the initial "sleep" status
+ * Use "monster_level" for the monster level
+ */
+bool alloc_monster(int dis, u32b mode)
+{
+       int                     y = 0, x = 0;
+       int         attempts_left = 10000;
+
+       /* Put the Guardian */
+       if (alloc_guardian(FALSE)) return TRUE;
+
+       /* Find a legal, distant, unoccupied, space */
+       while (attempts_left--)
+       {
+               /* Pick a location */
+               y = randint0(cur_hgt);
+               x = randint0(cur_wid);
 
                /* Require empty floor grid (was "naked") */
-               if (dun_level || (wilderness[p_ptr->wilderness_y][p_ptr->wilderness_x].terrain != TERRAIN_MOUNTAIN))
+               if (dun_level)
                {
                        if (!cave_empty_bold2(y, x)) continue;
                }
                else
                {
-                       if (!cave_empty_bold2(y, x) && (cave[y][x].feat != FEAT_MOUNTAIN)) continue;
+                       if (!cave_empty_bold(y, x)) continue;
                }
 
                /* Accept far away grids */
-               if (distance(y, x, py, px) > dis) break;
+               if (distance(y, x, p_ptr->y, p_ptr->x) > dis) break;
        }
 
        if (!attempts_left)
        {
                if (cheat_xtra || cheat_hear)
                {
-#ifdef JP
-msg_print("·Ù¹ð¡ª¿·¤¿¤Ê¥â¥ó¥¹¥¿¡¼¤òÇÛÃ֤Ǥ­¤Þ¤»¤ó¡£¾®¤µ¤¤³¬¤Ç¤¹¤«¡©");
-#else
-                       msg_print("Warning! Could not allocate a new monster. Small level?");
-#endif
-
+                       msg_print(_("警告!新たなモンスターを配置できません。小さい階ですか?", "Warning! Could not allocate a new monster. Small level?"));
                }
 
                return (FALSE);
@@ -3887,12 +3970,7 @@ msg_print("
        {
                if (alloc_horde(y, x))
                {
-#ifdef JP
-if (cheat_hear) msg_print("¥â¥ó¥¹¥¿¡¼¤ÎÂç·²");
-#else
-                       if (cheat_hear) msg_print("Monster horde.");
-#endif
-
+                       if (cheat_hear) msg_format(_("モンスターの大群(%c)", "Monster horde (%c)."), summon_kin_type);
                        return (TRUE);
                }
        }
@@ -3912,17 +3990,17 @@ if (cheat_hear) msg_print("
 }
 
 
-
-
-/*
- * Hack -- help decide if a monster race is "okay" to summon
+/*!
+ * @brief モンスターが召喚の基本条件に合っているかをチェックする / Hack -- help decide if a monster race is "okay" to summon
+ * @param r_idx チェックするモンスター種族ID
+ * @return 召喚対象にできるならばTRUE
  */
 static bool summon_specific_okay(int r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
 
        /* Hack - Only summon dungeon monsters */
-       if (!monster_dungeon(r_idx)) return (FALSE);
+       if (!mon_hook_dungeon(r_idx)) return (FALSE);
 
        /* Hack -- identify the summoning monster */
        if (summon_specific_who > 0)
@@ -3932,43 +4010,26 @@ static bool summon_specific_okay(int r_idx)
                /* Do not summon enemies */
 
                /* Friendly vs. opposite aligned normal or pet */
-               if (((r_ptr->flags3 & RF3_EVIL) &&
-                         (m_ptr->sub_align & SUB_ALIGN_GOOD)) ||
-                        ((r_ptr->flags3 & RF3_GOOD) &&
-                         (m_ptr->sub_align & SUB_ALIGN_EVIL)))
-               {
-                       return FALSE;
-               }
-
-               /* Hostile vs. non-hostile */
-               if (is_hostile(m_ptr) != summon_specific_hostile)
-               {
-                       return FALSE;
-               }
+               if (monster_has_hostile_align(m_ptr, 0, 0, r_ptr)) return FALSE;
        }
        /* Use the player's alignment */
        else if (summon_specific_who < 0)
        {
                /* Do not summon enemies of the pets */
-               if ((p_ptr->align < -9) && (r_ptr->flags3 & RF3_GOOD))
-               {
-                       if (!one_in_((0-p_ptr->align)/2+1)) return FALSE;
-               }
-               else if ((p_ptr->align > 9) && (r_ptr->flags3 & RF3_EVIL))
+               if (monster_has_hostile_align(NULL, 10, -10, r_ptr))
                {
-                       if (!one_in_(p_ptr->align/2+1)) return FALSE;
+                       if (!one_in_(ABS(p_ptr->align) / 2 + 1)) return FALSE;
                }
        }
 
        /* Hack -- no specific type specified */
        if (!summon_specific_type) return (TRUE);
 
-       if (!summon_unique_okay && ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_UNIQUE_7))) return FALSE;
+       if (!summon_unique_okay && ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL))) return FALSE;
 
        if ((summon_specific_who < 0) &&
-           ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_UNIQUE_7)) &&
-           (((p_ptr->align > 9) && (r_ptr->flags3 & RF3_EVIL)) ||
-            ((p_ptr->align < -9) && (r_ptr->flags3 & RF3_GOOD))))
+           ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL)) &&
+           monster_has_hostile_align(NULL, 10, -10, r_ptr))
                return FALSE;
 
        if ((r_ptr->flags7 & RF7_CHAMELEON) && (d_info[dungeon_type].flags1 & DF1_CHAMELEON)) return TRUE;
@@ -3977,9 +4038,16 @@ static bool summon_specific_okay(int r_idx)
 }
 
 
-/*
- * Place a monster (of the specified "type") near the given
- * location.  Return TRUE if a monster was actually summoned.
+/*!
+ * @brief モンスターを召喚により配置する / Place a monster (of the specified "type") near the given location. Return TRUE if a monster was actually summoned.
+ * @param who 召喚主のモンスター情報ID
+ * @param y1 目標地点y座標
+ * @param x1 目標地点x座標
+ * @param lev 相当生成階
+ * @param type 召喚種別
+ * @param mode 生成オプション 
+ * @return 召喚できたらtrueを返す
+ * @details
  *
  * We will attempt to place the monster up to 10 times before giving up.
  *
@@ -4007,7 +4075,7 @@ bool summon_specific(int who, int y1, int x1, int lev, int type, u32b mode)
 
        if (p_ptr->inside_arena) return (FALSE);
 
-       if (!mon_scatter(&y, &x, y1, x1, 2)) return FALSE;
+       if (!mon_scatter(0, &y, &x, y1, x1, 2)) return FALSE;
 
        /* Save the summoner */
        summon_specific_who = who;
@@ -4017,9 +4085,6 @@ bool summon_specific(int who, int y1, int x1, int lev, int type, u32b mode)
 
        summon_unique_okay = (mode & PM_ALLOW_UNIQUE) ? TRUE : FALSE;
 
-       /* Save the hostility */
-       summon_specific_hostile = (!(mode & PM_FORCE_FRIENDLY) && !(is_friendly_idx(who)) && !(mode & PM_FORCE_PET));
-
        /* Prepare allocation table */
        get_mon_num_prep(summon_specific_okay, get_monster_hook2(y, x));
 
@@ -4047,7 +4112,16 @@ bool summon_specific(int who, int y1, int x1, int lev, int type, u32b mode)
        return (TRUE);
 }
 
-/* A "dangerous" function, creates a pet of the specified type */
+
+/*!
+ * @brief 特定モンスター種族を召喚により生成する / A "dangerous" function, creates a pet of the specified type
+ * @param who 召喚主のモンスター情報ID
+ * @param oy 目標地点y座標
+ * @param ox 目標地点x座標
+ * @param r_idx 生成するモンスター種族ID
+ * @param mode 生成オプション 
+ * @return 召喚できたらtrueを返す
+ */
 bool summon_named_creature (int who, int oy, int ox, int r_idx, u32b mode)
 {
        int x, y;
@@ -4060,16 +4134,20 @@ bool summon_named_creature (int who, int oy, int ox, int r_idx, u32b mode)
 
        if (p_ptr->inside_arena) return FALSE;
 
-       if (!mon_scatter(&y, &x, oy, ox, 2)) return FALSE;
+       if (!mon_scatter(r_idx, &y, &x, oy, ox, 2)) return FALSE;
 
        /* Place it (allow groups) */
        return place_monster_aux(who, y, x, r_idx, (mode | PM_NO_KAGE));
 }
 
 
-/*
- * Let the given monster attempt to reproduce.
- *
+/*!
+ * @brief モンスターを増殖生成する / Let the given monster attempt to reproduce.
+ * @param m_idx 増殖するモンスター情報ID
+ * @param clone クローン・モンスター処理ならばtrue
+ * @param mode 生成オプション 
+ * @return 生成できたらtrueを返す
+ * @details
  * Note that "reproduction" REQUIRES empty space.
  */
 bool multiply_monster(int m_idx, bool clone, u32b mode)
@@ -4078,16 +4156,17 @@ bool multiply_monster(int m_idx, bool clone, u32b mode)
 
        int y, x;
 
-       if (!mon_scatter(&y, &x, m_ptr->fy, m_ptr->fx, 1))
+       if (!mon_scatter(m_ptr->r_idx, &y, &x, m_ptr->fy, m_ptr->fx, 1))
                return FALSE;
 
        if (m_ptr->mflag2 & MFLAG2_NOPET) mode |= PM_NO_PET;
 
        /* Create a new monster (awake, no groups) */
-       if (!place_monster_aux(m_idx, y, x, m_ptr->r_idx, (mode | PM_NO_KAGE)))
+       if (!place_monster_aux(m_idx, y, x, m_ptr->r_idx, (mode | PM_NO_KAGE | PM_MULTIPLY)))
                return FALSE;
 
-       if (clone)
+       /* Hack -- Transfer "clone" flag */
+       if (clone || (m_ptr->smart & SM_CLONED))
        {
                m_list[hack_m_idx_ii].smart |= SM_CLONED;
                m_list[hack_m_idx_ii].mflag2 |= MFLAG2_NOPET;
@@ -4098,11 +4177,12 @@ bool multiply_monster(int m_idx, bool clone, u32b mode)
 
 
 
-
-
-/*
- * Dump a message describing a monster's reaction to damage
- *
+/*!
+ * @brief ダメージを受けたモンスターの様子を記述する / Dump a message describing a monster's reaction to damage
+ * @param m_idx モンスター情報ID
+ * @param dam 与えたダメージ
+ * @return なし
+ * @details
  * Technically should attempt to treat "Beholder"'s as jelly's
  */
 void message_pain(int m_idx, int dam)
@@ -4115,19 +4195,12 @@ void message_pain(int m_idx, int dam)
 
        char m_name[80];
 
-
        /* Get the monster name */
        monster_desc(m_name, m_ptr, 0);
 
-       /* Notice non-damage */
-       if (dam == 0)
+       if(dam == 0) // Notice non-damage
        {
-#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;
        }
 
@@ -4137,687 +4210,311 @@ void message_pain(int m_idx, int dam)
        tmp = (newhp * 100L) / oldhp;
        percentage = (int)(tmp);
 
-
-       /* Mushrooms, Eyes, Jellies, Molds, Vortices, Worms, Quylthulgs */
-       if (strchr(",ejmvwQ", r_ptr->d_char))
+       if(my_strchr(",ejmvwQ", r_ptr->d_char)) // Mushrooms, Eyes, Jellies, Molds, Vortices, Worms, Quylthulgs
        {
 #ifdef JP
-               if (percentage > 95)
-                       msg_format("%^s¤Ï¤Û¤È¤ó¤Éµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
-               else if (percentage > 75)
-                       msg_format("%^s¤Ï¤·¤ê¹þ¤ß¤·¤¿¡£", m_name);
-               else if (percentage > 50)
-                       msg_format("%^s¤Ï½Ì¤³¤Þ¤Ã¤¿¡£", m_name);
-               else if (percentage > 35)
-                       msg_format("%^s¤ÏÄˤߤ˿̤¨¤¿¡£", m_name);
-               else if (percentage > 20)
-                       msg_format("%^s¤Ï¿È¤â¤À¤¨¤·¤¿¡£", m_name);
-               else if (percentage > 10)
-                       msg_format("%^s¤Ï¶ìÄˤǿȤâ¤À¤¨¤·¤¿¡£", m_name);
-               else
-                       msg_format("%^s¤Ï¤°¤Ë¤ã¤°¤Ë¤ã¤ÈáÛÚ»¤·¤¿¡£", m_name);
+               if(percentage > 95) msg_format("%^sはほとんど気にとめていない。", m_name);
+               else if(percentage > 75) msg_format("%^sはしり込みした。", m_name);
+               else if(percentage > 50) msg_format("%^sは縮こまった。", m_name);
+               else if(percentage > 35) msg_format("%^sは痛みに震えた。", m_name);
+               else if(percentage > 20) msg_format("%^sは身もだえした。", m_name);
+               else if(percentage > 10) msg_format("%^sは苦痛で身もだえした。", m_name);
+               else msg_format("%^sはぐにゃぐにゃと痙攣した。", m_name);
 #else
-               if (percentage > 95)
-                       msg_format("%^s barely notices.", m_name);
-               else if (percentage > 75)
-                       msg_format("%^s flinches.", m_name);
-               else if (percentage > 50)
-                       msg_format("%^s squelches.", m_name);
-               else if (percentage > 35)
-                       msg_format("%^s quivers in pain.", m_name);
-               else if (percentage > 20)
-                       msg_format("%^s writhes about.", m_name);
-               else if (percentage > 10)
-                       msg_format("%^s writhes in agony.", m_name);
-               else
-                       msg_format("%^s jerks limply.", m_name);
+               if(percentage > 95) msg_format("%^s barely notices.", m_name);
+               else if(percentage > 75) msg_format("%^s flinches.", m_name);
+               else if(percentage > 50) msg_format("%^s squelches.", m_name);
+               else if(percentage > 35) msg_format("%^s quivers in pain.", m_name);
+               else if(percentage > 20) msg_format("%^s writhes about.", m_name);
+               else if(percentage > 10) msg_format("%^s writhes in agony.", m_name);
+               else msg_format("%^s jerks limply.", m_name);
 #endif
-
        }
 
-
-       /* Fish */
-       else if (strchr("l", r_ptr->d_char))
+       else if(my_strchr("l", r_ptr->d_char)) // Fish
        {
-               if (percentage > 95)
-#ifdef JP
-msg_format("%^s¤Ï¤Û¤È¤ó¤Éµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
-#else
-                       msg_format("%^s barely notices.", m_name);
-#endif
-               else if (percentage > 75)
-#ifdef JP
-msg_format("%^s¤Ï¤·¤ê¹þ¤ß¤·¤¿¡£", m_name);
-#else
-                       msg_format("%^s flinches.", m_name);
-#endif
-               else if (percentage > 50)
-#ifdef JP
-msg_format("%^s¤Ïí´í°¤·¤¿¡£", m_name);
-#else
-                       msg_format("%^s hesitates.", m_name);
-#endif
-               else if (percentage > 35)
-#ifdef JP
-msg_format("%^s¤ÏÄˤߤ˿̤¨¤¿¡£", m_name);
-#else
-                       msg_format("%^s quivers in pain.", m_name);
-#endif
-               else if (percentage > 20)
 #ifdef JP
-msg_format("%^s¤Ï¿È¤â¤À¤¨¤·¤¿¡£", m_name);
+               if(percentage > 95) msg_format("%^sはほとんど気にとめていない。", m_name);
+               else if(percentage > 75) msg_format("%^sはしり込みした。", m_name);
+               else if(percentage > 50) msg_format("%^sは躊躇した。", m_name);
+               else if(percentage > 35) msg_format("%^sは痛みに震えた。", m_name);
+               else if(percentage > 20) msg_format("%^sは身もだえした。", m_name);
+               else if(percentage > 10) msg_format("%^sは苦痛で身もだえした。", m_name);
+               else msg_format("%^sはぐにゃぐにゃと痙攣した。", m_name);
 #else
-                       msg_format("%^s writhes about.", m_name);
-#endif
-               else if (percentage > 10)
-#ifdef JP
-msg_format("%^s¤Ï¶ìÄˤǿȤâ¤À¤¨¤·¤¿¡£", m_name);
-#else
-                       msg_format("%^s writhes in agony.", m_name);
-#endif
-               else
+               if(percentage > 95) msg_format("%^s barely notices.", m_name);
+               else if(percentage > 75) msg_format("%^s flinches.", m_name);
+               else if(percentage > 50) msg_format("%^s hesitates.", m_name);
+               else if(percentage > 35) msg_format("%^s quivers in pain.", m_name);
+               else if(percentage > 20) msg_format("%^s writhes about.", m_name);
+               else if(percentage > 10) msg_format("%^s writhes in agony.", m_name);
+               else msg_format("%^s jerks limply.", m_name);
+#endif         
+       }
+
+       else if(my_strchr("g#+<>", r_ptr->d_char)) // Golems, Walls, Doors, Stairs
+       {       
 #ifdef JP
-msg_format("%^s¤Ï¤°¤Ë¤ã¤°¤Ë¤ã¤ÈáÛÚ»¤·¤¿¡£", m_name);
+               if(percentage > 95) msg_format("%sは攻撃を気にとめていない。", m_name);
+               else if(percentage > 75) msg_format("%sは攻撃に肩をすくめた。", m_name);
+               else if(percentage > 50) msg_format("%^sは雷鳴のように吠えた。", m_name);
+               else if(percentage > 35) msg_format("%^sは苦しげに吠えた。", m_name);
+               else if(percentage > 20) msg_format("%^sはうめいた。", m_name);
+               else if(percentage > 10) msg_format("%^sは躊躇した。", m_name);
+               else msg_format("%^sはくしゃくしゃになった。", m_name);
 #else
-                       msg_format("%^s jerks limply.", m_name);
+               if(percentage > 95) msg_format("%^s ignores the attack.", m_name);
+               else if(percentage > 75) msg_format("%^s shrugs off the attack.", m_name);
+               else if(percentage > 50) msg_format("%^s roars thunderously.", m_name);
+               else if(percentage > 35) msg_format("%^s rumbles.", m_name);
+               else if(percentage > 20) msg_format("%^s grunts.", m_name);
+               else if(percentage > 10) msg_format("%^s hesitates.", m_name);
+               else msg_format("%^s crumples.", m_name);
 #endif
        }
 
-
-       /* Golems, Walls, Doors, Stairs */
-       else if (strchr("g#+<>", r_ptr->d_char))
+       else if(my_strchr("JMR", r_ptr->d_char) || !isalpha(r_ptr->d_char)) // Snakes, Hydrae, Reptiles, Mimics
        {
-               if (percentage > 95)
-#ifdef JP
-msg_format("%s¤Ï¹¶·â¤òµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
-#else
-                       msg_format("%^s ignores the attack.", m_name);
-#endif
-               else if (percentage > 75)
-#ifdef JP
-msg_format("%s¤Ï¹¶·â¤Ë¸ª¤ò¤¹¤¯¤á¤¿¡£", m_name);
-#else
-                       msg_format("%^s shrugs off the attack.", m_name);
-#endif
-               else if (percentage > 50)
-#ifdef JP
-msg_format("%^s¤ÏÍëÌĤΤ褦¤ËËʤ¨¤¿¡£", m_name);
-#else
-                       msg_format("%^s roars thunderously.", m_name);
-#endif
-               else if (percentage > 35)
 #ifdef JP
-msg_format("%^s¤Ï¶ì¤·¤²¤ËËʤ¨¤¿¡£", m_name);
+               if(percentage > 95) msg_format("%^sはほとんど気にとめていない。", m_name);
+               else if(percentage > 75) msg_format("%^sはシーッと鳴いた。", m_name);
+               else if(percentage > 50) msg_format("%^sは怒って頭を上げた。", m_name);
+               else if(percentage > 35) msg_format("%^sは猛然と威嚇した。", m_name);
+               else if(percentage > 20) msg_format("%^sは身もだえした。", m_name);
+               else if(percentage > 10) msg_format("%^sは苦痛で身もだえした。", m_name);
+               else msg_format("%^sはぐにゃぐにゃと痙攣した。", m_name);
 #else
-                       msg_format("%^s rumbles.", m_name);
-#endif
-               else if (percentage > 20)
-#ifdef JP
-msg_format("%^s¤Ï¤¦¤á¤¤¤¿¡£", m_name);
-#else
-                       msg_format("%^s grunts.", m_name);
-#endif
-               else if (percentage > 10)
-#ifdef JP
-msg_format("%^s¤Ïí´í°¤·¤¿¡£", m_name);
-#else
-                       msg_format("%^s hesitates.", m_name);
-#endif
-               else
-#ifdef JP
-msg_format("%^s¤Ï¤¯¤·¤ã¤¯¤·¤ã¤Ë¤Ê¤Ã¤¿¡£", m_name);
-#else
-                       msg_format("%^s crumples.", m_name);
+               if(percentage > 95) msg_format("%^s barely notices.", m_name);
+               else if(percentage > 75) msg_format("%^s hisses.", m_name);
+               else if(percentage > 50) msg_format("%^s rears up in anger.", m_name);
+               else if(percentage > 35) msg_format("%^s hisses furiously.", m_name);
+               else if(percentage > 20) msg_format("%^s writhes about.", m_name);
+               else if(percentage > 10) msg_format("%^s writhes in agony.", m_name);
+               else msg_format("%^s jerks limply.", m_name);
 #endif
        }
 
-
-       /* Snakes, Hydrae, Reptiles, Mimics */
-       else if (strchr("JMR", r_ptr->d_char) || !isalpha(r_ptr->d_char))
+       else if(my_strchr("f", r_ptr->d_char))
        {
-               if (percentage > 95)
-#ifdef JP
-msg_format("%^s¤Ï¤Û¤È¤ó¤Éµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
-#else
-                       msg_format("%^s barely notices.", m_name);
-#endif
-               else if (percentage > 75)
-#ifdef JP
-msg_format("%^s¤Ï¥·¡¼¥Ã¤ÈÌĤ¤¤¿¡£", m_name);
-#else
-                       msg_format("%^s hisses.", m_name);
-#endif
-               else if (percentage > 50)
-#ifdef JP
-msg_format("%^s¤ÏÅܤäÆƬ¤ò¾å¤²¤¿¡£", m_name);
-#else
-                       msg_format("%^s rears up in anger.", m_name);
-#endif
-               else if (percentage > 35)
 #ifdef JP
-msg_format("%^s¤ÏÌÔÁ³¤È°Ò³Å¤·¤¿¡£", m_name);
+               if(percentage > 95) msg_format("%sは攻撃に肩をすくめた。", m_name);
+               else if(percentage > 75) msg_format("%^sは吠えた。", m_name);
+               else if(percentage > 50) msg_format("%^sは怒って吠えた。", m_name);
+               else if(percentage > 35) msg_format("%^sは痛みでシーッと鳴いた。", m_name);
+               else if(percentage > 20) msg_format("%^sは痛みで弱々しく鳴いた。", m_name);
+               else if(percentage > 10) msg_format("%^sは苦痛にうめいた。", m_name);
+               else msg_format("%sは哀れな鳴き声を出した。", m_name);
 #else
-                       msg_format("%^s hisses furiously.", m_name);
-#endif
-               else if (percentage > 20)
-#ifdef JP
-msg_format("%^s¤Ï¿È¤â¤À¤¨¤·¤¿¡£", m_name);
-#else
-                       msg_format("%^s writhes about.", m_name);
-#endif
-               else if (percentage > 10)
-#ifdef JP
-msg_format("%^s¤Ï¶ìÄˤǿȤâ¤À¤¨¤·¤¿¡£", m_name);
-#else
-                       msg_format("%^s writhes in agony.", m_name);
-#endif
-               else
-#ifdef JP
-msg_format("%^s¤Ï¤°¤Ë¤ã¤°¤Ë¤ã¤ÈáÛÚ»¤·¤¿¡£", m_name);
-#else
-                       msg_format("%^s jerks limply.", m_name);
+               if(percentage > 95) msg_format("%^s shrugs off the attack.", m_name);
+               else if(percentage > 75) msg_format("%^s roars.", m_name);
+               else if(percentage > 50) msg_format("%^s growls angrily.", m_name);
+               else if(percentage > 35) msg_format("%^s hisses with pain.", m_name);
+               else if(percentage > 20) msg_format("%^s mewls in pain.", m_name);
+               else if(percentage > 10) msg_format("%^s hisses in agony.", m_name);
+               else msg_format("%^s mewls pitifully.", m_name);
 #endif
        }
 
-
-       /* Felines */
-       else if (strchr("f", r_ptr->d_char))
+       else if(my_strchr("acFIKS", r_ptr->d_char)) // Ants, Centipedes, Flies, Insects, Beetles, Spiders
        {
-               if (percentage > 95)
-#ifdef JP
-msg_format("%s¤Ï¹¶·â¤Ë¸ª¤ò¤¹¤¯¤á¤¿¡£", m_name);
-#else
-                       msg_format("%^s shrugs off the attack.", m_name);
-#endif
-               else if (percentage > 75)
-#ifdef JP
-msg_format("%^s¤ÏËʤ¨¤¿¡£", m_name);
-#else
-                       msg_format("%^s roars.", m_name);
-#endif
-               else if (percentage > 50)
-#ifdef JP
-msg_format("%^s¤ÏÅܤäÆËʤ¨¤¿¡£", m_name);
-#else
-                       msg_format("%^s growls angrily.", m_name);
-#endif
-               else if (percentage > 35)
 #ifdef JP
-msg_format("%^s¤ÏÄˤߤǥ·¡¼¥Ã¤ÈÌĤ¤¤¿¡£", m_name);
+               if(percentage > 95) msg_format("%sは攻撃を気にとめていない。", m_name);
+               else if(percentage > 75) msg_format("%^sはキーキー鳴いた。", m_name);
+               else if(percentage > 50) msg_format("%^sはヨロヨロ逃げ回った。", m_name);
+               else if(percentage > 35) msg_format("%^sはうるさく鳴いた。", m_name);
+               else if(percentage > 20) msg_format("%^sは痛みに痙攣した。", m_name);
+               else if(percentage > 10) msg_format("%^sは苦痛で痙攣した。", m_name);
+               else msg_format("%^sはピクピクひきつった。", m_name);
 #else
-                       msg_format("%^s hisses with pain.", m_name);
-#endif
-               else if (percentage > 20)
-#ifdef JP
-msg_format("%^s¤ÏÄˤߤǼ塹¤·¤¯ÌĤ¤¤¿¡£", m_name);
-#else
-                       msg_format("%^s mewls in pain.", m_name);
-#endif
-               else if (percentage > 10)
-#ifdef JP
-msg_format("%^s¤Ï¶ìÄˤˤ¦¤á¤¤¤¿¡£", m_name);
-#else
-                       msg_format("%^s hisses in agony.", m_name);
-#endif
-               else
-#ifdef JP
-msg_format("%s¤Ï°¥¤ì¤ÊÌĤ­À¼¤ò½Ð¤·¤¿¡£", m_name);
-#else
-                       msg_format("%^s mewls pitifully.", m_name);
+               if(percentage > 95)     msg_format("%^s ignores the attack.", m_name);
+               else if(percentage > 75) msg_format("%^s chitters.", m_name);
+               else if(percentage > 50) msg_format("%^s scuttles about.", m_name);
+               else if(percentage > 35) msg_format("%^s twitters.", m_name);
+               else if(percentage > 20) msg_format("%^s jerks in pain.", m_name);
+               else if(percentage > 10) msg_format("%^s jerks in agony.", m_name);
+               else msg_format("%^s twitches.", m_name);
 #endif
        }
 
-
-       /* Ants, Centipedes, Flies, Insects, Beetles, Spiders */
-       else if (strchr("acFIKS", r_ptr->d_char))
-       {
-               if (percentage > 95)
-#ifdef JP
-msg_format("%s¤Ï¹¶·â¤òµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
-#else
-                       msg_format("%^s ignores the attack.", m_name);
-#endif
-               else if (percentage > 75)
-#ifdef JP
-msg_format("%^s¤Ï¥­¡¼¥­¡¼ÌĤ¤¤¿¡£", m_name);
-#else
-                       msg_format("%^s chitters.", m_name);
-#endif
-
-               else if (percentage > 50)
-#ifdef JP
-msg_format("%^s¤Ï¥è¥í¥è¥íƨ¤²²ó¤Ã¤¿¡£", m_name);
-#else
-                       msg_format("%^s scuttles about.", m_name);
-#endif
-
-               else if (percentage > 35)
-#ifdef JP
-msg_format("%^s¤Ï¤¦¤ë¤µ¤¯ÌĤ¤¤¿¡£", m_name);
-#else
-                       msg_format("%^s twitters.", m_name);
-#endif
-
-               else if (percentage > 20)
-#ifdef JP
-msg_format("%^s¤ÏÄˤߤËáÛÚ»¤·¤¿¡£", m_name);
-#else
-                       msg_format("%^s jerks in pain.", m_name);
-#endif
-
-               else if (percentage > 10)
-#ifdef JP
-msg_format("%^s¤Ï¶ìÄˤÇáÛÚ»¤·¤¿¡£", m_name);
-#else
-                       msg_format("%^s jerks in agony.", m_name);
-#endif
-
-               else
+       else if(my_strchr("B", r_ptr->d_char)) // Birds
+       {               
 #ifdef JP
-msg_format("%^s¤Ï¥Ô¥¯¥Ô¥¯¤Ò¤­¤Ä¤Ã¤¿¡£", m_name);
+               if(percentage > 95) msg_format("%^sはさえずった。", m_name);
+               else if(percentage > 75) msg_format("%^sはピーピー鳴いた。", m_name);
+               else if(percentage > 50) msg_format("%^sはギャーギャー鳴いた。", m_name);
+               else if(percentage > 35) msg_format("%^sはギャーギャー鳴きわめいた。", m_name);
+               else if(percentage > 20) msg_format("%^sは苦しんだ。", m_name);
+               else if(percentage > 10) msg_format("%^sはのたうち回った。", m_name);
+               else msg_format("%^sはキーキーと鳴き叫んだ。", m_name);
 #else
-                       msg_format("%^s twitches.", m_name);
+               if(percentage > 95)     msg_format("%^s chirps.", m_name);
+               else if(percentage > 75) msg_format("%^s twitters.", m_name);
+               else if(percentage > 50) msg_format("%^s squawks.", m_name);
+               else if(percentage > 35) msg_format("%^s chatters.", m_name);
+               else if(percentage > 20) msg_format("%^s jeers.", m_name);
+               else if(percentage > 10) msg_format("%^s flutters about.", m_name);
+               else msg_format("%^s squeaks.", m_name);
 #endif
-
        }
 
-
-       /* Birds */
-       else if (strchr("B", r_ptr->d_char))
-       {
-               if (percentage > 95)
+       else if(my_strchr("duDLUW", r_ptr->d_char)) // Dragons, Demons, High Undead
+       {       
 #ifdef JP
-msg_format("%^s¤Ï¤µ¤¨¤º¤Ã¤¿¡£", m_name);
+               if(percentage > 95) msg_format("%sは攻撃を気にとめていない。", m_name);
+               else if(percentage > 75) msg_format("%^sはしり込みした。", m_name);
+               else if(percentage > 50) msg_format("%^sは痛みでシーッと鳴いた。", m_name);
+               else if(percentage > 35) msg_format("%^sは痛みでうなった。", m_name);
+               else if(percentage > 20) msg_format("%^sは痛みに吠えた。", m_name);
+               else if(percentage > 10) msg_format("%^sは苦しげに叫んだ。", m_name);
+               else msg_format("%^sは弱々しくうなった。", m_name);
 #else
-                       msg_format("%^s chirps.", m_name);
+               if(percentage > 95) msg_format("%^s ignores the attack.", m_name);
+               else if(percentage > 75) msg_format("%^s flinches.", m_name);
+               else if(percentage > 50) msg_format("%^s hisses in pain.", m_name);
+               else if(percentage > 35) msg_format("%^s snarls with pain.", m_name);
+               else if(percentage > 20) msg_format("%^s roars with pain.", m_name);
+               else if(percentage > 10) msg_format("%^s gasps.", m_name);
+               else msg_format("%^s snarls feebly.", m_name);
 #endif
-
-               else if (percentage > 75)
-#ifdef JP
-msg_format("%^s¤Ï¥Ô¡¼¥Ô¡¼ÌĤ¤¤¿¡£", m_name);
-#else
-                       msg_format("%^s twitters.", m_name);
-#endif
-
-               else if (percentage > 50)
-#ifdef JP
-msg_format("%^s¤Ï¥®¥ã¡¼¥®¥ã¡¼ÌĤ¤¤¿¡£", m_name);
-#else
-                       msg_format("%^s squawks.", m_name);
-#endif
-
-               else if (percentage > 35)
-#ifdef JP
-msg_format("%^s¤Ï¥®¥ã¡¼¥®¥ã¡¼ÌĤ­¤ï¤á¤¤¤¿¡£", m_name);
-#else
-                       msg_format("%^s chatters.", m_name);
-#endif
-
-               else if (percentage > 20)
-#ifdef JP
-msg_format("%^s¤Ï¶ì¤·¤ó¤À¡£", m_name);
-#else
-                       msg_format("%^s jeers.", m_name);
-#endif
-
-               else if (percentage > 10)
-#ifdef JP
-msg_format("%^s¤Ï¤Î¤¿¤¦¤Á²ó¤Ã¤¿¡£", m_name);
-#else
-                       msg_format("%^s flutters about.", m_name);
-#endif
-
-               else
-#ifdef JP
-msg_format("%^s¤Ï¥­¡¼¥­¡¼¤ÈÌĤ­¶«¤ó¤À¡£", m_name);
-#else
-                       msg_format("%^s squeaks.", m_name);
-#endif
-
        }
 
-
-       /* Dragons, Demons, High Undead */
-       else if (strchr("duDLUW", r_ptr->d_char))
+       else if(my_strchr("s", r_ptr->d_char)) // Skeletons
        {
-               if (percentage > 95)
-#ifdef JP
-msg_format("%s¤Ï¹¶·â¤òµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
-#else
-                       msg_format("%^s ignores the attack.", m_name);
-#endif
-
-               else if (percentage > 75)
-#ifdef JP
-msg_format("%^s¤Ï¤·¤ê¹þ¤ß¤·¤¿¡£", m_name);
-#else
-                       msg_format("%^s flinches.", m_name);
-#endif
-
-               else if (percentage > 50)
-#ifdef JP
-msg_format("%^s¤ÏÄˤߤǥ·¡¼¥Ã¤ÈÌĤ¤¤¿¡£", m_name);
-#else
-                       msg_format("%^s hisses in pain.", m_name);
-#endif
-
-               else if (percentage > 35)
-#ifdef JP
-msg_format("%^s¤ÏÄˤߤǤ¦¤Ê¤Ã¤¿¡£", m_name);
-#else
-                       msg_format("%^s snarls with pain.", m_name);
-#endif
-
-               else if (percentage > 20)
-#ifdef JP
-msg_format("%^s¤ÏÄˤߤËËʤ¨¤¿¡£", m_name);
-#else
-                       msg_format("%^s roars with pain.", m_name);
-#endif
-
-               else if (percentage > 10)
-#ifdef JP
-msg_format("%^s¤Ï¶ì¤·¤²¤Ë¶«¤ó¤À¡£", m_name);
-#else
-                       msg_format("%^s gasps.", m_name);
-#endif
-
-               else
 #ifdef JP
-msg_format("%^s¤Ï¼å¡¹¤·¤¯¤¦¤Ê¤Ã¤¿¡£", m_name);
+               if(percentage > 95) msg_format("%sは攻撃を気にとめていない。", m_name);
+               else if(percentage > 75) msg_format("%sは攻撃に肩をすくめた。", m_name);
+               else if(percentage > 50) msg_format("%^sはカタカタと笑った。", m_name);
+               else if(percentage > 35) msg_format("%^sはよろめいた。", m_name);
+               else if(percentage > 20) msg_format("%^sはカタカタ言った。", m_name);
+               else if(percentage > 10) msg_format("%^sはよろめいた。", m_name);
+               else msg_format("%^sはガタガタ言った。", m_name);
 #else
-                       msg_format("%^s snarls feebly.", m_name);
+               if(percentage > 95) msg_format("%^s ignores the attack.", m_name);
+               else if(percentage > 75) msg_format("%^s shrugs off the attack.", m_name);
+               else if(percentage > 50) msg_format("%^s rattles.", m_name);
+               else if(percentage > 35) msg_format("%^s stumbles.", m_name);
+               else if(percentage > 20) msg_format("%^s rattles.", m_name);
+               else if(percentage > 10) msg_format("%^s staggers.", m_name);
+               else msg_format("%^s clatters.", m_name);
 #endif
-
        }
 
-
-       /* Skeletons */
-       else if (strchr("s", r_ptr->d_char))
-       {
-               if (percentage > 95)
-#ifdef JP
-msg_format("%s¤Ï¹¶·â¤òµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
-#else
-                       msg_format("%^s ignores the attack.", m_name);
-#endif
-
-               else if (percentage > 75)
-#ifdef JP
-msg_format("%s¤Ï¹¶·â¤Ë¸ª¤ò¤¹¤¯¤á¤¿¡£", m_name);
-#else
-                       msg_format("%^s shrugs off the attack.", m_name);
-#endif
-
-               else if (percentage > 50)
-#ifdef JP
-msg_format("%^s¤Ï¥«¥¿¥«¥¿¤È¾Ð¤Ã¤¿¡£", m_name);
-#else
-                       msg_format("%^s rattles.", m_name);
-#endif
-
-               else if (percentage > 35)
-#ifdef JP
-msg_format("%^s¤Ï¤è¤í¤á¤¤¤¿¡£", m_name);
-#else
-                       msg_format("%^s stumbles.", m_name);
-#endif
-
-               else if (percentage > 20)
+       else if(my_strchr("z", r_ptr->d_char)) // Zombies
+       {               
 #ifdef JP
-msg_format("%^s¤Ï¥«¥¿¥«¥¿¸À¤Ã¤¿¡£", m_name);
+               if(percentage > 95) msg_format("%sは攻撃を気にとめていない。", m_name);
+               else if(percentage > 75) msg_format("%sは攻撃に肩をすくめた。", m_name);
+               else if(percentage > 50) msg_format("%^sはうめいた。", m_name);
+               else if(percentage > 35) msg_format("%sは苦しげにうめいた。", m_name);
+               else if(percentage > 20) msg_format("%^sは躊躇した。", m_name);
+               else if(percentage > 10) msg_format("%^sはうなった。", m_name);
+               else msg_format("%^sはよろめいた。", m_name);
 #else
-                       msg_format("%^s rattles.", m_name);
+               if(percentage > 95) msg_format("%^s ignores the attack.", m_name);
+               else if(percentage > 75) msg_format("%^s shrugs off the attack.", m_name);
+               else if(percentage > 50) msg_format("%^s groans.", m_name);
+               else if(percentage > 35) msg_format("%^s moans.", m_name);
+               else if(percentage > 20) msg_format("%^s hesitates.", m_name);
+               else if(percentage > 10) msg_format("%^s grunts.", m_name);
+               else msg_format("%^s staggers.", m_name);
 #endif
-
-               else if (percentage > 10)
-#ifdef JP
-msg_format("%^s¤Ï¤è¤í¤á¤¤¤¿¡£", m_name);
-#else
-                       msg_format("%^s staggers.", m_name);
-#endif
-
-               else
-#ifdef JP
-msg_format("%^s¤Ï¥¬¥¿¥¬¥¿¸À¤Ã¤¿¡£", m_name);
-#else
-                       msg_format("%^s clatters.", m_name);
-#endif
-
        }
 
-
-       /* Zombies */
-       else if (strchr("z", r_ptr->d_char))
+       else if(my_strchr("G", r_ptr->d_char)) // Ghosts
        {
-               if (percentage > 95)
-#ifdef JP
-msg_format("%s¤Ï¹¶·â¤òµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
-#else
-                       msg_format("%^s ignores the attack.", m_name);
-#endif
-
-               else if (percentage > 75)
-#ifdef JP
-msg_format("%s¤Ï¹¶·â¤Ë¸ª¤ò¤¹¤¯¤á¤¿¡£", m_name);
-#else
-                       msg_format("%^s shrugs off the attack.", m_name);
-#endif
-
-               else if (percentage > 50)
-#ifdef JP
-msg_format("%^s¤Ï¤¦¤á¤¤¤¿¡£", m_name);
-#else
-                       msg_format("%^s groans.", m_name);
-#endif
-
-               else if (percentage > 35)
-#ifdef JP
-msg_format("%s¤Ï¶ì¤·¤²¤Ë¤¦¤á¤¤¤¿¡£", m_name);
-#else
-                       msg_format("%^s moans.", m_name);
-#endif
-
-               else if (percentage > 20)
-#ifdef JP
-msg_format("%^s¤Ïí´í°¤·¤¿¡£", m_name);
-#else
-                       msg_format("%^s hesitates.", m_name);
-#endif
-
-               else if (percentage > 10)
-#ifdef JP
-msg_format("%^s¤Ï¤¦¤Ê¤Ã¤¿¡£", m_name);
-#else
-                       msg_format("%^s grunts.", m_name);
-#endif
-
-               else
 #ifdef JP
-msg_format("%^s¤Ï¤è¤í¤á¤¤¤¿¡£", m_name);
+               if(percentage > 95) msg_format("%sは攻撃を気にとめていない。", m_name);
+               else if(percentage > 75) msg_format("%sは攻撃に肩をすくめた。", m_name);
+               else if(percentage > 50) msg_format("%sはうめいた。", m_name);
+               else if(percentage > 35) msg_format("%^sは泣きわめいた。", m_name);
+               else if(percentage > 20) msg_format("%^sは吠えた。", m_name);
+               else if(percentage > 10) msg_format("%sは弱々しくうめいた。", m_name);
+               else msg_format("%^sはかすかにうめいた。", m_name);
 #else
-                       msg_format("%^s staggers.", m_name);
+               if(percentage > 95) msg_format("%^s ignores the attack.", m_name);
+               else if(percentage > 75) msg_format("%^s shrugs off the attack.", m_name);
+               else if(percentage > 50)  msg_format("%^s moans.", m_name);
+               else if(percentage > 35) msg_format("%^s wails.", m_name);
+               else if(percentage > 20) msg_format("%^s howls.", m_name);
+               else if(percentage > 10) msg_format("%^s moans softly.", m_name);
+               else msg_format("%^s sighs.", m_name);
 #endif
-
        }
 
-
-       /* Ghosts */
-       else if (strchr("G", r_ptr->d_char))
-
+       else if(my_strchr("CZ", r_ptr->d_char)) // Dogs and Hounds
        {
-               if (percentage > 95)
-#ifdef JP
-msg_format("%s¤Ï¹¶·â¤òµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
-#else
-                       msg_format("%^s ignores the attack.", m_name);
-#endif
-
-               else if (percentage > 75)
-#ifdef JP
-msg_format("%s¤Ï¹¶·â¤Ë¸ª¤ò¤¹¤¯¤á¤¿¡£", m_name);
-#else
-                       msg_format("%^s shrugs off the attack.", m_name);
-#endif
-
-               else if (percentage > 50)
 #ifdef JP
-msg_format("%s¤Ï¤¦¤á¤¤¤¿¡£", m_name);
+               if(percentage > 95) msg_format("%^sは攻撃に肩をすくめた。", m_name);
+               else if(percentage > 75) msg_format("%^sは痛みでうなった。", m_name);
+               else if(percentage > 50) msg_format("%^sは痛みでキャンキャン吠えた。", m_name);
+               else if(percentage > 35) msg_format("%^sは痛みで鳴きわめいた。", m_name);
+               else if(percentage > 20) msg_format("%^sは苦痛のあまり鳴きわめいた。", m_name);
+               else if(percentage > 10) msg_format("%^sは苦痛でもだえ苦しんだ。", m_name);
+               else msg_format("%^sは弱々しく吠えた。", m_name);
 #else
-                       msg_format("%^s moans.", m_name);
+               if(percentage > 95) msg_format("%^s shrugs off the attack.", m_name);
+               else if(percentage > 75) msg_format("%^s snarls with pain.", m_name);
+               else if(percentage > 50) msg_format("%^s yelps in pain.", m_name);
+               else if(percentage > 35) msg_format("%^s howls in pain.", m_name);
+               else if(percentage > 20) msg_format("%^s howls in agony.", m_name);
+               else if(percentage > 10) msg_format("%^s writhes in agony.", m_name);
+               else msg_format("%^s yelps feebly.", m_name);
 #endif
-
-               else if (percentage > 35)
-#ifdef JP
-msg_format("%^s¤Ïµã¤­¤ï¤á¤¤¤¿¡£", m_name);
-#else
-                       msg_format("%^s wails.", m_name);
-#endif
-
-               else if (percentage > 20)
-#ifdef JP
-msg_format("%^s¤ÏËʤ¨¤¿¡£", m_name);
-#else
-                       msg_format("%^s howls.", m_name);
-#endif
-
-               else if (percentage > 10)
-#ifdef JP
-msg_format("%s¤Ï¼å¡¹¤·¤¯¤¦¤á¤¤¤¿¡£", m_name);
-#else
-                       msg_format("%^s moans softly.", m_name);
-#endif
-
-               else
-#ifdef JP
-msg_format("%^s¤Ï¤«¤¹¤«¤Ë¤¦¤á¤¤¤¿¡£", m_name);
-#else
-                       msg_format("%^s sighs.", m_name);
-#endif
-
        }
 
-
-       /* Dogs and Hounds */
-       else if (strchr("CZ", r_ptr->d_char))
+       else if(my_strchr("Xbilqrt", r_ptr->d_char)) // One type of creatures (ignore,squeal,shriek)
        {
 #ifdef JP
-               if (percentage > 95)
-                       msg_format("%^s¤Ï¹¶·â¤Ë¸ª¤ò¤¹¤¯¤á¤¿¡£", m_name);
-               else if (percentage > 75)
-                       msg_format("%^s¤ÏÄˤߤǤ¦¤Ê¤Ã¤¿¡£", m_name);
-               else if (percentage > 50)
-                       msg_format("%^s¤ÏÄˤߤǥ­¥ã¥ó¥­¥ã¥óËʤ¨¤¿¡£", m_name);
-               else if (percentage > 35)
-                       msg_format("%^s¤ÏÄˤߤÇÌĤ­¤ï¤á¤¤¤¿¡£", m_name);
-               else if (percentage > 20)
-                       msg_format("%^s¤Ï¶ìÄˤΤ¢¤Þ¤êÌĤ­¤ï¤á¤¤¤¿¡£", m_name);
-               else if (percentage > 10)
-                       msg_format("%^s¤Ï¶ìÄˤǤâ¤À¤¨¶ì¤·¤ó¤À¡£", m_name);
-               else
-                       msg_format("%^s¤Ï¼å¡¹¤·¤¯Ëʤ¨¤¿¡£", m_name);
+               if(percentage > 95) msg_format("%^sは攻撃を気にとめていない。", m_name);
+               else if(percentage > 75) msg_format("%^sは痛みでうなった。", m_name);
+               else if(percentage > 50) msg_format("%^sは痛みで叫んだ。", m_name);
+               else if(percentage > 35) msg_format("%^sは痛みで絶叫した。", m_name);
+               else if(percentage > 20) msg_format("%^sは苦痛のあまり絶叫した。", m_name);
+               else if(percentage > 10) msg_format("%^sは苦痛でもだえ苦しんだ。", m_name);
+               else msg_format("%^sは弱々しく叫んだ。", m_name);
 #else
-               if (percentage > 95)
-                       msg_format("%^s shrugs off the attack.", m_name);
-               else if (percentage > 75)
-                       msg_format("%^s snarls with pain.", m_name);
-               else if (percentage > 50)
-                       msg_format("%^s yelps in pain.", m_name);
-               else if (percentage > 35)
-                       msg_format("%^s howls in pain.", m_name);
-               else if (percentage > 20)
-                       msg_format("%^s howls in agony.", m_name);
-               else if (percentage > 10)
-                       msg_format("%^s writhes in agony.", m_name);
-               else
-                       msg_format("%^s yelps feebly.", m_name);
+               if(percentage > 95) msg_format("%^s ignores the attack.", m_name);
+               else if(percentage > 75) msg_format("%^s grunts with pain.", m_name);
+               else if(percentage > 50) msg_format("%^s squeals in pain.", m_name);
+               else if(percentage > 35) msg_format("%^s shrieks in pain.", m_name);
+               else if(percentage > 20) msg_format("%^s shrieks in agony.", m_name);
+               else if(percentage > 10) msg_format("%^s writhes in agony.", m_name);
+               else msg_format("%^s cries out feebly.", m_name);
 #endif
-
        }
 
-       /* One type of monsters (ignore,squeal,shriek) */
-       else if (strchr("Xbilqrt", r_ptr->d_char))
+       else // Another type of creatures (shrug,cry,scream)
        {
 #ifdef JP
-               if (percentage > 95)
-                       msg_format("%^s¤Ï¹¶·â¤òµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
-               else if (percentage > 75)
-                       msg_format("%^s¤ÏÄˤߤǤ¦¤Ê¤Ã¤¿¡£", m_name);
-               else if (percentage > 50)
-                       msg_format("%^s¤ÏÄˤߤǶ«¤ó¤À¡£", m_name);
-               else if (percentage > 35)
-                       msg_format("%^s¤ÏÄˤߤÇÀ䶫¤·¤¿¡£", m_name);
-               else if (percentage > 20)
-                       msg_format("%^s¤Ï¶ìÄˤΤ¢¤Þ¤êÀ䶫¤·¤¿¡£", m_name);
-               else if (percentage > 10)
-                       msg_format("%^s¤Ï¶ìÄˤǤâ¤À¤¨¶ì¤·¤ó¤À¡£", m_name);
-               else
-                       msg_format("%^s¤Ï¼å¡¹¤·¤¯¶«¤ó¤À¡£", m_name);
+               if(percentage > 95) msg_format("%^sは攻撃に肩をすくめた。", m_name);
+               else if(percentage > 75) msg_format("%^sは痛みでうなった。", m_name);
+               else if(percentage > 50) msg_format("%^sは痛みで叫んだ。", m_name);
+               else if(percentage > 35) msg_format("%^sは痛みで絶叫した。", m_name);
+               else if(percentage > 20) msg_format("%^sは苦痛のあまり絶叫した。", m_name);
+               else if(percentage > 10) msg_format("%^sは苦痛でもだえ苦しんだ。", m_name);
+               else msg_format("%^sは弱々しく叫んだ。", m_name);
 #else
-               if (percentage > 95)
-                       msg_format("%^s ignores the attack.", m_name);
-               else if (percentage > 75)
-                       msg_format("%^s grunts with pain.", m_name);
-               else if (percentage > 50)
-                       msg_format("%^s squeals in pain.", m_name);
-               else if (percentage > 35)
-                       msg_format("%^s shrieks in pain.", m_name);
-               else if (percentage > 20)
-                       msg_format("%^s shrieks in agony.", m_name);
-               else if (percentage > 10)
-                       msg_format("%^s writhes in agony.", m_name);
-               else
-                       msg_format("%^s cries out feebly.", m_name);
+               if(percentage > 95) msg_format("%^s shrugs off the attack.", m_name);
+               else if(percentage > 75) msg_format("%^s grunts with pain.", m_name);
+               else if(percentage > 50) msg_format("%^s cries out in pain.", m_name);
+               else if(percentage > 35) msg_format("%^s screams in pain.", m_name);
+               else if(percentage > 20) msg_format("%^s screams in agony.", m_name);
+               else if(percentage > 10) msg_format("%^s writhes in agony.", m_name);
+               else msg_format("%^s cries out feebly.", m_name);
 #endif
-
-       }
-
-       /* Another type of monsters (shrug,cry,scream) */
-       else
-       {
-#ifdef JP
-               if (percentage > 95)
-                       msg_format("%^s¤Ï¹¶·â¤Ë¸ª¤ò¤¹¤¯¤á¤¿¡£", m_name);
-               else if (percentage > 75)
-                       msg_format("%^s¤ÏÄˤߤǤ¦¤Ê¤Ã¤¿¡£", m_name);
-               else if (percentage > 50)
-                       msg_format("%^s¤ÏÄˤߤǶ«¤ó¤À¡£", m_name);
-               else if (percentage > 35)
-                       msg_format("%^s¤ÏÄˤߤÇÀ䶫¤·¤¿¡£", m_name);
-               else if (percentage > 20)
-                       msg_format("%^s¤Ï¶ìÄˤΤ¢¤Þ¤êÀ䶫¤·¤¿¡£", m_name);
-               else if (percentage > 10)
-                       msg_format("%^s¤Ï¶ìÄˤǤâ¤À¤¨¶ì¤·¤ó¤À¡£", m_name);
-               else
-                       msg_format("%^s¤Ï¼å¡¹¤·¤¯¶«¤ó¤À¡£", m_name);
-#else
-               if (percentage > 95)
-                       msg_format("%^s shrugs off the attack.", m_name);
-               else if (percentage > 75)
-                       msg_format("%^s grunts with pain.", m_name);
-               else if (percentage > 50)
-                       msg_format("%^s cries out in pain.", m_name);
-               else if (percentage > 35)
-                       msg_format("%^s screams in pain.", m_name);
-               else if (percentage > 20)
-                       msg_format("%^s screams in agony.", m_name);
-               else if (percentage > 10)
-                       msg_format("%^s writhes in agony.", m_name);
-               else
-                       msg_format("%^s cries out feebly.", m_name);
-#endif
-
        }
 }
 
 
-/*
- * Learn about an "observed" resistance.
+
+/*!
+ * @brief SMART(適格に攻撃を行う)モンスターの学習状況を更新する / Learn about an "observed" resistance.
+ * @param m_idx 更新を行う「モンスター情報ID
+ * @param what 学習対象ID
+ * @return なし
  */
 void update_smart_learn(int m_idx, int what)
 {
-#ifdef DRS_SMART_OPTIONS
-
        monster_type *m_ptr = &m_list[m_idx];
 
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
@@ -4840,31 +4537,31 @@ void update_smart_learn(int m_idx, int what)
        {
        case DRS_ACID:
                if (p_ptr->resist_acid) m_ptr->smart |= (SM_RES_ACID);
-               if (p_ptr->oppose_acid) m_ptr->smart |= (SM_OPP_ACID);
+               if (IS_OPPOSE_ACID()) m_ptr->smart |= (SM_OPP_ACID);
                if (p_ptr->immune_acid) m_ptr->smart |= (SM_IMM_ACID);
                break;
 
        case DRS_ELEC:
                if (p_ptr->resist_elec) m_ptr->smart |= (SM_RES_ELEC);
-               if (p_ptr->oppose_elec) m_ptr->smart |= (SM_OPP_ELEC);
+               if (IS_OPPOSE_ELEC()) m_ptr->smart |= (SM_OPP_ELEC);
                if (p_ptr->immune_elec) m_ptr->smart |= (SM_IMM_ELEC);
                break;
 
        case DRS_FIRE:
                if (p_ptr->resist_fire) m_ptr->smart |= (SM_RES_FIRE);
-               if (p_ptr->oppose_fire) m_ptr->smart |= (SM_OPP_FIRE);
+               if (IS_OPPOSE_FIRE()) m_ptr->smart |= (SM_OPP_FIRE);
                if (p_ptr->immune_fire) m_ptr->smart |= (SM_IMM_FIRE);
                break;
 
        case DRS_COLD:
                if (p_ptr->resist_cold) m_ptr->smart |= (SM_RES_COLD);
-               if (p_ptr->oppose_cold) m_ptr->smart |= (SM_OPP_COLD);
+               if (IS_OPPOSE_COLD()) m_ptr->smart |= (SM_OPP_COLD);
                if (p_ptr->immune_cold) m_ptr->smart |= (SM_IMM_COLD);
                break;
 
        case DRS_POIS:
                if (p_ptr->resist_pois) m_ptr->smart |= (SM_RES_POIS);
-               if (p_ptr->oppose_pois) m_ptr->smart |= (SM_OPP_POIS);
+               if (IS_OPPOSE_POIS()) m_ptr->smart |= (SM_OPP_POIS);
                break;
 
 
@@ -4924,14 +4621,14 @@ void update_smart_learn(int m_idx, int what)
                if (p_ptr->reflect) m_ptr-> smart |= (SM_IMM_REFLECT);
                break;
        }
-
-#endif /* DRS_SMART_OPTIONS */
-
 }
 
 
-/*
- * Place the player in the dungeon XXX XXX
+/*!
+ * @brief プレイヤーを指定座標に配置する / Place the player in the dungeon XXX XXX
+ * @param x 配置先X座標
+ * @param y 配置先Y座標
+ * @return 配置に成功したらTRUE
  */
 bool player_place(int y, int x)
 {
@@ -4939,16 +4636,18 @@ bool player_place(int y, int x)
        if (cave[y][x].m_idx != 0) return FALSE;
 
        /* Save player location */
-       py = y;
-       px = x;
+       p_ptr->y = y;
+       p_ptr->x = x;
 
        /* Success */
        return TRUE;
 }
 
 
-/*
- * Drop all items carried by a monster
+/*!
+ * @brief モンスターが盗みや拾いで確保していたアイテムを全てドロップさせる / Drop all items carried by a monster
+ * @param m_ptr モンスター参照ポインタ
+ * @return なし
  */
 void monster_drop_carried_objects(monster_type *m_ptr)
 {
@@ -4967,15 +4666,15 @@ void monster_drop_carried_objects(monster_type *m_ptr)
                /* Acquire next object */
                next_o_idx = o_ptr->next_o_idx;
 
-               /* Paranoia */
-               o_ptr->held_m_idx = 0;
-
                /* Get local object */
                q_ptr = &forge;
 
                /* Copy the object */
                object_copy(q_ptr, o_ptr);
 
+               /* Forget monster */
+               q_ptr->held_m_idx = 0;
+
                /* Delete the object */
                delete_object_idx(this_o_idx);