OSDN Git Service

[Refactor] #39068 エンバグを修正しつつ,add_essence() の item_tester_tval グローバル参照をローカル引数に収める.
[hengband/hengband.git] / src / snipe.c
index b400b4e..73c7ac1 100644 (file)
@@ -7,9 +7,15 @@
  */
 
 #include "angband.h"
+#include "core.h"
+#include "util.h"
+#include "term.h"
+
 #include "player-status.h"
 #include "cmd-basic.h"
 #include "snipe.h"
+#include "monsterrace.h"
+#include "view-mainwindow.h"
 
 #define MAX_SNIPE_POWERS 16
 
@@ -114,7 +120,7 @@ static bool snipe_concentrate(void)
        if ((int)p_ptr->concent < (2 + (p_ptr->lev + 5) / 10)) p_ptr->concent++;
 
        msg_format(_("集中した。(集中度 %d)", "You concentrate deeply. (lvl %d)"), p_ptr->concent);
-       reset_concent = FALSE;
+       p_ptr->reset_concent = FALSE;
 
        p_ptr->update |= (PU_BONUS | PU_MONSTERS);
        p_ptr->redraw |= (PR_STATUS);
@@ -134,7 +140,7 @@ void reset_concentration(bool msg)
        }
 
        p_ptr->concent = 0;
-       reset_concent = FALSE;
+       p_ptr->reset_concent = FALSE;
 
        p_ptr->update |= (PU_BONUS | PU_MONSTERS);
        p_ptr->redraw |= (PR_STATUS);
@@ -480,7 +486,7 @@ MULTIPLY tot_dam_aux_snipe(MULTIPLY mult, monster_type *m_ptr, SPELL_IDX snipe_t
  */
 static bool cast_sniper_spell(int spell)
 {
-       object_type *o_ptr = &inventory[INVEN_BOW];
+       object_type *o_ptr = &p_ptr->inventory_list[INVEN_BOW];
        SPELL_IDX snipe_type = SP_NONE;
 
        if (o_ptr->tval != TV_BOW)
@@ -518,7 +524,7 @@ static bool cast_sniper_spell(int spell)
        command_cmd = 'f';
        do_cmd_fire(snipe_type);
 
-       return (is_fired);
+       return (p_ptr->is_fired);
 }
 
 /*!