World: include can_access_trock_eyebridge can_access_trock_front can_access_trock_big_chest can_access_trock_middle and fix_fake_world in the player specific attributes
This commit is contained in:
		
							parent
							
								
									4b9e7d715c
								
							
						
					
					
						commit
						8721310cf7
					
				| 
						 | 
				
			
			@ -45,10 +45,6 @@ class World(object):
 | 
			
		|||
        self.accessibility = accessibility.copy()
 | 
			
		||||
        self.shuffle_ganon = shuffle_ganon
 | 
			
		||||
        self.fix_gtower_exit = self.shuffle_ganon
 | 
			
		||||
        self.can_access_trock_eyebridge = None
 | 
			
		||||
        self.can_access_trock_front = None
 | 
			
		||||
        self.can_access_trock_big_chest = None
 | 
			
		||||
        self.can_access_trock_middle = None
 | 
			
		||||
        self.quickswap = quickswap
 | 
			
		||||
        self.fastmenu = fastmenu
 | 
			
		||||
        self.disable_music = disable_music
 | 
			
		||||
| 
						 | 
				
			
			@ -56,7 +52,6 @@ class World(object):
 | 
			
		|||
        self.custom = custom
 | 
			
		||||
        self.customitemarray = customitemarray
 | 
			
		||||
        self.can_take_damage = True
 | 
			
		||||
        self.fix_fake_world = True
 | 
			
		||||
        self.hints = hints.copy()
 | 
			
		||||
        self.dynamic_regions = []
 | 
			
		||||
        self.dynamic_locations = []
 | 
			
		||||
