about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2025-10-07 18:01:18 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2025-10-07 18:01:18 -0400
commitecc4411f327e61f6db4a1c96596dd9e070790a46 (patch)
tree83fa07fde5b926cade750d05fe2792f0b0b3127d
parent239cd63658fcefcdf8531f8fa2fab2d5f1209d81 (diff)
downloadlingo2-archipelago-ecc4411f327e61f6db4a1c96596dd9e070790a46.tar.gz
lingo2-archipelago-ecc4411f327e61f6db4a1c96596dd9e070790a46.tar.bz2
lingo2-archipelago-ecc4411f327e61f6db4a1c96596dd9e070790a46.zip
Don't create useless connections
Connections that can't be used unless you already have access to the other side (e.g. being on the "wrong side" of a vanilla door) are useless because they never increase access. This change turns these into oneway connections. This has helped with ER failures significantly, reducing the fail rate from about 14% to about 3%.
-rw-r--r--apworld/regions.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/apworld/regions.py b/apworld/regions.py index 1215f5a..0c3858d 100644 --- a/apworld/regions.py +++ b/apworld/regions.py
@@ -132,6 +132,12 @@ def create_regions(world: "Lingo2World"):
132 reqs.simplify() 132 reqs.simplify()
133 reqs.remove_room(from_region) 133 reqs.remove_room(from_region)
134 134
135 if to_region in reqs.rooms:
136 # This connection can't ever increase access because you're required to have access to the other side in
137 # order for it to be usable. We will just not create the connection at all, in order to help GER figure out
138 # what regions are dead ends.
139 continue
140
135 connection = Entrance(world.player, connection_name, regions[from_region]) 141 connection = Entrance(world.player, connection_name, regions[from_region])
136 connection.access_rule = make_location_lambda(reqs, world, regions) 142 connection.access_rule = make_location_lambda(reqs, world, regions)
137 143