summary refs log tree commit diff stats
path: root/test/TestSunwarps.py
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-04-18 11:45:33 -0500
committerGitHub <noreply@github.com>2024-04-18 18:45:33 +0200
commitb45b9bd74612239ebc29322fc340b1bee62e7032 (patch)
treed61b0077586fa146a418a46536daef02ae27989a /test/TestSunwarps.py
parent7a358cedc44c0892a4c369a4884a23a001535d63 (diff)
downloadlingo-apworld-b45b9bd74612239ebc29322fc340b1bee62e7032.tar.gz
lingo-apworld-b45b9bd74612239ebc29322fc340b1bee62e7032.tar.bz2
lingo-apworld-b45b9bd74612239ebc29322fc340b1bee62e7032.zip
Lingo: The Pilgrim Update (#2884)
* An option was added to enable or disable the pilgrimage, and it defaults to disabled. When disabled, the client will prevent you from performing a pilgrimage (i.e. the yellow border will not appear when you enter the 1 sunwarp). The sun painting is added to the item pool when pilgrimage is disabled, as otherwise there is no way into the Pilgrim Antechamber. Inversely, the sun painting is no longer in the item pool when pilgrimage is enabled (even if door shuffle is on), requiring you to perform a pilgrimage to get to that room.
* The canonical pilgrimage has been deprecated. Instead, there is logic for determining whether a pilgrimage is possible.
* Two options were added that allow the player to decide whether paintings and/or Crossroads - Roof Access are permitted during the pilgrimage. Both default to disabled. These options apply both to logical expectations in the generator, and are also enforced by the game client.
* An option was added to control how sunwarps are accessed. The default is for them to always be accessible, like in the base game. It is also possible to disable them entirely (which is not possible when pilgrimage is enabled), or lock them behind items similar to door shuffle. It can either be one item that unlocks all sunwarps at the same time, six progressive items that unlock the sunwarps from 1 to 6, or six individual items that unlock the sunwarps in any order. This option is independent from door shuffle.
* An option was added that shuffles sunwarps. This acts similarly to painting shuffle. The 12 sunwarps are re-ordered and re-paired. Sunwarps that were previously entrances or exits do not need to stay entrances or exits. Performing a pilgrimage requires proceeding through the sunwarps in the new order, rather than the original one.
* Pilgrimage was added as a win condition. It requires you to solve the blue PILGRIM panel in the Pilgrim Antechamber.
Diffstat (limited to 'test/TestSunwarps.py')
-rw-r--r--test/TestSunwarps.py213
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 @@
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"))