OSDN Git Service

[Refactor] #37353 行動パワー消費処理を take_turn() で再定義 / Redefine take_turn() for consumption...
[hengband/hengband.git] / src / cmd-pet.c
index 945827e..c8a0113 100644 (file)
@@ -331,7 +331,7 @@ bool do_riding(bool force)
 
                if (c_ptr->m_idx)
                {
-                       p_ptr->energy_use = 100;
+                       take_turn(p_ptr, 100);;
 
                        msg_print(_("モンスターが立ちふさがっている!", "There is a monster in the way!"));
 
@@ -388,7 +388,7 @@ bool do_riding(bool force)
                if (r_info[m_ptr->r_idx].level > randint1((p_ptr->skill_exp[GINOU_RIDING] / 50 + p_ptr->lev / 2 + 20)))
                {
                        msg_print(_("うまく乗れなかった。", "You failed to ride."));
-                       p_ptr->energy_use = 100;
+                       take_turn(p_ptr, 100);;
                        return FALSE;
                }
 
@@ -408,7 +408,7 @@ bool do_riding(bool force)
                if (p_ptr->riding == p_ptr->health_who) health_track(0);
        }
 
-       p_ptr->energy_use = 100;
+       take_turn(p_ptr, 100);;
 
        /* Mega-Hack -- Forget the view and lite */
        p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE);