From 204838009a6b997e71091a08ecd7515708da6d0d Mon Sep 17 00:00:00 2001 From: deskull Date: Thu, 28 Feb 2019 14:03:26 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#38995=20world=5Ftype=20=E6=A7=8B?= =?utf8?q?=E9=80=A0=E4=BD=93=E3=81=AB=20turn=20=E3=82=92=20game=5Fturn=20?= =?utf8?q?=E3=81=AB=E6=94=B9=E5=90=8D=E3=81=97=E3=81=A6=E5=8F=96=E3=82=8A?= =?utf8?q?=E8=BE=BC=E3=82=80=E3=80=82=20/=20Rename=20turn=20to=20game=5Ftu?= =?utf8?q?rn=20and=20move=20to=20world=5Ftype=20structure.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/autopick.c | 8 ++++---- src/birth.c | 8 ++++---- src/bldg.c | 10 +++++----- src/chest.c | 2 +- src/cmd-activate.c | 2 +- src/cmd-item.c | 2 +- src/cmd-read.c | 2 +- src/cmd-spell.c | 2 +- src/cmd2.c | 8 ++++---- src/cmd4.c | 6 +++--- src/defines.h | 4 ++-- src/dungeon.c | 52 +++++++++++++++++++++++++-------------------------- src/effects.c | 4 ++-- src/externs.h | 1 - src/files.c | 6 +++--- src/flavor.c | 4 ++-- src/floor-generate.c | 2 +- src/floor-save.c | 20 ++++++++++---------- src/gameoption.c | 4 ++-- src/grid.c | 2 +- src/load.c | 10 +++++----- src/monster-process.c | 14 +++++++------- src/monster2.c | 4 ++-- src/mutation.c | 8 ++++---- src/object1.c | 6 +++--- src/player-move.c | 10 +++++----- src/player-status.c | 4 ++-- src/realm-hissatsu.c | 2 +- src/realm-song.c | 2 +- src/report.c | 2 +- src/rooms.c | 2 +- src/save.c | 10 +++++----- src/scores.c | 8 ++++---- src/selfinfo.c | 6 +++--- src/shoot.c | 4 ++-- src/spells-world.c | 2 +- src/spells1.c | 6 +++--- src/spells2.c | 4 ++-- src/spells3.c | 12 ++++++------ src/store.c | 16 ++++++++-------- src/tables.c | 8 ++++---- src/trap.c | 2 +- src/types.h | 9 +++++---- src/util.c | 2 +- src/variable.c | 7 +++---- src/wizard2.c | 4 ++-- src/world.c | 8 ++++---- src/z-config.h | 2 +- 48 files changed, 161 insertions(+), 162 deletions(-) diff --git a/src/autopick.c b/src/autopick.c index 1113255d6..6b21e8bd1 100644 --- a/src/autopick.c +++ b/src/autopick.c @@ -5994,16 +5994,16 @@ void do_cmd_edit_autopick(void) tb->dirty_line = -1; tb->filename_mode = PT_DEFAULT; - if (turn < old_autosave_turn) + if (current_world_ptr->game_turn < old_autosave_turn) { - while (old_autosave_turn > turn) old_autosave_turn -= TURNS_PER_TICK * TOWN_DAWN; + while (old_autosave_turn > current_world_ptr->game_turn) old_autosave_turn -= TURNS_PER_TICK * TOWN_DAWN; } /* Autosave */ - if (turn > old_autosave_turn + 100L) + if (current_world_ptr->game_turn > old_autosave_turn + 100L) { do_cmd_save_game(TRUE); - old_autosave_turn = turn; + old_autosave_turn = current_world_ptr->game_turn; } /* HACK -- Reset start_time to stop counting playtime while edit */ diff --git a/src/birth.c b/src/birth.c index 3aa2406f5..c40a86f74 100644 --- a/src/birth.c +++ b/src/birth.c @@ -1884,7 +1884,7 @@ static void init_dungeon_quests(void) } /*! - * @brief ゲームターンを初期化する / Reset turn + * @brief ゲームターンを初期化する / Reset current_world_ptr->game_turn * @details アンデッド系種族は開始時刻を夜からにする。 * @return なし */ @@ -1896,12 +1896,12 @@ static void init_turn(void) (p_ptr->prace == RACE_SPECTRE)) { /* Undead start just after midnight */ - turn = (TURNS_PER_TICK*3 * TOWN_DAWN) / 4 + 1; + current_world_ptr->game_turn = (TURNS_PER_TICK*3 * TOWN_DAWN) / 4 + 1; turn_limit = TURNS_PER_TICK * TOWN_DAWN * MAX_DAYS + TURNS_PER_TICK * TOWN_DAWN * 3 / 4; } else { - turn = 1; + current_world_ptr->game_turn = 1; turn_limit = TURNS_PER_TICK * TOWN_DAWN * (MAX_DAYS - 1) + TURNS_PER_TICK * TOWN_DAWN * 3 / 4; } @@ -4119,7 +4119,7 @@ static bool player_birth_aux(void) /* Clear */ clear_from(10); - /* Reset turn; before auto-roll and after choosing race */ + /* Reset current_world_ptr->game_turn; before auto-roll and after choosing race */ init_turn(); /*** Generate ***/ diff --git a/src/bldg.c b/src/bldg.c index 769690c90..27c1b1ba0 100644 --- a/src/bldg.c +++ b/src/bldg.c @@ -1466,10 +1466,10 @@ static bool kakutoujou(void) char out_val[160], tmp_str[80]; concptr p; - if ((turn - old_battle) > TURNS_PER_TICK*250) + if ((current_world_ptr->game_turn - old_battle) > TURNS_PER_TICK*250) { battle_monsters(); - old_battle = turn; + old_battle = current_world_ptr->game_turn; } screen_save(); @@ -1938,7 +1938,7 @@ static bool inn_comm(int cmd) } else { - s32b oldturn = turn; + s32b oldturn = current_world_ptr->game_turn; int prev_day, prev_hour, prev_min; extract_day_hour_min(&prev_day, &prev_hour, &prev_min); @@ -1947,10 +1947,10 @@ static bool inn_comm(int cmd) else do_cmd_write_nikki(NIKKI_BUNSHOU, 0, _("宿屋に泊まった。", "stay over night at the inn.")); - turn = (turn / (TURNS_PER_TICK * TOWN_DAWN / 2) + 1) * (TURNS_PER_TICK * TOWN_DAWN / 2); + current_world_ptr->game_turn = (current_world_ptr->game_turn / (TURNS_PER_TICK * TOWN_DAWN / 2) + 1) * (TURNS_PER_TICK * TOWN_DAWN / 2); if (dungeon_turn < dungeon_turn_limit) { - dungeon_turn += MIN((turn - oldturn), TURNS_PER_TICK * 250) * INN_DUNGEON_TURN_ADJ; + dungeon_turn += MIN((current_world_ptr->game_turn - oldturn), TURNS_PER_TICK * 250) * INN_DUNGEON_TURN_ADJ; if (dungeon_turn > dungeon_turn_limit) dungeon_turn = dungeon_turn_limit; } diff --git a/src/chest.c b/src/chest.c index e18f2065f..6f7fa974e 100644 --- a/src/chest.c +++ b/src/chest.c @@ -17,7 +17,7 @@ * Small chests often contain "gold", while Large chests always contain * items. Wooden chests contain 2 items, Iron chests contain 4 items, * and Steel chests contain 6 items. The "value" of the items in a -* chest is based on the "power" of the chest, which is in turn based +* chest is based on the "power" of the chest, which is in current_world_ptr->game_turn based * on the level on which the chest is generated. * */ diff --git a/src/cmd-activate.c b/src/cmd-activate.c index e69cea226..dc8c89a41 100644 --- a/src/cmd-activate.c +++ b/src/cmd-activate.c @@ -342,7 +342,7 @@ static bool ang_sort_comp_pet(vptr u, vptr v, int a, int b) *
  * Currently, only (some) artifacts, and Dragon Scale Mail, can be activated.
  * But one could, for example, easily make an activatable "Ring of Plasma".
- * Note that it always takes a turn to activate an artifact, even if
+ * Note that it always takes a current_world_ptr->game_turn to activate an artifact, even if
  * the user hits "escape" at the "direction" prompt.
  * 
