summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-07-23 02:34:47 -0400
committerGitHub <noreply@github.com>2024-07-23 08:34:47 +0200
commitcccdf6481571cd883c9519cde0a717b6f336fbda (patch)
treee321f8eb2b6d1ad40b47a99a2bf0279902c9e5b9
parent5c54e52bfe88c5ee91828a3eea1d2cecfee8af45 (diff)
downloadlingo-apworld-cccdf6481571cd883c9519cde0a717b6f336fbda.tar.gz
lingo-apworld-cccdf6481571cd883c9519cde0a717b6f336fbda.tar.bz2
lingo-apworld-cccdf6481571cd883c9519cde0a717b6f336fbda.zip
Lingo: Add pilgrimage logic through Starting Room (#3654)
* Lingo: Add pilgrimage logic through Starting Room

* Added unit test

* Reverse order of two doors in unit test

* Remove print statements from TestPilgrimage

* Update generated.dat
-rw-r--r--data/LL1.yaml9
-rw-r--r--data/generated.datbin136017 -> 136277 bytes
-rw-r--r--test/TestPilgrimage.py32
3 files changed, 37 insertions, 4 deletions
diff --git a/data/LL1.yaml b/data/LL1.yaml index 970063d..e12ca02 100644 --- a/data/LL1.yaml +++ b/data/LL1.yaml
@@ -140,6 +140,15 @@
140 painting: True 140 painting: True
141 The Colorful: 141 The Colorful:
142 painting: True 142 painting: True
143 Welcome Back Area:
144 room: Welcome Back Area
145 door: Shortcut to Starting Room
146 Second Room:
147 door: Main Door
148 Hidden Room:
149 door: Back Right Door
150 Rhyme Room (Looped Square):
151 door: Rhyme Room Entrance
143 panels: 152 panels:
144 HI: 153 HI:
145 id: Entry Room/Panel_hi_hi 154 id: Entry Room/Panel_hi_hi
diff --git a/data/generated.dat b/data/generated.dat index 0653086..3ed6cb2 100644 --- a/data/generated.dat +++ b/data/generated.dat
Binary files differ
diff --git a/test/TestPilgrimage.py b/test/TestPilgrimage.py index 3cc9194..4c5e259 100644 --- a/test/TestPilgrimage.py +++ b/test/TestPilgrimage.py
@@ -29,7 +29,6 @@ class TestPilgrimageWithRoofAndPaintings(LingoTestBase):
29 "Outside The Undeterred - Green Painting"] 29 "Outside The Undeterred - Green Painting"]
30 30
31 for door in doors: 31 for door in doors:
32 print(door)
33 self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM")) 32 self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
34 self.collect_by_name(door) 33 self.collect_by_name(door)
35 34
@@ -53,7 +52,6 @@ class TestPilgrimageNoRoofYesPaintings(LingoTestBase):
53 "Starting Room - Street Painting"] 52 "Starting Room - Street Painting"]
54 53
55 for door in doors: 54 for door in doors:
56 print(door)
57 self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM")) 55 self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
58 self.collect_by_name(door) 56 self.collect_by_name(door)
59 57
@@ -81,13 +79,40 @@ class TestPilgrimageNoRoofNoPaintings(LingoTestBase):
81 "Orange Tower Fourth Floor - Hot Crusts Door"] 79 "Orange Tower Fourth Floor - Hot Crusts Door"]
82 80
83 for door in doors: 81 for door in doors:
84 print(door)
85 self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM")) 82 self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
86 self.collect_by_name(door) 83 self.collect_by_name(door)
87 84
88 self.assertTrue(self.can_reach_location("Pilgrim Antechamber - PILGRIM")) 85 self.assertTrue(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
89 86
90 87
88class TestPilgrimageRequireStartingRoom(LingoTestBase):
89 options = {
90 "enable_pilgrimage": "true",
91 "shuffle_colors": "false",
92 "shuffle_doors": "complex",
93 "pilgrimage_allows_roof_access": "false",
94 "pilgrimage_allows_paintings": "false",
95 "early_color_hallways": "false"
96 }
97
98 def test_access(self):
99 doors = ["Second Room - Exit Door", "Crossroads - Roof Access", "Hub Room - Crossroads Entrance",
100 "Outside The Undeterred - Green Painting", "Outside The Undeterred - Number Hunt",
101 "Starting Room - Street Painting", "Outside The Initiated - Shortcut to Hub Room",
102 "Directional Gallery - Shortcut to The Undeterred", "Orange Tower First Floor - Salt Pepper Door",
103 "Color Hunt - Shortcut to The Steady", "The Bearer - Entrance",
104 "Orange Tower Fifth Floor - Quadruple Intersection", "The Tenacious - Shortcut to Hub Room",
105 "Outside The Agreeable - Tenacious Entrance", "Crossroads - Tower Entrance",
106 "Orange Tower Fourth Floor - Hot Crusts Door", "Challenge Room - Welcome Door",
107 "Number Hunt - Challenge Entrance", "Welcome Back Area - Shortcut to Starting Room"]
108
109 for door in doors:
110 self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
111 self.collect_by_name(door)
112
113 self.assertTrue(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
114
115
91class TestPilgrimageYesRoofNoPaintings(LingoTestBase): 116class TestPilgrimageYesRoofNoPaintings(LingoTestBase):
92 options = { 117 options = {
93 "enable_pilgrimage": "true", 118 "enable_pilgrimage": "true",
@@ -107,7 +132,6 @@ class TestPilgrimageYesRoofNoPaintings(LingoTestBase):
107 "Orange Tower Fifth Floor - Quadruple Intersection"] 132 "Orange Tower Fifth Floor - Quadruple Intersection"]
108 133
109 for door in doors: 134 for door in doors:
110 print(door)
111 self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM")) 135 self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
112 self.collect_by_name(door) 136 self.collect_by_name(door)
113 137