Commit 06abaee
committed
fix: Issues with stair exploration
This commit is a significant rewrite of stair-related aspects of travel.
Although qw doesn't get stuck often these days with the recent
improvements to exploration and travel, this case in Orc revealed that
it still has some blind spots. Specific qw got shafted from Orc:1,
partially explored Orc:2 to reveal two upstairs, and got stuck in a loop
between Orc:1 and Orc:2 when the upstairs it took lead to a disconnected
cell with no further stairs. In this case the necessary backtracking was
broken as a result of tight control travel has now over unexplored stair
searches.
The code to determine the next travel depth and associated direction was
relatively difficult to understand in terms of it repeating various bits
of logic several times in the relevant function. This commit refactors
and simplifies the logic into fewer functions with more general code. It
removes special state tracking for stairs searches that's made redundant
by aforementioned recent changes to stairs direction searches. We also
no longer use an explicit backtracking state variable, instead relying
on stair state resets and the backtracking plan to put us in a state
that has us search new stairs on the level to which we backtrack.1 parent 448b382 commit 06abaee
File tree
7 files changed
+123
-176
lines changed- source
7 files changed
+123
-176
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
754 | 754 | | |
755 | 755 | | |
756 | 756 | | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
765 | | - | |
766 | | - | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | | - | |
785 | | - | |
786 | | - | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | | - | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | | - | |
803 | | - | |
804 | | - | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | | - | |
809 | | - | |
810 | | - | |
811 | | - | |
812 | | - | |
813 | | - | |
814 | | - | |
815 | | - | |
816 | | - | |
817 | | - | |
818 | | - | |
819 | | - | |
820 | | - | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | | - | |
829 | | - | |
830 | | - | |
831 | | - | |
832 | | - | |
833 | | - | |
834 | | - | |
835 | | - | |
836 | | - | |
837 | | - | |
838 | | - | |
839 | | - | |
840 | | - | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | | - | |
847 | | - | |
848 | | - | |
849 | | - | |
850 | | - | |
851 | | - | |
852 | | - | |
853 | | - | |
854 | | - | |
855 | | - | |
856 | | - | |
857 | | - | |
858 | | - | |
859 | | - | |
860 | | - | |
861 | | - | |
862 | | - | |
863 | | - | |
864 | | - | |
865 | | - | |
866 | | - | |
867 | | - | |
868 | | - | |
869 | | - | |
870 | | - | |
871 | | - | |
872 | | - | |
873 | | - | |
874 | | - | |
875 | | - | |
876 | | - | |
877 | | - | |
| 757 | + | |
878 | 758 | | |
879 | 759 | | |
880 | 760 | | |
| |||
909 | 789 | | |
910 | 790 | | |
911 | 791 | | |
912 | | - | |
| 792 | + | |
913 | 793 | | |
914 | 794 | | |
915 | 795 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 2 | + | |
8 | 3 | | |
9 | 4 | | |
10 | 5 | | |
| |||
231 | 226 | | |
232 | 227 | | |
233 | 228 | | |
| 229 | + | |
234 | 230 | | |
235 | | - | |
236 | 231 | | |
237 | 232 | | |
238 | 233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | 9 | | |
17 | 10 | | |
18 | 11 | | |
| |||
92 | 85 | | |
93 | 86 | | |
94 | 87 | | |
95 | | - | |
| 88 | + | |
96 | 89 | | |
97 | 90 | | |
98 | 91 | | |
99 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
100 | 99 | | |
101 | 100 | | |
102 | 101 | | |
103 | 102 | | |
104 | | - | |
105 | | - | |
| 103 | + | |
| 104 | + | |
106 | 105 | | |
107 | 106 | | |
108 | 107 | | |
109 | 108 | | |
110 | 109 | | |
111 | 110 | | |
112 | | - | |
113 | | - | |
114 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
| |||
123 | 125 | | |
124 | 126 | | |
125 | 127 | | |
126 | | - | |
| 128 | + | |
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
| |||
63 | 67 | | |
64 | 68 | | |
65 | 69 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | 70 | | |
79 | 71 | | |
80 | 72 | | |
| |||
296 | 288 | | |
297 | 289 | | |
298 | 290 | | |
299 | | - | |
300 | 291 | | |
301 | 292 | | |
302 | 293 | | |
| |||
0 commit comments