diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-11-08 18:35:12 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-08 17:35:12 -0600 |
commit | bbbbc71bee25cfd22c5304f98f5a7881383585a3 (patch) | |
tree | d27581db7b8db03da4b731fe8c2d5072d3162cf8 /test/TestProgressive.py | |
download | lingo-apworld-bbbbc71bee25cfd22c5304f98f5a7881383585a3.tar.gz lingo-apworld-bbbbc71bee25cfd22c5304f98f5a7881383585a3.tar.bz2 lingo-apworld-bbbbc71bee25cfd22c5304f98f5a7881383585a3.zip |
Lingo: New game (#1806)
Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com> Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com> Co-authored-by: Phar <zach@alliware.com>
Diffstat (limited to 'test/TestProgressive.py')
-rw-r--r-- | test/TestProgressive.py | 191 |
1 files changed, 191 insertions, 0 deletions
diff --git a/test/TestProgressive.py b/test/TestProgressive.py new file mode 100644 index 0000000..026971c --- /dev/null +++ b/test/TestProgressive.py | |||
@@ -0,0 +1,191 @@ | |||
1 | from . import LingoTestBase | ||
2 | |||
3 | |||
4 | class TestComplexProgressiveHallwayRoom(LingoTestBase): | ||
5 | options = { | ||
6 | "shuffle_doors": "complex" | ||
7 | } | ||
8 | |||
9 | def test_item(self): | ||
10 | self.assertFalse(self.multiworld.state.can_reach("Outside The Agreeable", "Region", self.player)) | ||
11 | self.assertFalse(self.multiworld.state.can_reach("Hallway Room (2)", "Region", self.player)) | ||
12 | self.assertFalse(self.multiworld.state.can_reach("Hallway Room (3)", "Region", self.player)) | ||
13 | self.assertFalse(self.multiworld.state.can_reach("Hallway Room (4)", "Region", self.player)) | ||
14 | self.assertFalse(self.multiworld.state.can_reach("Elements Area", "Region", self.player)) | ||
15 | |||
16 | self.collect_by_name(["Second Room - Exit Door", "The Tenacious - Shortcut to Hub Room", | ||
17 | "Outside The Agreeable - Tenacious Entrance"]) | ||
18 | self.assertTrue(self.multiworld.state.can_reach("Outside The Agreeable", "Region", self.player)) | ||
19 | self.assertFalse(self.multiworld.state.can_reach("Hallway Room (2)", "Region", self.player)) | ||
20 | self.assertFalse(self.multiworld.state.can_reach("Hallway Room (3)", "Region", self.player)) | ||
21 | self.assertFalse(self.multiworld.state.can_reach("Hallway Room (4)", "Region", self.player)) | ||
22 | self.assertFalse(self.multiworld.state.can_reach("Elements Area", "Region", self.player)) | ||
23 | |||
24 | progressive_hallway_room = self.get_items_by_name("Progressive Hallway Room") | ||
25 | |||
26 | self.collect(progressive_hallway_room[0]) | ||
27 | self.assertTrue(self.multiworld.state.can_reach("Outside The Agreeable", "Region", self.player)) | ||
28 | self.assertTrue(self.multiworld.state.can_reach("Hallway Room (2)", "Region", self.player)) | ||
29 | self.assertFalse(self.multiworld.state.can_reach("Hallway Room (3)", "Region", self.player)) | ||
30 | self.assertFalse(self.multiworld.state.can_reach("Hallway Room (4)", "Region", self.player)) | ||
31 | self.assertFalse(self.multiworld.state.can_reach("Elements Area", "Region", self.player)) | ||
32 | |||
33 | self.collect(progressive_hallway_room[1]) | ||
34 | self.assertTrue(self.multiworld.state.can_reach("Outside The Agreeable", "Region", self.player)) | ||
35 | self.assertTrue(self.multiworld.state.can_reach("Hallway Room (2)", "Region", self.player)) | ||
36 | self.assertTrue(self.multiworld.state.can_reach("Hallway Room (3)", "Region", self.player)) | ||
37 | self.assertFalse(self.multiworld.state.can_reach("Hallway Room (4)", "Region", self.player)) | ||
38 | self.assertFalse(self.multiworld.state.can_reach("Elements Area", "Region", self.player)) | ||
39 | |||
40 | self.collect(progressive_hallway_room[2]) | ||
41 | self.assertTrue(self.multiworld.state.can_reach("Outside The Agreeable", "Region", self.player)) | ||
42 | self.assertTrue(self.multiworld.state.can_reach("Hallway Room (2)", "Region", self.player)) | ||
43 | self.assertTrue(self.multiworld.state.can_reach("Hallway Room (3)", "Region", self.player)) | ||
44 | self.assertTrue(self.multiworld.state.can_reach("Hallway Room (4)", "Region", self.player)) | ||
45 | self.assertFalse(self.multiworld.state.can_reach("Elements Area", "Region", self.player)) | ||
46 | |||
47 | self.collect(progressive_hallway_room[3]) | ||
48 | self.assertTrue(self.multiworld.state.can_reach("Outside The Agreeable", "Region", self.player)) | ||
49 | self.assertTrue(self.multiworld.state.can_reach("Hallway Room (2)", "Region", self.player)) | ||
50 | self.assertTrue(self.multiworld.state.can_reach("Hallway Room (3)", "Region", self.player)) | ||
51 | self.assertTrue(self.multiworld.state.can_reach("Hallway Room (4)", "Region", self.player)) | ||
52 | self.assertTrue(self.multiworld.state.can_reach("Elements Area", "Region", self.player)) | ||
53 | |||
54 | |||
55 | class TestSimpleHallwayRoom(LingoTestBase): | ||
56 | options = { | ||
57 | "shuffle_doors": "simple" | ||
58 | } | ||
59 | |||
60 | def test_item(self): | ||
61 | self.assertFalse(self.multiworld.state.can_reach("Outside The Agreeable", "Region", self.player)) | ||
62 | self.assertFalse(self.multiworld.state.can_reach("Hallway Room (2)", "Region", self.player)) | ||
63 | self.assertFalse(self.multiworld.state.can_reach("Hallway Room (3)", "Region", self.player)) | ||
64 | self.assertFalse(self.multiworld.state.can_reach("Hallway Room (4)", "Region", self.player)) | ||
65 | self.assertFalse(self.multiworld.state.can_reach("Elements Area", "Region", self.player)) | ||
66 | |||
67 | self.collect_by_name(["Second Room - Exit Door", "Entrances to The Tenacious"]) | ||
68 | self.assertTrue(self.multiworld.state.can_reach("Outside The Agreeable", "Region", self.player)) | ||
69 | self.assertFalse(self.multiworld.state.can_reach("Hallway Room (2)", "Region", self.player)) | ||
70 | self.assertFalse(self.multiworld.state.can_reach("Hallway Room (3)", "Region", self.player)) | ||
71 | self.assertFalse(self.multiworld.state.can_reach("Hallway Room (4)", "Region", self.player)) | ||
72 | self.assertFalse(self.multiworld.state.can_reach("Elements Area", "Region", self.player)) | ||
73 | |||
74 | self.collect_by_name("Hallway Room Doors") | ||
75 | self.assertTrue(self.multiworld.state.can_reach("Outside The Agreeable", "Region", self.player)) | ||
76 | self.assertTrue(self.multiworld.state.can_reach("Hallway Room (2)", "Region", self.player)) | ||
77 | self.assertTrue(self.multiworld.state.can_reach("Hallway Room (3)", "Region", self.player)) | ||
78 | self.assertTrue(self.multiworld.state.can_reach("Hallway Room (4)", "Region", self.player)) | ||
79 | self.assertTrue(self.multiworld.state.can_reach("Elements Area", "Region", self.player)) | ||
80 | |||
81 | |||
82 | class TestProgressiveArtGallery(LingoTestBase): | ||
83 | options = { | ||
84 | "shuffle_doors": "complex" | ||
85 | } | ||
86 | |||
87 | def test_item(self): | ||
88 | self.assertFalse(self.multiworld.state.can_reach("Art Gallery", "Region", self.player)) | ||
89 | self.assertFalse(self.multiworld.state.can_reach("Art Gallery (Second Floor)", "Region", self.player)) | ||
90 | self.assertFalse(self.multiworld.state.can_reach("Art Gallery (Third Floor)", "Region", self.player)) | ||
91 | self.assertFalse(self.multiworld.state.can_reach("Art Gallery (Fourth Floor)", "Region", self.player)) | ||
92 | self.assertFalse(self.can_reach_location("Art Gallery - ONE ROAD MANY TURNS")) | ||
93 | self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player)) | ||
94 | |||
95 | self.collect_by_name(["Second Room - Exit Door", "Crossroads - Tower Entrance", | ||
96 | "Orange Tower Fourth Floor - Hot Crusts Door"]) | ||
97 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery", "Region", self.player)) | ||
98 | self.assertFalse(self.multiworld.state.can_reach("Art Gallery (Second Floor)", "Region", self.player)) | ||
99 | self.assertFalse(self.multiworld.state.can_reach("Art Gallery (Third Floor)", "Region", self.player)) | ||
100 | self.assertFalse(self.multiworld.state.can_reach("Art Gallery (Fourth Floor)", "Region", self.player)) | ||
101 | self.assertFalse(self.can_reach_location("Art Gallery - ONE ROAD MANY TURNS")) | ||
102 | self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player)) | ||
103 | |||
104 | progressive_gallery_room = self.get_items_by_name("Progressive Art Gallery") | ||
105 | |||
106 | self.collect(progressive_gallery_room[0]) | ||
107 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery", "Region", self.player)) | ||
108 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery (Second Floor)", "Region", self.player)) | ||
109 | self.assertFalse(self.multiworld.state.can_reach("Art Gallery (Third Floor)", "Region", self.player)) | ||
110 | self.assertFalse(self.multiworld.state.can_reach("Art Gallery (Fourth Floor)", "Region", self.player)) | ||
111 | self.assertFalse(self.can_reach_location("Art Gallery - ONE ROAD MANY TURNS")) | ||
112 | self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player)) | ||
113 | |||
114 | self.collect(progressive_gallery_room[1]) | ||
115 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery", "Region", self.player)) | ||
116 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery (Second Floor)", "Region", self.player)) | ||
117 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery (Third Floor)", "Region", self.player)) | ||
118 | self.assertFalse(self.multiworld.state.can_reach("Art Gallery (Fourth Floor)", "Region", self.player)) | ||
119 | self.assertFalse(self.can_reach_location("Art Gallery - ONE ROAD MANY TURNS")) | ||
120 | self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player)) | ||
121 | |||
122 | self.collect(progressive_gallery_room[2]) | ||
123 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery", "Region", self.player)) | ||
124 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery (Second Floor)", "Region", self.player)) | ||
125 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery (Third Floor)", "Region", self.player)) | ||
126 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery (Fourth Floor)", "Region", self.player)) | ||
127 | self.assertFalse(self.can_reach_location("Art Gallery - ONE ROAD MANY TURNS")) | ||
128 | self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player)) | ||
129 | |||
130 | self.collect(progressive_gallery_room[3]) | ||
131 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery", "Region", self.player)) | ||
132 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery (Second Floor)", "Region", self.player)) | ||
133 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery (Third Floor)", "Region", self.player)) | ||
134 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery (Fourth Floor)", "Region", self.player)) | ||
135 | self.assertTrue(self.can_reach_location("Art Gallery - ONE ROAD MANY TURNS")) | ||
136 | self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player)) | ||
137 | |||
138 | self.collect(progressive_gallery_room[4]) | ||
139 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery", "Region", self.player)) | ||
140 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery (Second Floor)", "Region", self.player)) | ||
141 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery (Third Floor)", "Region", self.player)) | ||
142 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery (Fourth Floor)", "Region", self.player)) | ||
143 | self.assertTrue(self.can_reach_location("Art Gallery - ONE ROAD MANY TURNS")) | ||
144 | self.assertTrue(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player)) | ||
145 | |||
146 | |||
147 | class TestNoDoorsArtGallery(LingoTestBase): | ||
148 | options = { | ||
149 | "shuffle_doors": "none", | ||
150 | "shuffle_colors": "true" | ||
151 | } | ||
152 | |||
153 | def test_item(self): | ||
154 | self.assertFalse(self.multiworld.state.can_reach("Art Gallery", "Region", self.player)) | ||
155 | self.assertFalse(self.multiworld.state.can_reach("Art Gallery (Second Floor)", "Region", self.player)) | ||
156 | self.assertFalse(self.multiworld.state.can_reach("Art Gallery (Third Floor)", "Region", self.player)) | ||
157 | self.assertFalse(self.multiworld.state.can_reach("Art Gallery (Fourth Floor)", "Region", self.player)) | ||
158 | self.assertFalse(self.can_reach_location("Art Gallery - ONE ROAD MANY TURNS")) | ||
159 | self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player)) | ||
160 | |||
161 | self.collect_by_name("Yellow") | ||
162 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery", "Region", self.player)) | ||
163 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery (Second Floor)", "Region", self.player)) | ||
164 | self.assertFalse(self.multiworld.state.can_reach("Art Gallery (Third Floor)", "Region", self.player)) | ||
165 | self.assertFalse(self.multiworld.state.can_reach("Art Gallery (Fourth Floor)", "Region", self.player)) | ||
166 | self.assertFalse(self.can_reach_location("Art Gallery - ONE ROAD MANY TURNS")) | ||
167 | self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player)) | ||
168 | |||
169 | self.collect_by_name("Brown") | ||
170 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery", "Region", self.player)) | ||
171 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery (Second Floor)", "Region", self.player)) | ||
172 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery (Third Floor)", "Region", self.player)) | ||
173 | self.assertFalse(self.multiworld.state.can_reach("Art Gallery (Fourth Floor)", "Region", self.player)) | ||
174 | self.assertFalse(self.can_reach_location("Art Gallery - ONE ROAD MANY TURNS")) | ||
175 | self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player)) | ||
176 | |||
177 | self.collect_by_name("Blue") | ||
178 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery", "Region", self.player)) | ||
179 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery (Second Floor)", "Region", self.player)) | ||
180 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery (Third Floor)", "Region", self.player)) | ||
181 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery (Fourth Floor)", "Region", self.player)) | ||
182 | self.assertFalse(self.can_reach_location("Art Gallery - ONE ROAD MANY TURNS")) | ||
183 | self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player)) | ||
184 | |||
185 | self.collect_by_name(["Orange", "Gray"]) | ||
186 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery", "Region", self.player)) | ||
187 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery (Second Floor)", "Region", self.player)) | ||
188 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery (Third Floor)", "Region", self.player)) | ||
189 | self.assertTrue(self.multiworld.state.can_reach("Art Gallery (Fourth Floor)", "Region", self.player)) | ||
190 | self.assertTrue(self.can_reach_location("Art Gallery - ONE ROAD MANY TURNS")) | ||
191 | self.assertTrue(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player)) | ||