From c74577d7082881dc19d4d8b188290cd3b459c891 Mon Sep 17 00:00:00 2001 From: t3hf1gm3nt <59876300+t3hf1gm3nt@users.noreply.github.com> Date: Mon, 8 May 2023 16:36:35 -0400 Subject: [PATCH] [TLOZ] Fix start weapon locations (#1802) * Fix starting weapon locations usage Makes a fresh copy of starting weapon locations when get_pool_core is ran Should fix the issue of dangerous_weapon_locations getting appended to the list for other worlds past the first world that has dangerous StartingPosition, as well as running into the error if ExpandedPool was different between players Credit for fix goes to @Silvris in the AP Discord --- worlds/tloz/ItemPool.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/worlds/tloz/ItemPool.py b/worlds/tloz/ItemPool.py index 9dcf1b7a..1d333361 100644 --- a/worlds/tloz/ItemPool.py +++ b/worlds/tloz/ItemPool.py @@ -92,16 +92,17 @@ def get_pool_core(world): placed_items[location] = item # Starting Weapon + start_weapon_locations = starting_weapon_locations.copy() starting_weapon = random.choice(starting_weapons) if world.multiworld.StartingPosition[world.player] == StartingPosition.option_safe: - placed_items[starting_weapon_locations[0]] = starting_weapon + placed_items[start_weapon_locations[0]] = starting_weapon elif world.multiworld.StartingPosition[world.player] in \ [StartingPosition.option_unsafe, StartingPosition.option_dangerous]: if world.multiworld.StartingPosition[world.player] == StartingPosition.option_dangerous: for location in dangerous_weapon_locations: if world.multiworld.ExpandedPool[world.player] or "Drop" not in location: - starting_weapon_locations.append(location) - placed_items[random.choice(starting_weapon_locations)] = starting_weapon + start_weapon_locations.append(location) + placed_items[random.choice(start_weapon_locations)] = starting_weapon else: pool.append(starting_weapon) for other_weapons in starting_weapons: