Pokémon R/B: Allow generating with all items linked (#4330)

* Pokémon R/B: Allow generating with all items linked

* check priority/excluded locations for pc_item

* Update regions.py

* Un-remove regions.py code
This commit is contained in:
Alchav
2025-03-16 12:33:24 -04:00
committed by GitHub
parent 785569c40c
commit 7f35eb8867
2 changed files with 27 additions and 9 deletions

View File

@@ -1579,6 +1579,18 @@ def create_regions(world):
world.item_pool.append(item)
world.random.shuffle(world.item_pool)
if not world.options.key_items_only:
if "Player's House 2F - Player's PC" in world.options.exclude_locations:
acceptable_item = lambda item: item.excludable
elif "Player's House 2F - Player's PC" in world.options.priority_locations:
acceptable_item = lambda item: item.advancement
else:
acceptable_item = lambda item: True
for i, item in enumerate(world.item_pool):
if acceptable_item(item):
world.pc_item = world.item_pool.pop(i)
break
advancement_items = [item.name for item in world.item_pool if item.advancement] \
+ [item.name for item in world.multiworld.precollected_items[world.player] if
item.advancement]