#include "quest.h"
#include "artifact.h"
#include "avatar.h"
+#include "player-move.h"
#include "player-status.h"
#include "cmd-spell.h"
#include "realm-hex.h"
q_ptr->status = QUEST_STATUS_FAILED;
q_ptr->complev = p_ptr->lev;
update_playtime();
- q_ptr->comptime = playtime;
+ q_ptr->comptime = current_world_ptr->play_time;
/* Additional settings */
switch (q_ptr->type)
quest[QUEST_TOWER1].status = QUEST_STATUS_FAILED;
quest[QUEST_TOWER1].complev = p_ptr->lev;
update_playtime();
- quest[QUEST_TOWER1].comptime = playtime;
+ quest[QUEST_TOWER1].comptime = current_world_ptr->play_time;
}
}
}
q_ptr->status = QUEST_STATUS_FAILED;
q_ptr->complev = (byte)p_ptr->lev;
update_playtime();
- q_ptr->comptime = playtime;
+ q_ptr->comptime = current_world_ptr->play_time;
r_info[q_ptr->r_idx].flags1 &= ~(RF1_QUESTOR);
}
}
p_ptr->energy_need = 0;
battle_monsters();
}
- else if (current_world_ptr->game_turn - old_turn == 150 * TURNS_PER_TICK)
+ else if (current_world_ptr->game_turn - current_floor_ptr->generated_turn == 150 * TURNS_PER_TICK)
{
msg_print(_("申し分けありませんが、この勝負は引き分けとさせていただきます。", "This battle have ended in a draw."));
p_ptr->au += kakekin;
/*** 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) &&
p_ptr->window |= PW_PLAYER;
p_ptr->sutemi = FALSE;
p_ptr->counter = FALSE;
- now_damaged = FALSE;
+ p_ptr->now_damaged = FALSE;
handle_stuff();
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);
}
{
while (1)
{
- kubi_r_idx[i] = get_mon_num(MAX_DEPTH - 1);
- r_ptr = &r_info[kubi_r_idx[i]];
+ current_world_ptr->bounty_r_idx[i] = get_mon_num(MAX_DEPTH - 1);
+ r_ptr = &r_info[current_world_ptr->bounty_r_idx[i]];
if (!(r_ptr->flags1 & RF1_UNIQUE)) continue;
if (r_ptr->rarity > 100) continue;
- if (no_questor_or_bounty_uniques(kubi_r_idx[i])) continue;
+ if (no_questor_or_bounty_uniques(current_world_ptr->bounty_r_idx[i])) continue;
for (j = 0; j < i; j++)
- if (kubi_r_idx[i] == kubi_r_idx[j]) break;
+ if (current_world_ptr->bounty_r_idx[i] == current_world_ptr->bounty_r_idx[j]) break;
if (j == i) break;
}
{
for (j = i; j < MAX_KUBI; j++)
{
- if (r_info[kubi_r_idx[i]].level > r_info[kubi_r_idx[j]].level)
+ if (r_info[current_world_ptr->bounty_r_idx[i]].level > r_info[current_world_ptr->bounty_r_idx[j]].level)
{
- tmp = kubi_r_idx[i];
- kubi_r_idx[i] = kubi_r_idx[j];
- kubi_r_idx[j] = tmp;
+ tmp = current_world_ptr->bounty_r_idx[i];
+ current_world_ptr->bounty_r_idx[i] = current_world_ptr->bounty_r_idx[j];
+ current_world_ptr->bounty_r_idx[j] = tmp;
}
}
}
p_ptr->teleport_town = FALSE;
p_ptr->sutemi = FALSE;
- world_monster = FALSE;
- now_damaged = FALSE;
+ current_world_ptr->timewalk_m_idx = 0;
+ p_ptr->now_damaged = FALSE;
now_message = 0;
start_time = time(NULL) - 1;
record_o_name[0] = '\0';
if (current_world_ptr->game_turn > rollback_turns) current_world_ptr->game_turn -= rollback_turns;
else current_world_ptr->game_turn = 1; /* Paranoia */
- if (old_turn > rollback_turns) old_turn -= rollback_turns;
- else old_turn = 1;
+ if (current_floor_ptr->generated_turn > rollback_turns) current_floor_ptr->generated_turn -= rollback_turns;
+ else current_floor_ptr->generated_turn = 1;
if (old_battle > rollback_turns) old_battle -= rollback_turns;
else old_battle = 1;
if (p_ptr->feeling_turn > rollback_turns) p_ptr->feeling_turn -= rollback_turns;