Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions worlds/pokemon_rb/regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1580,16 +1580,22 @@ def create_regions(world):

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
def acceptable_item(item):
return ("Badge" not in item.name and "Trap" not in item.name and item.name != "Pokedex"
and "Coins" not in item.name and "Progressive" not in item.name
and ("Player's House 2F - Player's PC" not in world.options.exclude_locations or item.excludable)
and ("Player's House 2F - Player's PC" in world.options.exclude_locations or
"Player's House 2F - Player's PC" not in world.options.priority_locations or item.advancement))
for i, item in enumerate(world.item_pool):
if acceptable_item(item):
if acceptable_item(item) and (item.name not in world.options.non_local_items.value):
world.pc_item = world.item_pool.pop(i)
break
else:
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
Expand Down
Loading