OSDN Git Service

#37284 (2.2.0.15) NASTY生成のdelay値計算ミス修正。 / Fix delay calculation for NASTY generation.
[hengband/hengband.git] / src / monster2.c
index 21abd89..dc62024 100644 (file)
@@ -1,20 +1,25 @@
-/* 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なモンスターの生成を禁止する? */
+
 
+/*!
+ * @var horror_desc
+ * @brief ELDRITCH HORROR効果時のモンスターの形容メッセージ(通常時)
+ */
 cptr horror_desc[MAX_SAN_HORROR] =
 {
 #ifdef JP
@@ -69,6 +74,10 @@ cptr horror_desc[MAX_SAN_HORROR] =
 
 };
 
+/*!
+ * @var funny_desc
+ * @brief ELDRITCH HORROR効果時のモンスターの形容メッセージ(幻覚状態時)
+ */
 cptr funny_desc[MAX_SAN_FUNNY] =
 {
 #ifdef JP
@@ -129,6 +138,10 @@ cptr funny_desc[MAX_SAN_FUNNY] =
 
 };
 
+/*!
+ * @var funny_comments
+ * @brief ELDRITCH HORROR効果時の幻覚時間延長を示す錯乱表現
+ */
 cptr funny_comments[MAX_SAN_COMMENT] =
 {
 #ifdef JP
@@ -149,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)
 {
@@ -159,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)
 {
@@ -168,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)
 {
@@ -190,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)
@@ -279,8 +303,11 @@ void delete_monster_idx(int i)
 }
 
 
-/*
- * 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)
 {
@@ -297,8 +324,11 @@ 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)
 {
@@ -382,9 +412,11 @@ static void compact_monsters_aux(int i1, int 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
@@ -400,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 */
@@ -481,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.
  */
@@ -557,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)
@@ -604,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);
@@ -618,21 +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;
 
-
+/*!
+ * @var summon_unique_okay
+ * @brief 召喚対象にユニークを含めるかを示すグローバル変数 / summoning unique enable
+ * @todo summon_unique_okay グローバル変数の除去と関数引数への代替を行う
+ */
 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];
@@ -724,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 == '?') ||
@@ -935,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)
 {
@@ -1129,8 +1165,11 @@ static bool restrict_monster_to_dungeon(int r_idx)
        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)
@@ -1190,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;
@@ -1228,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",
@@ -1259,12 +1306,12 @@ s16b get_mon_num(int level)
        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;
 
-       pls_kakuritu = MAX(NASTY_MON_MAX, NASTY_MON_BASE - ((dungeon_turn / (TURNS_PER_TICK * 2500L) - hoge / 10)));
-       pls_level    = MIN(NASTY_MON_PLUS_MAX, 3 + dungeon_turn / (TURNS_PER_TICK * 20000L) - hoge / 40 + MIN(5, level / 10)) ;
+       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)
        {
@@ -1412,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.
@@ -1486,12 +1534,7 @@ void monster_desc(char *desc, monster_type *m_ptr, int mode)
        {
                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;
                }
 
@@ -1534,12 +1577,7 @@ void monster_desc(char *desc, monster_type *m_ptr, int mode)
 
 
                /* Assume simple result */
-#ifdef JP
-               res = "何か";
-#else
-               res = "it";
-#endif
-
+               res = _("何か", "it");
 
                /* Brute force: split on the possibilities */
                switch (kind + (mode & (MD_INDEF_HIDDEN | MD_POSSESSIVE | MD_OBJECTIVE)))
@@ -1683,11 +1721,7 @@ void monster_desc(char *desc, monster_type *m_ptr, int mode)
                                 !(p_ptr->riding && (&m_list[p_ptr->riding] == m_ptr)))
                        {
                                /* It is a fake unique monster */
-#ifdef JP
-                               (void)sprintf(desc, "%sもどき", name);
-#else
-                               (void)sprintf(desc, "fake %s", name);
-#endif
+                               (void)sprintf(desc, _("%sもどき", "fake %s"), name);
                        }
 
                        else
@@ -1716,58 +1750,33 @@ void monster_desc(char *desc, monster_type *m_ptr, int mode)
                {
                        /* 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 (p_ptr->riding && (&m_list[p_ptr->riding] == m_ptr))
                {
-#ifdef JP
-                       strcat(desc,"(乗馬中)");
-#else
-                       strcat(desc,"(riding)");
-#endif
+                       strcat(desc,_("(乗馬中)", "(riding)"));
                }
 
                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)"));
                        }
                }
 
@@ -1782,21 +1791,18 @@ void monster_desc(char *desc, monster_type *m_ptr, int mode)
                        /* 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)
@@ -1900,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).
@@ -1939,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;
@@ -1947,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->ap_r_idx];
+               char m_name[80];
+               monster_race *r_ptr = &r_info[m_ptr->ap_r_idx];
 
                power = r_ptr->level / 2;
 
@@ -1972,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 */
 
@@ -1995,7 +2008,6 @@ void sanity_blast(monster_type *m_ptr, bool necro)
                                funny_desc[randint0(MAX_SAN_FUNNY)], m_name);
 #endif
 
-
                        if (one_in_(3))
                        {
                                msg_print(funny_comments[randint0(MAX_SAN_COMMENT)]);
@@ -2028,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 */
@@ -2083,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;
        }
@@ -2115,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;
@@ -2156,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);
                                        }
 
@@ -2191,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;
                                }
@@ -2204,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;
                                }