*/ diff --git a/src/cmd-item.c b/src/cmd-item.c index 073522db3..9baf208ec 100644 --- a/src/cmd-item.c +++ b/src/cmd-item.c @@ -432,7 +432,7 @@ void do_cmd_wield(void) o_ptr->ident |= (IDENT_SENSE); } - /* The Stone Mask make the player turn into a vampire! */ + /* The Stone Mask make the player current_world_ptr->game_turn into a vampire! */ if ((o_ptr->name1 == ART_STONEMASK) && (p_ptr->prace != RACE_VAMPIRE) && (p_ptr->prace != RACE_ANDROID)) { /* Turn into a vampire */ diff --git a/src/cmd-read.c b/src/cmd-read.c index 36de7f677..c16f50232 100644 --- a/src/cmd-read.c +++ b/src/cmd-read.c @@ -28,7 +28,7 @@ *
  * Certain scrolls can be "aborted" without losing the scroll.  These
  * include scrolls with no effects but recharge or identify, which are
- * cancelled before use.  XXX Reading them still takes a turn, though.
+ * cancelled before use.  XXX Reading them still takes a current_world_ptr->game_turn, though.
  * 
*/ void do_cmd_read_scroll_aux(INVENTORY_IDX item, bool known) diff --git a/src/cmd-spell.c b/src/cmd-spell.c index 04a37ddf0..83515aed9 100644 --- a/src/cmd-spell.c +++ b/src/cmd-spell.c @@ -1201,7 +1201,7 @@ void do_cmd_cast(void) /* Process spell */ else { - /* Canceled spells cost neither a turn nor mana */ + /* Canceled spells cost neither a current_world_ptr->game_turn nor mana */ if (!do_spell(realm, spell, SPELL_CAST)) return; if (randint1(100) < chance) diff --git a/src/cmd2.c b/src/cmd2.c index cc71a8501..d64b54c8b 100644 --- a/src/cmd2.c +++ b/src/cmd2.c @@ -450,7 +450,7 @@ void do_cmd_go_down(void) /*! - * @brief 探索コマンドのメインルーチン / Simple command to "search" for one turn + * @brief 探索コマンドのメインルーチン / Simple command to "search" for one current_world_ptr->game_turn * @return なし */ void do_cmd_search(void) @@ -1182,7 +1182,7 @@ static bool do_cmd_tunnel_aux(POSITION y, POSITION x) * @details *
  * Note that you must tunnel in order to hit invisible monsters
- * in walls, though moving into walls still takes a turn anyway.
+ * in walls, though moving into walls still takes a current_world_ptr->game_turn anyway.
  *
  * Digging is very difficult without a "digger" weapon, but can be
  * accomplished by strong players using heavy weapons.
@@ -1801,7 +1801,7 @@ void do_cmd_bash(void)
  *
  * Consider confusion 
  *
- * This command must always take a turn, to prevent free detection
+ * This command must always take a current_world_ptr->game_turn, to prevent free detection
  * of invisible monsters.
  * 
*/ @@ -2195,7 +2195,7 @@ void do_cmd_rest(void) if (p_ptr->special_defense & NINJA_S_STEALTH) set_superstealth(FALSE); - /* Take a turn (?) */ + /* Take a current_world_ptr->game_turn (?) */ take_turn(p_ptr, 100); /* The sin of sloth */ diff --git a/src/cmd4.c b/src/cmd4.c index e45a42940..4f58a5fad 100644 --- a/src/cmd4.c +++ b/src/cmd4.c @@ -852,11 +852,11 @@ static void do_cmd_last_get(void) sprintf(buf,_("%sの入手を記録します。", "Do you really want to record getting %s? "),record_o_name); if (!get_check(buf)) return; - turn_tmp = turn; - turn = record_turn; + turn_tmp = current_world_ptr->game_turn; + current_world_ptr->game_turn = record_turn; sprintf(buf,_("%sを手に入れた。", "descover %s."), record_o_name); do_cmd_write_nikki(NIKKI_BUNSHOU, 0, buf); - turn = turn_tmp; + current_world_ptr->game_turn = turn_tmp; } /*! diff --git a/src/defines.h b/src/defines.h index 3f40e680f..9df542915 100644 --- a/src/defines.h +++ b/src/defines.h @@ -4677,8 +4677,8 @@ extern int PlayerUID; #define IS_WIZARD_CLASS() \ (p_ptr->pclass == CLASS_MAGE || p_ptr->pclass == CLASS_HIGH_MAGE || p_ptr->pclass == CLASS_SORCERER || p_ptr->pclass == CLASS_MAGIC_EATER || p_ptr->pclass == CLASS_BLUE_MAGE) -/* Multishadow effects is determined by turn */ -#define CHECK_MULTISHADOW() (p_ptr->multishadow && (turn & 1)) +/* Multishadow effects is determined by current_world_ptr->game_turn */ +#define CHECK_MULTISHADOW() (p_ptr->multishadow && (current_world_ptr->game_turn & 1)) /* Is "teleport level" ineffective to this target? */ #define TELE_LEVEL_IS_INEFF(TARGET) \ diff --git a/src/dungeon.c b/src/dungeon.c index 79bc6f6c5..cbda4bbda 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -1026,7 +1026,7 @@ static void notice_lite_change(object_type *o_ptr) else if (o_ptr->name2 == EGO_LITE_LONG) { if ((o_ptr->xtra4 < 50) && (!(o_ptr->xtra4 % 5)) - && (turn % (TURNS_PER_TICK*2))) + && (current_world_ptr->game_turn % (TURNS_PER_TICK*2))) { if (disturb_minor) disturb(FALSE, TRUE); msg_print(_("明かりが微かになってきている。", "Your light is growing faint.")); @@ -1313,7 +1313,7 @@ static void process_world_aux_digestion(void) } /* Digest normally -- Every 50 game turns */ - else if (!(turn % (TURNS_PER_TICK * 5))) + else if (!(current_world_ptr->game_turn % (TURNS_PER_TICK * 5))) { /* Basic digestion rate based on speed */ int digestion = SPEED_TO_ENERGY(p_ptr->pspeed); @@ -2165,7 +2165,7 @@ static void process_world_aux_light(void) /* Decrease life-span */ if (o_ptr->name2 == EGO_LITE_LONG) { - if (turn % (TURNS_PER_TICK*2)) o_ptr->xtra4--; + if (current_world_ptr->game_turn % (TURNS_PER_TICK*2)) o_ptr->xtra4--; } else o_ptr->xtra4--; @@ -2905,7 +2905,7 @@ static void process_world_aux_recharge(void) /* * Recharge rods. Rods now use timeout to control charging status, * and each charging rod in a stack decreases the stack's timeout by - * one per turn. -LM- + * one per current_world_ptr->game_turn. -LM- */ for (changed = FALSE, i = 0; i < INVEN_PACK; i++) { @@ -3334,7 +3334,7 @@ static void update_dungeon_feeling(void) delay = MAX(10, 150 - p_ptr->skill_fos) * (150 - current_floor_ptr->dun_level) * TURNS_PER_TICK / 100; /* Not yet felt anything */ - if (turn < p_ptr->feeling_turn + delay && !cheat_xtra) return; + if (current_world_ptr->game_turn < p_ptr->feeling_turn + delay && !cheat_xtra) return; /* Extract quest number (if any) */ quest_num = quest_number(current_floor_ptr->dun_level); @@ -3350,7 +3350,7 @@ static void update_dungeon_feeling(void) new_feeling = get_dungeon_feeling(); /* Remember last time updated */ - p_ptr->feeling_turn = turn; + p_ptr->feeling_turn = current_world_ptr->game_turn; /* No change */ if (p_ptr->feeling == new_feeling) return; @@ -3379,7 +3379,7 @@ static void process_world(void) int day, hour, min; const s32b A_DAY = TURNS_PER_TICK * TOWN_DAWN; - s32b prev_turn_in_today = ((turn - TURNS_PER_TICK) % A_DAY + A_DAY / 4) % A_DAY; + s32b prev_turn_in_today = ((current_world_ptr->game_turn - TURNS_PER_TICK) % A_DAY + A_DAY / 4) % A_DAY; int prev_min = (1440 * prev_turn_in_today / A_DAY) % 60; extract_day_hour_min(&day, &hour, &min); @@ -3450,7 +3450,7 @@ static void process_world(void) p_ptr->energy_need = 0; battle_monsters(); } - else if (turn - old_turn == 150 * TURNS_PER_TICK) + else if (current_world_ptr->game_turn - old_turn == 150 * TURNS_PER_TICK) { msg_print(_("申し分けありませんが、この勝負は引き分けとさせていただきます。", "This battle have ended in a draw.")); p_ptr->au += kakekin; @@ -3461,11 +3461,11 @@ static void process_world(void) } /* Every 10 game turns */ - if (turn % TURNS_PER_TICK) return; + if (current_world_ptr->game_turn % TURNS_PER_TICK) return; /*** Check the Time and Load ***/ - if (!(turn % (50*TURNS_PER_TICK))) + if (!(current_world_ptr->game_turn % (50*TURNS_PER_TICK))) { /* Check time and load */ if ((0 != check_time()) || (0 != check_load())) @@ -3500,7 +3500,7 @@ static void process_world(void) /*** Attempt timed autosave ***/ if (autosave_t && autosave_freq && !p_ptr->inside_battle) { - if (!(turn % ((s32b)autosave_freq * TURNS_PER_TICK))) + if (!(current_world_ptr->game_turn % ((s32b)autosave_freq * TURNS_PER_TICK))) do_cmd_save_game(TRUE); } @@ -3515,12 +3515,12 @@ static void process_world(void) if (!current_floor_ptr->dun_level && !p_ptr->inside_quest && !p_ptr->inside_battle && !p_ptr->inside_arena) { /* Hack -- Daybreak/Nighfall in town */ - if (!(turn % ((TURNS_PER_TICK * TOWN_DAWN) / 2))) + if (!(current_world_ptr->game_turn % ((TURNS_PER_TICK * TOWN_DAWN) / 2))) { bool dawn; /* Check for dawn */ - dawn = (!(turn % (TURNS_PER_TICK * TOWN_DAWN))); + dawn = (!(current_world_ptr->game_turn % (TURNS_PER_TICK * TOWN_DAWN))); if (dawn) day_break(); else night_falls(); @@ -3534,7 +3534,7 @@ static void process_world(void) /*** Shuffle the Storekeepers ***/ /* Chance is only once a day (while in dungeon) */ - if (!(turn % (TURNS_PER_TICK * STORE_TICKS))) + if (!(current_world_ptr->game_turn % (TURNS_PER_TICK * STORE_TICKS))) { /* Sometimes, shuffle the shop-keepers */ if (one_in_(STORE_SHUFFLE)) @@ -3588,8 +3588,8 @@ static void process_world(void) } /* Hack -- Check for creature regeneration */ - if (!(turn % (TURNS_PER_TICK * 10)) && !p_ptr->inside_battle) regen_monsters(); - if (!(turn % (TURNS_PER_TICK * 3))) regen_captured_monsters(); + if (!(current_world_ptr->game_turn % (TURNS_PER_TICK * 10)) && !p_ptr->inside_battle) regen_monsters(); + if (!(current_world_ptr->game_turn % (TURNS_PER_TICK * 3))) regen_captured_monsters(); if (!p_ptr->leaving) { @@ -4696,7 +4696,7 @@ static void process_upkeep_with_speed(void) p_ptr->enchant_energy_need -= SPEED_TO_ENERGY(p_ptr->pspeed); } - /* No turn yet */ + /* No current_world_ptr->game_turn yet */ if (p_ptr->enchant_energy_need > 0) return; while (p_ptr->enchant_energy_need <= 0) @@ -4762,7 +4762,7 @@ static void process_player(void) p_ptr->energy_need -= SPEED_TO_ENERGY(p_ptr->pspeed); } - /* No turn yet */ + /* No current_world_ptr->game_turn yet */ if (p_ptr->energy_need > 0) return; if (!command_rep) prt_time(); @@ -4984,7 +4984,7 @@ static void process_player(void) /* Hack -- cancel "lurking browse mode" */ if (!command_new) command_see = FALSE; - /* Assume free turn */ + /* Assume free current_world_ptr->game_turn */ free_turn(p_ptr); if (p_ptr->inside_battle) @@ -5496,12 +5496,12 @@ static void dungeon(bool load_game) if (!p_ptr->playing || p_ptr->is_dead) break; /* Count game turns */ - turn++; + current_world_ptr->game_turn++; if (dungeon_turn < dungeon_turn_limit) { if (!p_ptr->wild_mode || wild_regen) dungeon_turn++; - else if (p_ptr->wild_mode && !(turn % ((MAX_HGT + MAX_WID) / 2))) dungeon_turn++; + else if (p_ptr->wild_mode && !(current_world_ptr->game_turn % ((MAX_HGT + MAX_WID) / 2))) dungeon_turn++; } prevent_turn_overflow(); @@ -5783,7 +5783,7 @@ void play_game(bool new_game) } } - /* Hack -- turn off the cursor */ + /* Hack -- current_world_ptr->game_turn off the cursor */ (void)Term_set_cursor(0); @@ -6228,13 +6228,13 @@ void prevent_turn_overflow(void) int rollback_days, i, j; s32b rollback_turns; - if (turn < turn_limit) return; + if (current_world_ptr->game_turn < turn_limit) return; - rollback_days = 1 + (turn - turn_limit) / (TURNS_PER_TICK * TOWN_DAWN); + rollback_days = 1 + (current_world_ptr->game_turn - turn_limit) / (TURNS_PER_TICK * TOWN_DAWN); rollback_turns = TURNS_PER_TICK * TOWN_DAWN * rollback_days; - if (turn > rollback_turns) turn -= rollback_turns; - else turn = 1; /* Paranoia */ + 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 (old_battle > rollback_turns) old_battle -= rollback_turns; diff --git a/src/effects.c b/src/effects.c index 63a58a209..75395ecc1 100644 --- a/src/effects.c +++ b/src/effects.c @@ -1241,7 +1241,7 @@ bool set_wraith_form(TIME_EFFECT v, bool do_dec) } else if (!p_ptr->wraith_form) { - msg_print(_("物質界を離れて幽鬼のような存在になった!", "You leave the physical world and turn into a wraith-being!")); + msg_print(_("物質界を離れて幽鬼のような存在になった!", "You leave the physical world and current_world_ptr->game_turn into a wraith-being!")); notice = TRUE; chg_virtue(V_UNLIFE, 3); chg_virtue(V_HONOUR, -2); @@ -3655,7 +3655,7 @@ void change_race(CHARACTER_IDX new_race, concptr effect_msg) #ifdef JP msg_format("あなたは%s%sに変化した!", effect_msg, title); #else - msg_format("You turn into %s %s%s!", (!effect_msg[0] && is_a_vowel(title[0]) ? "an" : "a"), effect_msg, title); + msg_format("You current_world_ptr->game_turn into %s %s%s!", (!effect_msg[0] && is_a_vowel(title[0]) ? "an" : "a"), effect_msg, title); #endif chg_virtue(V_CHANCE, 2); diff --git a/src/externs.h b/src/externs.h index 6e14c01f2..194631efa 100644 --- a/src/externs.h +++ b/src/externs.h @@ -160,7 +160,6 @@ extern bool msg_flag; extern s16b running; extern GAME_TURN resting; extern bool invoking_midnight_curse; -extern GAME_TURN turn; extern GAME_TURN turn_limit; extern GAME_TURN dungeon_turn; extern GAME_TURN dungeon_turn_limit; diff --git a/src/files.c b/src/files.c index a1c24acf3..5330570df 100644 --- a/src/files.c +++ b/src/files.c @@ -564,8 +564,8 @@ errr process_pref_file_command(char *buf) } break; - /* Process "X:" -- turn option off */ - /* Process "Y:" -- turn option on */ + /* Process "X:" -- current_world_ptr->game_turn option off */ + /* Process "Y:" -- current_world_ptr->game_turn option on */ case 'X': case 'Y': for (i = 0; option_info[i].o_desc; i++) @@ -6880,7 +6880,7 @@ void exit_game_panic(void) /* Clear the top line */ prt("", 0, 0); - /* Hack -- turn off some things */ + /* Hack -- current_world_ptr->game_turn off some things */ disturb(TRUE, TRUE); /* Mega-Hack -- Delay death */ diff --git a/src/flavor.c b/src/flavor.c index 085186012..80cffbc96 100644 --- a/src/flavor.c +++ b/src/flavor.c @@ -2391,7 +2391,7 @@ void object_desc(char *buf, object_type *o_ptr, BIT_FLAGS mode) t = object_desc_num(t, fire_rate/100); t = object_desc_chr(t, '.'); t = object_desc_num(t, fire_rate%100); - t = object_desc_str(t, "turn"); + t = object_desc_str(t, "current_world_ptr->game_turn"); t = object_desc_chr(t, p2); } @@ -2490,7 +2490,7 @@ void object_desc(char *buf, object_type *o_ptr, BIT_FLAGS mode) avgdam *= (p_ptr->num_fire * 100); avgdam /= energy_fire; t = object_desc_num(t, avgdam); - t = object_desc_str(t, show_ammo_detail ? "/turn" : ""); + t = object_desc_str(t, show_ammo_detail ? "/current_world_ptr->game_turn" : ""); if(show_ammo_crit_ratio) { diff --git a/src/floor-generate.c b/src/floor-generate.c index df5600338..9011e5b0b 100644 --- a/src/floor-generate.c +++ b/src/floor-generate.c @@ -661,7 +661,7 @@ static bool cave_gen(void) int tunnel_fail_count = 0; /* - * Build each type of room in turn until we cannot build any more. + * Build each type of room in current_world_ptr->game_turn until we cannot build any more. */ if (!generate_rooms()) return FALSE; diff --git a/src/floor-save.c b/src/floor-save.c index 2a538baf7..122a56dd2 100644 --- a/src/floor-save.c +++ b/src/floor-save.c @@ -1052,8 +1052,8 @@ void leave_floor(void) /* Get out of the my way! */ get_out_monster(); - /* Record the last visit turn of current floor */ - sf_ptr->last_visit = turn; + /* Record the last visit current_world_ptr->game_turn of current floor */ + sf_ptr->last_visit = current_world_ptr->game_turn; forget_lite(); forget_view(); @@ -1194,8 +1194,8 @@ void change_floor(void) int alloc_chance = d_info[p_ptr->dungeon_idx].max_m_alloc_chance; GAME_TURN alloc_times; - while (tmp_last_visit > turn) tmp_last_visit -= TURNS_PER_TICK * TOWN_DAWN; - absence_ticks = (turn - tmp_last_visit) / TURNS_PER_TICK; + while (tmp_last_visit > current_world_ptr->game_turn) tmp_last_visit -= TURNS_PER_TICK * TOWN_DAWN; + absence_ticks = (current_world_ptr->game_turn - tmp_last_visit) / TURNS_PER_TICK; /* Maintain monsters */ for (i = 1; i < m_max; i++) @@ -1302,8 +1302,8 @@ void change_floor(void) generate_random_floor(); } - /* Record last visit turn */ - sf_ptr->last_visit = turn; + /* Record last visit current_world_ptr->game_turn */ + sf_ptr->last_visit = current_world_ptr->game_turn; /* Set correct current_floor_ptr->dun_level value */ sf_ptr->dun_level = current_floor_ptr->dun_level; @@ -1358,9 +1358,9 @@ void change_floor(void) /* * Update visit mark * - * The "turn" is not always different number because - * the level teleport doesn't take any turn. Use - * visit mark instead of last visit turn to find the + * The "current_world_ptr->game_turn" is not always different number because + * the level teleport doesn't take any current_world_ptr->game_turn. Use + * visit mark instead of last visit current_world_ptr->game_turn to find the * oldest saved floor. */ sf_ptr->visit_mark = latest_visit_mark++; @@ -1386,7 +1386,7 @@ void change_floor(void) wiz_lite((bool)(p_ptr->pclass == CLASS_NINJA)); /* Remember when this level was "created" */ - old_turn = turn; + old_turn = current_world_ptr->game_turn; /* No dungeon feeling yet */ p_ptr->feeling_turn = old_turn; diff --git a/src/gameoption.c b/src/gameoption.c index 06dfb66ad..95b24fc81 100644 --- a/src/gameoption.c +++ b/src/gameoption.c @@ -173,7 +173,7 @@ bool cheat_know; /* Know complete monster info */ bool cheat_live; /* Allow player to avoid death */ bool cheat_save; /* Ask for saving death */ bool cheat_diary_output; /* Detailed info to diary */ -bool cheat_turn; /* Peek turn */ +bool cheat_turn; /* Peek current_world_ptr->game_turn */ bool cheat_sight; @@ -611,7 +611,7 @@ const option_type cheat_info[CHEAT_MAX] = }, { &cheat_turn, FALSE, 255, 0x81, 0x00, - "cheat_turn", _("ゲームメッセージにターン表示を行う", "Put turn to game message.") + "cheat_turn", _("ゲームメッセージにターン表示を行う", "Put current_world_ptr->game_turn to game message.") }, { &cheat_sight, FALSE, 255, 0x82, 0x00, diff --git a/src/grid.c b/src/grid.c index f43ec82f5..aac1d221d 100644 --- a/src/grid.c +++ b/src/grid.c @@ -4920,7 +4920,7 @@ static int scent_when = 0; * current position, and monsters can use it to home in the character, * but not to run away from him. * - * Smell is valued according to age. When a character takes his turn, + * Smell is valued according to age. When a character takes his current_world_ptr->game_turn, * scent is aged by one, and new scent of the current age is laid down. * Speedy characters leave more scent, true, but it also ages faster, * which makes it harder to hunt them down. diff --git a/src/load.c b/src/load.c index aef1ce25c..d5fb83be7 100644 --- a/src/load.c +++ b/src/load.c @@ -2277,12 +2277,12 @@ static void rd_extra(void) rd_s32b(&p_ptr->feeling_turn); } - /* Current turn */ - rd_s32b(&turn); + /* Current current_world_ptr->game_turn */ + rd_s32b(¤t_world_ptr->game_turn); if (z_older_than(10, 3, 12)) { - dungeon_turn = turn; + dungeon_turn = current_world_ptr->game_turn; } else rd_s32b(&dungeon_turn); @@ -2290,13 +2290,13 @@ static void rd_extra(void) { old_turn /= 2; p_ptr->feeling_turn /= 2; - turn /= 2; + current_world_ptr->game_turn /= 2; dungeon_turn /= 2; } if (z_older_than(10, 3, 13)) { - old_battle = turn; + old_battle = current_world_ptr->game_turn; } else rd_s32b(&old_battle); diff --git a/src/monster-process.c b/src/monster-process.c index 125c5b889..2b5f64bb4 100644 --- a/src/monster-process.c +++ b/src/monster-process.c @@ -2851,7 +2851,7 @@ void process_monster(MONSTER_IDX m_idx) do_move = FALSE; } - /* In anti-melee dungeon, stupid or confused monster takes useless turn */ + /* In anti-melee dungeon, stupid or confused monster takes useless current_world_ptr->game_turn */ if (do_move && (d_info[p_ptr->dungeon_idx].flags1 & DF1_NO_MELEE)) { if (!MON_CONFUSED(m_ptr)) @@ -2875,7 +2875,7 @@ void process_monster(MONSTER_IDX m_idx) /* Do not move */ do_move = FALSE; - /* Took a turn */ + /* Took a current_world_ptr->game_turn */ do_turn = TRUE; } } @@ -2907,7 +2907,7 @@ void process_monster(MONSTER_IDX m_idx) { if (monst_attack_monst(m_idx, g_ptr->m_idx)) return; - /* In anti-melee dungeon, stupid or confused monster takes useless turn */ + /* In anti-melee dungeon, stupid or confused monster takes useless current_world_ptr->game_turn */ else if (d_info[p_ptr->dungeon_idx].flags1 & DF1_NO_MELEE) { if (MON_CONFUSED(m_ptr)) return; @@ -3273,10 +3273,10 @@ void process_monster(MONSTER_IDX m_idx) /*! * @brief 全モンスターのターン管理メインルーチン / - * Process all the "live" monsters, once per game turn. + * Process all the "live" monsters, once per game current_world_ptr->game_turn. * @return なし * @details - * During each game turn, we scan through the list of all the "live" monsters,\n + * During each game current_world_ptr->game_turn, we scan through the list of all the "live" monsters,\n * (backwards, so we can excise any "freshly dead" monsters), energizing each\n * monster, and allowing fully energized monsters to move, attack, pass, etc.\n *\n @@ -3295,8 +3295,8 @@ void process_monster(MONSTER_IDX m_idx) *\n * Note the special "MFLAG_BORN" flag, which allows us to ignore "fresh"\n * monsters while they are still being "born". A monster is "fresh" only\n - * during the turn in which it is created, and we use the "hack_m_idx" to\n - * determine if the monster is yet to be processed during the current turn.\n + * during the current_world_ptr->game_turn in which it is created, and we use the "hack_m_idx" to\n + * determine if the monster is yet to be processed during the current current_world_ptr->game_turn.\n *\n * Note the special "MFLAG_NICE" flag, which allows the player to get one\n * move before any "nasty" monsters get to use their spell attacks.\n diff --git a/src/monster2.c b/src/monster2.c index 083d6e5bc..647fbd796 100644 --- a/src/monster2.c +++ b/src/monster2.c @@ -2085,11 +2085,11 @@ void sanity_blast(monster_type *m_ptr, bool necro) { if ((p_ptr->stat_use[A_INT] < 4) && (p_ptr->stat_use[A_WIS] < 4)) { - msg_print(_("あなたは完璧な馬鹿になったような気がした。しかしそれは元々だった。", "You turn into an utter moron!")); + msg_print(_("あなたは完璧な馬鹿になったような気がした。しかしそれは元々だった。", "You current_world_ptr->game_turn into an utter moron!")); } else { - msg_print(_("あなたは完璧な馬鹿になった!", "You turn into an utter moron!")); + msg_print(_("あなたは完璧な馬鹿になった!", "You current_world_ptr->game_turn into an utter moron!")); } if (p_ptr->muta3 & MUT3_HYPER_INT) diff --git a/src/mutation.c b/src/mutation.c index ab245caa0..1803e3b44 100644 --- a/src/mutation.c +++ b/src/mutation.c @@ -429,7 +429,7 @@ bool gain_random_mutation(int choose_mut) case 120: case 121: case 122: muta_class = &(p_ptr->muta3); muta_which = MUT3_HYPER_STR; - muta_desc = _( "超人的に強くなった!", "You turn into a superhuman he-man!"); + muta_desc = _( "超人的に強くなった!", "You current_world_ptr->game_turn into a superhuman he-man!"); break; case 123: case 124: case 125: @@ -465,7 +465,7 @@ bool gain_random_mutation(int choose_mut) case 136: case 137: muta_class = &(p_ptr->muta3); muta_which = MUT3_ALBINO; - muta_desc = _( "アルビノになった!弱くなった気がする...", "You turn into an albino! You feel frail..."); + muta_desc = _( "アルビノになった!弱くなった気がする...", "You current_world_ptr->game_turn into an albino! You feel frail..."); break; case 138: case 139: case 140: @@ -525,7 +525,7 @@ bool gain_random_mutation(int choose_mut) case 159: case 160: muta_class = &(p_ptr->muta3); muta_which = MUT3_SHORT_LEG; - muta_desc = _( "足が短い突起になってしまった!", "Your legs turn into short stubs!"); + muta_desc = _( "足が短い突起になってしまった!", "Your legs current_world_ptr->game_turn into short stubs!"); break; case 161: case 162: @@ -1601,7 +1601,7 @@ void dump_mutations(FILE *OutFile) } if (p_ptr->muta1 & MUT1_MIDAS_TCH) { - fprintf(OutFile, _(" あなたは通常アイテムを金に変えることができる。\n", " You can turn ordinary items to gold.\n")); + fprintf(OutFile, _(" あなたは通常アイテムを金に変えることができる。\n", " You can current_world_ptr->game_turn ordinary items to gold.\n")); } if (p_ptr->muta1 & MUT1_GROW_MOLD) diff --git a/src/object1.c b/src/object1.c index 4963cddba..67a94d6b2 100644 --- a/src/object1.c +++ b/src/object1.c @@ -428,8 +428,8 @@ static concptr item_activation_aux(object_type *o_ptr) constant = act_ptr->timeout.constant; dice = act_ptr->timeout.dice; if (constant == 0 && dice == 0) { - /* We can activate it every turn */ - strcpy(timeout, _("いつでも", "every turn")); + /* We can activate it every current_world_ptr->game_turn */ + strcpy(timeout, _("いつでも", "every current_world_ptr->game_turn")); } else if (constant < 0) { /* Activations that have special timeout */ switch (act_ptr->index) { @@ -558,7 +558,7 @@ bool screen_object(object_type *o_ptr, BIT_FLAGS mode) /* Figurines, a hack */ if (o_ptr->name1 == ART_STONEMASK) { - info[i++] = _("それを装備した者は吸血鬼になる。", "It makes you turn into a vampire permanently."); + info[i++] = _("それを装備した者は吸血鬼になる。", "It makes you current_world_ptr->game_turn into a vampire permanently."); } if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI)) diff --git a/src/player-move.c b/src/player-move.c index c62c61ce5..eb5ee4a63 100644 --- a/src/player-move.c +++ b/src/player-move.c @@ -108,7 +108,7 @@ * entirely open. * * Corners: If you are not in the open (i.e. you are in a corridor) - * and there is only one way to go in the new squares, then turn in + * and there is only one way to go in the new squares, then current_world_ptr->game_turn in * that direction. If there are more than two new ways to go, STOP. * If there are two ways to go, and those ways are separated by a * square which does not seem to be open, then STOP. @@ -530,7 +530,7 @@ void py_pickup_aux(OBJECT_IDX o_idx) msg_format("You have %s (%c).", o_name, index_to_label(slot)); strcpy(record_o_name, o_name); #endif - record_turn = turn; + record_turn = current_world_ptr->game_turn; check_find_art_quest_completion(o_ptr); @@ -1096,7 +1096,7 @@ bool trap_can_be_ignored(FEAT_IDX feat) * @note * This routine should (probably) always induce energy expenditure.\n * @details - * Note that moving will *always* take a turn, and will *always* hit\n + * Note that moving will *always* take a current_world_ptr->game_turn, and will *always* hit\n * any monster which might be in the destination grid. Previously,\n * moving into walls was "free" and did NOT hit invisible monsters.\n */ @@ -1435,7 +1435,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap) /* * Well, it makes sense that you lose time bumping into * a wall _if_ you are confused, stunned or blind; but - * typing mistakes should not cost you a turn... + * typing mistakes should not cost you a current_world_ptr->game_turn... */ if (!(p_ptr->confused || p_ptr->stun || p_ptr->image)) free_turn(p_ptr); @@ -1623,7 +1623,7 @@ static bool find_breakleft; * Diagonal Corridor -- allow diaginal entry into corridors.\n *\n * Blunt Corridor -- If there is a wall two spaces ahead and\n - * we seem to be in a corridor, then force a turn into the side\n + * we seem to be in a corridor, then force a current_world_ptr->game_turn into the side\n * corridor, must be moving straight into a corridor here. ???\n *\n * Diagonal Corridor Blunt Corridor (?)\n diff --git a/src/player-status.c b/src/player-status.c index 93df4b2f4..9973414c7 100644 --- a/src/player-status.c +++ b/src/player-status.c @@ -162,11 +162,11 @@ void calc_bonuses(void) /* Start with "normal" speed */ new_speed = 110; - /* Start with a single blow per turn */ + /* Start with a single blow per current_world_ptr->game_turn */ p_ptr->num_blow[0] = 1; p_ptr->num_blow[1] = 1; - /* Start with a single shot per turn */ + /* Start with a single shot per current_world_ptr->game_turn */ p_ptr->num_fire = 100; /* Reset the "xtra" tval */ diff --git a/src/realm-hissatsu.c b/src/realm-hissatsu.c index e4534ea9c..ffec50aad 100644 --- a/src/realm-hissatsu.c +++ b/src/realm-hissatsu.c @@ -446,7 +446,7 @@ concptr do_hissatsu_spell(SPELL_IDX spell, BIT_FLAGS mode) case 16: if (name) return _("捨て身", "Desperate Attack"); if (desc) return _("強力な攻撃を繰り出す。次のターンまでの間、食らうダメージが増える。", - "Attacks with all of your power. But all damages you take will be doubled for one turn."); + "Attacks with all of your power. But all damages you take will be doubled for one current_world_ptr->game_turn."); if (cast) { diff --git a/src/realm-song.c b/src/realm-song.c index 8ee338e31..73f787058 100644 --- a/src/realm-song.c +++ b/src/realm-song.c @@ -262,7 +262,7 @@ concptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode) if (cast) { msg_print(_("静かな音楽が感覚を研ぎ澄まさせた...", "Your quiet music sharpens your sense of hearing...")); - /* Hack -- Initialize the turn count */ + /* Hack -- Initialize the current_world_ptr->game_turn count */ SINGING_COUNT(p_ptr) = 0; start_singing(spell, MUSIC_DETECT); } diff --git a/src/report.c b/src/report.c index ed034e33c..993e08005 100644 --- a/src/report.c +++ b/src/report.c @@ -473,7 +473,7 @@ errr report_score(void) buf_sprintf(score, "maxlv: %d\n", p_ptr->max_plv); buf_sprintf(score, "maxdp: %d\n", max_dlv[DUNGEON_ANGBAND]); buf_sprintf(score, "au: %d\n", p_ptr->au); - buf_sprintf(score, "turns: %d\n", turn_real(turn)); + buf_sprintf(score, "turns: %d\n", turn_real(current_world_ptr->game_turn)); buf_sprintf(score, "sex: %d\n", p_ptr->psex); buf_sprintf(score, "race: %s\n", rp_ptr->title); buf_sprintf(score, "class: %s\n", cp_ptr->title); diff --git a/src/rooms.c b/src/rooms.c index f36c2a182..5868722fb 100644 --- a/src/rooms.c +++ b/src/rooms.c @@ -1303,7 +1303,7 @@ bool generate_lake(POSITION y0, POSITION x0, POSITION xsize, POSITION ysize, int is_outer_bold(y0 + y - yhsize, x0 + x - xhsize)) place_extra_bold(y0 + y - yhsize, x0 + x - xhsize); - /* turn off icky flag (no longer needed.) */ + /* current_world_ptr->game_turn off icky flag (no longer needed.) */ current_floor_ptr->grid_array[y0 + y - yhsize][x0 + x - xhsize].info &= ~(CAVE_ICKY | CAVE_ROOM); /* Light lava */ diff --git a/src/save.c b/src/save.c index b75627af3..9e57fc479 100644 --- a/src/save.c +++ b/src/save.c @@ -825,8 +825,8 @@ static void wr_extra(void) /* Turn of last "feeling" */ wr_s32b(p_ptr->feeling_turn); - /* Current turn */ - wr_s32b(turn); + /* Current current_world_ptr->game_turn */ + wr_s32b(current_world_ptr->game_turn); wr_s32b(dungeon_turn); @@ -1771,7 +1771,7 @@ bool load_player(void) /* Paranoia */ - turn = 0; + current_world_ptr->game_turn = 0; /* Paranoia */ p_ptr->is_dead = FALSE; @@ -1891,8 +1891,8 @@ bool load_player(void) /* Paranoia */ if (!err) { - /* Invalid turn */ - if (!turn) err = -1; + /* Invalid current_world_ptr->game_turn */ + if (!current_world_ptr->game_turn) err = -1; /* Message (below) */ if (err) what = _("セーブファイルが壊れています", "Broken savefile"); diff --git a/src/scores.c b/src/scores.c index 3963342c3..873b4511b 100644 --- a/src/scores.c +++ b/src/scores.c @@ -481,8 +481,8 @@ errr top_twenty(void) sprintf(the_score.gold, "%9lu", (long)p_ptr->au); the_score.gold[9] = '\0'; - /* Save the current turn */ - sprintf(the_score.turns, "%9lu", (long)turn_real(turn)); + /* Save the current current_world_ptr->game_turn */ + sprintf(the_score.turns, "%9lu", (long)turn_real(current_world_ptr->game_turn)); the_score.turns[9] = '\0'; #ifdef HIGHSCORE_DATE_HACK @@ -602,8 +602,8 @@ errr predict_score(void) /* Save the current gold */ sprintf(the_score.gold, "%9lu", (long)p_ptr->au); - /* Save the current turn */ - sprintf(the_score.turns, "%9lu", (long)turn_real(turn)); + /* Save the current current_world_ptr->game_turn */ + sprintf(the_score.turns, "%9lu", (long)turn_real(current_world_ptr->game_turn)); /* Hack -- no time needed */ strcpy(the_score.day, _("今日", "TODAY")); diff --git a/src/selfinfo.c b/src/selfinfo.c index 72bdc2857..191eb3a47 100644 --- a/src/selfinfo.c +++ b/src/selfinfo.c @@ -302,7 +302,7 @@ void self_knowledge(void) break; case RACE_GOLEM: if (plev > 19) - info[i++] = _("あなたは d20+30 ターンの間肌を石に変化させられる。(15 MP)", "You can turn your skin to stone, dur d20+30 (cost 15)."); + info[i++] = _("あなたは d20+30 ターンの間肌を石に変化させられる。(15 MP)", "You can current_world_ptr->game_turn your skin to stone, dur d20+30 (cost 15)."); break; case RACE_ZOMBIE: case RACE_SKELETON: @@ -501,7 +501,7 @@ void self_knowledge(void) case CLASS_CAVALRY: if (plev > 9) { - info[i++] = _("あなたはモンスターに乗って無理矢理ペットにすることができる。", "You can ride on a hostile monster forcibly to turn it into pet."); + info[i++] = _("あなたはモンスターに乗って無理矢理ペットにすることができる。", "You can ride on a hostile monster forcibly to current_world_ptr->game_turn it into pet."); } break; case CLASS_BERSERKER: @@ -599,7 +599,7 @@ void self_knowledge(void) } if (p_ptr->muta1 & MUT1_MIDAS_TCH) { - info[i++] = _("あなたは通常アイテムを金に変えることができる。", "You can turn ordinary items to gold."); + info[i++] = _("あなたは通常アイテムを金に変えることができる。", "You can current_world_ptr->game_turn ordinary items to gold."); } if (p_ptr->muta1 & MUT1_GROW_MOLD) { diff --git a/src/shoot.c b/src/shoot.c index da42019c5..1edb19ce2 100644 --- a/src/shoot.c +++ b/src/shoot.c @@ -457,11 +457,11 @@ void exe_fire(INVENTORY_IDX item, object_type *j_ptr) } - /* Take a (partial) turn */ + /* Take a (partial) current_world_ptr->game_turn */ p_ptr->energy_use = (p_ptr->energy_use / thits); is_fired = TRUE; - /* Sniper - Difficult to shot twice at 1 turn */ + /* Sniper - Difficult to shot twice at 1 current_world_ptr->game_turn */ if (snipe_type == SP_DOUBLE) p_ptr->concent = (p_ptr->concent + 1) / 2; /* Sniper - Repeat shooting when double shots */ diff --git a/src/spells-world.c b/src/spells-world.c index 133a5c3f4..9c84e424f 100644 --- a/src/spells-world.c +++ b/src/spells-world.c @@ -17,7 +17,7 @@ bool set_gametime(void) /* Verify */ if (tmp_int >= dungeon_turn_limit) tmp_int = dungeon_turn_limit - 1; else if (tmp_int < 0) tmp_int = 0; - dungeon_turn = turn = tmp_int; + dungeon_turn = current_world_ptr->game_turn = tmp_int; return (TRUE); } diff --git a/src/spells1.c b/src/spells1.c index 35676e6eb..8d159c620 100644 --- a/src/spells1.c +++ b/src/spells1.c @@ -1577,7 +1577,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P dam /= 3; /* - * Powerful demons & undead can turn a mindcrafter's + * Powerful demons & undead can current_world_ptr->game_turn a mindcrafter's * attacks back on them */ if ((r_ptr->flags3 & (RF3_UNDEAD | RF3_DEMON)) && @@ -1668,7 +1668,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P dam /= 3; /* - * Powerful demons & undead can turn a mindcrafter's + * Powerful demons & undead can current_world_ptr->game_turn a mindcrafter's * attacks back on them */ if ((r_ptr->flags3 & (RF3_UNDEAD | RF3_DEMON)) && @@ -1776,7 +1776,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P do_conf = 0; /* - * Powerful demons & undead can turn a mindcrafter's + * Powerful demons & undead can current_world_ptr->game_turn a mindcrafter's * attacks back on them */ if ((r_ptr->flags3 & (RF3_UNDEAD | RF3_DEMON)) && diff --git a/src/spells2.c b/src/spells2.c index f671658dc..a66e6e185 100644 --- a/src/spells2.c +++ b/src/spells2.c @@ -1659,7 +1659,7 @@ bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate) * @details *
  *
- * This will turn some walls into floors and some floors into walls.
+ * This will current_world_ptr->game_turn some walls into floors and some floors into walls.
  *
  * The player will take damage and "jump" into a safe grid if possible,
  * otherwise, he will "tunnel" through the rubble instantaneously.
@@ -1671,7 +1671,7 @@ bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate)
  * Note that thus the player and monsters (except eaters of walls and
  * passers through walls) will never occupy the same grid as a wall.
  * Note that as of now (2.7.8) no monster may occupy a "wall" grid, even
