diff options
Diffstat (limited to 'test/TestSunwarps.py')
-rw-r--r-- | test/TestSunwarps.py | 213 |
1 files changed, 213 insertions, 0 deletions
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 @@ | |||
1 | from . import LingoTestBase | ||
2 | |||
3 | |||
4 | class 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 | |||
20 | class 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 | |||
38 | class 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 | |||
57 | class 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 | |||
79 | class 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 | |||
97 | class 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 | |||
116 | class 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 | |||
143 | class 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 | |||
171 | class 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 | |||
186 | class 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 | |||
201 | class 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")) | ||