@@ -2221,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
@@ -2317,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));
@@ -2597,7 +2658,7 @@ void update_mon(int m_idx, bool full)
                        }
 
                        /* 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, 1);
@@ -2669,8 +2730,10 @@ void update_mon(int m_idx, bool full)
 }
 
 
-/*
- * 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)
 {
@@ -2690,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)
 {
@@ -2724,6 +2789,11 @@ static bool monster_hook_chameleon_lord(int r_idx)
        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];
@@ -2756,7 +2826,13 @@ static bool monster_hook_chameleon(int r_idx)
        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;
@@ -2830,17 +2906,9 @@ 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 */
@@ -2873,8 +2941,10 @@ void choose_new_monster(int m_idx, bool born, int r_idx)
 }
 
 
-/*
- *  Hook for Tanuki
+/*!
+ * @brief たぬきの変身対象となるモンスターかどうか判定する / Hook for Tanuki
+ * @param r_idx モンスター種族ID
+ * @return 対象にできるならtrueを返す
  */
 static bool monster_hook_tanuki(int r_idx)
 {
@@ -2892,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)
 {
@@ -2917,8 +2989,10 @@ static int initial_r_appearance(int r_idx)
 }
 
 
-/*
- * Get initial monster speed
+/*!
+ * @brief モンスターの個体加速を設定する / Get initial monster speed
+ * @param r_ptr モンスター種族の参照ポインタ
+ * @return 加速値
  */
 byte get_mspeed(monster_race *r_ptr)
 {
@@ -2939,9 +3013,15 @@ byte get_mspeed(monster_race *r_ptr)
 }
 
 
-/*
- * 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 生成モンスター種族
+ * @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,
@@ -3053,12 +3133,7 @@ static 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 */
@@ -3081,22 +3156,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
+                       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
+                       if (cheat_hear) msg_format(_("深層のモンスター (%s)。", "Deep Monster (%s)."), name);
                }
        }
 
@@ -3104,12 +3171,7 @@ 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_NAZGUL) || (r_ptr->level < 10)) mode &= ~PM_KAGE;
@@ -3327,59 +3389,27 @@ 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();
                        if (o_ptr)
                        {
                                object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
-#ifdef JP
-                               msg_format("%sは%s光った。", o_name, color);
-#else
-                               msg_format("%s glows %s.", o_name, color);
-#endif
+                               msg_format(_("%sは%s光った。", "%s glows %s."), o_name, color);
                        }
                        else
                        {
-#ifdef JP
-                               msg_format("%s光る物が頭に浮かんだ。", color);
-#else
-                               msg_format("An %s image forms in your mind.");
-#endif
+                               msg_format(_("%s光る物が頭に浮かんだ。", "An %s image forms in your mind."), color);
                        }
                }
        }
@@ -3392,22 +3422,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 */
@@ -3426,12 +3447,20 @@ msg_print("爆発のルーンは解除された。");
 }
 
 
-/*
- *  improved version of scatter() for place monster
- */
 
-#define MON_SCAT_MAXD 10
+#define MON_SCAT_MAXD 10 /*!< mon_scatter()関数によるモンスター配置で許される中心からの最大距離 */
 
+/*!
+ * @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];
@@ -3501,15 +3530,16 @@ static bool mon_scatter(int r_idx, 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)
 {
@@ -3592,15 +3622,24 @@ static bool place_monster_group(int who, int y, int x, int r_idx, u32b mode)
        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)
 {
@@ -3640,9 +3679,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.
@@ -3737,11 +3782,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)
 {
@@ -3766,6 +3812,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;
@@ -3826,8 +3878,10 @@ bool alloc_horde(int y, int x)
 #endif /* MONSTER_HORDES */
 
 
-/*
- * Put the Guardian
+/*!
+ * @brief ダンジョンの主生成を試みる / Put the Guardian
+ * @param def_val 現在の主の生成状態
+ * @return 生成に成功したらtrue
  */
 bool alloc_guardian(bool def_val)
 {
@@ -3864,13 +3918,14 @@ bool alloc_guardian(bool def_val)
 }
 
 
-/*
- * Attempt to allocate a random monster in the dungeon.
- *
+/*!
+ * @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)
@@ -3899,19 +3954,14 @@ bool alloc_monster(int dis, u32b mode)
                }
 
                /* 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);
@@ -3923,12 +3973,7 @@ msg_print("警告!新たなモンスターを配置できません。小さい
        {
                if (alloc_horde(y, x))
                {
-#ifdef JP
-                       if (cheat_hear) msg_format("モンスターの大群(%c)", summon_kin_type);
-#else
-                       if (cheat_hear) msg_format("Monster horde (%c).", summon_kin_type);
-#endif
-
+                       if (cheat_hear) msg_format(_("モンスターの大群(%c)", "Monster horde (%c)."), summon_kin_type);
                        return (TRUE);
                }
        }
@@ -3948,10 +3993,10 @@ 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)
 {
@@ -3996,9 +4041,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.
  *
@@ -4063,7 +4115,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;
@@ -4083,9 +4144,13 @@ bool summon_named_creature (int who, int oy, int ox, int r_idx, u32b mode)
 }
 
 
-/*
- * 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)
@@ -4115,11 +4180,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)
@@ -4137,11 +4203,7 @@ void message_pain(int m_idx, int dam)
 
        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;
        }
 
@@ -4448,9 +4510,11 @@ void message_pain(int m_idx, int dam)
 
 
 
-
-/*
- * 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)
 {
@@ -4563,8 +4627,11 @@ void update_smart_learn(int m_idx, int what)
 }
 
 
-/*
- * 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)
 {
@@ -4572,16 +4639,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)
 {