- * for a single turn, unless that monster can pass_walls or kill_walls.
+ * for a single current_world_ptr->game_turn, unless that monster can pass_walls or kill_walls.
  * This has allowed massive simplification of the "monster" code.
  * 
*/ diff --git a/src/spells3.c b/src/spells3.c index ca22199d8..b000e057f 100644 --- a/src/spells3.c +++ b/src/spells3.c @@ -1933,7 +1933,7 @@ bool alchemy(void) if (command_arg > 0) force = TRUE; q = _("どのアイテムを金に変えますか?", "Turn which item to gold? "); - s = _("金に変えられる物がありません。", "You have nothing to turn to gold."); + s = _("金に変えられる物がありません。", "You have nothing to current_world_ptr->game_turn to gold."); o_ptr = choose_object(&item, q, s, (USE_INVEN | USE_FLOOR)); if (!o_ptr) return (FALSE); @@ -1959,7 +1959,7 @@ bool alchemy(void) if (confirm_destroy || (object_value(o_ptr) > 0)) { /* Make a verification */ - sprintf(out_val, _("本当に%sを金に変えますか?", "Really turn %s to gold? "), o_name); + sprintf(out_val, _("本当に%sを金に変えますか?", "Really current_world_ptr->game_turn %s to gold? "), o_name); if (!get_check(out_val)) return FALSE; } } @@ -1967,7 +1967,7 @@ bool alchemy(void) /* Artifacts cannot be destroyed */ if (!can_player_destroy_object(o_ptr)) { - msg_format(_("%sを金に変えることに失敗した。", "You fail to turn %s to gold!"), o_name); + msg_format(_("%sを金に変えることに失敗した。", "You fail to current_world_ptr->game_turn %s to gold!"), o_name); return FALSE; } @@ -1976,7 +1976,7 @@ bool alchemy(void) if (price <= 0) { - msg_format(_("%sをニセの金に変えた。", "You turn %s to fool's gold."), o_name); + msg_format(_("%sをニセの金に変えた。", "You current_world_ptr->game_turn %s to fool's gold."), o_name); } else { @@ -1985,7 +1985,7 @@ bool alchemy(void) if (amt > 1) price *= amt; if (price > 30000) price = 30000; - msg_format(_("%sを$%d の金に変えた。", "You turn %s to %ld coins worth of gold."), o_name, price); + msg_format(_("%sを$%d の金に変えた。", "You current_world_ptr->game_turn %s to %ld coins worth of gold."), o_name, price); p_ptr->au += price; p_ptr->redraw |= (PR_GOLD); @@ -2343,7 +2343,7 @@ bool identify_item(object_type *o_ptr) p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER); strcpy(record_o_name, o_name); - record_turn = turn; + record_turn = current_world_ptr->game_turn; object_desc(o_name, o_ptr, OD_NAME_ONLY); diff --git a/src/store.c b/src/store.c index 895b6d51a..db58b6080 100644 --- a/src/store.c +++ b/src/store.c @@ -3921,7 +3921,7 @@ static int increase_insults(void) st_ptr->bad_buy = 0; /* Open tomorrow */ - st_ptr->store_open = turn + TURNS_PER_TICK*TOWN_DAWN/8 + randint1(TURNS_PER_TICK*TOWN_DAWN/8); + st_ptr->store_open = current_world_ptr->game_turn + TURNS_PER_TICK*TOWN_DAWN/8 + randint1(TURNS_PER_TICK*TOWN_DAWN/8); /* Closed */ return (TRUE); @@ -4680,7 +4680,7 @@ static void store_purchase(void) choice = purchase_haggle(j_ptr, &price); /* Hack -- Got kicked out */ - if (st_ptr->store_open >= turn) return; + if (st_ptr->store_open >= current_world_ptr->game_turn) return; } /* Player wants it */ @@ -4724,7 +4724,7 @@ static void store_purchase(void) msg_format(_("%sを $%ldで購入しました。", "You bought %s for %ld gold."), o_name, (long)price); strcpy(record_o_name, o_name); - record_turn = turn; + record_turn = current_world_ptr->game_turn; if (record_buy) do_cmd_write_nikki(NIKKI_BUY, 0, o_name); object_desc(o_name, o_ptr, OD_NAME_ONLY); @@ -5007,7 +5007,7 @@ static void store_sell(void) choice = sell_haggle(q_ptr, &price); /* Kicked out */ - if (st_ptr->store_open >= turn) return; + if (st_ptr->store_open >= current_world_ptr->game_turn) return; /* Sold... */ if (choice == 0) @@ -5730,7 +5730,7 @@ void do_cmd_store(void) inner_town_num = p_ptr->town_num; /* Hack -- Check the "locked doors" */ - if ((town_info[p_ptr->town_num].store[which].store_open >= turn) || + if ((town_info[p_ptr->town_num].store[which].store_open >= current_world_ptr->game_turn) || (ironman_shops)) { msg_print(_("ドアに鍵がかかっている。", "The doors are locked.")); @@ -5739,7 +5739,7 @@ void do_cmd_store(void) } /* Calculate the number of store maintainances since the last visit */ - maintain_num = (turn - town_info[p_ptr->town_num].store[which].last_visit) / (TURNS_PER_TICK * STORE_TICKS); + maintain_num = (current_world_ptr->game_turn - town_info[p_ptr->town_num].store[which].last_visit) / (TURNS_PER_TICK * STORE_TICKS); /* Maintain the store max. 10 times */ if (maintain_num > 10) maintain_num = 10; @@ -5751,7 +5751,7 @@ void do_cmd_store(void) store_maint(p_ptr->town_num, which); /* Save the visit */ - town_info[p_ptr->town_num].store[which].last_visit = turn; + town_info[p_ptr->town_num].store[which].last_visit = current_world_ptr->game_turn; } forget_lite(); @@ -5932,7 +5932,7 @@ void do_cmd_store(void) if (need_redraw_store_inv) display_inventory(); /* Hack -- get kicked out of the store */ - if (st_ptr->store_open >= turn) leave_store = TRUE; + if (st_ptr->store_open >= current_world_ptr->game_turn) leave_store = TRUE; } select_floor_music(); diff --git a/src/tables.c b/src/tables.c index 3ad2c0278..603995dbb 100644 --- a/src/tables.c +++ b/src/tables.c @@ -1137,7 +1137,7 @@ const byte adj_chr_chm[] = * @brief * 魅力による魅了能力修正テーブル / * This table is used to help calculate the number of blows the player can - * make in a single round of attacks (one player turn) with a normal weapon. + * make in a single round of attacks (one player current_world_ptr->game_turn) with a normal weapon. * @details *
  * This number ranges from a single blow/round for weak players to up to six
