chg_virtue(V_DILIGENCE, -1);
/* Save the rest code */
- resting = command_arg;
+ p_ptr->resting = command_arg;
p_ptr->action = ACTION_REST;
p_ptr->update |= (PU_BONUS);
update_creature(p_ptr);
/*** Check for interupts ***/
/* Complete resting */
- if (resting < 0)
+ if (p_ptr->resting < 0)
{
/* Basic resting */
- if (resting == COMMAND_ARG_REST_FULL_HEALING)
+ if (p_ptr->resting == COMMAND_ARG_REST_FULL_HEALING)
{
/* Stop resting */
if ((p_ptr->chp == p_ptr->mhp) &&
}
/* Complete resting */
- else if (resting == COMMAND_ARG_REST_UNTIL_DONE)
+ else if (p_ptr->resting == COMMAND_ARG_REST_UNTIL_DONE)
{
/* Stop resting */
if ((p_ptr->chp == p_ptr->mhp) &&
else if (p_ptr->action == ACTION_REST)
{
/* Timed rest */
- if (resting > 0)
+ if (p_ptr->resting > 0)
{
/* Reduce rest count */
- resting--;
+ p_ptr->resting--;
- if (!resting) set_action(ACTION_NONE);
+ if (!p_ptr->resting) set_action(ACTION_NONE);
p_ptr->redraw |= (PR_STATE);
}
}
case ACTION_REST:
{
- resting = 0;
+ p_ptr->resting = 0;
break;
}
case ACTION_LEARN:
extern s16b command_new;
extern bool msg_flag;
extern s16b running;
-extern GAME_TURN resting;
extern bool invoking_midnight_curse;
extern GAME_TURN old_battle;
extern bool use_sound;
TIME_EFFECT dustrobe; /* Timed -- Robe of dust */
bool timewalk;
-
+ GAME_TURN resting; /* Current counter for resting, if any */
PATRON_IDX chaos_patron;
bool msg_flag; /* Used in msg_print() for "buffering" */
s16b running; /* Current counter for running, if any */
-GAME_TURN resting; /* Current counter for resting, if any */
bool invoking_midnight_curse; /*!< 悪夢モード時の真夜中太古の呪い発生処理フラグ */
strcpy(text, _(" ", " "));
/* Extensive (timed) rest */
- if (resting >= 1000)
+ if (p_ptr->resting >= 1000)
{
- i = resting / 100;
+ i = p_ptr->resting / 100;
text[3] = '0';
text[2] = '0';
text[1] = '0' + (i % 10);
}
/* Long (timed) rest */
- else if (resting >= 100)
+ else if (p_ptr->resting >= 100)
{
- i = resting;
+ i = p_ptr->resting;
text[3] = '0' + (i % 10);
i = i / 10;
text[2] = '0' + (i % 10);
}
/* Medium (timed) rest */
- else if (resting >= 10)
+ else if (p_ptr->resting >= 10)
{
- i = resting;
+ i = p_ptr->resting;
text[3] = '0' + (i % 10);
text[2] = '0' + (i / 10);
}
/* Short (timed) rest */
- else if (resting > 0)
+ else if (p_ptr->resting > 0)
{
- i = resting;
+ i = p_ptr->resting;
text[3] = '0' + (i);
}
/* Rest until healed */
- else if (resting == COMMAND_ARG_REST_FULL_HEALING)
+ else if (p_ptr->resting == COMMAND_ARG_REST_FULL_HEALING)
{
text[0] = text[1] = text[2] = text[3] = '*';
}
/* Rest until done */
- else if (resting == COMMAND_ARG_REST_UNTIL_DONE)
+ else if (p_ptr->resting == COMMAND_ARG_REST_UNTIL_DONE)
{
text[0] = text[1] = text[2] = text[3] = '&';
}