Skip to content

Commit fd3a13c

Browse files
alwaysintrebleqwint
authored andcommitted
The Messenger: fix generation failure for no portal shuffle with 3 available portals (ArchipelagoMW#3200)
1 parent fffce23 commit fd3a13c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

worlds/messenger/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ def generate_early(self) -> None:
155155
self.starting_portals.append("Searing Crags Portal")
156156
portals_to_strip = [portal for portal in ["Riviere Turquoise Portal", "Sunken Shrine Portal"]
157157
if portal in self.starting_portals]
158-
self.starting_portals.remove(self.random.choice(portals_to_strip))
158+
if portals_to_strip:
159+
self.starting_portals.remove(self.random.choice(portals_to_strip))
159160

160161
self.filler = FILLER.copy()
161162
if self.options.traps:

worlds/messenger/test/test_portals.py

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55

66
class PortalTestBase(MessengerTestBase):
7+
options = {
8+
"available_portals": 3,
9+
}
10+
711
def test_portal_reqs(self) -> None:
812
"""tests the paths to open a portal if only that portal is closed with vanilla connections."""
913
# portal and requirements to reach it if it's the only closed portal

0 commit comments

Comments
 (0)