@@ -1266,11 +1266,11 @@ const arena_type arena_info[MAX_ARENA_MONS + 2] =
  * Note that the table has been changed at high speeds.  From
  * "Slow (-40)" to "Fast (+30)" is pretty much unchanged, but
  * at speeds above "Fast (+30)", one approaches an asymptotic
- * effective limit of 50 energy per turn.  This means that it
+ * effective limit of 50 energy per current_world_ptr->game_turn.  This means that it
  * is relatively easy to reach "Fast (+30)" and get about 40
- * energy per turn, but then speed becomes very "expensive",
+ * energy per current_world_ptr->game_turn, but then speed becomes very "expensive",
  * and you must get all the way to "Fast (+50)" to reach the
- * point of getting 45 energy per turn.  After that point,
+ * point of getting 45 energy per current_world_ptr->game_turn.  After that point,
  * furthur increases in speed are more or less pointless,
  * except to balance out heavy inventory.
  *
diff --git a/src/trap.c b/src/trap.c
index f36aa5d5e..7eccfce82 100644
--- a/src/trap.c
+++ b/src/trap.c
@@ -280,7 +280,7 @@ static void hit_trap_slow(void)
 * @param trap_message メッセージの補完文字列
 * @param resist 状態異常に抵抗する判定が出たならTRUE
 * @param set_status 状態異常を指定する関数ポインタ
