Archipelago/worlds/sm
lordlou 941dcb60e5
SM: fixed flawed and limited comeback check (#1398)
The issue at hand is fixing impossible seeds generated by a lack of properly checking if the player can come back to its previous region after reaching for a new location, as reported here: https://discord.com/channels/731205301247803413/1050529825212874763/1050529825212874763

The previous attempt at checking for comeback was only done against "Landing Site" and the custom start region which is a partial solution at best. For exemple, generating a single player plando seed with a custom starting location at "red_brinstar_elevator" with a forced red door at "RedTowerElevatorBottomLeft" and 2 Missiles set at "Morphing Ball" and "Energy Tank, Brinstar Ceiling" would generate an impossible seed where the player is expected to go through the green door "LandingSiteRight" with no Supers to go to the only possible next location "Power Bomb (red Brinstar spike room)". This is because the comeback check would pass because it would consider coming back to "Landing Site" enough.

The proposed solution is keeping a record of the last accessed region when collecting items. It would then be used as the source of the comeback check with the destination being the new location. This check had to be moved from can_fill() to can_reach() because the maximum_exploration_state of the AP filler only use can_reach().

Its still not perfect because collect() can be called in batch for many items at a time so the last accessed region will be set as the last collected item and will be used for the next comeback checks.

This was tested a bit with the given exemple above (its now failing generation) and by generating some 8 SM players seed with many door color rando, area rando and boss rando enabled.
2023-01-23 00:36:18 +01:00
..
data SM: Fix unobtainable items in remote items+item links combo (#1151) 2022-11-01 06:42:11 +01:00
docs Docs: Update snes9x Links (#1048) 2022-09-27 13:26:33 +02:00
variaRandomizer SM: fixed flawed and limited comeback check (#1398) 2023-01-23 00:36:18 +01:00
Client.py SM: Fix unobtainable items in remote items+item links combo (#1151) 2022-11-01 06:42:11 +01:00
Options.py Templates: Remove auto wordwrap, fix manual indentation, and reformat docstrings for world options in main. (#1201) 2022-11-06 08:28:16 -06:00
Regions.py Added Super Metroid support (#46) 2021-11-12 14:00:11 +01:00
Rom.py SM: Fix unobtainable items in remote items+item links combo (#1151) 2022-11-01 06:42:11 +01:00
Rules.py Added Super Metroid support (#46) 2021-11-12 14:00:11 +01:00
__init__.py SM: fixed flawed and limited comeback check (#1398) 2023-01-23 00:36:18 +01:00