• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision286c3551eafa734842f86f1dbf3244e56d0b6a66 (tree)
Time2019-03-12 23:52:21
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #38844 ambush_flag to player_type.

Change Summary

Incremental Difference

--- a/src/externs.h
+++ b/src/externs.h
@@ -338,7 +338,6 @@ extern u32b start_time;
338338 extern bool sukekaku;
339339 extern bool new_mane;
340340 extern bool mon_fight;
341-extern bool ambush_flag;
342341 extern bool generate_encounter;
343342 extern concptr screen_dump;
344343
--- a/src/floor-save.c
+++ b/src/floor-save.c
@@ -1098,7 +1098,7 @@ void change_floor(void)
10981098 panel_col_max = 0;
10991099
11001100 /* Mega-Hack -- not ambushed on the wildness? */
1101- ambush_flag = FALSE;
1101+ p_ptr->ambush_flag = FALSE;
11021102
11031103 /* No saved floors (On the surface etc.) */
11041104 if (!(change_floor_mode & CFM_SAVE_FLOORS) &&
--- a/src/monster-status.c
+++ b/src/monster-status.c
@@ -1123,7 +1123,7 @@ bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, concptr note)
11231123
11241124 if (!(d_info[p_ptr->dungeon_idx].flags1 & DF1_BEGINNER))
11251125 {
1126- if (!current_floor_ptr->dun_level && !ambush_flag && !p_ptr->inside_arena)
1126+ if (!current_floor_ptr->dun_level && !p_ptr->ambush_flag && !p_ptr->inside_arena)
11271127 {
11281128 chg_virtue(V_VALOUR, -1);
11291129 }
--- a/src/player-move.c
+++ b/src/player-move.c
@@ -936,7 +936,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
936936 p_ptr->wilderness_x--;
937937 p_ptr->oldpy = current_floor_ptr->height - 2;
938938 p_ptr->oldpx = current_floor_ptr->width - 2;
939- ambush_flag = FALSE;
939+ p_ptr->ambush_flag = FALSE;
940940 }
941941
942942 else if ((y == 0) && (x == MAX_WID - 1))
@@ -945,7 +945,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
945945 p_ptr->wilderness_x++;
946946 p_ptr->oldpy = current_floor_ptr->height - 2;
947947 p_ptr->oldpx = 1;
948- ambush_flag = FALSE;
948+ p_ptr->ambush_flag = FALSE;
949949 }
950950
951951 else if ((y == MAX_HGT - 1) && (x == 0))
@@ -954,7 +954,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
954954 p_ptr->wilderness_x--;
955955 p_ptr->oldpy = 1;
956956 p_ptr->oldpx = current_floor_ptr->width - 2;
957- ambush_flag = FALSE;
957+ p_ptr->ambush_flag = FALSE;
958958 }
959959
960960 else if ((y == MAX_HGT - 1) && (x == MAX_WID - 1))
@@ -963,7 +963,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
963963 p_ptr->wilderness_x++;
964964 p_ptr->oldpy = 1;
965965 p_ptr->oldpx = 1;
966- ambush_flag = FALSE;
966+ p_ptr->ambush_flag = FALSE;
967967 }
968968
969969 else if (y == 0)
@@ -971,7 +971,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
971971 p_ptr->wilderness_y--;
972972 p_ptr->oldpy = current_floor_ptr->height - 2;
973973 p_ptr->oldpx = x;
974- ambush_flag = FALSE;
974+ p_ptr->ambush_flag = FALSE;
975975 }
976976
977977 else if (y == MAX_HGT - 1)
@@ -979,7 +979,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
979979 p_ptr->wilderness_y++;
980980 p_ptr->oldpy = 1;
981981 p_ptr->oldpx = x;
982- ambush_flag = FALSE;
982+ p_ptr->ambush_flag = FALSE;
983983 }
984984
985985 else if (x == 0)
@@ -987,7 +987,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
987987 p_ptr->wilderness_x--;
988988 p_ptr->oldpx = current_floor_ptr->width - 2;
989989 p_ptr->oldpy = y;
990- ambush_flag = FALSE;
990+ p_ptr->ambush_flag = FALSE;
991991 }
992992
993993 else if (x == MAX_WID - 1)
@@ -995,7 +995,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
995995 p_ptr->wilderness_x++;
996996 p_ptr->oldpx = 1;
997997 p_ptr->oldpy = y;
998- ambush_flag = FALSE;
998+ p_ptr->ambush_flag = FALSE;
999999 }
10001000
10011001 p_ptr->leaving = TRUE;
--- a/src/types.h
+++ b/src/types.h
@@ -1263,6 +1263,7 @@ struct player_type
12631263 bool wait_report_score; /* Waiting to report score */
12641264 bool is_dead; /* Player is dead */
12651265 bool now_damaged;
1266+ bool ambush_flag;
12661267
12671268 bool wizard; /* Player is in wizard mode */
12681269
--- a/src/variable.c
+++ b/src/variable.c
@@ -790,7 +790,6 @@ bool new_mane;
790790
791791 bool mon_fight;
792792
793-bool ambush_flag;
794793 bool generate_encounter;
795794
796795 concptr screen_dump = NULL;
Show on old repository browser