-* @param turn 状態異常の追加ターン量
+* @param current_world_ptr->game_turn 状態異常の追加ターン量
 * @return なし
 */
 static void hit_trap_set_abnormal_status(concptr trap_message, bool resist, bool(*set_status)(IDX), IDX turn_aux)
diff --git a/src/types.h b/src/types.h
index 8d5c8443b..bc2e4b737 100644
--- a/src/types.h
+++ b/src/types.h
@@ -786,9 +786,9 @@ struct store_type
 	s16b good_buy;			/* Number of "good" buys */
 	s16b bad_buy;			/* Number of "bad" buys */
 
-	s32b store_open;		/* Closed until this turn */
+	s32b store_open;		/* Closed until this current_world_ptr->game_turn */
 
-	s32b last_visit;		/* Last visited on this turn */
+	s32b last_visit;		/* Last visited on this current_world_ptr->game_turn */
 
 	s16b table_num;			/* Table -- Number of entries */
 	s16b table_size;		/* Table -- Total Size of Array */
@@ -1284,7 +1284,7 @@ struct player_type
 	bool autopick_autoregister; /* auto register is in-use or not */
 
 	byte feeling;		/* Most recent dungeon feeling */
-	s32b feeling_turn;	/* The turn of the last dungeon feeling */
+	s32b feeling_turn;	/* The current_world_ptr->game_turn of the last dungeon feeling */
 
 
 	/*** Temporary fields ***/
