fix LttP create_regions

This commit is contained in:
Fabian Dill 2021-07-23 12:03:19 +02:00
parent d62b46f6cd
commit 15747f48e9
1 changed files with 35 additions and 35 deletions

View File

@ -34,48 +34,48 @@ class ALTTPWorld(World):
create_items = generate_itempool create_items = generate_itempool
def create_regions(self): def create_regions(self):
player = self.player
world = self.world world = self.world
for player in world.get_game_players("A Link to the Past"): if world.open_pyramid[player] == 'goal':
if world.open_pyramid[player] == 'goal': world.open_pyramid[player] = world.goal[player] in {'crystals', 'ganontriforcehunt',
world.open_pyramid[player] = world.goal[player] in {'crystals', 'ganontriforcehunt', 'localganontriforcehunt', 'ganonpedestal'}
'localganontriforcehunt', 'ganonpedestal'} elif world.open_pyramid[player] == 'auto':
elif world.open_pyramid[player] == 'auto': world.open_pyramid[player] = world.goal[player] in {'crystals', 'ganontriforcehunt',
world.open_pyramid[player] = world.goal[player] in {'crystals', 'ganontriforcehunt', 'localganontriforcehunt', 'ganonpedestal'} and \
'localganontriforcehunt', 'ganonpedestal'} and \ (world.shuffle[player] in {'vanilla', 'dungeonssimple', 'dungeonsfull',
(world.shuffle[player] in {'vanilla', 'dungeonssimple', 'dungeonsfull', 'dungeonscrossed'} or not world.shuffle_ganon)
'dungeonscrossed'} or not world.shuffle_ganon) else:
else: world.open_pyramid[player] = {'on': True, 'off': False, 'yes': True, 'no': False}.get(
world.open_pyramid[player] = {'on': True, 'off': False, 'yes': True, 'no': False}.get( world.open_pyramid[player], 'auto')
world.open_pyramid[player], 'auto')
world.triforce_pieces_available[player] = max(world.triforce_pieces_available[player], world.triforce_pieces_available[player] = max(world.triforce_pieces_available[player],
world.triforce_pieces_required[player]) world.triforce_pieces_required[player])
if world.mode[player] != 'inverted': if world.mode[player] != 'inverted':
create_regions(world, player) create_regions(world, player)
else: else:
create_inverted_regions(world, player) create_inverted_regions(world, player)
create_shops(world, player) create_shops(world, player)
create_dungeons(world, player) create_dungeons(world, player)
for player in world.get_game_players("A Link to the Past"):
if world.logic[player] not in ["noglitches", "minorglitches"] and world.shuffle[player] in \
{"vanilla", "dungeonssimple", "dungeonsfull", "simple", "restricted", "full"}:
world.fix_fake_world[player] = False
# seeded entrance shuffle if world.logic[player] not in ["noglitches", "minorglitches"] and world.shuffle[player] in \
old_random = world.random {"vanilla", "dungeonssimple", "dungeonsfull", "simple", "restricted", "full"}:
world.random = random.Random(world.er_seeds[player]) world.fix_fake_world[player] = False
if world.mode[player] != 'inverted': # seeded entrance shuffle
link_entrances(world, player) old_random = world.random
mark_light_world_regions(world, player) world.random = random.Random(world.er_seeds[player])
else:
link_inverted_entrances(world, player)
mark_dark_world_regions(world, player)
world.random = old_random if world.mode[player] != 'inverted':
plando_connect(world, player) link_entrances(world, player)
mark_light_world_regions(world, player)
else:
link_inverted_entrances(world, player)
mark_dark_world_regions(world, player)
world.random = old_random
plando_connect(world, player)
def collect(self, state: CollectionState, item: Item) -> bool: def collect(self, state: CollectionState, item: Item) -> bool:
if item.name.startswith('Progressive '): if item.name.startswith('Progressive '):