OSDN Git Service

[Refactor] #37353 monster_living() の引数修正。 / Type replacement of monster_living()...
[hengband/hengband.git] / src / xtra2.c
index c18b233..b227e5f 100644 (file)
@@ -14,6 +14,7 @@
 #include "angband.h"
 #include "cmd-pet.h"
 #include "object-curse.h"
+#include "monster-hook.h"
 
 #define REWARD_CHANCE 10
 
@@ -49,8 +50,6 @@ void check_experience(void)
 
        /* Redraw experience */
        p_ptr->redraw |= (PR_EXP);
-
-       /* Handle stuff */
        handle_stuff();
 
 
@@ -60,16 +59,9 @@ void check_experience(void)
        {
                /* Lose a level */
                p_ptr->lev--;
-
-               /* Update some stuff */
                p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
-
-               /* Redraw some stuff */
                p_ptr->redraw |= (PR_LEV | PR_TITLE);
-
                p_ptr->window |= (PW_PLAYER);
-
-               /* Handle stuff */
                handle_stuff();
        }
 
@@ -104,18 +96,12 @@ void check_experience(void)
 
                msg_format(_("レベル %d にようこそ。", "Welcome to level %d."), p_ptr->lev);
 
-               /* Update some stuff */
                p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
-
-               /* Redraw some stuff */
                p_ptr->redraw |= (PR_LEV | PR_TITLE | PR_EXP);
-
                p_ptr->window |= (PW_PLAYER | PW_SPELL | PW_INVEN);
 
                /* HPとMPの上昇量を表示 */
                level_up = 1;
-
-               /* Handle stuff */
                handle_stuff();
 
                level_up = 0;
@@ -196,15 +182,9 @@ void check_experience(void)
                        level_reward = FALSE;
                }
 
-               /* Update some stuff */
                p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
-
-               /* Redraw some stuff */
                p_ptr->redraw |= (PR_LEV | PR_TITLE);
-
                p_ptr->window |= (PW_PLAYER | PW_SPELL);
-
-               /* Handle stuff */
                handle_stuff();
        }
 