@@ -1502,7 +1502,7 @@ struct player_type
 
 	byte pspeed;		/* Current speed */
 
-	ENERGY energy_use;	/* Energy use this turn */
+	ENERGY energy_use;	/* Energy use this current_world_ptr->game_turn */
 
 	POSITION y;	/* Player location in dungeon */
 	POSITION x;	/* Player location in dungeon */
@@ -1901,4 +1901,5 @@ typedef struct {
 	 */
 	POSITION max_wild_x;
 	POSITION max_wild_y;
+	GAME_TURN game_turn;				/*!< 画面表示上のゲーム時間基準となるターン / Current game turn */
 } world_type;
diff --git a/src/util.c b/src/util.c
index 017becb4b..0ef1de022 100644
--- a/src/util.c
+++ b/src/util.c
@@ -2820,7 +2820,7 @@ void msg_print(concptr msg)
 	}
 	else
 	{
-		sprintf(buf, ("T:%d - %s"), (int)turn, msg);
+		sprintf(buf, ("T:%d - %s"), (int)current_world_ptr->game_turn, msg);
 	}
 
 	/* New Message Length */
diff --git a/src/variable.c b/src/variable.c
index 153cb94cb..e6a7696ce 100644
--- a/src/variable.c
+++ b/src/variable.c
@@ -113,10 +113,9 @@ GAME_TURN resting;			/* Current counter for resting, if any */
 
 bool invoking_midnight_curse; /*!< 悪夢モード時の真夜中太古の呪い発生処理フラグ */
 
-GAME_TURN turn;				/*!< 画面表示上のゲーム時間基準となるターン / Current game turn */
-GAME_TURN turn_limit;		/*!< turnの最大値 / Limit of game turn */
-GAME_TURN dungeon_turn;			/*!< NASTY生成の計算に関わる内部ターン値 / Game turn in dungeon */
-GAME_TURN dungeon_turn_limit;	/*!< dungeon_turnの最大値 / Limit of game turn in dungeon */
+GAME_TURN turn_limit;		/*!< current_world_ptr->game_turnの最大値 / Limit of game current_world_ptr->game_turn */
+GAME_TURN dungeon_turn;			/*!< NASTY生成の計算に関わる内部ターン値 / Game current_world_ptr->game_turn in dungeon */
+GAME_TURN dungeon_turn_limit;	/*!< dungeon_turnの最大値 / Limit of game current_world_ptr->game_turn in dungeon */
 GAME_TURN old_turn;			/* Turn when level began */
 GAME_TURN old_battle;
 
diff --git a/src/wizard2.c b/src/wizard2.c
index 39b4e4dc5..d2f600d06 100644
--- a/src/wizard2.c
+++ b/src/wizard2.c
@@ -414,7 +414,7 @@ static void do_cmd_wiz_change(void)
  *     thus accepting the default-values for the remaining values.
  *     pval comes first now, since it is most important.
  * - wiz_reroll_item()
- *     apply some magic to the item or turn it into an artifact.
+ *     apply some magic to the item or current_world_ptr->game_turn it into an artifact.
  * - wiz_roll_item()
  *     Get some statistics about the rarity of an item:
  *     We create a lot of fake items and see if they are of the
@@ -762,7 +762,7 @@ static void wiz_tweak_item(object_type *o_ptr)
 
 /*!
  * @brief アイテムの質を選択して再生成する /
- * Apply magic to an item or turn it into an artifact. -Bernd-
+ * Apply magic to an item or current_world_ptr->game_turn it into an artifact. -Bernd-
  * @param o_ptr 再生成の対象となるアイテム情報の参照ポインタ
  * @return なし
  */
diff --git a/src/world.c b/src/world.c
index 0b49c2610..a58882cab 100644
--- a/src/world.c
+++ b/src/world.c
@@ -8,7 +8,7 @@
 bool is_daytime(void)
 {
 	s32b len = TURNS_PER_TICK * TOWN_DAWN;
-	if ((turn % len) < (len / 2))
+	if ((current_world_ptr->game_turn % len) < (len / 2))
 		return TRUE;
 	else
 		return FALSE;
@@ -24,7 +24,7 @@ bool is_daytime(void)
 void extract_day_hour_min(int *day, int *hour, int *min)
 {
 	const s32b A_DAY = TURNS_PER_TICK * TOWN_DAWN;
-	s32b turn_in_today = (turn + A_DAY / 4) % A_DAY;
+	s32b turn_in_today = (current_world_ptr->game_turn + A_DAY / 4) % A_DAY;
 
 	switch (p_ptr->start_race)
 	{
@@ -32,10 +32,10 @@ void extract_day_hour_min(int *day, int *hour, int *min)
 	case RACE_SKELETON:
 	case RACE_ZOMBIE:
 	case RACE_SPECTRE:
-		*day = (turn - A_DAY * 3 / 4) / A_DAY + 1;
+		*day = (current_world_ptr->game_turn - A_DAY * 3 / 4) / A_DAY + 1;
 		break;
 	default:
-		*day = (turn + A_DAY / 4) / A_DAY + 1;
+		*day = (current_world_ptr->game_turn + A_DAY / 4) / A_DAY + 1;
 		break;
 	}
 	*hour = (24 * turn_in_today / A_DAY) % 24;
diff --git a/src/z-config.h b/src/z-config.h
index d98056b7b..b32000470 100644
--- a/src/z-config.h
+++ b/src/z-config.h
@@ -138,7 +138,7 @@
  * some weird tricks with "player_uid" and such involving "defines".
  * Note that this option used the AFS library routines Authenticate(),
  * bePlayer(), beGames() to enforce the proper priviledges.
- * You may need to turn "SAFE_SETUID" off to use this option.
+ * You may need to current_world_ptr->game_turn "SAFE_SETUID" off to use this option.
  */
 /* #define SECURE */
 
-- 
2.11.0