OSDN Git Service

[Refactor] #37353 配列用ポインタ town を他の慣例に従い town_info に改名。 / Rename town pointer to town_...
[hengband/hengband.git] / src / player-status.c
index 0d19df6..7064df5 100644 (file)
@@ -3,6 +3,7 @@
 
 #include "artifact.h"
 #include "avatar.h"
+#include "spells-status.h"
 
 /*
  * Return alignment title
@@ -2812,7 +2813,7 @@ static void calc_torch(void)
 
        /* max radius is 14 (was 5) without rewriting other code -- */
        /* see cave.c:update_lite() and defines.h:LITE_MAX */
-       if (d_info[dungeon_type].flags1 & DF1_DARKNESS && p_ptr->cur_lite > 1)
+       if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS && p_ptr->cur_lite > 1)
                p_ptr->cur_lite = 1;
 
        /*
@@ -3814,5 +3815,10 @@ bool player_has_no_spellbooks(void)
 
 void take_turn(player_type *creature_ptr, PERCENTAGE need_cost)
 {
-       p_ptr->energy_use = (ENERGY)need_cost;
+       creature_ptr->energy_use = (ENERGY)need_cost;
+}
+
+void free_turn(player_type *creature_ptr)
+{
+       creature_ptr->energy_use = 0;
 }