@@ -646,10 +626,7 @@ void check_quest_completion(monster_type *m_ptr)
 
                for (i = 0; i < (dun_level / 15)+1; i++)
                {
-                       /* Get local object */
                        o_ptr = &forge;
-
-                       /* Wipe the object */
                        object_wipe(o_ptr);
 
                        /* Make a great object */
@@ -689,10 +666,11 @@ void check_find_art_quest_completion(object_type *o_ptr)
  * @param r_ptr 撃破されたモンスターの種族情報を持つ構造体の参照ポインタ
  * @return 撃破されたモンスターの述語
  */
-cptr extract_note_dies(monster_race *r_ptr)
+cptr extract_note_dies(MONRACE_IDX r_idx)
 {
+       monster_race *r_ptr = &r_info[r_idx];
        /* Some monsters get "destroyed" */
-       if (!monster_living(r_ptr))
+       if (!monster_living(r_idx))
        {
                int i;
 
@@ -730,15 +708,14 @@ cptr extract_note_dies(monster_race *r_ptr)
  */
 void monster_death(MONSTER_IDX m_idx, bool drop_item)
 {
-       int i, j, y, x;
+       int i, j;
+       POSITION y, x;
 
        int dump_item = 0;
        int dump_gold = 0;
-
        int number = 0;
 
        monster_type *m_ptr = &m_list[m_idx];
-
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
 
        bool visible = ((m_ptr->ml && !p_ptr->image) || (r_ptr->flags1 & RF1_UNIQUE));
@@ -819,12 +796,10 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
 
                if (arena_info[p_ptr->arena_number].tval)
                {
-                       /* Get local object */
                        q_ptr = &forge;
 
                        /* Prepare to make a prize */
                        object_prep(q_ptr, lookup_kind(arena_info[p_ptr->arena_number].tval, arena_info[p_ptr->arena_number].sval));
-
                        apply_magic(q_ptr, object_level, AM_NO_FIXED_ART);
 
                        /* Drop it in the dungeon */
@@ -882,8 +857,6 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
                                if (!one_in_(5)) corpse = TRUE;
                        }
                }
-
-               /* Get local object */
                q_ptr = &forge;
 
                /* Prepare to make an object */
@@ -935,7 +908,6 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
                /* Bloodletters of Khorne may drop a blade of chaos */
                if (drop_chosen_item && (randint1(100) < 15))
                {
-                       /* Get local object */
                        q_ptr = &forge;
 
                        /* Prepare to make a Blade of Chaos */
@@ -951,10 +923,7 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
        case MON_RAAL:
                if (drop_chosen_item && (dun_level > 9))
                {
-                       /* Get local object */
                        q_ptr = &forge;
-
-                       /* Wipe the object */
                        object_wipe(q_ptr);
 
                        /* Activate restriction */
@@ -1057,8 +1026,6 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
 
        case MON_SERPENT:
                if (!drop_chosen_item) break;
-
-               /* Get local object */
                q_ptr = &forge;
 
                /* Mega-Hack -- Prepare to make "Grond" */
@@ -1072,8 +1039,6 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
 
                /* Drop it in the dungeon */
                (void)drop_near(q_ptr, -1, y, x);
-
-               /* Get local object */
                q_ptr = &forge;
 
                /* Mega-Hack -- Prepare to make "Chaos" */
@@ -1092,7 +1057,6 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
        case MON_B_DEATH_SWORD:
                if (drop_chosen_item)
                {
-                       /* Get local object */
                        q_ptr = &forge;
 
                        /* Prepare to make a broken sword */
@@ -1108,7 +1072,6 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
                if (drop_chosen_item && ((m_ptr->r_idx == MON_A_GOLD) ||
                     ((m_ptr->r_idx == MON_A_SILVER) && (r_ptr->r_akills % 5 == 0))))
                {
-                       /* Get local object */
                        q_ptr = &forge;
 
                        /* Prepare to make a Can of Toys */
@@ -1136,10 +1099,7 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
                case '(':
                        if (dun_level > 0)
                        {
-                               /* Get local object */
                                q_ptr = &forge;
-
-                               /* Wipe the object */
                                object_wipe(q_ptr);
 
                                /* Activate restriction */
@@ -1156,10 +1116,7 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
                case '/':
                        if (dun_level > 4)
                        {
-                               /* Get local object */
                                q_ptr = &forge;
-
-                               /* Wipe the object */
                                object_wipe(q_ptr);
 
                                /* Activate restriction */
@@ -1176,10 +1133,7 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
                case '[':
                        if (dun_level > 19)
                        {
-                               /* Get local object */
                                q_ptr = &forge;
-
-                               /* Wipe the object */
                                object_wipe(q_ptr);
 
                                /* Activate restriction */
@@ -1196,10 +1150,7 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
                case '\\':
                        if (dun_level > 4)
                        {
-                               /* Get local object */
                                q_ptr = &forge;
-
-                               /* Wipe the object */
                                object_wipe(q_ptr);
 
                                /* Activate restriction */
@@ -1216,10 +1167,7 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
                case '|':
                        if (m_ptr->r_idx != MON_STORMBRINGER)
                        {
-                               /* Get local object */
                                q_ptr = &forge;
-
-                               /* Wipe the object */
                                object_wipe(q_ptr);
 
                                /* Activate restriction */
@@ -1296,7 +1244,6 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
 
                        if (k_idx)
                        {
-                               /* Get local object */
                                q_ptr = &forge;
 
                                /* Prepare to make a reward */
@@ -1338,10 +1285,7 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
        /* Drop some objects */
        for (j = 0; j < number; j++)
        {
-               /* Get local object */
                q_ptr = &forge;
-
-               /* Wipe the object */
                object_wipe(q_ptr);
 
                /* Make Gold */
@@ -1568,15 +1512,14 @@ static void get_exp_from_mon(HIT_POINT dam, monster_type *m_ptr)
  */
 bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note)
 {
-       monster_type    *m_ptr = &m_list[m_idx];
-       monster_race    *r_ptr = &r_info[m_ptr->r_idx];
-
-       monster_type    exp_mon;
+       monster_type *m_ptr = &m_list[m_idx];
+       monster_race *r_ptr = &r_info[m_ptr->r_idx];
+       monster_type exp_mon;
 
        /* Innocent until proven otherwise */
-       bool        innocent = TRUE, thief = FALSE;
-       int         i;
-       int         expdam;
+       bool innocent = TRUE, thief = FALSE;
+       int i;
+       HIT_POINT expdam;
 
        (void)COPY(&exp_mon, m_ptr, monster_type);
        
@@ -1591,7 +1534,6 @@ bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note)
        if (p_ptr->health_who == m_idx) p_ptr->redraw |= (PR_HEALTH);
        if (p_ptr->riding == m_idx) p_ptr->redraw |= (PR_UHEALTH);
 
-       /* Wake it up */
        (void)set_monster_csleep(m_idx, 0);
 
        /* Hack - Cancel any special player stealth magics. -LM- */
@@ -1603,15 +1545,14 @@ bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note)
        /* Genocided by chaos patron */
        if (!m_idx) return TRUE;
        
-       /* Hurt it */
        m_ptr->hp -= dam;
-       
        m_ptr->dealt_damage += dam;
+
        if(m_ptr->dealt_damage > m_ptr->max_maxhp * 100) m_ptr->dealt_damage = m_ptr->max_maxhp * 100;
+
        if (p_ptr->wizard)
        {
-               msg_format( _("合計%d/%dのダメージを与えた。","You do %d (out of %d) damage."),
-                                       m_ptr->dealt_damage, m_ptr->maxhp);
+               msg_format( _("合計%d/%dのダメージを与えた。","You do %d (out of %d) damage."), m_ptr->dealt_damage, m_ptr->maxhp);
        }
 
        /* It is dead now */
@@ -1710,13 +1651,13 @@ bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note)
 
                        /* Dump a message */
                        if (!get_rnd_line(_("mondeath_j.txt", "mondeath.txt"), m_ptr->r_idx, line_got))
-
+                       {
                                msg_format("%^s %s", m_name, line_got);
+                       }
 
 #ifdef WORLD_SCORE
                        if (m_ptr->r_idx == MON_SERPENT)
                        {
-                               /* Make screen dump */
                                screen_dump = make_screen_dump();
                        }
 #endif
@@ -1759,8 +1700,7 @@ bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note)
                        chg_virtue(V_COMPASSION, -1);
                }
 
-               if ((r_ptr->flags3 & RF3_GOOD) &&
-                       ((r_ptr->level) / 10 + (3 * dun_level) >= randint1(100)))
+               if ((r_ptr->flags3 & RF3_GOOD) && ((r_ptr->level) / 10 + (3 * dun_level) >= randint1(100)))
                        chg_virtue(V_UNLIFE, 1);
 
                if (r_ptr->d_char == 'A')
@@ -1817,8 +1757,7 @@ bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note)
                {
                        if (r_ptr->flags1 & RF1_UNIQUE)
                                chg_virtue(V_JUSTICE, 3);
-                       else if (1+((r_ptr->level) / 10 + (2 * dun_level))
-                               >= randint1(100))
+                       else if (1+((r_ptr->level) / 10 + (2 * dun_level)) >= randint1(100))
                                chg_virtue(V_JUSTICE, 1);
                }
                else if (innocent)
@@ -1834,11 +1773,7 @@ bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note)
                if ((r_ptr->flags1 & RF1_UNIQUE) && record_destroy_uniq)
                {
                        char note_buf[160];
-#ifdef JP
-                       sprintf(note_buf, "%s%s", r_name + r_ptr->name, (m_ptr->smart & SM_CLONED) ? "(クローン)" : "");
-#else
-                       sprintf(note_buf, "%s%s", r_name + r_ptr->name, (m_ptr->smart & SM_CLONED) ? "(Clone)" : "");
-#endif
+                       sprintf(note_buf, "%s%s", r_name + r_ptr->name, (m_ptr->smart & SM_CLONED) ? _("(クローン)", "(Clone)") : "");
                        do_cmd_write_nikki(NIKKI_UNIQUE, 0, note_buf);
                }
 
@@ -1866,7 +1801,7 @@ bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note)
                }
 
                /* Death by Physical attack -- non-living monster */
-               else if (!monster_living(r_ptr))
+               else if (!monster_living(m_ptr->r_idx))
                {
                        bool explode = FALSE;
 
@@ -1884,7 +1819,7 @@ bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note)
                                if ((p_ptr->pseikaku == SEIKAKU_COMBAT) || (inventory[INVEN_BOW].name1 == ART_CRIMSON))
                                        msg_format("せっかくだから%sを倒した。", m_name);
                                else
-msg_format("%sを倒した。", m_name);
+                               msg_format("%sを倒した。", m_name);
 #else
                                msg_format("You have destroyed %s.", m_name);
 #endif
@@ -1898,7 +1833,7 @@ msg_format("%sを倒した。", m_name);
                        if ((p_ptr->pseikaku == SEIKAKU_COMBAT) || (inventory[INVEN_BOW].name1 == ART_CRIMSON))
                                msg_format("せっかくだから%sを葬り去った。", m_name);
                        else
-msg_format("%sを葬り去った。", m_name);
+                               msg_format("%sを葬り去った。", m_name);
 #else
                                msg_format("You have slain %s.", m_name);
 #endif
@@ -1920,18 +1855,13 @@ msg_format("%sを葬り去った。", m_name);
                monster_death(m_idx, TRUE);
 
                /* Mega hack : replace IKETA to BIKETAL */
-               if ((m_ptr->r_idx == MON_IKETA) &&
-                   !(p_ptr->inside_arena || p_ptr->inside_battle))
+               if ((m_ptr->r_idx == MON_IKETA) && !(p_ptr->inside_arena || p_ptr->inside_battle))
                {
-                       int dummy_y = m_ptr->fy;
-                       int dummy_x = m_ptr->fx;
+                       POSITION dummy_y = m_ptr->fy;
+                       POSITION dummy_x = m_ptr->fx;
                        BIT_FLAGS mode = 0L;
-
                        if (is_pet(m_ptr)) mode |= PM_FORCE_PET;
-
-
                        delete_monster_idx(m_idx);
-
                        if (summon_named_creature(0, dummy_y, dummy_x, MON_BIKETAL, mode))
                        {
                                msg_print(_("「ハァッハッハッハ!!私がバイケタルだ!!」", "Uwa-hahaha!  *I* am Biketal!"));
@@ -1939,7 +1869,6 @@ msg_format("%sを葬り去った。", m_name);
                }
                else
                {
-
                        delete_monster_idx(m_idx);
                }
 
@@ -1976,8 +1905,7 @@ msg_format("%sを葬り去った。", m_name);
                 * Run (sometimes) if at 10% or less of max hit points,
                 * or (usually) when hit for half its current hit points
                 */
-               if ((randint1(10) >= percentage) ||
-                   ((dam >= m_ptr->hp) && (randint0(100) < 80)))
+               if ((randint1(10) >= percentage) || ((dam >= m_ptr->hp) && (randint0(100) < 80)))
                {
                        /* Hack -- note fear */
                        (*fear) = TRUE;
@@ -1991,22 +1919,6 @@ msg_format("%sを葬り去った。", m_name);
 
 #endif
 
-#if 0
-       if (p_ptr->riding && (p_ptr->riding == m_idx) && (dam > 0))
-       {
-               char m_name[80];
-
-               /* Extract monster name */
-               monster_desc(m_name, m_ptr, 0);
-
-               if (m_ptr->hp > m_ptr->maxhp/3) dam = (dam + 1) / 2;
-               if (rakuba((dam > 200) ? 200 : dam, FALSE))
-               {
-               msg_format(_("%^sに振り落とされた!", "%^s has thrown you off!"), m_name);
-               }
-       }
-#endif
-
        /* Not dead yet */
        return (FALSE);
 }
@@ -2082,8 +1994,6 @@ void resize_map(void)
 
        /* Hack -- update */
        handle_stuff();
-       
-       /* Redraw */
        Term_redraw();
 
        /*
@@ -2107,13 +2017,10 @@ void redraw_window(void)
        if (!character_dungeon) return;
 
        p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER);
-
        p_ptr->window |= (PW_MESSAGE | PW_OVERHEAD | PW_DUNGEON | PW_MONSTER | PW_OBJECT);
 
        /* Hack -- update */
        handle_stuff();
-
-       /* Redraw */
        Term_redraw();
 }
 
@@ -2158,10 +2065,7 @@ bool change_panel(POSITION dy, POSITION dx)
 
                p_ptr->update |= (PU_MONSTERS);
 
-               /* Redraw map */
                p_ptr->redraw |= (PR_MAP);
-
-               /* Handle stuff */
                handle_stuff();
 
                /* Success */
@@ -2302,10 +2206,7 @@ void verify_panel(void)
        panel_bounds_center();
 
        p_ptr->update |= (PU_MONSTERS);
-
-       /* Redraw map */
        p_ptr->redraw |= (PR_MAP);
-
        p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
 }
 
@@ -2316,14 +2217,14 @@ void verify_panel(void)
 cptr look_mon_desc(monster_type *m_ptr, BIT_FLAGS mode)
 {
        monster_race *ap_r_ptr = &r_info[m_ptr->ap_r_idx];
-       bool         living;
-       int          perc;
+       bool living;
+       int perc;
        cptr desc;
        cptr attitude;
        cptr clone;
 
        /* Determine if the monster is "living" */
-       living = monster_living(ap_r_ptr);
+       living = monster_living(m_ptr->ap_r_idx);
 
        /* Calculate a health "percentage" */
        perc = 100L * m_ptr->hp / m_ptr->maxhp;
@@ -2331,55 +2232,29 @@ cptr look_mon_desc(monster_type *m_ptr, BIT_FLAGS mode)
        /* Healthy monsters */
        if (m_ptr->hp >= m_ptr->maxhp)
        {
-               /* No damage */
-#ifdef JP
-               desc = living ? "無傷" : "無ダメージ";
-#else
-               desc = living ? "unhurt" : "undamaged";
-#endif
-
+               desc = living ? _("無傷", "unhurt") : _("無ダメージ", "undamaged");
        }
 
        else if (perc >= 60)
        {
-#ifdef JP
-               desc = living ? "軽傷" : "小ダメージ";
-#else
-               desc = living ? "somewhat wounded" : "somewhat damaged";
-#endif
-
+               desc = living ? _("軽傷", "somewhat wounded") : _("小ダメージ", "somewhat damaged");
        }
 
        else if (perc >= 25)
        {
-#ifdef JP
-               desc = living ? "負傷" : "中ダメージ";
-#else
-               desc = living ? "wounded" : "damaged";
-#endif
-
+               desc = living ? _("負傷", "wounded") : _("中ダメージ", "damaged");
        }
 
        else if (perc >= 10)
        {
-#ifdef JP
-               desc = living ? "重傷" : "大ダメージ";
-#else
-               desc = living ? "badly wounded" : "badly damaged";
-#endif
-
+               desc = living ? _("重傷", "badly wounded") : _("大ダメージ", "badly damaged");
        }
 
        else 
        {
-#ifdef JP
-               desc = living ? "半死半生" : "倒れかけ";
-#else
-               desc = living ? "almost dead" : "almost destroyed";
-#endif
+               desc = living ? _("半死半生", "almost dead") : _("倒れかけ", "almost destroyed");
        }
 
-
        /* Need attitude information? */
        if (!(mode & 0x01))
        {
@@ -2399,7 +2274,6 @@ cptr look_mon_desc(monster_type *m_ptr, BIT_FLAGS mode)
                attitude = _("", "");
        }
 
-
        /* Clone monster? */
        if (m_ptr->smart & SM_CLONED)
        {
@@ -2419,6 +2293,7 @@ cptr look_mon_desc(monster_type *m_ptr, BIT_FLAGS mode)
        {
                return format(_("レベル???, %s%s%s", "Level ???, %s%s%s"), desc, attitude, clone);
        }
+
 }
 
 
@@ -2773,8 +2648,6 @@ static bool target_set_accept(POSITION y, POSITION x)
        for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
        {
                object_type *o_ptr;
-
-               /* Acquire object */
                o_ptr = &o_list[this_o_idx];
 
                /* Acquire next object */
@@ -3052,8 +2925,6 @@ static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, cptr info)
 
                /* Hack -- health bar for this monster */
                health_track(c_ptr->m_idx);
-
-               /* Hack -- handle stuff */
                handle_stuff();
 
                /* Interact */
@@ -3143,8 +3014,6 @@ static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, cptr info)
                        char o_name[MAX_NLEN];
 
                        object_type *o_ptr;
-
-                       /* Acquire object */
                        o_ptr = &o_list[this_o_idx];
 
                        /* Acquire next object */
@@ -3153,7 +3022,6 @@ static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, cptr info)
                        /* Obtain an object description */
                        object_desc(o_name, o_ptr, 0);
 
-                       /* Describe the object */
 #ifdef JP
                        sprintf(out_val, "%s%s%s%s[%s]", s1, o_name, s2, s3, info);
 #else
@@ -3194,19 +3062,14 @@ static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, cptr info)
                                char o_name[MAX_NLEN];
 
                                object_type *o_ptr;
-
-                               /* Acquire object */
                                o_ptr = &o_list[floor_list[0]];
 
-                               /* Describe the object */
                                object_desc(o_name, o_ptr, 0);
 
 #ifdef JP
-                               sprintf(out_val, "%s%s%s%s[%s]",
-                                       s1, o_name, s2, s3, info);
+                               sprintf(out_val, "%s%s%s%s[%s]", s1, o_name, s2, s3, info);
 #else
-                               sprintf(out_val, "%s%s%s%s [%s]",
-                                       s1, s2, s3, o_name, info);
+                               sprintf(out_val, "%s%s%s%s [%s]", s1, s2, s3, o_name, info);
 #endif
 
                                prt(out_val, 0, 0);
@@ -3224,11 +3087,9 @@ static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, cptr info)
                        {
                                /* Display rough information about items */
 #ifdef JP
-                               sprintf(out_val, "%s %d個のアイテム%s%s ['x'で一覧, %s]",
-                                       s1, (int)floor_num, s2, s3, info);
+                               sprintf(out_val, "%s %d個のアイテム%s%s ['x'で一覧, %s]", s1, (int)floor_num, s2, s3, info);
 #else
-                               sprintf(out_val, "%s%s%sa pile of %d items [x,%s]",
-                                       s1, s2, s3, (int)floor_num, info);
+                               sprintf(out_val, "%s%s%sa pile of %d items [x,%s]", s1, s2, s3, (int)floor_num, info);
 #endif
 
                                prt(out_val, 0, 0);
@@ -3249,8 +3110,6 @@ static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, cptr info)
                        {
                                int i;
                                OBJECT_IDX o_idx;
-
-                               /* Save screen */
                                screen_save();
 
                                /* Display */
@@ -3260,19 +3119,13 @@ static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, cptr info)
 
                                /* Prompt */
 #ifdef JP
-                               sprintf(out_val, "%s %d個のアイテム%s%s [Enterで次へ, %s]",
-                                       s1, (int)floor_num, s2, s3, info);
+                               sprintf(out_val, "%s %d個のアイテム%s%s [Enterで次へ, %s]", s1, (int)floor_num, s2, s3, info);
 #else
-                               sprintf(out_val, "%s%s%sa pile of %d items [Enter,%s]",
-                                       s1, s2, s3, (int)floor_num, info);
+                               sprintf(out_val, "%s%s%sa pile of %d items [Enter,%s]", s1, s2, s3, (int)floor_num, info);
 #endif
                                prt(out_val, 0, 0);
 
-
-                               /* Wait */
                                query = inkey();
-
-                               /* Load screen */
                                screen_load();
 
                                /* Exit unless 'Enter' */
@@ -3309,8 +3162,6 @@ static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, cptr info)
        for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
        {
                object_type *o_ptr;
-
-               /* Acquire object */
                o_ptr = &o_list[this_o_idx];
 
                /* Acquire next object */
@@ -3327,7 +3178,6 @@ static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, cptr info)
                        /* Obtain an object description */
                        object_desc(o_name, o_ptr, 0);
 