| 
						 | 
				
			
			@ -77,6 +72,11 @@ class World(object):
 | 
			
		|||
            set_player_attr('fix_skullwoods_exit', self.shuffle[player] not in ['vanilla', 'simple', 'restricted', 'dungeonssimple'])
 | 
			
		||||
            set_player_attr('fix_palaceofdarkness_exit', self.shuffle[player] not in ['vanilla', 'simple', 'restricted', 'dungeonssimple'])
 | 
			
		||||
            set_player_attr('fix_trock_exit', self.shuffle[player] not in ['vanilla', 'simple', 'restricted', 'dungeonssimple'])
 | 
			
		||||
            set_player_attr('can_access_trock_eyebridge', None)
 | 
			
		||||
            set_player_attr('can_access_trock_front', None)
 | 
			
		||||
            set_player_attr('can_access_trock_big_chest', None)
 | 
			
		||||
            set_player_attr('can_access_trock_middle', None)
 | 
			
		||||
            set_player_attr('fix_fake_world', True)
 | 
			
		||||
            set_player_attr('mapshuffle', False)
 | 
			
		||||
            set_player_attr('compassshuffle', False)
 | 
			
		||||
            set_player_attr('keyshuffle', False)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -903,7 +903,7 @@ def link_entrances(world, player):
 | 
			
		|||
        # place remaining doors
 | 
			
		||||
        connect_doors(world, doors, door_targets, player)
 | 
			
		||||
    elif world.shuffle[player] == 'insanity_legacy':
 | 
			
		||||
        world.fix_fake_world = False
 | 
			
		||||
        world.fix_fake_world[player] = False
 | 
			
		||||
        # beware ye who enter here
 | 
			
		||||
 | 
			
		||||
        entrances = LW_Entrances + LW_Dungeon_Entrances + DW_Entrances + DW_Dungeon_Entrances + Old_Man_Entrances + ['Skull Woods Second Section Door (East)', 'Skull Woods First Section Door', 'Kakariko Well Cave', 'Bat Cave Cave', 'North Fairy Cave', 'Sanctuary', 'Lost Woods Hideout Stump', 'Lumberjack Tree Cave']
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										10
									
								
								Main.py
								
								
								
								
							
							
						
						
									
										10
									
								
								Main.py
								
								
								
								
							| 
						 | 
				
			
			@ -234,13 +234,13 @@ def copy_world(world):
 | 
			
		|||
    ret.light_world_light_cone = world.light_world_light_cone
 | 
			
		||||
    ret.dark_world_light_cone = world.dark_world_light_cone
 | 
			
		||||
    ret.seed = world.seed
 | 
			
		||||
    ret.can_access_trock_eyebridge = world.can_access_trock_eyebridge
 | 
			
		||||
    ret.can_access_trock_front = world.can_access_trock_front
 | 
			
		||||
    ret.can_access_trock_big_chest = world.can_access_trock_big_chest
 | 
			
		||||
    ret.can_access_trock_middle = world.can_access_trock_middle
 | 
			
		||||
    ret.can_access_trock_eyebridge = world.can_access_trock_eyebridge.copy()
 | 
			
		||||
    ret.can_access_trock_front = world.can_access_trock_front.copy()
 | 
			
		||||
    ret.can_access_trock_big_chest = world.can_access_trock_big_chest.copy()
 | 
			
		||||
    ret.can_access_trock_middle = world.can_access_trock_middle.copy()
 | 
			
		||||
    ret.can_take_damage = world.can_take_damage
 | 
			
		||||
    ret.difficulty_requirements = world.difficulty_requirements.copy()
 | 
			
		||||
    ret.fix_fake_world = world.fix_fake_world
 | 
			
		||||
    ret.fix_fake_world = world.fix_fake_world.copy()
 | 
			
		||||
    ret.lamps_needed_for_dark_rooms = world.lamps_needed_for_dark_rooms
 | 
			
		||||
    ret.mapshuffle = world.mapshuffle.copy()
 | 
			
		||||
    ret.compassshuffle = world.compassshuffle.copy()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								Rom.py
								
								
								
								
							
							
						
						
									
										2
									
								
								Rom.py
								
								
								
								
							| 
						 | 
				
			
			@ -909,7 +909,7 @@ def patch_rom(world, player, rom, enemized):
 | 
			
		|||
    rom.write_byte(0x180086, 0x00 if world.aga_randomness else 0x01)  # set blue ball and ganon warp randomness
 | 
			
		||||
    rom.write_byte(0x1800A0, 0x01)  # return to light world on s+q without mirror
 | 
			
		||||
    rom.write_byte(0x1800A1, 0x01)  # enable overworld screen transition draining for water level inside swamp
 | 
			
		||||
    rom.write_byte(0x180174, 0x01 if world.fix_fake_world else 0x00)
 | 
			
		||||
    rom.write_byte(0x180174, 0x01 if world.fix_fake_world[player] else 0x00)
 | 
			
		||||
    rom.write_byte(0x18017E, 0x01) # Fairy fountains only trade in bottles
 | 
			
		||||
    rom.write_byte(0x180034, 0x0A) # starting max bombs
 | 
			
		||||
    rom.write_byte(0x180035, 30) # starting max arrows
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										16
									
								
								Rules.py
								
								
								
								
							
							
						
						
									
										16
									
								
								Rules.py
								
								
								
								
							| 
						 | 
				
			
			@ -736,14 +736,14 @@ def set_trock_key_rules(world, player):
 | 
			
		|||
    all_state = world.get_all_state(True)
 | 
			
		||||
    
 | 
			
		||||
    # Check if each of the four main regions of the dungoen can be reached. The previous code section prevents key-costing moves within the dungeon.
 | 
			
		||||
    can_reach_back = all_state.can_reach(world.get_region('Turtle Rock (Eye Bridge)', player)) if world.can_access_trock_eyebridge is None else world.can_access_trock_eyebridge
 | 
			
		||||
    world.can_access_trock_eyebridge = can_reach_back
 | 
			
		||||
    can_reach_front = all_state.can_reach(world.get_region('Turtle Rock (Entrance)', player)) if world.can_access_trock_front is None else world.can_access_trock_front
 | 
			
		||||
    world.can_access_trock_front = can_reach_front
 | 
			
		||||
    can_reach_big_chest = all_state.can_reach(world.get_region('Turtle Rock (Big Chest)', player)) if world.can_access_trock_big_chest is None else world.can_access_trock_big_chest
 | 
			
		||||
    world.can_access_trock_big_chest = can_reach_big_chest
 | 
			
		||||
    can_reach_middle = all_state.can_reach(world.get_region('Turtle Rock (Second Section)', player)) if world.can_access_trock_middle is None else world.can_access_trock_middle
 | 
			
		||||
    world.can_access_trock_middle = can_reach_middle
 | 
			
		||||
    can_reach_back = all_state.can_reach(world.get_region('Turtle Rock (Eye Bridge)', player)) if world.can_access_trock_eyebridge[player] is None else world.can_access_trock_eyebridge[player]
 | 
			
		||||
    world.can_access_trock_eyebridge[player] = can_reach_back
 | 
			
		||||
    can_reach_front = all_state.can_reach(world.get_region('Turtle Rock (Entrance)', player)) if world.can_access_trock_front[player] is None else world.can_access_trock_front[player]
 | 
			
		||||
    world.can_access_trock_front[player] = can_reach_front
 | 
			
		||||
    can_reach_big_chest = all_state.can_reach(world.get_region('Turtle Rock (Big Chest)', player)) if world.can_access_trock_big_chest[player] is None else world.can_access_trock_big_chest[player]
 | 
			
		||||
    world.can_access_trock_big_chest[player] = can_reach_big_chest
 | 
			
		||||
    can_reach_middle = all_state.can_reach(world.get_region('Turtle Rock (Second Section)', player)) if world.can_access_trock_middle[player] is None else world.can_access_trock_middle[player]
 | 
			
		||||
    world.can_access_trock_middle[player] = can_reach_middle
 | 
			
		||||
 | 
			
		||||
    # No matter what, the key requirement for going from the middle to the bottom should be three keys.
 | 
			
		||||
    set_rule(world.get_entrance('Turtle Rock Dark Room Staircase', player), lambda state: state.has_key('Small Key (Turtle Rock)', player, 3))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue