Skip to content

LttP: fix fix fake world always applying #3087

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 24 additions & 23 deletions worlds/alttp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,42 +345,43 @@ def generate_early(self):

def create_regions(self):
player = self.player
world = self.multiworld
multiworld = self.multiworld

if world.mode[player] != 'inverted':
create_regions(world, player)
if multiworld.mode[player] != 'inverted':
create_regions(multiworld, player)
else:
create_inverted_regions(world, player)
create_shops(world, player)
create_inverted_regions(multiworld, player)
create_shops(multiworld, player)
self.create_dungeons()

if world.glitches_required[player] not in ["no_glitches", "minor_glitches"] and world.entrance_shuffle[player] in \
{"vanilla", "dungeons_simple", "dungeons_full", "simple", "restricted", "full"}:
world.fix_fake_world[player] = False
if (multiworld.glitches_required[player] not in ["no_glitches", "minor_glitches"] and
multiworld.entrance_shuffle[player] in [
"vanilla", "dungeons_simple", "dungeons_full", "simple", "restricted", "full"]):
multiworld.fix_fake_world[player] = False

# seeded entrance shuffle
old_random = world.random
world.random = random.Random(self.er_seed)
old_random = multiworld.random
multiworld.random = random.Random(self.er_seed)

if world.mode[player] != 'inverted':
link_entrances(world, player)
mark_light_world_regions(world, player)
if multiworld.mode[player] != 'inverted':
link_entrances(multiworld, player)
mark_light_world_regions(multiworld, player)
for region_name, entrance_name in indirect_connections_not_inverted.items():
world.register_indirect_condition(world.get_region(region_name, player),
world.get_entrance(entrance_name, player))
multiworld.register_indirect_condition(multiworld.get_region(region_name, player),
multiworld.get_entrance(entrance_name, player))
else:
link_inverted_entrances(world, player)
mark_dark_world_regions(world, player)
link_inverted_entrances(multiworld, player)
mark_dark_world_regions(multiworld, player)
for region_name, entrance_name in indirect_connections_inverted.items():
world.register_indirect_condition(world.get_region(region_name, player),
world.get_entrance(entrance_name, player))
multiworld.register_indirect_condition(multiworld.get_region(region_name, player),
multiworld.get_entrance(entrance_name, player))

world.random = old_random
plando_connect(world, player)
multiworld.random = old_random
plando_connect(multiworld, player)

for region_name, entrance_name in indirect_connections.items():
world.register_indirect_condition(world.get_region(region_name, player),
world.get_entrance(entrance_name, player))
multiworld.register_indirect_condition(multiworld.get_region(region_name, player),
multiworld.get_entrance(entrance_name, player))

def collect_item(self, state: CollectionState, item: Item, remove=False):
item_name = item.name
Expand Down
Loading