From 3214cef6cf64451de1d4d9305f1ac82085f02125 Mon Sep 17 00:00:00 2001 From: t3hf1gm3nt <59876300+t3hf1gm3nt@users.noreply.github.com> Date: Sat, 9 Dec 2023 22:23:40 -0500 Subject: [PATCH] TLOZ: Fix starting weapon possibly getting overwritten by triforce fragments (#2578) As discovered by this bug report https://discord.com/channels/731205301247803413/1182522267687731220 it's currently possible to accidentally have the starting weapon of a player overwritten by a triforce fragment if TriforceLocations is set to dungeons and StartingPosition is set to dangerous. This fix makes sure to remove the location of a placed starting weapon if said location is in a dungeon from the pool of possible locations that triforce fragments can be placed in this circumstance. --- worlds/tloz/ItemPool.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/worlds/tloz/ItemPool.py b/worlds/tloz/ItemPool.py index 1d333361..7773accd 100644 --- a/worlds/tloz/ItemPool.py +++ b/worlds/tloz/ItemPool.py @@ -117,6 +117,9 @@ def get_pool_core(world): else: possible_level_locations = [location for location in standard_level_locations if location not in level_locations[8]] + for location in placed_items.keys(): + if location in possible_level_locations: + possible_level_locations.remove(location) for level in range(1, 9): if world.multiworld.TriforceLocations[world.player] == TriforceLocations.option_vanilla: placed_items[f"Level {level} Triforce"] = fragment