• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision204838009a6b997e71091a08ecd7515708da6d0d (tree)
Time2019-02-28 14:03:26
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #38995 world_type 構造体に turn を game_turn に改名して取り込む。 / Rename turn to game_turn and move to world_type structure.

Change Summary

Incremental Difference

--- a/src/autopick.c
+++ b/src/autopick.c
@@ -5994,16 +5994,16 @@ void do_cmd_edit_autopick(void)
59945994 tb->dirty_line = -1;
59955995 tb->filename_mode = PT_DEFAULT;
59965996
5997- if (turn < old_autosave_turn)
5997+ if (current_world_ptr->game_turn < old_autosave_turn)
59985998 {
5999- while (old_autosave_turn > turn) old_autosave_turn -= TURNS_PER_TICK * TOWN_DAWN;
5999+ while (old_autosave_turn > current_world_ptr->game_turn) old_autosave_turn -= TURNS_PER_TICK * TOWN_DAWN;
60006000 }
60016001
60026002 /* Autosave */
6003- if (turn > old_autosave_turn + 100L)
6003+ if (current_world_ptr->game_turn > old_autosave_turn + 100L)
60046004 {
60056005 do_cmd_save_game(TRUE);
6006- old_autosave_turn = turn;
6006+ old_autosave_turn = current_world_ptr->game_turn;
60076007 }
60086008
60096009 /* HACK -- Reset start_time to stop counting playtime while edit */
--- a/src/birth.c
+++ b/src/birth.c
@@ -1884,7 +1884,7 @@ static void init_dungeon_quests(void)
18841884 }
18851885
18861886 /*!
1887- * @brief ゲームターンを初期化する / Reset turn
1887+ * @brief ゲームターンを初期化する / Reset current_world_ptr->game_turn
18881888 * @details アンデッド系種族は開始時刻を夜からにする。
18891889 * @return なし
18901890 */
@@ -1896,12 +1896,12 @@ static void init_turn(void)
18961896 (p_ptr->prace == RACE_SPECTRE))
18971897 {
18981898 /* Undead start just after midnight */
1899- turn = (TURNS_PER_TICK*3 * TOWN_DAWN) / 4 + 1;
1899+ current_world_ptr->game_turn = (TURNS_PER_TICK*3 * TOWN_DAWN) / 4 + 1;
19001900 turn_limit = TURNS_PER_TICK * TOWN_DAWN * MAX_DAYS + TURNS_PER_TICK * TOWN_DAWN * 3 / 4;
19011901 }
19021902 else
19031903 {
1904- turn = 1;
1904+ current_world_ptr->game_turn = 1;
19051905 turn_limit = TURNS_PER_TICK * TOWN_DAWN * (MAX_DAYS - 1) + TURNS_PER_TICK * TOWN_DAWN * 3 / 4;
19061906 }
19071907
@@ -4119,7 +4119,7 @@ static bool player_birth_aux(void)
41194119 /* Clear */
41204120 clear_from(10);
41214121
4122- /* Reset turn; before auto-roll and after choosing race */
4122+ /* Reset current_world_ptr->game_turn; before auto-roll and after choosing race */
41234123 init_turn();
41244124
41254125 /*** Generate ***/
--- a/src/bldg.c
+++ b/src/bldg.c
@@ -1466,10 +1466,10 @@ static bool kakutoujou(void)
14661466 char out_val[160], tmp_str[80];
14671467 concptr p;
14681468
1469- if ((turn - old_battle) > TURNS_PER_TICK*250)
1469+ if ((current_world_ptr->game_turn - old_battle) > TURNS_PER_TICK*250)
14701470 {
14711471 battle_monsters();
1472- old_battle = turn;
1472+ old_battle = current_world_ptr->game_turn;
14731473 }
14741474
14751475 screen_save();
@@ -1938,7 +1938,7 @@ static bool inn_comm(int cmd)
19381938 }
19391939 else
19401940 {
1941- s32b oldturn = turn;
1941+ s32b oldturn = current_world_ptr->game_turn;
19421942 int prev_day, prev_hour, prev_min;
19431943
19441944 extract_day_hour_min(&prev_day, &prev_hour, &prev_min);
@@ -1947,10 +1947,10 @@ static bool inn_comm(int cmd)
19471947 else
19481948 do_cmd_write_nikki(NIKKI_BUNSHOU, 0, _("宿屋に泊まった。", "stay over night at the inn."));
19491949
1950- turn = (turn / (TURNS_PER_TICK * TOWN_DAWN / 2) + 1) * (TURNS_PER_TICK * TOWN_DAWN / 2);
1950+ current_world_ptr->game_turn = (current_world_ptr->game_turn / (TURNS_PER_TICK * TOWN_DAWN / 2) + 1) * (TURNS_PER_TICK * TOWN_DAWN / 2);
19511951 if (dungeon_turn < dungeon_turn_limit)
19521952 {
1953- dungeon_turn += MIN((turn - oldturn), TURNS_PER_TICK * 250) * INN_DUNGEON_TURN_ADJ;
1953+ dungeon_turn += MIN((current_world_ptr->game_turn - oldturn), TURNS_PER_TICK * 250) * INN_DUNGEON_TURN_ADJ;
19541954 if (dungeon_turn > dungeon_turn_limit) dungeon_turn = dungeon_turn_limit;
19551955 }
19561956
--- a/src/chest.c
+++ b/src/chest.c
@@ -17,7 +17,7 @@
1717 * Small chests often contain "gold", while Large chests always contain
1818 * items. Wooden chests contain 2 items, Iron chests contain 4 items,
1919 * and Steel chests contain 6 items. The "value" of the items in a
20-* chest is based on the "power" of the chest, which is in turn based
20+* chest is based on the "power" of the chest, which is in current_world_ptr->game_turn based
2121 * on the level on which the chest is generated.
2222 * </pre>
2323 */
--- 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)
342342 * <pre>
343343 * Currently, only (some) artifacts, and Dragon Scale Mail, can be activated.
344344 * But one could, for example, easily make an activatable "Ring of Plasma".
345- * Note that it always takes a turn to activate an artifact, even if
345+ * Note that it always takes a current_world_ptr->game_turn to activate an artifact, even if
346346 * the user hits "escape" at the "direction" prompt.
347347 * </pre>
348348 */
--- a/src/cmd-item.c
+++ b/src/cmd-item.c
@@ -432,7 +432,7 @@ void do_cmd_wield(void)
432432 o_ptr->ident |= (IDENT_SENSE);
433433 }
434434
435- /* The Stone Mask make the player turn into a vampire! */
435+ /* The Stone Mask make the player current_world_ptr->game_turn into a vampire! */
436436 if ((o_ptr->name1 == ART_STONEMASK) && (p_ptr->prace != RACE_VAMPIRE) && (p_ptr->prace != RACE_ANDROID))
437437 {
438438 /* Turn into a vampire */
--- a/src/cmd-read.c
+++ b/src/cmd-read.c
@@ -28,7 +28,7 @@
2828 * <pre>
2929 * Certain scrolls can be "aborted" without losing the scroll. These
3030 * include scrolls with no effects but recharge or identify, which are
31- * cancelled before use. XXX Reading them still takes a turn, though.
31+ * cancelled before use. XXX Reading them still takes a current_world_ptr->game_turn, though.
3232 * </pre>
3333 */
3434 void do_cmd_read_scroll_aux(INVENTORY_IDX item, bool known)
--- a/src/cmd-spell.c
+++ b/src/cmd-spell.c
@@ -1201,7 +1201,7 @@ void do_cmd_cast(void)
12011201 /* Process spell */
12021202 else
12031203 {
1204- /* Canceled spells cost neither a turn nor mana */
1204+ /* Canceled spells cost neither a current_world_ptr->game_turn nor mana */
12051205 if (!do_spell(realm, spell, SPELL_CAST)) return;
12061206
12071207 if (randint1(100) < chance)
--- a/src/cmd2.c
+++ b/src/cmd2.c
@@ -450,7 +450,7 @@ void do_cmd_go_down(void)
450450
451451
452452 /*!
453- * @brief 探索コマンドのメインルーチン / Simple command to "search" for one turn
453+ * @brief 探索コマンドのメインルーチン / Simple command to "search" for one current_world_ptr->game_turn
454454 * @return なし
455455 */
456456 void do_cmd_search(void)
@@ -1182,7 +1182,7 @@ static bool do_cmd_tunnel_aux(POSITION y, POSITION x)
11821182 * @details
11831183 * <pre>
11841184 * Note that you must tunnel in order to hit invisible monsters
1185- * in walls, though moving into walls still takes a turn anyway.
1185+ * in walls, though moving into walls still takes a current_world_ptr->game_turn anyway.
11861186 *
11871187 * Digging is very difficult without a "digger" weapon, but can be
11881188 * accomplished by strong players using heavy weapons.
@@ -1801,7 +1801,7 @@ void do_cmd_bash(void)
18011801 *
18021802 * Consider confusion
18031803 *
1804- * This command must always take a turn, to prevent free detection
1804+ * This command must always take a current_world_ptr->game_turn, to prevent free detection
18051805 * of invisible monsters.
18061806 * </pre>
18071807 */
@@ -2195,7 +2195,7 @@ void do_cmd_rest(void)
21952195
21962196 if (p_ptr->special_defense & NINJA_S_STEALTH) set_superstealth(FALSE);
21972197
2198- /* Take a turn (?) */
2198+ /* Take a current_world_ptr->game_turn (?) */
21992199 take_turn(p_ptr, 100);
22002200
22012201 /* The sin of sloth */
--- a/src/cmd4.c
+++ b/src/cmd4.c
@@ -852,11 +852,11 @@ static void do_cmd_last_get(void)
852852 sprintf(buf,_("%sの入手を記録します。", "Do you really want to record getting %s? "),record_o_name);
853853 if (!get_check(buf)) return;
854854
855- turn_tmp = turn;
856- turn = record_turn;
855+ turn_tmp = current_world_ptr->game_turn;
856+ current_world_ptr->game_turn = record_turn;
857857 sprintf(buf,_("%sを手に入れた。", "descover %s."), record_o_name);
858858 do_cmd_write_nikki(NIKKI_BUNSHOU, 0, buf);
859- turn = turn_tmp;
859+ current_world_ptr->game_turn = turn_tmp;
860860 }
861861
862862 /*!
--- a/src/defines.h
+++ b/src/defines.h
@@ -4677,8 +4677,8 @@ extern int PlayerUID;
46774677 #define IS_WIZARD_CLASS() \
46784678 (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)
46794679
4680-/* Multishadow effects is determined by turn */
4681-#define CHECK_MULTISHADOW() (p_ptr->multishadow && (turn & 1))
4680+/* Multishadow effects is determined by current_world_ptr->game_turn */
4681+#define CHECK_MULTISHADOW() (p_ptr->multishadow && (current_world_ptr->game_turn & 1))
46824682
46834683 /* Is "teleport level" ineffective to this target? */
46844684 #define TELE_LEVEL_IS_INEFF(TARGET) \
--- a/src/dungeon.c
+++ b/src/dungeon.c
@@ -1026,7 +1026,7 @@ static void notice_lite_change(object_type *o_ptr)
10261026 else if (o_ptr->name2 == EGO_LITE_LONG)
10271027 {
10281028 if ((o_ptr->xtra4 < 50) && (!(o_ptr->xtra4 % 5))
1029- && (turn % (TURNS_PER_TICK*2)))
1029+ && (current_world_ptr->game_turn % (TURNS_PER_TICK*2)))
10301030 {
10311031 if (disturb_minor) disturb(FALSE, TRUE);
10321032 msg_print(_("明かりが微かになってきている。", "Your light is growing faint."));
@@ -1313,7 +1313,7 @@ static void process_world_aux_digestion(void)
13131313 }
13141314
13151315 /* Digest normally -- Every 50 game turns */
1316- else if (!(turn % (TURNS_PER_TICK * 5)))
1316+ else if (!(current_world_ptr->game_turn % (TURNS_PER_TICK * 5)))
13171317 {
13181318 /* Basic digestion rate based on speed */
13191319 int digestion = SPEED_TO_ENERGY(p_ptr->pspeed);
@@ -2165,7 +2165,7 @@ static void process_world_aux_light(void)
21652165 /* Decrease life-span */
21662166 if (o_ptr->name2 == EGO_LITE_LONG)
21672167 {
2168- if (turn % (TURNS_PER_TICK*2)) o_ptr->xtra4--;
2168+ if (current_world_ptr->game_turn % (TURNS_PER_TICK*2)) o_ptr->xtra4--;
21692169 }
21702170 else o_ptr->xtra4--;
21712171
@@ -2905,7 +2905,7 @@ static void process_world_aux_recharge(void)
29052905 /*
29062906 * Recharge rods. Rods now use timeout to control charging status,
29072907 * and each charging rod in a stack decreases the stack's timeout by
2908- * one per turn. -LM-
2908+ * one per current_world_ptr->game_turn. -LM-
29092909 */
29102910 for (changed = FALSE, i = 0; i < INVEN_PACK; i++)
29112911 {
@@ -3334,7 +3334,7 @@ static void update_dungeon_feeling(void)
33343334 delay = MAX(10, 150 - p_ptr->skill_fos) * (150 - current_floor_ptr->dun_level) * TURNS_PER_TICK / 100;
33353335
33363336 /* Not yet felt anything */
3337- if (turn < p_ptr->feeling_turn + delay && !cheat_xtra) return;
3337+ if (current_world_ptr->game_turn < p_ptr->feeling_turn + delay && !cheat_xtra) return;
33383338
33393339 /* Extract quest number (if any) */
33403340 quest_num = quest_number(current_floor_ptr->dun_level);
@@ -3350,7 +3350,7 @@ static void update_dungeon_feeling(void)
33503350 new_feeling = get_dungeon_feeling();
33513351
33523352 /* Remember last time updated */
3353- p_ptr->feeling_turn = turn;
3353+ p_ptr->feeling_turn = current_world_ptr->game_turn;
33543354
33553355 /* No change */
33563356 if (p_ptr->feeling == new_feeling) return;
@@ -3379,7 +3379,7 @@ static void process_world(void)
33793379 int day, hour, min;
33803380
33813381 const s32b A_DAY = TURNS_PER_TICK * TOWN_DAWN;
3382- s32b prev_turn_in_today = ((turn - TURNS_PER_TICK) % A_DAY + A_DAY / 4) % A_DAY;
3382+ s32b prev_turn_in_today = ((current_world_ptr->game_turn - TURNS_PER_TICK) % A_DAY + A_DAY / 4) % A_DAY;
33833383 int prev_min = (1440 * prev_turn_in_today / A_DAY) % 60;
33843384
33853385 extract_day_hour_min(&day, &hour, &min);
@@ -3450,7 +3450,7 @@ static void process_world(void)
34503450 p_ptr->energy_need = 0;
34513451 battle_monsters();
34523452 }
3453- else if (turn - old_turn == 150 * TURNS_PER_TICK)
3453+ else if (current_world_ptr->game_turn - old_turn == 150 * TURNS_PER_TICK)
34543454 {
34553455 msg_print(_("申し分けありませんが、この勝負は引き分けとさせていただきます。", "This battle have ended in a draw."));
34563456 p_ptr->au += kakekin;
@@ -3461,11 +3461,11 @@ static void process_world(void)
34613461 }
34623462
34633463 /* Every 10 game turns */
3464- if (turn % TURNS_PER_TICK) return;
3464+ if (current_world_ptr->game_turn % TURNS_PER_TICK) return;
34653465
34663466 /*** Check the Time and Load ***/
34673467
3468- if (!(turn % (50*TURNS_PER_TICK)))
3468+ if (!(current_world_ptr->game_turn % (50*TURNS_PER_TICK)))
34693469 {
34703470 /* Check time and load */
34713471 if ((0 != check_time()) || (0 != check_load()))
@@ -3500,7 +3500,7 @@ static void process_world(void)
35003500 /*** Attempt timed autosave ***/
35013501 if (autosave_t && autosave_freq && !p_ptr->inside_battle)
35023502 {
3503- if (!(turn % ((s32b)autosave_freq * TURNS_PER_TICK)))
3503+ if (!(current_world_ptr->game_turn % ((s32b)autosave_freq * TURNS_PER_TICK)))
35043504 do_cmd_save_game(TRUE);
35053505 }
35063506
@@ -3515,12 +3515,12 @@ static void process_world(void)
35153515 if (!current_floor_ptr->dun_level && !p_ptr->inside_quest && !p_ptr->inside_battle && !p_ptr->inside_arena)
35163516 {
35173517 /* Hack -- Daybreak/Nighfall in town */
3518- if (!(turn % ((TURNS_PER_TICK * TOWN_DAWN) / 2)))
3518+ if (!(current_world_ptr->game_turn % ((TURNS_PER_TICK * TOWN_DAWN) / 2)))
35193519 {
35203520 bool dawn;
35213521
35223522 /* Check for dawn */
3523- dawn = (!(turn % (TURNS_PER_TICK * TOWN_DAWN)));
3523+ dawn = (!(current_world_ptr->game_turn % (TURNS_PER_TICK * TOWN_DAWN)));
35243524
35253525 if (dawn) day_break();
35263526 else night_falls();
@@ -3534,7 +3534,7 @@ static void process_world(void)
35343534 /*** Shuffle the Storekeepers ***/
35353535
35363536 /* Chance is only once a day (while in dungeon) */
3537- if (!(turn % (TURNS_PER_TICK * STORE_TICKS)))
3537+ if (!(current_world_ptr->game_turn % (TURNS_PER_TICK * STORE_TICKS)))
35383538 {
35393539 /* Sometimes, shuffle the shop-keepers */
35403540 if (one_in_(STORE_SHUFFLE))
@@ -3588,8 +3588,8 @@ static void process_world(void)
35883588 }
35893589
35903590 /* Hack -- Check for creature regeneration */
3591- if (!(turn % (TURNS_PER_TICK * 10)) && !p_ptr->inside_battle) regen_monsters();
3592- if (!(turn % (TURNS_PER_TICK * 3))) regen_captured_monsters();
3591+ if (!(current_world_ptr->game_turn % (TURNS_PER_TICK * 10)) && !p_ptr->inside_battle) regen_monsters();
3592+ if (!(current_world_ptr->game_turn % (TURNS_PER_TICK * 3))) regen_captured_monsters();
35933593
35943594 if (!p_ptr->leaving)
35953595 {
@@ -4696,7 +4696,7 @@ static void process_upkeep_with_speed(void)
46964696 p_ptr->enchant_energy_need -= SPEED_TO_ENERGY(p_ptr->pspeed);
46974697 }
46984698
4699- /* No turn yet */
4699+ /* No current_world_ptr->game_turn yet */
47004700 if (p_ptr->enchant_energy_need > 0) return;
47014701
47024702 while (p_ptr->enchant_energy_need <= 0)
@@ -4762,7 +4762,7 @@ static void process_player(void)
47624762 p_ptr->energy_need -= SPEED_TO_ENERGY(p_ptr->pspeed);
47634763 }
47644764
4765- /* No turn yet */
4765+ /* No current_world_ptr->game_turn yet */
47664766 if (p_ptr->energy_need > 0) return;
47674767 if (!command_rep) prt_time();
47684768
@@ -4984,7 +4984,7 @@ static void process_player(void)
49844984 /* Hack -- cancel "lurking browse mode" */
49854985 if (!command_new) command_see = FALSE;
49864986
4987- /* Assume free turn */
4987+ /* Assume free current_world_ptr->game_turn */
49884988 free_turn(p_ptr);
49894989
49904990 if (p_ptr->inside_battle)
@@ -5496,12 +5496,12 @@ static void dungeon(bool load_game)
54965496 if (!p_ptr->playing || p_ptr->is_dead) break;
54975497
54985498 /* Count game turns */
5499- turn++;
5499+ current_world_ptr->game_turn++;
55005500
55015501 if (dungeon_turn < dungeon_turn_limit)
55025502 {
55035503 if (!p_ptr->wild_mode || wild_regen) dungeon_turn++;
5504- else if (p_ptr->wild_mode && !(turn % ((MAX_HGT + MAX_WID) / 2))) dungeon_turn++;
5504+ else if (p_ptr->wild_mode && !(current_world_ptr->game_turn % ((MAX_HGT + MAX_WID) / 2))) dungeon_turn++;
55055505 }
55065506
55075507 prevent_turn_overflow();
@@ -5783,7 +5783,7 @@ void play_game(bool new_game)
57835783 }
57845784 }
57855785
5786- /* Hack -- turn off the cursor */
5786+ /* Hack -- current_world_ptr->game_turn off the cursor */
57875787 (void)Term_set_cursor(0);
57885788
57895789
@@ -6228,13 +6228,13 @@ void prevent_turn_overflow(void)
62286228 int rollback_days, i, j;
62296229 s32b rollback_turns;
62306230
6231- if (turn < turn_limit) return;
6231+ if (current_world_ptr->game_turn < turn_limit) return;
62326232
6233- rollback_days = 1 + (turn - turn_limit) / (TURNS_PER_TICK * TOWN_DAWN);
6233+ rollback_days = 1 + (current_world_ptr->game_turn - turn_limit) / (TURNS_PER_TICK * TOWN_DAWN);
62346234 rollback_turns = TURNS_PER_TICK * TOWN_DAWN * rollback_days;
62356235
6236- if (turn > rollback_turns) turn -= rollback_turns;
6237- else turn = 1; /* Paranoia */
6236+ if (current_world_ptr->game_turn > rollback_turns) current_world_ptr->game_turn -= rollback_turns;
6237+ else current_world_ptr->game_turn = 1; /* Paranoia */
62386238 if (old_turn > rollback_turns) old_turn -= rollback_turns;
62396239 else old_turn = 1;
62406240 if (old_battle > rollback_turns) old_battle -= rollback_turns;
--- a/src/effects.c
+++ b/src/effects.c
@@ -1241,7 +1241,7 @@ bool set_wraith_form(TIME_EFFECT v, bool do_dec)
12411241 }
12421242 else if (!p_ptr->wraith_form)
12431243 {
1244- msg_print(_("物質界を離れて幽鬼のような存在になった!", "You leave the physical world and turn into a wraith-being!"));
1244+ msg_print(_("物質界を離れて幽鬼のような存在になった!", "You leave the physical world and current_world_ptr->game_turn into a wraith-being!"));
12451245 notice = TRUE;
12461246 chg_virtue(V_UNLIFE, 3);
12471247 chg_virtue(V_HONOUR, -2);
@@ -3655,7 +3655,7 @@ void change_race(CHARACTER_IDX new_race, concptr effect_msg)
36553655 #ifdef JP
36563656 msg_format("あなたは%s%sに変化した!", effect_msg, title);
36573657 #else
3658- msg_format("You turn into %s %s%s!", (!effect_msg[0] && is_a_vowel(title[0]) ? "an" : "a"), effect_msg, title);
3658+ 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);
36593659 #endif
36603660
36613661 chg_virtue(V_CHANCE, 2);
--- a/src/externs.h
+++ b/src/externs.h
@@ -160,7 +160,6 @@ extern bool msg_flag;
160160 extern s16b running;
161161 extern GAME_TURN resting;
162162 extern bool invoking_midnight_curse;
163-extern GAME_TURN turn;
164163 extern GAME_TURN turn_limit;
165164 extern GAME_TURN dungeon_turn;
166165 extern GAME_TURN dungeon_turn_limit;
--- a/src/files.c
+++ b/src/files.c
@@ -564,8 +564,8 @@ errr process_pref_file_command(char *buf)
564564 }
565565 break;
566566
567- /* Process "X:<str>" -- turn option off */
568- /* Process "Y:<str>" -- turn option on */
567+ /* Process "X:<str>" -- current_world_ptr->game_turn option off */
568+ /* Process "Y:<str>" -- current_world_ptr->game_turn option on */
569569 case 'X':
570570 case 'Y':
571571 for (i = 0; option_info[i].o_desc; i++)
@@ -6880,7 +6880,7 @@ void exit_game_panic(void)
68806880 /* Clear the top line */
68816881 prt("", 0, 0);
68826882
6883- /* Hack -- turn off some things */
6883+ /* Hack -- current_world_ptr->game_turn off some things */
68846884 disturb(TRUE, TRUE);
68856885
68866886 /* Mega-Hack -- Delay death */
--- a/src/flavor.c
+++ b/src/flavor.c
@@ -2391,7 +2391,7 @@ void object_desc(char *buf, object_type *o_ptr, BIT_FLAGS mode)
23912391 t = object_desc_num(t, fire_rate/100);
23922392 t = object_desc_chr(t, '.');
23932393 t = object_desc_num(t, fire_rate%100);
2394- t = object_desc_str(t, "turn");
2394+ t = object_desc_str(t, "current_world_ptr->game_turn");
23952395 t = object_desc_chr(t, p2);
23962396 }
23972397
@@ -2490,7 +2490,7 @@ void object_desc(char *buf, object_type *o_ptr, BIT_FLAGS mode)
24902490 avgdam *= (p_ptr->num_fire * 100);
24912491 avgdam /= energy_fire;
24922492 t = object_desc_num(t, avgdam);
2493- t = object_desc_str(t, show_ammo_detail ? "/turn" : "");
2493+ t = object_desc_str(t, show_ammo_detail ? "/current_world_ptr->game_turn" : "");
24942494
24952495 if(show_ammo_crit_ratio)
24962496 {
--- a/src/floor-generate.c
+++ b/src/floor-generate.c
@@ -661,7 +661,7 @@ static bool cave_gen(void)
661661 int tunnel_fail_count = 0;
662662
663663 /*
664- * Build each type of room in turn until we cannot build any more.
664+ * Build each type of room in current_world_ptr->game_turn until we cannot build any more.
665665 */
666666 if (!generate_rooms()) return FALSE;
667667
--- a/src/floor-save.c
+++ b/src/floor-save.c
@@ -1052,8 +1052,8 @@ void leave_floor(void)
10521052 /* Get out of the my way! */
10531053 get_out_monster();
10541054
1055- /* Record the last visit turn of current floor */
1056- sf_ptr->last_visit = turn;
1055+ /* Record the last visit current_world_ptr->game_turn of current floor */
1056+ sf_ptr->last_visit = current_world_ptr->game_turn;
10571057
10581058 forget_lite();
10591059 forget_view();
@@ -1194,8 +1194,8 @@ void change_floor(void)
11941194 int alloc_chance = d_info[p_ptr->dungeon_idx].max_m_alloc_chance;
11951195 GAME_TURN alloc_times;
11961196
1197- while (tmp_last_visit > turn) tmp_last_visit -= TURNS_PER_TICK * TOWN_DAWN;
1198- absence_ticks = (turn - tmp_last_visit) / TURNS_PER_TICK;
1197+ while (tmp_last_visit > current_world_ptr->game_turn) tmp_last_visit -= TURNS_PER_TICK * TOWN_DAWN;
1198+ absence_ticks = (current_world_ptr->game_turn - tmp_last_visit) / TURNS_PER_TICK;
11991199
12001200 /* Maintain monsters */
12011201 for (i = 1; i < m_max; i++)
@@ -1302,8 +1302,8 @@ void change_floor(void)
13021302 generate_random_floor();
13031303 }
13041304
1305- /* Record last visit turn */
1306- sf_ptr->last_visit = turn;
1305+ /* Record last visit current_world_ptr->game_turn */
1306+ sf_ptr->last_visit = current_world_ptr->game_turn;
13071307
13081308 /* Set correct current_floor_ptr->dun_level value */
13091309 sf_ptr->dun_level = current_floor_ptr->dun_level;
@@ -1358,9 +1358,9 @@ void change_floor(void)
13581358 /*
13591359 * Update visit mark
13601360 *
1361- * The "turn" is not always different number because
1362- * the level teleport doesn't take any turn. Use
1363- * visit mark instead of last visit turn to find the
1361+ * The "current_world_ptr->game_turn" is not always different number because
1362+ * the level teleport doesn't take any current_world_ptr->game_turn. Use
1363+ * visit mark instead of last visit current_world_ptr->game_turn to find the
13641364 * oldest saved floor.
13651365 */
13661366 sf_ptr->visit_mark = latest_visit_mark++;
@@ -1386,7 +1386,7 @@ void change_floor(void)
13861386 wiz_lite((bool)(p_ptr->pclass == CLASS_NINJA));
13871387
13881388 /* Remember when this level was "created" */
1389- old_turn = turn;
1389+ old_turn = current_world_ptr->game_turn;
13901390
13911391 /* No dungeon feeling yet */
13921392 p_ptr->feeling_turn = old_turn;
--- a/src/gameoption.c
+++ b/src/gameoption.c
@@ -173,7 +173,7 @@ bool cheat_know; /* Know complete monster info */
173173 bool cheat_live; /* Allow player to avoid death */
174174 bool cheat_save; /* Ask for saving death */
175175 bool cheat_diary_output; /* Detailed info to diary */
176-bool cheat_turn; /* Peek turn */
176+bool cheat_turn; /* Peek current_world_ptr->game_turn */
177177 bool cheat_sight;
178178
179179
@@ -611,7 +611,7 @@ const option_type cheat_info[CHEAT_MAX] =
611611 },
612612
613613 { &cheat_turn, FALSE, 255, 0x81, 0x00,
614- "cheat_turn", _("ゲームメッセージにターン表示を行う", "Put turn to game message.")
614+ "cheat_turn", _("ゲームメッセージにターン表示を行う", "Put current_world_ptr->game_turn to game message.")
615615 },
616616
617617 { &cheat_sight, FALSE, 255, 0x82, 0x00,
--- a/src/grid.c
+++ b/src/grid.c
@@ -4920,7 +4920,7 @@ static int scent_when = 0;
49204920 * current position, and monsters can use it to home in the character,
49214921 * but not to run away from him.
49224922 *
4923- * Smell is valued according to age. When a character takes his turn,
4923+ * Smell is valued according to age. When a character takes his current_world_ptr->game_turn,
49244924 * scent is aged by one, and new scent of the current age is laid down.
49254925 * Speedy characters leave more scent, true, but it also ages faster,
49264926 * which makes it harder to hunt them down.
--- a/src/load.c
+++ b/src/load.c
@@ -2277,12 +2277,12 @@ static void rd_extra(void)
22772277 rd_s32b(&p_ptr->feeling_turn);
22782278 }
22792279
2280- /* Current turn */
2281- rd_s32b(&turn);
2280+ /* Current current_world_ptr->game_turn */
2281+ rd_s32b(&current_world_ptr->game_turn);
22822282
22832283 if (z_older_than(10, 3, 12))
22842284 {
2285- dungeon_turn = turn;
2285+ dungeon_turn = current_world_ptr->game_turn;
22862286 }
22872287 else rd_s32b(&dungeon_turn);
22882288
@@ -2290,13 +2290,13 @@ static void rd_extra(void)
22902290 {
22912291 old_turn /= 2;
22922292 p_ptr->feeling_turn /= 2;
2293- turn /= 2;
2293+ current_world_ptr->game_turn /= 2;
22942294 dungeon_turn /= 2;
22952295 }
22962296
22972297 if (z_older_than(10, 3, 13))
22982298 {
2299- old_battle = turn;
2299+ old_battle = current_world_ptr->game_turn;
23002300 }
23012301 else rd_s32b(&old_battle);
23022302
--- a/src/monster-process.c
+++ b/src/monster-process.c
@@ -2851,7 +2851,7 @@ void process_monster(MONSTER_IDX m_idx)
28512851 do_move = FALSE;
28522852 }
28532853
2854- /* In anti-melee dungeon, stupid or confused monster takes useless turn */
2854+ /* In anti-melee dungeon, stupid or confused monster takes useless current_world_ptr->game_turn */
28552855 if (do_move && (d_info[p_ptr->dungeon_idx].flags1 & DF1_NO_MELEE))
28562856 {
28572857 if (!MON_CONFUSED(m_ptr))
@@ -2875,7 +2875,7 @@ void process_monster(MONSTER_IDX m_idx)
28752875 /* Do not move */
28762876 do_move = FALSE;
28772877
2878- /* Took a turn */
2878+ /* Took a current_world_ptr->game_turn */
28792879 do_turn = TRUE;
28802880 }
28812881 }
@@ -2907,7 +2907,7 @@ void process_monster(MONSTER_IDX m_idx)
29072907 {
29082908 if (monst_attack_monst(m_idx, g_ptr->m_idx)) return;
29092909
2910- /* In anti-melee dungeon, stupid or confused monster takes useless turn */
2910+ /* In anti-melee dungeon, stupid or confused monster takes useless current_world_ptr->game_turn */
29112911 else if (d_info[p_ptr->dungeon_idx].flags1 & DF1_NO_MELEE)
29122912 {
29132913 if (MON_CONFUSED(m_ptr)) return;
@@ -3273,10 +3273,10 @@ void process_monster(MONSTER_IDX m_idx)
32733273
32743274 /*!
32753275 * @brief 全モンスターのターン管理メインルーチン /
3276- * Process all the "live" monsters, once per game turn.
3276+ * Process all the "live" monsters, once per game current_world_ptr->game_turn.
32773277 * @return なし
32783278 * @details
3279- * During each game turn, we scan through the list of all the "live" monsters,\n
3279+ * During each game current_world_ptr->game_turn, we scan through the list of all the "live" monsters,\n
32803280 * (backwards, so we can excise any "freshly dead" monsters), energizing each\n
32813281 * monster, and allowing fully energized monsters to move, attack, pass, etc.\n
32823282 *\n
@@ -3295,8 +3295,8 @@ void process_monster(MONSTER_IDX m_idx)
32953295 *\n
32963296 * Note the special "MFLAG_BORN" flag, which allows us to ignore "fresh"\n
32973297 * monsters while they are still being "born". A monster is "fresh" only\n
3298- * during the turn in which it is created, and we use the "hack_m_idx" to\n
3299- * determine if the monster is yet to be processed during the current turn.\n
3298+ * during the current_world_ptr->game_turn in which it is created, and we use the "hack_m_idx" to\n
3299+ * determine if the monster is yet to be processed during the current current_world_ptr->game_turn.\n
33003300 *\n
33013301 * Note the special "MFLAG_NICE" flag, which allows the player to get one\n
33023302 * move before any "nasty" monsters get to use their spell attacks.\n
--- a/src/monster2.c
+++ b/src/monster2.c
@@ -2085,11 +2085,11 @@ void sanity_blast(monster_type *m_ptr, bool necro)
20852085 {
20862086 if ((p_ptr->stat_use[A_INT] < 4) && (p_ptr->stat_use[A_WIS] < 4))
20872087 {
2088- msg_print(_("あなたは完璧な馬鹿になったような気がした。しかしそれは元々だった。", "You turn into an utter moron!"));
2088+ msg_print(_("あなたは完璧な馬鹿になったような気がした。しかしそれは元々だった。", "You current_world_ptr->game_turn into an utter moron!"));
20892089 }
20902090 else
20912091 {
2092- msg_print(_("あなたは完璧な馬鹿になった!", "You turn into an utter moron!"));
2092+ msg_print(_("あなたは完璧な馬鹿になった!", "You current_world_ptr->game_turn into an utter moron!"));
20932093 }
20942094
20952095 if (p_ptr->muta3 & MUT3_HYPER_INT)
--- a/src/mutation.c
+++ b/src/mutation.c
@@ -429,7 +429,7 @@ bool gain_random_mutation(int choose_mut)
429429 case 120: case 121: case 122:
430430 muta_class = &(p_ptr->muta3);
431431 muta_which = MUT3_HYPER_STR;
432- muta_desc = _( "超人的に強くなった!", "You turn into a superhuman he-man!");
432+ muta_desc = _( "超人的に強くなった!", "You current_world_ptr->game_turn into a superhuman he-man!");
433433
434434 break;
435435 case 123: case 124: case 125:
@@ -465,7 +465,7 @@ bool gain_random_mutation(int choose_mut)
465465 case 136: case 137:
466466 muta_class = &(p_ptr->muta3);
467467 muta_which = MUT3_ALBINO;
468- muta_desc = _( "アルビノになった!弱くなった気がする...", "You turn into an albino! You feel frail...");
468+ muta_desc = _( "アルビノになった!弱くなった気がする...", "You current_world_ptr->game_turn into an albino! You feel frail...");
469469
470470 break;
471471 case 138: case 139: case 140:
@@ -525,7 +525,7 @@ bool gain_random_mutation(int choose_mut)
525525 case 159: case 160:
526526 muta_class = &(p_ptr->muta3);
527527 muta_which = MUT3_SHORT_LEG;
528- muta_desc = _( "足が短い突起になってしまった!", "Your legs turn into short stubs!");
528+ muta_desc = _( "足が短い突起になってしまった!", "Your legs current_world_ptr->game_turn into short stubs!");
529529
530530 break;
531531 case 161: case 162:
@@ -1601,7 +1601,7 @@ void dump_mutations(FILE *OutFile)
16011601 }
16021602 if (p_ptr->muta1 & MUT1_MIDAS_TCH)
16031603 {
1604- fprintf(OutFile, _(" あなたは通常アイテムを金に変えることができる。\n", " You can turn ordinary items to gold.\n"));
1604+ fprintf(OutFile, _(" あなたは通常アイテムを金に変えることができる。\n", " You can current_world_ptr->game_turn ordinary items to gold.\n"));
16051605
16061606 }
16071607 if (p_ptr->muta1 & MUT1_GROW_MOLD)
--- a/src/object1.c
+++ b/src/object1.c
@@ -428,8 +428,8 @@ static concptr item_activation_aux(object_type *o_ptr)
428428 constant = act_ptr->timeout.constant;
429429 dice = act_ptr->timeout.dice;
430430 if (constant == 0 && dice == 0) {
431- /* We can activate it every turn */
432- strcpy(timeout, _("いつでも", "every turn"));
431+ /* We can activate it every current_world_ptr->game_turn */
432+ strcpy(timeout, _("いつでも", "every current_world_ptr->game_turn"));
433433 } else if (constant < 0) {
434434 /* Activations that have special timeout */
435435 switch (act_ptr->index) {
@@ -558,7 +558,7 @@ bool screen_object(object_type *o_ptr, BIT_FLAGS mode)
558558 /* Figurines, a hack */
559559 if (o_ptr->name1 == ART_STONEMASK)
560560 {
561- info[i++] = _("それを装備した者は吸血鬼になる。", "It makes you turn into a vampire permanently.");
561+ info[i++] = _("それを装備した者は吸血鬼になる。", "It makes you current_world_ptr->game_turn into a vampire permanently.");
562562 }
563563
564564 if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI))
--- a/src/player-move.c
+++ b/src/player-move.c
@@ -108,7 +108,7 @@
108108 * entirely open.
109109 *
110110 * Corners: If you are not in the open (i.e. you are in a corridor)
111- * and there is only one way to go in the new squares, then turn in
111+ * and there is only one way to go in the new squares, then current_world_ptr->game_turn in
112112 * that direction. If there are more than two new ways to go, STOP.
113113 * If there are two ways to go, and those ways are separated by a
114114 * square which does not seem to be open, then STOP.
@@ -530,7 +530,7 @@ void py_pickup_aux(OBJECT_IDX o_idx)
530530 msg_format("You have %s (%c).", o_name, index_to_label(slot));
531531 strcpy(record_o_name, o_name);
532532 #endif
533- record_turn = turn;
533+ record_turn = current_world_ptr->game_turn;
534534
535535
536536 check_find_art_quest_completion(o_ptr);
@@ -1096,7 +1096,7 @@ bool trap_can_be_ignored(FEAT_IDX feat)
10961096 * @note
10971097 * This routine should (probably) always induce energy expenditure.\n
10981098 * @details
1099- * Note that moving will *always* take a turn, and will *always* hit\n
1099+ * Note that moving will *always* take a current_world_ptr->game_turn, and will *always* hit\n
11001100 * any monster which might be in the destination grid. Previously,\n
11011101 * moving into walls was "free" and did NOT hit invisible monsters.\n
11021102 */
@@ -1435,7 +1435,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
14351435 /*
14361436 * Well, it makes sense that you lose time bumping into
14371437 * a wall _if_ you are confused, stunned or blind; but
1438- * typing mistakes should not cost you a turn...
1438+ * typing mistakes should not cost you a current_world_ptr->game_turn...
14391439 */
14401440 if (!(p_ptr->confused || p_ptr->stun || p_ptr->image))
14411441 free_turn(p_ptr);
@@ -1623,7 +1623,7 @@ static bool find_breakleft;
16231623 * Diagonal Corridor -- allow diaginal entry into corridors.\n
16241624 *\n
16251625 * Blunt Corridor -- If there is a wall two spaces ahead and\n
1626- * we seem to be in a corridor, then force a turn into the side\n
1626+ * we seem to be in a corridor, then force a current_world_ptr->game_turn into the side\n
16271627 * corridor, must be moving straight into a corridor here. ???\n
16281628 *\n
16291629 * Diagonal Corridor Blunt Corridor (?)\n
--- a/src/player-status.c
+++ b/src/player-status.c
@@ -162,11 +162,11 @@ void calc_bonuses(void)
162162 /* Start with "normal" speed */
163163 new_speed = 110;
164164
165- /* Start with a single blow per turn */
165+ /* Start with a single blow per current_world_ptr->game_turn */
166166 p_ptr->num_blow[0] = 1;
167167 p_ptr->num_blow[1] = 1;
168168
169- /* Start with a single shot per turn */
169+ /* Start with a single shot per current_world_ptr->game_turn */
170170 p_ptr->num_fire = 100;
171171
172172 /* Reset the "xtra" tval */
--- a/src/realm-hissatsu.c
+++ b/src/realm-hissatsu.c
@@ -446,7 +446,7 @@ concptr do_hissatsu_spell(SPELL_IDX spell, BIT_FLAGS mode)
446446 case 16:
447447 if (name) return _("捨て身", "Desperate Attack");
448448 if (desc) return _("強力な攻撃を繰り出す。次のターンまでの間、食らうダメージが増える。",
449- "Attacks with all of your power. But all damages you take will be doubled for one turn.");
449+ "Attacks with all of your power. But all damages you take will be doubled for one current_world_ptr->game_turn.");
450450
451451 if (cast)
452452 {
--- a/src/realm-song.c
+++ b/src/realm-song.c
@@ -262,7 +262,7 @@ concptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
262262 if (cast)
263263 {
264264 msg_print(_("静かな音楽が感覚を研ぎ澄まさせた...", "Your quiet music sharpens your sense of hearing..."));
265- /* Hack -- Initialize the turn count */
265+ /* Hack -- Initialize the current_world_ptr->game_turn count */
266266 SINGING_COUNT(p_ptr) = 0;
267267 start_singing(spell, MUSIC_DETECT);
268268 }
--- a/src/report.c
+++ b/src/report.c
@@ -473,7 +473,7 @@ errr report_score(void)
473473 buf_sprintf(score, "maxlv: %d\n", p_ptr->max_plv);
474474 buf_sprintf(score, "maxdp: %d\n", max_dlv[DUNGEON_ANGBAND]);
475475 buf_sprintf(score, "au: %d\n", p_ptr->au);
476- buf_sprintf(score, "turns: %d\n", turn_real(turn));
476+ buf_sprintf(score, "turns: %d\n", turn_real(current_world_ptr->game_turn));
477477 buf_sprintf(score, "sex: %d\n", p_ptr->psex);
478478 buf_sprintf(score, "race: %s\n", rp_ptr->title);
479479 buf_sprintf(score, "class: %s\n", cp_ptr->title);
--- a/src/rooms.c
+++ b/src/rooms.c
@@ -1303,7 +1303,7 @@ bool generate_lake(POSITION y0, POSITION x0, POSITION xsize, POSITION ysize, int
13031303 is_outer_bold(y0 + y - yhsize, x0 + x - xhsize))
13041304 place_extra_bold(y0 + y - yhsize, x0 + x - xhsize);
13051305
1306- /* turn off icky flag (no longer needed.) */
1306+ /* current_world_ptr->game_turn off icky flag (no longer needed.) */
13071307 current_floor_ptr->grid_array[y0 + y - yhsize][x0 + x - xhsize].info &= ~(CAVE_ICKY | CAVE_ROOM);
13081308
13091309 /* Light lava */
--- a/src/save.c
+++ b/src/save.c
@@ -825,8 +825,8 @@ static void wr_extra(void)
825825 /* Turn of last "feeling" */
826826 wr_s32b(p_ptr->feeling_turn);
827827
828- /* Current turn */
829- wr_s32b(turn);
828+ /* Current current_world_ptr->game_turn */
829+ wr_s32b(current_world_ptr->game_turn);
830830
831831 wr_s32b(dungeon_turn);
832832
@@ -1771,7 +1771,7 @@ bool load_player(void)
17711771
17721772
17731773 /* Paranoia */
1774- turn = 0;
1774+ current_world_ptr->game_turn = 0;
17751775
17761776 /* Paranoia */
17771777 p_ptr->is_dead = FALSE;
@@ -1891,8 +1891,8 @@ bool load_player(void)
18911891 /* Paranoia */
18921892 if (!err)
18931893 {
1894- /* Invalid turn */
1895- if (!turn) err = -1;
1894+ /* Invalid current_world_ptr->game_turn */
1895+ if (!current_world_ptr->game_turn) err = -1;
18961896
18971897 /* Message (below) */
18981898 if (err) what = _("セーブファイルが壊れています", "Broken savefile");
--- a/src/scores.c
+++ b/src/scores.c
@@ -481,8 +481,8 @@ errr top_twenty(void)
481481 sprintf(the_score.gold, "%9lu", (long)p_ptr->au);
482482 the_score.gold[9] = '\0';
483483
484- /* Save the current turn */
485- sprintf(the_score.turns, "%9lu", (long)turn_real(turn));
484+ /* Save the current current_world_ptr->game_turn */
485+ sprintf(the_score.turns, "%9lu", (long)turn_real(current_world_ptr->game_turn));
486486 the_score.turns[9] = '\0';
487487
488488 #ifdef HIGHSCORE_DATE_HACK
@@ -602,8 +602,8 @@ errr predict_score(void)
602602 /* Save the current gold */
603603 sprintf(the_score.gold, "%9lu", (long)p_ptr->au);
604604
605- /* Save the current turn */
606- sprintf(the_score.turns, "%9lu", (long)turn_real(turn));
605+ /* Save the current current_world_ptr->game_turn */
606+ sprintf(the_score.turns, "%9lu", (long)turn_real(current_world_ptr->game_turn));
607607
608608 /* Hack -- no time needed */
609609 strcpy(the_score.day, _("今日", "TODAY"));
--- a/src/selfinfo.c
+++ b/src/selfinfo.c
@@ -302,7 +302,7 @@ void self_knowledge(void)
302302 break;
303303 case RACE_GOLEM:
304304 if (plev > 19)
305- info[i++] = _("あなたは d20+30 ターンの間肌を石に変化させられる。(15 MP)", "You can turn your skin to stone, dur d20+30 (cost 15).");
305+ info[i++] = _("あなたは d20+30 ターンの間肌を石に変化させられる。(15 MP)", "You can current_world_ptr->game_turn your skin to stone, dur d20+30 (cost 15).");
306306 break;
307307 case RACE_ZOMBIE:
308308 case RACE_SKELETON:
@@ -501,7 +501,7 @@ void self_knowledge(void)
501501 case CLASS_CAVALRY:
502502 if (plev > 9)
503503 {
504- info[i++] = _("あなたはモンスターに乗って無理矢理ペットにすることができる。", "You can ride on a hostile monster forcibly to turn it into pet.");
504+ info[i++] = _("あなたはモンスターに乗って無理矢理ペットにすることができる。", "You can ride on a hostile monster forcibly to current_world_ptr->game_turn it into pet.");
505505 }
506506 break;
507507 case CLASS_BERSERKER:
@@ -599,7 +599,7 @@ void self_knowledge(void)
599599 }
600600 if (p_ptr->muta1 & MUT1_MIDAS_TCH)
601601 {
602- info[i++] = _("あなたは通常アイテムを金に変えることができる。", "You can turn ordinary items to gold.");
602+ info[i++] = _("あなたは通常アイテムを金に変えることができる。", "You can current_world_ptr->game_turn ordinary items to gold.");
603603 }
604604 if (p_ptr->muta1 & MUT1_GROW_MOLD)
605605 {
--- a/src/shoot.c
+++ b/src/shoot.c
@@ -457,11 +457,11 @@ void exe_fire(INVENTORY_IDX item, object_type *j_ptr)
457457 }
458458
459459
460- /* Take a (partial) turn */
460+ /* Take a (partial) current_world_ptr->game_turn */
461461 p_ptr->energy_use = (p_ptr->energy_use / thits);
462462 is_fired = TRUE;
463463
464- /* Sniper - Difficult to shot twice at 1 turn */
464+ /* Sniper - Difficult to shot twice at 1 current_world_ptr->game_turn */
465465 if (snipe_type == SP_DOUBLE) p_ptr->concent = (p_ptr->concent + 1) / 2;
466466
467467 /* Sniper - Repeat shooting when double shots */
--- a/src/spells-world.c
+++ b/src/spells-world.c
@@ -17,7 +17,7 @@ bool set_gametime(void)
1717 /* Verify */
1818 if (tmp_int >= dungeon_turn_limit) tmp_int = dungeon_turn_limit - 1;
1919 else if (tmp_int < 0) tmp_int = 0;
20- dungeon_turn = turn = tmp_int;
20+ dungeon_turn = current_world_ptr->game_turn = tmp_int;
2121 return (TRUE);
2222
2323 }
--- 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
15771577 dam /= 3;
15781578
15791579 /*
1580- * Powerful demons & undead can turn a mindcrafter's
1580+ * Powerful demons & undead can current_world_ptr->game_turn a mindcrafter's
15811581 * attacks back on them
15821582 */
15831583 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
16681668 dam /= 3;
16691669
16701670 /*
1671- * Powerful demons & undead can turn a mindcrafter's
1671+ * Powerful demons & undead can current_world_ptr->game_turn a mindcrafter's
16721672 * attacks back on them
16731673 */
16741674 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
17761776 do_conf = 0;
17771777
17781778 /*
1779- * Powerful demons & undead can turn a mindcrafter's
1779+ * Powerful demons & undead can current_world_ptr->game_turn a mindcrafter's
17801780 * attacks back on them
17811781 */
17821782 if ((r_ptr->flags3 & (RF3_UNDEAD | RF3_DEMON)) &&
--- a/src/spells2.c
+++ b/src/spells2.c
@@ -1659,7 +1659,7 @@ bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate)
16591659 * @details
16601660 * <pre>
16611661 *
1662- * This will turn some walls into floors and some floors into walls.
1662+ * This will current_world_ptr->game_turn some walls into floors and some floors into walls.
16631663 *
16641664 * The player will take damage and "jump" into a safe grid if possible,
16651665 * otherwise, he will "tunnel" through the rubble instantaneously.
@@ -1671,7 +1671,7 @@ bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate)
16711671 * Note that thus the player and monsters (except eaters of walls and
16721672 * passers through walls) will never occupy the same grid as a wall.
16731673 * Note that as of now (2.7.8) no monster may occupy a "wall" grid, even
1674- * for a single turn, unless that monster can pass_walls or kill_walls.
1674+ * for a single current_world_ptr->game_turn, unless that monster can pass_walls or kill_walls.
16751675 * This has allowed massive simplification of the "monster" code.
16761676 * </pre>
16771677 */
--- a/src/spells3.c
+++ b/src/spells3.c
@@ -1933,7 +1933,7 @@ bool alchemy(void)
19331933 if (command_arg > 0) force = TRUE;
19341934
19351935 q = _("どのアイテムを金に変えますか?", "Turn which item to gold? ");
1936- s = _("金に変えられる物がありません。", "You have nothing to turn to gold.");
1936+ s = _("金に変えられる物がありません。", "You have nothing to current_world_ptr->game_turn to gold.");
19371937
19381938 o_ptr = choose_object(&item, q, s, (USE_INVEN | USE_FLOOR));
19391939 if (!o_ptr) return (FALSE);
@@ -1959,7 +1959,7 @@ bool alchemy(void)
19591959 if (confirm_destroy || (object_value(o_ptr) > 0))
19601960 {
19611961 /* Make a verification */
1962- sprintf(out_val, _("本当に%sを金に変えますか?", "Really turn %s to gold? "), o_name);
1962+ sprintf(out_val, _("本当に%sを金に変えますか?", "Really current_world_ptr->game_turn %s to gold? "), o_name);
19631963 if (!get_check(out_val)) return FALSE;
19641964 }
19651965 }
@@ -1967,7 +1967,7 @@ bool alchemy(void)
19671967 /* Artifacts cannot be destroyed */
19681968 if (!can_player_destroy_object(o_ptr))
19691969 {
1970- msg_format(_("%sを金に変えることに失敗した。", "You fail to turn %s to gold!"), o_name);
1970+ msg_format(_("%sを金に変えることに失敗した。", "You fail to current_world_ptr->game_turn %s to gold!"), o_name);
19711971
19721972 return FALSE;
19731973 }
@@ -1976,7 +1976,7 @@ bool alchemy(void)
19761976
19771977 if (price <= 0)
19781978 {
1979- msg_format(_("%sをニセの金に変えた。", "You turn %s to fool's gold."), o_name);
1979+ msg_format(_("%sをニセの金に変えた。", "You current_world_ptr->game_turn %s to fool's gold."), o_name);
19801980 }
19811981 else
19821982 {
@@ -1985,7 +1985,7 @@ bool alchemy(void)
19851985 if (amt > 1) price *= amt;
19861986
19871987 if (price > 30000) price = 30000;
1988- msg_format(_("%sを$%d の金に変えた。", "You turn %s to %ld coins worth of gold."), o_name, price);
1988+ msg_format(_("%sを$%d の金に変えた。", "You current_world_ptr->game_turn %s to %ld coins worth of gold."), o_name, price);
19891989
19901990 p_ptr->au += price;
19911991 p_ptr->redraw |= (PR_GOLD);
@@ -2343,7 +2343,7 @@ bool identify_item(object_type *o_ptr)
23432343 p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
23442344
23452345 strcpy(record_o_name, o_name);
2346- record_turn = turn;
2346+ record_turn = current_world_ptr->game_turn;
23472347
23482348 object_desc(o_name, o_ptr, OD_NAME_ONLY);
23492349
--- a/src/store.c
+++ b/src/store.c
@@ -3921,7 +3921,7 @@ static int increase_insults(void)
39213921 st_ptr->bad_buy = 0;
39223922
39233923 /* Open tomorrow */
3924- st_ptr->store_open = turn + TURNS_PER_TICK*TOWN_DAWN/8 + randint1(TURNS_PER_TICK*TOWN_DAWN/8);
3924+ st_ptr->store_open = current_world_ptr->game_turn + TURNS_PER_TICK*TOWN_DAWN/8 + randint1(TURNS_PER_TICK*TOWN_DAWN/8);
39253925
39263926 /* Closed */
39273927 return (TRUE);
@@ -4680,7 +4680,7 @@ static void store_purchase(void)
46804680 choice = purchase_haggle(j_ptr, &price);
46814681
46824682 /* Hack -- Got kicked out */
4683- if (st_ptr->store_open >= turn) return;
4683+ if (st_ptr->store_open >= current_world_ptr->game_turn) return;
46844684 }
46854685
46864686 /* Player wants it */
@@ -4724,7 +4724,7 @@ static void store_purchase(void)
47244724 msg_format(_("%sを $%ldで購入しました。", "You bought %s for %ld gold."), o_name, (long)price);
47254725
47264726 strcpy(record_o_name, o_name);
4727- record_turn = turn;
4727+ record_turn = current_world_ptr->game_turn;
47284728
47294729 if (record_buy) do_cmd_write_nikki(NIKKI_BUY, 0, o_name);
47304730 object_desc(o_name, o_ptr, OD_NAME_ONLY);
@@ -5007,7 +5007,7 @@ static void store_sell(void)
50075007 choice = sell_haggle(q_ptr, &price);
50085008
50095009 /* Kicked out */
5010- if (st_ptr->store_open >= turn) return;
5010+ if (st_ptr->store_open >= current_world_ptr->game_turn) return;
50115011
50125012 /* Sold... */
50135013 if (choice == 0)
@@ -5730,7 +5730,7 @@ void do_cmd_store(void)
57305730 inner_town_num = p_ptr->town_num;
57315731
57325732 /* Hack -- Check the "locked doors" */
5733- if ((town_info[p_ptr->town_num].store[which].store_open >= turn) ||
5733+ if ((town_info[p_ptr->town_num].store[which].store_open >= current_world_ptr->game_turn) ||
57345734 (ironman_shops))
57355735 {
57365736 msg_print(_("ドアに鍵がかかっている。", "The doors are locked."));
@@ -5739,7 +5739,7 @@ void do_cmd_store(void)
57395739 }
57405740
57415741 /* Calculate the number of store maintainances since the last visit */
5742- maintain_num = (turn - town_info[p_ptr->town_num].store[which].last_visit) / (TURNS_PER_TICK * STORE_TICKS);
5742+ maintain_num = (current_world_ptr->game_turn - town_info[p_ptr->town_num].store[which].last_visit) / (TURNS_PER_TICK * STORE_TICKS);
57435743
57445744 /* Maintain the store max. 10 times */
57455745 if (maintain_num > 10) maintain_num = 10;
@@ -5751,7 +5751,7 @@ void do_cmd_store(void)
57515751 store_maint(p_ptr->town_num, which);
57525752
57535753 /* Save the visit */
5754- town_info[p_ptr->town_num].store[which].last_visit = turn;
5754+ town_info[p_ptr->town_num].store[which].last_visit = current_world_ptr->game_turn;
57555755 }
57565756
57575757 forget_lite();
@@ -5932,7 +5932,7 @@ void do_cmd_store(void)
59325932 if (need_redraw_store_inv) display_inventory();
59335933
59345934 /* Hack -- get kicked out of the store */
5935- if (st_ptr->store_open >= turn) leave_store = TRUE;
5935+ if (st_ptr->store_open >= current_world_ptr->game_turn) leave_store = TRUE;
59365936 }
59375937
59385938 select_floor_music();
--- a/src/tables.c
+++ b/src/tables.c
@@ -1137,7 +1137,7 @@ const byte adj_chr_chm[] =
11371137 * @brief
11381138 * 魅力による魅了能力修正テーブル /
11391139 * This table is used to help calculate the number of blows the player can
1140- * make in a single round of attacks (one player turn) with a normal weapon.
1140+ * make in a single round of attacks (one player current_world_ptr->game_turn) with a normal weapon.
11411141 * @details
11421142 * <pre>
11431143 * 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] =
12661266 * Note that the table has been changed at high speeds. From
12671267 * "Slow (-40)" to "Fast (+30)" is pretty much unchanged, but
12681268 * at speeds above "Fast (+30)", one approaches an asymptotic
1269- * effective limit of 50 energy per turn. This means that it
1269+ * effective limit of 50 energy per current_world_ptr->game_turn. This means that it
12701270 * is relatively easy to reach "Fast (+30)" and get about 40
1271- * energy per turn, but then speed becomes very "expensive",
1271+ * energy per current_world_ptr->game_turn, but then speed becomes very "expensive",
12721272 * and you must get all the way to "Fast (+50)" to reach the
1273- * point of getting 45 energy per turn. After that point,
1273+ * point of getting 45 energy per current_world_ptr->game_turn. After that point,
12741274 * furthur increases in speed are more or less pointless,
12751275 * except to balance out heavy inventory.
12761276 *
--- a/src/trap.c
+++ b/src/trap.c
@@ -280,7 +280,7 @@ static void hit_trap_slow(void)
280280 * @param trap_message メッセージの補完文字列
281281 * @param resist 状態異常に抵抗する判定が出たならTRUE
282282 * @param set_status 状態異常を指定する関数ポインタ
283-* @param turn 状態異常の追加ターン量
283+* @param current_world_ptr->game_turn 状態異常の追加ターン量
284284 * @return なし
285285 */
286286 static void hit_trap_set_abnormal_status(concptr trap_message, bool resist, bool(*set_status)(IDX), IDX turn_aux)
--- a/src/types.h
+++ b/src/types.h
@@ -786,9 +786,9 @@ struct store_type
786786 s16b good_buy; /* Number of "good" buys */
787787 s16b bad_buy; /* Number of "bad" buys */
788788
789- s32b store_open; /* Closed until this turn */
789+ s32b store_open; /* Closed until this current_world_ptr->game_turn */
790790
791- s32b last_visit; /* Last visited on this turn */
791+ s32b last_visit; /* Last visited on this current_world_ptr->game_turn */
792792
793793 s16b table_num; /* Table -- Number of entries */
794794 s16b table_size; /* Table -- Total Size of Array */
@@ -1284,7 +1284,7 @@ struct player_type
12841284 bool autopick_autoregister; /* auto register is in-use or not */
12851285
12861286 byte feeling; /* Most recent dungeon feeling */
1287- s32b feeling_turn; /* The turn of the last dungeon feeling */
1287+ s32b feeling_turn; /* The current_world_ptr->game_turn of the last dungeon feeling */
12881288
12891289
12901290 /*** Temporary fields ***/
@@ -1502,7 +1502,7 @@ struct player_type
15021502
15031503 byte pspeed; /* Current speed */
15041504
1505- ENERGY energy_use; /* Energy use this turn */
1505+ ENERGY energy_use; /* Energy use this current_world_ptr->game_turn */
15061506
15071507 POSITION y; /* Player location in dungeon */
15081508 POSITION x; /* Player location in dungeon */
@@ -1901,4 +1901,5 @@ typedef struct {
19011901 */
19021902 POSITION max_wild_x;
19031903 POSITION max_wild_y;
1904+ GAME_TURN game_turn; /*!< 画面表示上のゲーム時間基準となるターン / Current game turn */
19041905 } world_type;
--- a/src/util.c
+++ b/src/util.c
@@ -2820,7 +2820,7 @@ void msg_print(concptr msg)
28202820 }
28212821 else
28222822 {
2823- sprintf(buf, ("T:%d - %s"), (int)turn, msg);
2823+ sprintf(buf, ("T:%d - %s"), (int)current_world_ptr->game_turn, msg);
28242824 }
28252825
28262826 /* New Message Length */
--- a/src/variable.c
+++ b/src/variable.c
@@ -113,10 +113,9 @@ GAME_TURN resting; /* Current counter for resting, if any */
113113
114114 bool invoking_midnight_curse; /*!< 悪夢モード時の真夜中太古の呪い発生処理フラグ */
115115
116-GAME_TURN turn; /*!< 画面表示上のゲーム時間基準となるターン / Current game turn */
117-GAME_TURN turn_limit; /*!< turnの最大値 / Limit of game turn */
118-GAME_TURN dungeon_turn; /*!< NASTY生成の計算に関わる内部ターン値 / Game turn in dungeon */
119-GAME_TURN dungeon_turn_limit; /*!< dungeon_turnの最大値 / Limit of game turn in dungeon */
116+GAME_TURN turn_limit; /*!< current_world_ptr->game_turnの最大値 / Limit of game current_world_ptr->game_turn */
117+GAME_TURN dungeon_turn; /*!< NASTY生成の計算に関わる内部ターン値 / Game current_world_ptr->game_turn in dungeon */
118+GAME_TURN dungeon_turn_limit; /*!< dungeon_turnの最大値 / Limit of game current_world_ptr->game_turn in dungeon */
120119 GAME_TURN old_turn; /* Turn when level began */
121120 GAME_TURN old_battle;
122121
--- a/src/wizard2.c
+++ b/src/wizard2.c
@@ -414,7 +414,7 @@ static void do_cmd_wiz_change(void)
414414 * thus accepting the default-values for the remaining values.
415415 * pval comes first now, since it is most important.
416416 * - wiz_reroll_item()
417- * apply some magic to the item or turn it into an artifact.
417+ * apply some magic to the item or current_world_ptr->game_turn it into an artifact.
418418 * - wiz_roll_item()
419419 * Get some statistics about the rarity of an item:
420420 * 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)
762762
763763 /*!
764764 * @brief アイテムの質を選択して再生成する /
765- * Apply magic to an item or turn it into an artifact. -Bernd-
765+ * Apply magic to an item or current_world_ptr->game_turn it into an artifact. -Bernd-
766766 * @param o_ptr 再生成の対象となるアイテム情報の参照ポインタ
767767 * @return なし
768768 */
--- a/src/world.c
+++ b/src/world.c
@@ -8,7 +8,7 @@
88 bool is_daytime(void)
99 {
1010 s32b len = TURNS_PER_TICK * TOWN_DAWN;
11- if ((turn % len) < (len / 2))
11+ if ((current_world_ptr->game_turn % len) < (len / 2))
1212 return TRUE;
1313 else
1414 return FALSE;
@@ -24,7 +24,7 @@ bool is_daytime(void)
2424 void extract_day_hour_min(int *day, int *hour, int *min)
2525 {
2626 const s32b A_DAY = TURNS_PER_TICK * TOWN_DAWN;
27- s32b turn_in_today = (turn + A_DAY / 4) % A_DAY;
27+ s32b turn_in_today = (current_world_ptr->game_turn + A_DAY / 4) % A_DAY;
2828
2929 switch (p_ptr->start_race)
3030 {
@@ -32,10 +32,10 @@ void extract_day_hour_min(int *day, int *hour, int *min)
3232 case RACE_SKELETON:
3333 case RACE_ZOMBIE:
3434 case RACE_SPECTRE:
35- *day = (turn - A_DAY * 3 / 4) / A_DAY + 1;
35+ *day = (current_world_ptr->game_turn - A_DAY * 3 / 4) / A_DAY + 1;
3636 break;
3737 default:
38- *day = (turn + A_DAY / 4) / A_DAY + 1;
38+ *day = (current_world_ptr->game_turn + A_DAY / 4) / A_DAY + 1;
3939 break;
4040 }
4141 *hour = (24 * turn_in_today / A_DAY) % 24;
--- a/src/z-config.h
+++ b/src/z-config.h
@@ -138,7 +138,7 @@
138138 * some weird tricks with "player_uid" and such involving "defines".
139139 * Note that this option used the AFS library routines Authenticate(),
140140 * bePlayer(), beGames() to enforce the proper priviledges.
141- * You may need to turn "SAFE_SETUID" off to use this option.
141+ * You may need to current_world_ptr->game_turn "SAFE_SETUID" off to use this option.
142142 */
143143 /* #define SECURE */
144144
Show on old repository browser