summary refs log tree commit diff stats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/TestOptions.py20
-rw-r--r--test/TestPilgrimage.py114
-rw-r--r--test/TestSunwarps.py213
3 files changed, 347 insertions, 0 deletions
diff --git a/test/TestOptions.py b/test/TestOptions.py index 1769677..fce0743 100644 --- a/test/TestOptions.py +++ b/test/TestOptions.py
@@ -29,3 +29,23 @@ class TestAllPanelHunt(LingoTestBase):
29 "level_2_requirement": "800", 29 "level_2_requirement": "800",
30 "early_color_hallways": "true" 30 "early_color_hallways": "true"
31 } 31 }
32
33
34class TestShuffleSunwarps(LingoTestBase):
35 options = {
36 "shuffle_doors": "none",
37 "shuffle_colors": "false",
38 "victory_condition": "pilgrimage",
39 "shuffle_sunwarps": "true",
40 "sunwarp_access": "normal"
41 }
42
43
44class TestShuffleSunwarpsAccess(LingoTestBase):
45 options = {
46 "shuffle_doors": "none",
47 "shuffle_colors": "false",
48 "victory_condition": "pilgrimage",
49 "shuffle_sunwarps": "true",
50 "sunwarp_access": "individual"
51 } \ No newline at end of file
diff --git a/test/TestPilgrimage.py b/test/TestPilgrimage.py new file mode 100644 index 0000000..3cc9194 --- /dev/null +++ b/test/TestPilgrimage.py
@@ -0,0 +1,114 @@
1from . import LingoTestBase
2
3
4class TestDisabledPilgrimage(LingoTestBase):
5 options = {
6 "enable_pilgrimage": "false",
7 "shuffle_colors": "false"
8 }
9
10 def test_access(self):
11 self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
12
13 self.collect_by_name("Pilgrim Room - Sun Painting")
14 self.assertTrue(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
15
16
17class TestPilgrimageWithRoofAndPaintings(LingoTestBase):
18 options = {
19 "enable_pilgrimage": "true",
20 "shuffle_colors": "false",
21 "shuffle_doors": "complex",
22 "pilgrimage_allows_roof_access": "true",
23 "pilgrimage_allows_paintings": "true",
24 "early_color_hallways": "false"
25 }
26
27 def test_access(self):
28 doors = ["Second Room - Exit Door", "Crossroads - Roof Access", "Hub Room - Crossroads Entrance",
29 "Outside The Undeterred - Green Painting"]
30
31 for door in doors:
32 print(door)
33 self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
34 self.collect_by_name(door)
35
36 self.assertTrue(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
37
38
39class TestPilgrimageNoRoofYesPaintings(LingoTestBase):
40 options = {
41 "enable_pilgrimage": "true",
42 "shuffle_colors": "false",
43 "shuffle_doors": "complex",
44 "pilgrimage_allows_roof_access": "false",
45 "pilgrimage_allows_paintings": "true",
46 "early_color_hallways": "false"
47 }
48
49 def test_access(self):
50 doors = ["Second Room - Exit Door", "Crossroads - Roof Access", "Hub Room - Crossroads Entrance",
51 "Outside The Undeterred - Green Painting", "Crossroads - Tower Entrance",
52 "Orange Tower Fourth Floor - Hot Crusts Door", "Orange Tower First Floor - Shortcut to Hub Room",
53 "Starting Room - Street Painting"]
54
55 for door in doors:
56 print(door)
57 self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
58 self.collect_by_name(door)
59
60 self.assertTrue(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
61
62
63class TestPilgrimageNoRoofNoPaintings(LingoTestBase):
64 options = {
65 "enable_pilgrimage": "true",
66 "shuffle_colors": "false",
67 "shuffle_doors": "complex",
68 "pilgrimage_allows_roof_access": "false",
69 "pilgrimage_allows_paintings": "false",
70 "early_color_hallways": "false"
71 }
72
73 def test_access(self):
74 doors = ["Second Room - Exit Door", "Crossroads - Roof Access", "Hub Room - Crossroads Entrance",
75 "Outside The Undeterred - Green Painting", "Orange Tower First Floor - Shortcut to Hub Room",
76 "Starting Room - Street Painting", "Outside The Initiated - Shortcut to Hub Room",
77 "Directional Gallery - Shortcut to The Undeterred", "Orange Tower First Floor - Salt Pepper Door",
78 "Color Hunt - Shortcut to The Steady", "The Bearer - Entrance",
79 "Orange Tower Fifth Floor - Quadruple Intersection", "The Tenacious - Shortcut to Hub Room",
80 "Outside The Agreeable - Tenacious Entrance", "Crossroads - Tower Entrance",
81 "Orange Tower Fourth Floor - Hot Crusts Door"]
82
83 for door in doors:
84 print(door)
85 self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
86 self.collect_by_name(door)
87
88 self.assertTrue(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
89
90
91class TestPilgrimageYesRoofNoPaintings(LingoTestBase):
92 options = {
93 "enable_pilgrimage": "true",
94 "shuffle_colors": "false",
95 "shuffle_doors": "complex",
96 "pilgrimage_allows_roof_access": "true",
97 "pilgrimage_allows_paintings": "false",
98 "early_color_hallways": "false"
99 }
100
101 def test_access(self):
102 doors = ["Second Room - Exit Door", "Crossroads - Roof Access", "Hub Room - Crossroads Entrance",
103 "Outside The Undeterred - Green Painting", "Orange Tower First Floor - Shortcut to Hub Room",
104 "Starting Room - Street Painting", "Outside The Initiated - Shortcut to Hub Room",
105 "Directional Gallery - Shortcut to The Undeterred", "Orange Tower First Floor - Salt Pepper Door",
106 "Color Hunt - Shortcut to The Steady", "The Bearer - Entrance",
107 "Orange Tower Fifth Floor - Quadruple Intersection"]
108
109 for door in doors:
110 print(door)
111 self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
112 self.collect_by_name(door)
113
114 self.assertTrue(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
diff --git a/test/TestSunwarps.py b/test/TestSunwarps.py new file mode 100644 index 0000000..e8e913c --- /dev/null +++ b/test/TestSunwarps.py
@@ -0,0 +1,213 @@
1from . import LingoTestBase
2
3
4class TestVanillaDoorsNormalSunwarps(LingoTestBase):
5 options = {
6 "shuffle_doors": "none",
7 "shuffle_colors": "true",
8 "sunwarp_access": "normal"
9 }
10
11 def test_access(self):
12 self.assertTrue(self.multiworld.state.can_reach("Crossroads", "Region", self.player))
13 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
14
15 self.collect_by_name("Yellow")
16 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
17 self.assertTrue(self.multiworld.state.can_reach("Outside The Initiated", "Region", self.player))
18
19
20class TestSimpleDoorsNormalSunwarps(LingoTestBase):
21 options = {
22 "shuffle_doors": "simple",
23 "sunwarp_access": "normal"
24 }
25
26 def test_access(self):
27 self.assertFalse(self.multiworld.state.can_reach("Crossroads", "Region", self.player))
28
29 self.collect_by_name("Second Room - Exit Door")
30 self.assertTrue(self.multiworld.state.can_reach("Crossroads", "Region", self.player))
31 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
32
33 self.collect_by_name(["Crossroads - Tower Entrances", "Orange Tower Fourth Floor - Hot Crusts Door"])
34 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
35 self.assertTrue(self.multiworld.state.can_reach("Outside The Initiated", "Region", self.player))
36
37
38class TestSimpleDoorsDisabledSunwarps(LingoTestBase):
39 options = {
40 "shuffle_doors": "simple",
41 "sunwarp_access": "disabled"
42 }
43
44 def test_access(self):
45 self.assertFalse(self.multiworld.state.can_reach("Crossroads", "Region", self.player))
46
47 self.collect_by_name("Second Room - Exit Door")
48 self.assertFalse(self.multiworld.state.can_reach("Crossroads", "Region", self.player))
49 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
50
51 self.collect_by_name(["Hub Room - Crossroads Entrance", "Crossroads - Tower Entrancse",
52 "Orange Tower Fourth Floor - Hot Crusts Door"])
53 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
54 self.assertFalse(self.multiworld.state.can_reach("Outside The Initiated", "Region", self.player))
55
56
57class TestSimpleDoorsUnlockSunwarps(LingoTestBase):
58 options = {
59 "shuffle_doors": "simple",
60 "sunwarp_access": "unlock"
61 }
62
63 def test_access(self):
64 self.assertFalse(self.multiworld.state.can_reach("Crossroads", "Region", self.player))
65
66 self.collect_by_name("Second Room - Exit Door")
67 self.assertFalse(self.multiworld.state.can_reach("Crossroads", "Region", self.player))
68
69 self.collect_by_name(["Crossroads - Tower Entrances", "Orange Tower Fourth Floor - Hot Crusts Door"])
70 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
71 self.assertFalse(self.multiworld.state.can_reach("Outside The Initiated", "Region", self.player))
72
73 self.collect_by_name("Sunwarps")
74 self.assertTrue(self.multiworld.state.can_reach("Crossroads", "Region", self.player))
75 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
76 self.assertTrue(self.multiworld.state.can_reach("Outside The Initiated", "Region", self.player))
77
78
79class TestComplexDoorsNormalSunwarps(LingoTestBase):
80 options = {
81 "shuffle_doors": "complex",
82 "sunwarp_access": "normal"
83 }
84
85 def test_access(self):
86 self.assertFalse(self.multiworld.state.can_reach("Crossroads", "Region", self.player))
87
88 self.collect_by_name("Second Room - Exit Door")
89 self.assertTrue(self.multiworld.state.can_reach("Crossroads", "Region", self.player))
90 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
91
92 self.collect_by_name(["Crossroads - Tower Entrance", "Orange Tower Fourth Floor - Hot Crusts Door"])
93 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
94 self.assertTrue(self.multiworld.state.can_reach("Outside The Initiated", "Region", self.player))
95
96
97class TestComplexDoorsDisabledSunwarps(LingoTestBase):
98 options = {
99 "shuffle_doors": "complex",
100 "sunwarp_access": "disabled"
101 }
102
103 def test_access(self):
104 self.assertFalse(self.multiworld.state.can_reach("Crossroads", "Region", self.player))
105
106 self.collect_by_name("Second Room - Exit Door")
107 self.assertFalse(self.multiworld.state.can_reach("Crossroads", "Region", self.player))
108 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
109
110 self.collect_by_name(["Hub Room - Crossroads Entrance", "Crossroads - Tower Entrance",
111 "Orange Tower Fourth Floor - Hot Crusts Door"])
112 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
113 self.assertFalse(self.multiworld.state.can_reach("Outside The Initiated", "Region", self.player))
114
115
116class TestComplexDoorsIndividualSunwarps(LingoTestBase):
117 options = {
118 "shuffle_doors": "complex",
119 "sunwarp_access": "individual"
120 }
121
122 def test_access(self):
123 self.assertFalse(self.multiworld.state.can_reach("Crossroads", "Region", self.player))
124
125 self.collect_by_name("Second Room - Exit Door")
126 self.assertFalse(self.multiworld.state.can_reach("Crossroads", "Region", self.player))
127
128 self.collect_by_name("1 Sunwarp")
129 self.assertTrue(self.multiworld.state.can_reach("Crossroads", "Region", self.player))
130
131 self.collect_by_name(["Crossroads - Tower Entrance", "Orange Tower Fourth Floor - Hot Crusts Door"])
132 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
133 self.assertFalse(self.multiworld.state.can_reach("Outside The Initiated", "Region", self.player))
134
135 self.collect_by_name("2 Sunwarp")
136 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
137 self.assertFalse(self.multiworld.state.can_reach("Outside The Initiated", "Region", self.player))
138
139 self.collect_by_name("3 Sunwarp")
140 self.assertTrue(self.multiworld.state.can_reach("Outside The Initiated", "Region", self.player))
141
142
143class TestComplexDoorsProgressiveSunwarps(LingoTestBase):
144 options = {
145 "shuffle_doors": "complex",
146 "sunwarp_access": "progressive"
147 }
148
149 def test_access(self):
150 self.assertFalse(self.multiworld.state.can_reach("Crossroads", "Region", self.player))
151
152 self.collect_by_name("Second Room - Exit Door")
153 self.assertFalse(self.multiworld.state.can_reach("Crossroads", "Region", self.player))
154
155 progressive_pilgrimage = self.get_items_by_name("Progressive Pilgrimage")
156 self.collect(progressive_pilgrimage[0])
157 self.assertTrue(self.multiworld.state.can_reach("Crossroads", "Region", self.player))
158
159 self.collect_by_name(["Crossroads - Tower Entrance", "Orange Tower Fourth Floor - Hot Crusts Door"])
160 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
161 self.assertFalse(self.multiworld.state.can_reach("Outside The Initiated", "Region", self.player))
162
163 self.collect(progressive_pilgrimage[1])
164 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
165 self.assertFalse(self.multiworld.state.can_reach("Outside The Initiated", "Region", self.player))
166
167 self.collect(progressive_pilgrimage[2])
168 self.assertTrue(self.multiworld.state.can_reach("Outside The Initiated", "Region", self.player))
169
170
171class TestUnlockSunwarpPilgrimage(LingoTestBase):
172 options = {
173 "sunwarp_access": "unlock",
174 "shuffle_colors": "false",
175 "enable_pilgrimage": "true"
176 }
177
178 def test_access(self):
179 self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
180
181 self.collect_by_name("Sunwarps")
182
183 self.assertTrue(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
184
185
186class TestIndividualSunwarpPilgrimage(LingoTestBase):
187 options = {
188 "sunwarp_access": "individual",
189 "shuffle_colors": "false",
190 "enable_pilgrimage": "true"
191 }
192
193 def test_access(self):
194 for i in range(1, 7):
195 self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
196 self.collect_by_name(f"{i} Sunwarp")
197
198 self.assertTrue(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
199
200
201class TestProgressiveSunwarpPilgrimage(LingoTestBase):
202 options = {
203 "sunwarp_access": "progressive",
204 "shuffle_colors": "false",
205 "enable_pilgrimage": "true"
206 }
207
208 def test_access(self):
209 for item in self.get_items_by_name("Progressive Pilgrimage"):
210 self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
211 self.collect(item)
212
213 self.assertTrue(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))