The Messenger: Transition Shuffle (#4402)

* The Messenger: transition rando

* remove unused import

* always link both directions for plando when using coupled transitions

* er_type was renamed to randomization_type

* use frozenset for things that shouldn't change

* review suggestions

* do portal and transition shuffle in `connect_entrances`

* remove some unnecessary connections that were causing entrance caching collisions

* add test for strictest possible ER settings

* use unittest.skip on the skipped test, so we don't waste time doing setUp and tearDown

* use the world helpers

* make the plando connection description more verbose

* always add searing crags portal if portal shuffle is disabled

* guarantee an arbitrary number of locations with first connection

* make the constraints more lenient for a bit more variety
This commit is contained in:
Aaron Wagener
2025-03-10 10:16:09 -05:00
committed by GitHub
parent 4882366ffc
commit 7c30c4a169
7 changed files with 258 additions and 75 deletions

View File

@@ -1,7 +1,7 @@
from copy import deepcopy
from typing import TYPE_CHECKING
from BaseClasses import CollectionState, PlandoOptions
from BaseClasses import CollectionState
from Options import PlandoConnection
if TYPE_CHECKING:
@@ -252,9 +252,7 @@ def shuffle_portals(world: "MessengerWorld") -> None:
world.random.shuffle(available_portals)
plando = world.options.portal_plando.value
if not plando:
plando = world.options.plando_connections.value
if plando and world.multiworld.plando_options & PlandoOptions.connections and not world.plando_portals:
if plando and not world.plando_portals:
try:
handle_planned_portals(plando)
# any failure i expect will trigger on available_portals.remove
@@ -294,8 +292,8 @@ def disconnect_portals(world: "MessengerWorld") -> None:
def validate_portals(world: "MessengerWorld") -> bool:
# if world.options.shuffle_transitions:
# return True
if world.options.shuffle_transitions:
return True
new_state = CollectionState(world.multiworld)
new_state.update_reachable_regions(world.player)
reachable_locs = 0