OSDN Git Service

Merge branch 'quest-sort-by-level'
[hengband/hengband.git] / src / cmd2.c
index 982aa64..0bb1503 100644 (file)
@@ -3464,10 +3464,9 @@ void do_cmd_fire_aux(int item, object_type *j_ptr)
                /* Monster here, Try to hit it */
                if (cave[y][x].m_idx)
                {
-                       int armour;
-                       cave_type *c_ptr = &cave[y][x];
+                       cave_type *c_mon_ptr = &cave[y][x];
 
-                       monster_type *m_ptr = &m_list[c_ptr->m_idx];
+                       monster_type *m_ptr = &m_list[c_mon_ptr->m_idx];
                        monster_race *r_ptr = &r_info[m_ptr->r_idx];
 
                        /* Check the visibility */
@@ -3541,7 +3540,7 @@ void do_cmd_fire_aux(int item, object_type *j_ptr)
                                                if (!p_ptr->image) monster_race_track(m_ptr->ap_r_idx);
 
                                                /* Hack -- Track this monster */
-                                               health_track(c_ptr->m_idx);
+                                               health_track(c_mon_ptr->m_idx);
                                        }
                                }
 
@@ -3573,11 +3572,9 @@ void do_cmd_fire_aux(int item, object_type *j_ptr)
                                        tdam = mon_damage_mod(m_ptr, tdam, FALSE);
                                }
 
-                               /* Complex message */
-                               if (p_ptr->wizard || cheat_xtra)
-                               {
-                                       msg_format(_("%d/%d のダメージを与えた。", "You do %d (out of %d) damage."), tdam, m_ptr->hp);
-                               }
+                               msg_format_wizard(CHEAT_MONSTER,
+                                       _("%dのダメージを与えた。(残りHP %d/%d(%d))", "You do %d damage. (left HP %d/%d(%d))"),
+                                       tdam, m_ptr->hp - tdam, m_ptr->maxhp, m_ptr->max_maxhp);
 
                                /* Sniper */
                                if (snipe_type == SP_EXPLODE)
@@ -3602,7 +3599,7 @@ void do_cmd_fire_aux(int item, object_type *j_ptr)
                                }
 
                                /* Hit the monster, check for death */
-                               if (mon_take_hit(c_ptr->m_idx, tdam, &fear, extract_note_dies(real_r_ptr(m_ptr))))
+                               if (mon_take_hit(c_mon_ptr->m_idx, tdam, &fear, extract_note_dies(real_r_ptr(m_ptr))))
                                {
                                        /* Dead monster */
                                }
@@ -3623,7 +3620,7 @@ void do_cmd_fire_aux(int item, object_type *j_ptr)
                                        }
 
                                        /* Message */
-                                       message_pain(c_ptr->m_idx, tdam);
+                                       message_pain(c_mon_ptr->m_idx, tdam);
 
                                        /* Anger the monster */
                                        if (tdam > 0) anger_monster(m_ptr);
@@ -3649,7 +3646,7 @@ void do_cmd_fire_aux(int item, object_type *j_ptr)
                                        if (snipe_type == SP_RUSH)
                                        {
                                                int n = randint1(5) + 3;
-                                               int m_idx = c_ptr->m_idx;
+                                               int m_idx = c_mon_ptr->m_idx;
 
                                                for ( ; cur_dis <= tdis; )
                                                {
@@ -3677,7 +3674,7 @@ void do_cmd_fire_aux(int item, object_type *j_ptr)
                                                        m_ptr->fy = ny;
 
                                                        /* Update the monster (new location) */
-                                                       update_mon(c_ptr->m_idx, TRUE);
+                                                       update_mon(c_mon_ptr->m_idx, TRUE);
 
                                                        lite_spot(ny, nx);
                                                        lite_spot(oy, ox);
@@ -3792,6 +3789,13 @@ void do_cmd_fire(void)
                return;
        }
 
+       if (j_ptr->sval == SV_HARP)
+       {
+               msg_print(_("この武器で射撃はできない。", "It's not for firing."));
+               flush();
+               return;
+       }
+
 
        if (p_ptr->special_defense & KATA_MUSOU)
        {
@@ -4207,11 +4211,8 @@ bool do_cmd_throw_aux(int mult, bool boomerang, int shuriken)
                                /* Modify the damage */
                                tdam = mon_damage_mod(m_ptr, tdam, FALSE);
 
-                               /* Complex message */
-                               if (p_ptr->wizard)
-                               {
-                                       msg_format(_("%d/%dのダメージを与えた。", "You do %d (out of %d) damage."), tdam, m_ptr->hp);
-                               }
+                               msg_format_wizard(CHEAT_MONSTER, _("%dのダメージを与えた。(残りHP %d/%d(%d))", "You do %d damage. (left HP %d/%d(%d))"),
+                                       tdam, m_ptr->hp - tdam, m_ptr->maxhp, m_ptr->max_maxhp);
 
                                /* Hit the monster, check for death */
                                if (mon_take_hit(c_ptr->m_idx, tdam, &fear, extract_note_dies(real_r_ptr(m_ptr))))