-                       /* Describe the object */
 #ifdef JP
                        sprintf(out_val, "%s%s%s%s[%s]", s1, o_name, s2, s3, info);
 #else
@@ -3508,7 +3358,7 @@ static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, cptr info)
  * some form of "scrolling" the map around the cursor.  
  * That is, consider the possibility of "auto-scrolling" the screen
  * while the cursor moves around.  This may require changes in the
- * "update_mon()" code to allow "visibility" even if off panel, and
+ * "update_monster()" code to allow "visibility" even if off panel, and
  * may require dynamic recalculation of the "temp" grid set.
  *
  * Hack -- targeting/observing an "outer border grid" may induce
@@ -3693,12 +3543,9 @@ bool target_set(BIT_FLAGS mode)
 
                                        p_ptr->update |= (PU_MONSTERS);
 
-                                       /* Redraw map */
                                        p_ptr->redraw |= (PR_MAP);
 
                                        p_ptr->window |= (PW_OVERHEAD);
-
-                                       /* Handle stuff */
                                        handle_stuff();
 
                                        /* Recalculate interesting grids */
@@ -3784,12 +3631,9 @@ bool target_set(BIT_FLAGS mode)
 
                                                p_ptr->update |= (PU_MONSTERS);
 
-                                               /* Redraw map */
                                                p_ptr->redraw |= (PR_MAP);
 
                                                p_ptr->window |= (PW_OVERHEAD);
