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.
This commit is contained in:
t3hf1gm3nt 2023-12-09 22:23:40 -05:00 committed by GitHub
parent f10431779b
commit 3214cef6cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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