LttP: remove "bonus" small key hyrule castle in case of standard + own_dungeons

This commit is contained in:
Fabian Dill 2022-01-09 04:48:31 +01:00
parent 651e22b14a
commit bde58fb677
2 changed files with 14 additions and 5 deletions

View File

@ -336,7 +336,8 @@ class ALTTPWorld(World):
standard_keyshuffle_players = set()
for player in world.get_game_players("A Link to the Past"):
if world.mode[player] == 'standard' and world.smallkey_shuffle[player] \
and world.smallkey_shuffle[player] != smallkey_shuffle.option_universal:
and world.smallkey_shuffle[player] != smallkey_shuffle.option_universal and \
world.smallkey_shuffle[player] != smallkey_shuffle.option_own_dungeons:
standard_keyshuffle_players.add(player)
if not world.ganonstower_vanilla[player] or \
world.logic[player] in {'owglitches', 'hybridglitches', "nologic"}:
@ -364,6 +365,14 @@ class ALTTPWorld(World):
fill_locations.remove(loc)
world.random.shuffle(fill_locations)
# TODO: investigate not creating the key in the first place
if __debug__:
# keeping this here while I'm not sure we caught all instances of multiple HC small keys in the pool
count = len(progitempool)
progitempool[:] = [item for item in progitempool if
item.player not in standard_keyshuffle_players or
item.name != "Small Key (Hyrule Castle)"]
assert len(progitempool) + len(standard_keyshuffle_players) == count
else:
progitempool[:] = [item for item in progitempool if
item.player not in standard_keyshuffle_players or
item.name != "Small Key (Hyrule Castle)"]