Skip to content

Commit

Permalink
TLOZ: Try accounting for non_local_items with the pool of starting we…
Browse files Browse the repository at this point in the history
…apons

It was brought up that if you attempt to non_local any of the starting weapons, there is still a chance for it to get chosen as your starting weapon if you are on a StartingPosition value lower than very_dangerous. This fix will attempt to build the starting weapons list accounting for non_local items, but if all possible weapons have been set to non_local, force one of them to be your starting weapon anyway since the player is still expecting a starting weapon in their world if they have chosen one of the lower StartingPosition values.
  • Loading branch information
t3hf1gm3nt committed Dec 20, 2023
1 parent 817197c commit 1ae4ed4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion worlds/tloz/ItemPool.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ def get_pool_core(world):

# Starting Weapon
start_weapon_locations = starting_weapon_locations.copy()
starting_weapon = random.choice(starting_weapons)
final_starting_weapons = [weapon for weapon in starting_weapons
if weapon not in world.multiworld.non_local_items[world.player]]
if not final_starting_weapons:
final_starting_weapons = starting_weapons
starting_weapon = random.choice(final_starting_weapons)
if world.multiworld.StartingPosition[world.player] == StartingPosition.option_safe:
placed_items[start_weapon_locations[0]] = starting_weapon
elif world.multiworld.StartingPosition[world.player] in \
Expand Down

0 comments on commit 1ae4ed4

Please sign in to comment.