Skip to content

Commit

Permalink
Lingo: Add pilgrimage logic through Starting Room (#3654)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
hatkirby authored Jul 23, 2024
1 parent 9c2933f commit 5188375
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 4 deletions.
9 changes: 9 additions & 0 deletions worlds/lingo/data/LL1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,15 @@
painting: True
The Colorful:
painting: True
Welcome Back Area:
room: Welcome Back Area
door: Shortcut to Starting Room
Second Room:
door: Main Door
Hidden Room:
door: Back Right Door
Rhyme Room (Looped Square):
door: Rhyme Room Entrance
panels:
HI:
id: Entry Room/Panel_hi_hi
Expand Down
Binary file modified worlds/lingo/data/generated.dat
Binary file not shown.
32 changes: 28 additions & 4 deletions worlds/lingo/test/TestPilgrimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def test_access(self):
"Outside The Undeterred - Green Painting"]

for door in doors:
print(door)
self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
self.collect_by_name(door)

Expand All @@ -53,7 +52,6 @@ def test_access(self):
"Starting Room - Street Painting"]

for door in doors:
print(door)
self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
self.collect_by_name(door)

Expand Down Expand Up @@ -81,13 +79,40 @@ def test_access(self):
"Orange Tower Fourth Floor - Hot Crusts Door"]

for door in doors:
print(door)
self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
self.collect_by_name(door)

self.assertTrue(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))


class TestPilgrimageRequireStartingRoom(LingoTestBase):
options = {
"enable_pilgrimage": "true",
"shuffle_colors": "false",
"shuffle_doors": "complex",
"pilgrimage_allows_roof_access": "false",
"pilgrimage_allows_paintings": "false",
"early_color_hallways": "false"
}

def test_access(self):
doors = ["Second Room - Exit Door", "Crossroads - Roof Access", "Hub Room - Crossroads Entrance",
"Outside The Undeterred - Green Painting", "Outside The Undeterred - Number Hunt",
"Starting Room - Street Painting", "Outside The Initiated - Shortcut to Hub Room",
"Directional Gallery - Shortcut to The Undeterred", "Orange Tower First Floor - Salt Pepper Door",
"Color Hunt - Shortcut to The Steady", "The Bearer - Entrance",
"Orange Tower Fifth Floor - Quadruple Intersection", "The Tenacious - Shortcut to Hub Room",
"Outside The Agreeable - Tenacious Entrance", "Crossroads - Tower Entrance",
"Orange Tower Fourth Floor - Hot Crusts Door", "Challenge Room - Welcome Door",
"Number Hunt - Challenge Entrance", "Welcome Back Area - Shortcut to Starting Room"]

for door in doors:
self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
self.collect_by_name(door)

self.assertTrue(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))


class TestPilgrimageYesRoofNoPaintings(LingoTestBase):
options = {
"enable_pilgrimage": "true",
Expand All @@ -107,7 +132,6 @@ def test_access(self):
"Orange Tower Fifth Floor - Quadruple Intersection"]

for door in doors:
print(door)
self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM"))
self.collect_by_name(door)

Expand Down

0 comments on commit 5188375

Please sign in to comment.