TUNIC: Fix decoupled ER + ladder storage making invalid entrances #5075

This commit is contained in:
Scipio Wright
2025-06-03 06:51:06 -04:00
committed by GitHub
parent 694e6bcae3
commit a76cec1539

View File

@@ -56,18 +56,18 @@ def set_er_region_rules(world: "TunicWorld", regions: Dict[str, Region], portal_
for portal1, portal2 in portal_pairs.items():
if portal1.scene_destination() == portal_sd:
return portal1.name, get_portal_outlet_region(portal2, world)
if portal2.scene_destination() == portal_sd:
if portal2.scene_destination() == portal_sd and not (options.decoupled and options.entrance_rando):
return portal2.name, get_portal_outlet_region(portal1, world)
raise Exception("No matches found in get_portal_info")
raise Exception(f"No matches found in get_portal_info for {portal_sd}")
# input scene destination tag, returns paired portal's name and region
def get_paired_portal(portal_sd: str) -> Tuple[str, str]:
for portal1, portal2 in portal_pairs.items():
if portal1.scene_destination() == portal_sd:
return portal2.name, portal2.region
if portal2.scene_destination() == portal_sd:
if portal2.scene_destination() == portal_sd and not (options.decoupled and options.entrance_rando):
return portal1.name, portal1.region
raise Exception("no matches found in get_paired_portal")
raise Exception(f"No matches found in get_paired_portal for {portal_sd}")
regions["Menu"].connect(
connecting_region=regions["Overworld"])