-
-                                               /* Handle stuff */
                                                handle_stuff();
 
                                                /* Recalculate interesting grids */
@@ -3903,12 +3747,9 @@ bool target_set(BIT_FLAGS mode)
 
                                        p_ptr->update |= (PU_MONSTERS);
 
-                                       /* Redraw map */
                                        p_ptr->redraw |= (PR_MAP);
 
                                        p_ptr->window |= (PW_OVERHEAD);
-
-                                       /* Handle stuff */
                                        handle_stuff();
 
                                        /* Recalculate interesting grids */
@@ -4028,12 +3869,9 @@ bool target_set(BIT_FLAGS mode)
 
        p_ptr->update |= (PU_MONSTERS);
 
-       /* Redraw map */
        p_ptr->redraw |= (PR_MAP);
 
        p_ptr->window |= (PW_OVERHEAD);
-
-       /* Handle stuff */
        handle_stuff();
 
        /* Failure to set target */
@@ -4575,8 +4413,6 @@ void gain_level_reward(int chosen_reward)
 
                        msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
                        msg_print(_("「汝の行いは貴き剣に値せり。」", "'Thy deed hath earned thee a worthy blade.'"));
-
-                       /* Get local object */
                        q_ptr = &forge;
                        dummy = TV_SWORD;
                        switch (randint1(p_ptr->lev))
@@ -5183,12 +5019,9 @@ bool tgt_pt(POSITION *x_ptr, POSITION *y_ptr)
 
                                        p_ptr->update |= (PU_MONSTERS);
 
-                                       /* Redraw map */
                                        p_ptr->redraw |= (PR_MAP);
 
                                        p_ptr->window |= (PW_OVERHEAD);
-
-                                       /* Handle stuff */
                                        handle_stuff();
                                }
                                else    /* move cursor to next stair and change panel */
@@ -5272,12 +5105,9 @@ bool tgt_pt(POSITION *x_ptr, POSITION *y_ptr)
 
        p_ptr->update |= (PU_MONSTERS);
 
-       /* Redraw map */
        p_ptr->redraw |= (PR_MAP);
 
        p_ptr->window |= (PW_OVERHEAD);
-
-       /* Handle stuff */
        handle_stuff();
 
        *x_ptr = x;