OSDN Git Service

[Refactor] #38844 invoking_midnight_curse を player_type 構造体へ移動.
authordeskull <deskull@users.sourceforge.jp>
Sun, 5 May 2019 01:16:34 +0000 (10:16 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Sun, 5 May 2019 02:40:44 +0000 (11:40 +0900)
src/core.c
src/externs.h
src/player-status.h
src/variable.c

index ef1cc90..1e79d20 100644 (file)
@@ -3317,7 +3317,7 @@ static void process_world(void)
                                generate_encounter = TRUE;
                        }
 
-                       invoking_midnight_curse = TRUE;
+                       p_ptr->invoking_midnight_curse = TRUE;
                }
        }
 
@@ -4383,11 +4383,11 @@ static void process_player(void)
                p_ptr->hack_mutation = FALSE;
        }
 
-       if (invoking_midnight_curse)
+       if (p_ptr->invoking_midnight_curse)
        {
                int count = 0;
                activate_ty_curse(FALSE, &count);
-               invoking_midnight_curse = FALSE;
+               p_ptr->invoking_midnight_curse = FALSE;
        }
 
        if (p_ptr->inside_battle)
index 4ae66b8..b7a767c 100644 (file)
@@ -122,7 +122,7 @@ extern s16b command_wrk;
 extern s16b command_new;
 extern bool msg_flag;
 extern s16b running;
-extern bool invoking_midnight_curse;
+
 extern GAME_TURN old_battle;
 extern bool use_sound;
 extern bool use_music;
index fdd963d..b32e94f 100644 (file)
@@ -542,6 +542,7 @@ struct player_type
        bool warning;
        bool mighty_throw;
        bool see_nocto;         /* Noctovision */
+       bool invoking_midnight_curse;
 
        DICE_NUMBER to_dd[2]; /* Extra dice/sides */
        DICE_SID to_ds[2];
index 668ad42..efb86d5 100644 (file)
@@ -101,8 +101,6 @@ bool msg_flag;                      /* Used in msg_print() for "buffering" */
 
 s16b running;                  /* Current counter for running, if any */
 
-bool invoking_midnight_curse; /*!< 悪夢モード時の真夜中太古の呪い発生処理フラグ */
-
 GAME_TURN old_battle;
 
 bool use_sound;                        /* The "sound" mode is enabled */