Pokemon R/B: The Big Door Shuffle Update (#2861)

- Perhaps most critically, adds the ability for the door shuffle code to catch door shuffle exceptions and try again. Will try up to 10 times. Should mean Door Shuffle does not need to be disallowed in the big async🤞
- Door Shuffle code has been made drastically faster by searching for the first dead end instead of sorting the whole list of entrances by whether they are dead ends.
- Renames Full to Interiors, and adds a new Full door shuffle that shuffles interior-to-interior doors separately from exterior-to-interior doors.
- Adds a new Decoupled door shuffle.
- Warp Tile Shuffle now has 3 separate options, Vanilla, Shuffle, and Mixed. Shuffle shuffles the warp tiles among themselves, Mixed mixes them into the Door Shuffle pool.
- Safari Zone connections are now shuffled on Full, Insanity, and Decoupled.
- On Simple Door Shuffle, the Town Map is updated to show the new dungeon locations. The Town Map has been updated to show the locations of dungeons that previously were not shown unless you opened the map within them, and the Sea Cottage has been removed from it.
- Adds Auto Level Scaling that chooses the level scaling mode based on the Door Shuffle choice.
- Fixes issues with Flash and Fly move interventions (where it ensures an available Pokémon that can learn it is reachable depending on settings).
- Fixes a possible generation crash with type chart randomization.
- Should fix an issue where `stage_fill_hook` was able to remove the wrong item from the item pool resulting in a duplicated item reference existing.
- Adds a stage_post_fill function which searches for Pokémon in order of spheres, setting all but the first advancement Pokémon event found to `useful` so that spoiler playthrough calculation skips them. In a solo game gen test, this cut gen time from 15 seconds to 10 seconds with same seed number. Difference is likely to be much more massive in larger multiworlds.
This commit is contained in:
Alchav
2024-03-05 17:01:45 -05:00
committed by GitHub
parent bfa9e7da00
commit a5a1494a96
10 changed files with 621 additions and 416 deletions

View File

@@ -10,7 +10,9 @@ def level_scaling(multiworld):
while locations:
sphere = set()
for world in multiworld.get_game_worlds("Pokemon Red and Blue"):
if multiworld.level_scaling[world.player] != "by_spheres_and_distance":
if (multiworld.level_scaling[world.player] != "by_spheres_and_distance"
and (multiworld.level_scaling[world.player] != "auto" or multiworld.door_shuffle[world.player]
in ("off", "simple"))):
continue
regions = {multiworld.get_region("Menu", world.player)}
checked_regions = set()
@@ -45,18 +47,18 @@ def level_scaling(multiworld):
return True
if (("Rock Tunnel 1F - Wild Pokemon" in location.name
and any([multiworld.get_entrance(e, location.player).connected_region.can_reach(state)
for e in ['Rock Tunnel 1F-NE to Route 10-N',
'Rock Tunnel 1F-NE to Rock Tunnel B1F-E',
'Rock Tunnel 1F-NW to Rock Tunnel B1F-E',
'Rock Tunnel 1F-NW to Rock Tunnel B1F-W',
'Rock Tunnel 1F-S to Route 10-S',
'Rock Tunnel 1F-S to Rock Tunnel B1F-W']])) or
for e in ['Rock Tunnel 1F-NE 1 to Route 10-N',
'Rock Tunnel 1F-NE 2 to Rock Tunnel B1F-E 1',
'Rock Tunnel 1F-NW 1 to Rock Tunnel B1F-E 2',
'Rock Tunnel 1F-NW 2 to Rock Tunnel B1F-W 1',
'Rock Tunnel 1F-S 1 to Route 10-S',
'Rock Tunnel 1F-S 2 to Rock Tunnel B1F-W 2']])) or
("Rock Tunnel B1F - Wild Pokemon" in location.name and
any([multiworld.get_entrance(e, location.player).connected_region.can_reach(state)
for e in ['Rock Tunnel B1F-E to Rock Tunnel 1F-NE',
'Rock Tunnel B1F-E to Rock Tunnel 1F-NW',
'Rock Tunnel B1F-W to Rock Tunnel 1F-NW',
'Rock Tunnel B1F-W to Rock Tunnel 1F-S']]))):
for e in ['Rock Tunnel B1F-E 1 to Rock Tunnel 1F-NE 2',
'Rock Tunnel B1F-E 2 to Rock Tunnel 1F-NW 1',
'Rock Tunnel B1F-W 1 to Rock Tunnel 1F-NW 2',
'Rock Tunnel B1F-W 2 to Rock Tunnel 1F-S 2']]))):
# Even if checks in Rock Tunnel are out of logic due to lack of Flash, it is very easy to
# wander in the dark and encounter wild Pokémon, even unintentionally while attempting to
# leave the way you entered. We'll count the wild Pokémon as reachable as soon as the Rock
@@ -135,4 +137,3 @@ def level_scaling(multiworld):
sphere_objects[object].level = level_list_copy.pop(0)
for world in multiworld.get_game_worlds("Pokemon Red and Blue"):
world.finished_level_scaling.set()