summary refs log tree commit diff stats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/TestDoors.py89
-rw-r--r--test/TestMastery.py39
-rw-r--r--test/TestOptions.py31
-rw-r--r--test/TestOrangeTower.py175
-rw-r--r--test/TestProgressive.py191
-rw-r--r--test/__init__.py13
6 files changed, 538 insertions, 0 deletions
diff --git a/test/TestDoors.py b/test/TestDoors.py new file mode 100644 index 0000000..5dc989a --- /dev/null +++ b/test/TestDoors.py
@@ -0,0 +1,89 @@
1from . import LingoTestBase
2
3
4class TestRequiredRoomLogic(LingoTestBase):
5 options = {
6 "shuffle_doors": "complex"
7 }
8
9 def test_pilgrim_first(self) -> None:
10 self.assertFalse(self.multiworld.state.can_reach("The Seeker", "Region", self.player))
11 self.assertFalse(self.multiworld.state.can_reach("Pilgrim Antechamber", "Region", self.player))
12 self.assertFalse(self.multiworld.state.can_reach("Pilgrim Room", "Region", self.player))
13 self.assertFalse(self.can_reach_location("The Seeker - Achievement"))
14
15 self.collect_by_name("Pilgrim Room - Sun Painting")
16 self.assertFalse(self.multiworld.state.can_reach("The Seeker", "Region", self.player))
17 self.assertTrue(self.multiworld.state.can_reach("Pilgrim Antechamber", "Region", self.player))
18 self.assertTrue(self.multiworld.state.can_reach("Pilgrim Room", "Region", self.player))
19 self.assertFalse(self.can_reach_location("The Seeker - Achievement"))
20
21 self.collect_by_name("Pilgrim Room - Shortcut to The Seeker")
22 self.assertTrue(self.multiworld.state.can_reach("The Seeker", "Region", self.player))
23 self.assertTrue(self.multiworld.state.can_reach("Pilgrim Room", "Region", self.player))
24 self.assertFalse(self.can_reach_location("The Seeker - Achievement"))
25
26 self.collect_by_name("Starting Room - Back Right Door")
27 self.assertTrue(self.can_reach_location("The Seeker - Achievement"))
28
29 def test_hidden_first(self) -> None:
30 self.assertFalse(self.multiworld.state.can_reach("The Seeker", "Region", self.player))
31 self.assertFalse(self.multiworld.state.can_reach("Pilgrim Room", "Region", self.player))
32 self.assertFalse(self.can_reach_location("The Seeker - Achievement"))
33
34 self.collect_by_name("Starting Room - Back Right Door")
35 self.assertFalse(self.multiworld.state.can_reach("The Seeker", "Region", self.player))
36 self.assertFalse(self.multiworld.state.can_reach("Pilgrim Room", "Region", self.player))
37 self.assertFalse(self.can_reach_location("The Seeker - Achievement"))
38
39 self.collect_by_name("Pilgrim Room - Shortcut to The Seeker")
40 self.assertFalse(self.multiworld.state.can_reach("The Seeker", "Region", self.player))
41 self.assertFalse(self.multiworld.state.can_reach("Pilgrim Room", "Region", self.player))
42 self.assertFalse(self.can_reach_location("The Seeker - Achievement"))
43
44 self.collect_by_name("Pilgrim Room - Sun Painting")
45 self.assertTrue(self.multiworld.state.can_reach("The Seeker", "Region", self.player))
46 self.assertTrue(self.multiworld.state.can_reach("Pilgrim Room", "Region", self.player))
47 self.assertTrue(self.can_reach_location("The Seeker - Achievement"))
48
49
50class TestRequiredDoorLogic(LingoTestBase):
51 options = {
52 "shuffle_doors": "complex"
53 }
54
55 def test_through_rhyme(self) -> None:
56 self.assertFalse(self.can_reach_location("Rhyme Room - Circle/Looped Square Wall"))
57
58 self.collect_by_name("Starting Room - Rhyme Room Entrance")
59 self.assertFalse(self.can_reach_location("Rhyme Room - Circle/Looped Square Wall"))
60
61 self.collect_by_name("Rhyme Room (Looped Square) - Door to Circle")
62 self.assertTrue(self.can_reach_location("Rhyme Room - Circle/Looped Square Wall"))
63
64 def test_through_hidden(self) -> None:
65 self.assertFalse(self.can_reach_location("Rhyme Room - Circle/Looped Square Wall"))
66
67 self.collect_by_name("Starting Room - Rhyme Room Entrance")
68 self.assertFalse(self.can_reach_location("Rhyme Room - Circle/Looped Square Wall"))
69
70 self.collect_by_name("Starting Room - Back Right Door")
71 self.assertFalse(self.can_reach_location("Rhyme Room - Circle/Looped Square Wall"))
72
73 self.collect_by_name("Hidden Room - Rhyme Room Entrance")
74 self.assertTrue(self.can_reach_location("Rhyme Room - Circle/Looped Square Wall"))
75
76
77class TestSimpleDoors(LingoTestBase):
78 options = {
79 "shuffle_doors": "simple"
80 }
81
82 def test_requirement(self):
83 self.assertFalse(self.multiworld.state.can_reach("Outside The Wanderer", "Region", self.player))
84 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
85
86 self.collect_by_name("Rhyme Room Doors")
87 self.assertTrue(self.multiworld.state.can_reach("Outside The Wanderer", "Region", self.player))
88 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
89
diff --git a/test/TestMastery.py b/test/TestMastery.py new file mode 100644 index 0000000..3fb3c95 --- /dev/null +++ b/test/TestMastery.py
@@ -0,0 +1,39 @@
1from . import LingoTestBase
2
3
4class TestMasteryWhenVictoryIsTheEnd(LingoTestBase):
5 options = {
6 "mastery_achievements": "22",
7 "victory_condition": "the_end",
8 "shuffle_colors": "true"
9 }
10
11 def test_requirement(self):
12 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Seventh Floor", "Region", self.player))
13
14 self.collect_by_name(["Red", "Blue", "Black", "Purple", "Orange"])
15 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Seventh Floor", "Region", self.player))
16 self.assertTrue(self.can_reach_location("The End (Solved)"))
17 self.assertFalse(self.can_reach_location("Orange Tower Seventh Floor - THE MASTER"))
18
19 self.collect_by_name(["Green", "Brown", "Yellow"])
20 self.assertTrue(self.can_reach_location("Orange Tower Seventh Floor - THE MASTER"))
21
22
23class TestMasteryWhenVictoryIsTheMaster(LingoTestBase):
24 options = {
25 "mastery_achievements": "24",
26 "victory_condition": "the_master",
27 "shuffle_colors": "true"
28 }
29
30 def test_requirement(self):
31 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Seventh Floor", "Region", self.player))
32
33 self.collect_by_name(["Red", "Blue", "Black", "Purple", "Orange"])
34 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Seventh Floor", "Region", self.player))
35 self.assertTrue(self.can_reach_location("Orange Tower Seventh Floor - THE END"))
36 self.assertFalse(self.can_reach_location("Orange Tower Seventh Floor - Mastery Achievements"))
37
38 self.collect_by_name(["Green", "Gray", "Brown", "Yellow"])
39 self.assertTrue(self.can_reach_location("Orange Tower Seventh Floor - Mastery Achievements")) \ No newline at end of file
diff --git a/test/TestOptions.py b/test/TestOptions.py new file mode 100644 index 0000000..1769677 --- /dev/null +++ b/test/TestOptions.py
@@ -0,0 +1,31 @@
1from . import LingoTestBase
2
3
4class TestMultiShuffleOptions(LingoTestBase):
5 options = {
6 "shuffle_doors": "complex",
7 "progressive_orange_tower": "true",
8 "shuffle_colors": "true",
9 "shuffle_paintings": "true",
10 "early_color_hallways": "true"
11 }
12
13
14class TestPanelsanity(LingoTestBase):
15 options = {
16 "shuffle_doors": "complex",
17 "progressive_orange_tower": "true",
18 "location_checks": "insanity",
19 "shuffle_colors": "true"
20 }
21
22
23class TestAllPanelHunt(LingoTestBase):
24 options = {
25 "shuffle_doors": "complex",
26 "progressive_orange_tower": "true",
27 "shuffle_colors": "true",
28 "victory_condition": "level_2",
29 "level_2_requirement": "800",
30 "early_color_hallways": "true"
31 }
diff --git a/test/TestOrangeTower.py b/test/TestOrangeTower.py new file mode 100644 index 0000000..7b0c3bb --- /dev/null +++ b/test/TestOrangeTower.py
@@ -0,0 +1,175 @@
1from . import LingoTestBase
2
3
4class TestProgressiveOrangeTower(LingoTestBase):
5 options = {
6 "shuffle_doors": "complex",
7 "progressive_orange_tower": "true"
8 }
9
10 def test_from_welcome_back(self) -> None:
11 self.assertFalse(self.multiworld.state.can_reach("Orange Tower First Floor", "Region", self.player))
12 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Second Floor", "Region", self.player))
13 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
14 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fourth Floor", "Region", self.player))
15 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player))
16 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Sixth Floor", "Region", self.player))
17 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Seventh Floor", "Region", self.player))
18
19 self.collect_by_name("Welcome Back Area - Shortcut to Starting Room")
20 self.collect_by_name("Orange Tower Fifth Floor - Welcome Back")
21 self.assertFalse(self.multiworld.state.can_reach("Orange Tower First Floor", "Region", self.player))
22 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Second Floor", "Region", self.player))
23 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
24 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fourth Floor", "Region", self.player))
25 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player))
26 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Sixth Floor", "Region", self.player))
27 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Seventh Floor", "Region", self.player))
28
29 progressive_tower = self.get_items_by_name("Progressive Orange Tower")
30
31 self.collect(progressive_tower[0])
32 self.assertFalse(self.multiworld.state.can_reach("Orange Tower First Floor", "Region", self.player))
33 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Second Floor", "Region", self.player))
34 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
35 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fourth Floor", "Region", self.player))
36 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player))
37 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Sixth Floor", "Region", self.player))
38 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Seventh Floor", "Region", self.player))
39
40 self.collect(progressive_tower[1])
41 self.assertFalse(self.multiworld.state.can_reach("Orange Tower First Floor", "Region", self.player))
42 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Second Floor", "Region", self.player))
43 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
44 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fourth Floor", "Region", self.player))
45 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player))
46 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Sixth Floor", "Region", self.player))
47 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Seventh Floor", "Region", self.player))
48
49 self.collect(progressive_tower[2])
50 self.assertFalse(self.multiworld.state.can_reach("Orange Tower First Floor", "Region", self.player))
51 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Second Floor", "Region", self.player))
52 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
53 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fourth Floor", "Region", self.player))
54 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player))
55 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Sixth Floor", "Region", self.player))
56 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Seventh Floor", "Region", self.player))
57
58 self.collect(progressive_tower[3])
59 self.assertTrue(self.multiworld.state.can_reach("Orange Tower First Floor", "Region", self.player))
60 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Second Floor", "Region", self.player))
61 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
62 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Fourth Floor", "Region", self.player))
63 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player))
64 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Sixth Floor", "Region", self.player))
65 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Seventh Floor", "Region", self.player))
66
67 self.collect(progressive_tower[4])
68 self.assertTrue(self.multiworld.state.can_reach("Orange Tower First Floor", "Region", self.player))
69 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Second Floor", "Region", self.player))
70 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
71 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Fourth Floor", "Region", self.player))
72 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player))
73 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Sixth Floor", "Region", self.player))
74 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Seventh Floor", "Region", self.player))
75
76 self.collect(progressive_tower[5])
77 self.assertTrue(self.multiworld.state.can_reach("Orange Tower First Floor", "Region", self.player))
78 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Second Floor", "Region", self.player))
79 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
80 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Fourth Floor", "Region", self.player))
81 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player))
82 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Sixth Floor", "Region", self.player))
83 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Seventh Floor", "Region", self.player))
84
85 def test_from_hub_room(self) -> None:
86 self.assertFalse(self.multiworld.state.can_reach("Orange Tower First Floor", "Region", self.player))
87 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Second Floor", "Region", self.player))
88 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
89 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fourth Floor", "Region", self.player))
90 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player))
91 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Sixth Floor", "Region", self.player))
92 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Seventh Floor", "Region", self.player))
93
94 self.collect_by_name("Second Room - Exit Door")
95 self.assertFalse(self.multiworld.state.can_reach("Orange Tower First Floor", "Region", self.player))
96 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Second Floor", "Region", self.player))
97 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
98 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fourth Floor", "Region", self.player))
99 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player))
100 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Sixth Floor", "Region", self.player))
101 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Seventh Floor", "Region", self.player))
102
103 self.collect_by_name("Orange Tower First Floor - Shortcut to Hub Room")
104 self.assertTrue(self.multiworld.state.can_reach("Orange Tower First Floor", "Region", self.player))
105 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Second Floor", "Region", self.player))
106 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
107 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fourth Floor", "Region", self.player))
108 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player))
109 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Sixth Floor", "Region", self.player))
110 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Seventh Floor", "Region", self.player))
111
112 progressive_tower = self.get_items_by_name("Progressive Orange Tower")
113
114 self.collect(progressive_tower[0])
115 self.assertTrue(self.multiworld.state.can_reach("Orange Tower First Floor", "Region", self.player))
116 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Second Floor", "Region", self.player))
117 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
118 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fourth Floor", "Region", self.player))
119 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player))
120 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Sixth Floor", "Region", self.player))
121 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Seventh Floor", "Region", self.player))
122
123 self.remove(self.get_item_by_name("Orange Tower First Floor - Shortcut to Hub Room"))
124 self.assertTrue(self.multiworld.state.can_reach("Orange Tower First Floor", "Region", self.player))
125 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Second Floor", "Region", self.player))
126 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
127 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fourth Floor", "Region", self.player))
128 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player))
129 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Sixth Floor", "Region", self.player))
130 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Seventh Floor", "Region", self.player))
131
132 self.collect(progressive_tower[1])
133 self.assertTrue(self.multiworld.state.can_reach("Orange Tower First Floor", "Region", self.player))
134 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Second Floor", "Region", self.player))
135 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
136 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fourth Floor", "Region", self.player))
137 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player))
138 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Sixth Floor", "Region", self.player))
139 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Seventh Floor", "Region", self.player))
140
141 self.collect(progressive_tower[2])
142 self.assertTrue(self.multiworld.state.can_reach("Orange Tower First Floor", "Region", self.player))
143 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Second Floor", "Region", self.player))
144 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
145 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Fourth Floor", "Region", self.player))
146 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player))
147 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Sixth Floor", "Region", self.player))
148 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Seventh Floor", "Region", self.player))
149
150 self.collect(progressive_tower[3])
151 self.assertTrue(self.multiworld.state.can_reach("Orange Tower First Floor", "Region", self.player))
152 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Second Floor", "Region", self.player))
153 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
154 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Fourth Floor", "Region", self.player))
155 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player))
156 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Sixth Floor", "Region", self.player))
157 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Seventh Floor", "Region", self.player))
158
159 self.collect(progressive_tower[4])
160 self.assertTrue(self.multiworld.state.can_reach("Orange Tower First Floor", "Region", self.player))
161 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Second Floor", "Region", self.player))
162 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
163 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Fourth Floor", "Region", self.player))
164 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player))
165 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Sixth Floor", "Region", self.player))
166 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Seventh Floor", "Region", self.player))
167
168 self.collect(progressive_tower[5])
169 self.assertTrue(self.multiworld.state.can_reach("Orange Tower First Floor", "Region", self.player))
170 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Second Floor", "Region", self.player))
171 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
172 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Fourth Floor", "Region", self.player))
173 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Fifth Floor", "Region", self.player))
174 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Sixth Floor", "Region", self.player))
175 self.assertTrue(self.multiworld.state.can_reach("Orange Tower Seventh Floor", "Region", self.player))
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 @@
1from . import LingoTestBase
2
3
4class 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
55class 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
82class 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
147class 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))
diff --git a/test/__init__.py b/test/__init__.py new file mode 100644 index 0000000..ffbf903 --- /dev/null +++ b/test/__init__.py
@@ -0,0 +1,13 @@
1from typing import ClassVar
2
3from test.bases import WorldTestBase
4from .. import LingoTestOptions
5
6
7class LingoTestBase(WorldTestBase):
8 game = "Lingo"
9 player: ClassVar[int] = 1
10
11 def world_setup(self, *args, **kwargs):
12 LingoTestOptions.disable_forced_good_item = True
13 super().world_setup(*args, **kwargs)