summary refs log tree commit diff stats
path: root/test/TestDoors.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/TestDoors.py')
-rw-r--r--test/TestDoors.py89
1 files changed, 89 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