Store Trock Back Entrance state so it can properly be copied between worlds for the playthrough.

This commit is contained in:
LLCoolDave 2017-07-17 23:13:39 +02:00
parent 1af6edf793
commit 0514ade3b3
3 changed files with 4 additions and 1 deletions

View File

@ -43,6 +43,7 @@ class World(object):
self.fix_trock_exit = self.shuffle not in ['vanilla', 'simple', 'restricted', 'dungeonssimple'] self.fix_trock_exit = self.shuffle not in ['vanilla', 'simple', 'restricted', 'dungeonssimple']
self.shuffle_ganon = shuffle_ganon self.shuffle_ganon = shuffle_ganon
self.fix_gtower_exit = self.shuffle_ganon self.fix_gtower_exit = self.shuffle_ganon
self.can_access_trock_eyebridge = None
def get_region(self, regionname): def get_region(self, regionname):
if isinstance(regionname, Region): if isinstance(regionname, Region):

View File

@ -535,6 +535,7 @@ def copy_world(world):
ret.light_world_light_cone = world.light_world_light_cone ret.light_world_light_cone = world.light_world_light_cone
ret.dark_world_light_cone = world.dark_world_light_cone ret.dark_world_light_cone = world.dark_world_light_cone
ret.seed = world.seed ret.seed = world.seed
ret.can_access_trock_eyebridge = world.can_access_trock_eyebridge
create_regions(ret) create_regions(ret)
# connect copied world # connect copied world

View File

@ -397,7 +397,8 @@ def set_trock_key_rules(world):
# check if the back entrance into trock can be accessed. As no small keys are placed yet, the rule on the dark room staircase door # check if the back entrance into trock can be accessed. As no small keys are placed yet, the rule on the dark room staircase door
# prevents us from reach the eye bridge from within the dungeon (!) # prevents us from reach the eye bridge from within the dungeon (!)
can_reach_back = all_state.can_reach(world.get_region('Turtle Rock (Eye Bridge)')) can_reach_back = all_state.can_reach(world.get_region('Turtle Rock (Eye Bridge)')) if world.can_access_trock_eyebridge is None else world.can_access_trock_eyebridge
world.can_access_trock_eyebridge = can_reach_back
# if we have backdoor access we can waste a key on the trinexx door, then have no lamp to reverse traverse the maze room. We simply require an additional key just to be super safe then. The backdoor access to the chest is otherwise free # if we have backdoor access we can waste a key on the trinexx door, then have no lamp to reverse traverse the maze room. We simply require an additional key just to be super safe then. The backdoor access to the chest is otherwise free
set_rule(world.get_entrance('Turtle Rock Pokey Room'), lambda state: state.has('Small Key (Turtle Rock)', 1)) if not can_reach_back else set_rule(world.get_entrance('Turtle Rock Pokey Room'), lambda state: state.has('Small Key (Turtle Rock)', 2)) set_rule(world.get_entrance('Turtle Rock Pokey Room'), lambda state: state.has('Small Key (Turtle Rock)', 1)) if not can_reach_back else set_rule(world.get_entrance('Turtle Rock Pokey Room'), lambda state: state.has('Small Key (Turtle Rock)', 2))