Archipelago/worlds
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
..
alttp Core: convert mixture of Plando Options and Settings into just Options 2023-01-19 17:20:23 +01:00
archipidle Core: rename `world` to `multiworld` (#931) 2022-10-31 21:41:21 -05:00
bk_sudoku Sudoku: Hints will no-longer duplicate (#1371) 2023-01-07 10:10:20 +01:00
checksfinder Core: rename `world` to `multiworld` (#931) 2022-10-31 21:41:21 -05:00
dark_souls_3 Network: implement 0.4 marked compatibility removals (#757) 2022-12-11 02:59:17 +01:00
dkc3 DKC3: Fix Generation Hang from missed `self.world` reference (#1203) 2022-11-04 21:40:31 -05:00
factorio Factorio: fix revealed tech tree hinting old location names 2022-12-04 21:29:35 +01:00
ff1 Network: implement 0.4 marked compatibility removals (#757) 2022-12-11 02:59:17 +01:00
generic Docs: Add special name keywords to docs. (#1353) 2023-01-02 14:42:47 -06:00
hk Tests: ensure item name groups do not collide with item names (#1074) 2023-01-18 15:45:48 +01:00
hylics2 Network: implement 0.4 marked compatibility removals (#757) 2022-12-11 02:59:17 +01:00
lufia2ac lufia2ac: rename starting_capsule/starting_party options to default_capsule/default_party 2022-12-19 12:45:49 +01:00
meritous Core: rename `world` to `multiworld` (#931) 2022-10-31 21:41:21 -05:00
minecraft Tests: now autoload tests from /worlds/*/test (#1318) 2022-12-11 13:15:23 +01:00
oot oot: force itempool to higher settings if required by heart logic 2023-01-13 23:53:13 +01:00
oribf Core: rename `world` to `multiworld` (#931) 2022-10-31 21:41:21 -05:00
overcooked2 [OC2] Logic: fixes fails when horde levels/items are excluded from location pool (#1369) 2023-01-05 15:49:50 +01:00
pokemon_rb Pokemon Red and Blue: Updates to trap weights and tracker support (#1395) 2023-01-20 18:49:12 +01:00
raft Templates: Remove auto wordwrap, fix manual indentation, and reformat docstrings for world options in main. (#1201) 2022-11-06 08:28:16 -06:00
rogue_legacy Rogue Legacy: Fix early vendors and architect... again. (#1359) 2023-01-02 12:25:47 -06:00
ror2 MultiServer: Remove `forced_auto_forfeit` (#1363) 2023-01-02 19:26:34 -06:00
sa2b SA2B: Fix Gate region connections (#1384) 2023-01-15 17:55:36 +01:00
sc2wol SC2: Various bugfixes (#1267) 2022-12-11 13:46:24 -06:00
sm SM: fixed flawed and limited comeback check (#1398) 2023-01-23 00:36:18 +01:00
sm64ex Templates: Remove auto wordwrap, fix manual indentation, and reformat docstrings for world options in main. (#1201) 2022-11-06 08:28:16 -06:00
smw SMW: Adjust Butter Bridge 2 - Dragon Coins logic (#1332) 2022-12-17 09:18:23 +01:00
smz3 Network: implement 0.4 marked compatibility removals (#757) 2022-12-11 02:59:17 +01:00
soe Tests: now autoload tests from /worlds/*/test (#1318) 2022-12-11 13:15:23 +01:00
spire MultiServer: Remove `forced_auto_forfeit` (#1363) 2023-01-02 19:26:34 -06:00
subnautica Core: mark version as 0.3.8 2023-01-21 17:30:30 +01:00
timespinner Network: implement 0.4 marked compatibility removals (#757) 2022-12-11 02:59:17 +01:00
v6 Core: rename `world` to `multiworld` (#931) 2022-10-31 21:41:21 -05:00
witness The Witness: Fix Expert PP2 Access Logic 2022-12-01 03:46:11 +01:00
zillion Zillion: minor terrain logic update 2023-01-07 10:12:45 +01:00
AutoSNIClient.py Core: SNI Client Refactor (#1083) 2022-10-25 19:54:43 +02:00
AutoWorld.py MultiServer: Remove `forced_auto_forfeit` (#1363) 2023-01-02 19:26:34 -06:00
Files.py [Pokemon Red and Blue] Initial implementation (#1016) 2022-10-13 07:45:52 +02:00
__init__.py Core: Make apworlds function mostly before Python 3.10 2022-12-20 17:24:04 +01:00