V6: Fix broken Generation for Location "V"
This commit is contained in:
		
							parent
							
								
									9d7975ce33
								
							
						
					
					
						commit
						70a422d354
					
				| 
						 | 
				
			
			@ -5,7 +5,7 @@ from .Locations import V6Location, location_table
 | 
			
		|||
def create_regions(world: MultiWorld, player: int):
 | 
			
		||||
    regOvr = Region("Menu", RegionType.Generic, "Dimension VVVVVV", player, world)
 | 
			
		||||
    locOvr_names = ["Overworld (Pipe-shaped Segment)", "Overworld (Left of Ship)", "Overworld (Square Room)", "Overworld (Sad Elephant)",
 | 
			
		||||
                    "It's a Secret to Nobody", "Trench Warfare", "NPC Trinket"]
 | 
			
		||||
                    "It's a Secret to Nobody", "Trench Warfare", "NPC Trinket", "V"]
 | 
			
		||||
    regOvr.locations += [V6Location(player, loc_name, location_table[loc_name], regOvr) for loc_name in locOvr_names]
 | 
			
		||||
    world.regions.append(regOvr)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -29,11 +29,6 @@ def create_regions(world: MultiWorld, player: int):
 | 
			
		|||
    regWrp.locations += [V6Location(player, loc_name, location_table[loc_name], regWrp) for loc_name in locWrp_names]
 | 
			
		||||
    world.regions.append(regWrp)
 | 
			
		||||
 | 
			
		||||
    regEnd = Region("The Final Level", RegionType.Generic, "The Final Level", player, world)
 | 
			
		||||
    locEnd_names = ["V"]
 | 
			
		||||
    regEnd.locations += [V6Location(player, loc_name, location_table[loc_name], regEnd) for loc_name in locEnd_names]
 | 
			
		||||
    world.regions.append(regEnd)
 | 
			
		||||
 | 
			
		||||
def connect_regions(world: MultiWorld, player: int, source: str, target: str, rule):
 | 
			
		||||
    sourceRegion = world.get_region(source, player)
 | 
			
		||||
    targetRegion = world.get_region(target, player)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,16 +19,16 @@ def set_rules(world,player):
 | 
			
		|||
    connect_regions(world, player, "Menu", "Space Station 2", lambda state: _has_trinket_range(state,player,world.DoorCost[player].value*2,world.DoorCost[player].value*3))
 | 
			
		||||
    connect_regions(world, player, "Menu", "Warp Zone",       lambda state: _has_trinket_range(state,player,world.DoorCost[player].value*3,world.DoorCost[player].value*4))
 | 
			
		||||
 | 
			
		||||
    connect_regions(world, player,  "Menu", "The Final Level", lambda state : state.can_reach("Laboratory",'Region',player) and
 | 
			
		||||
                                                                              state.can_reach("The Tower",'Region',player) and
 | 
			
		||||
                                                                              state.can_reach("Space Station 2",'Region',player) and
 | 
			
		||||
                                                                              state.can_reach("Warp Zone",'Region',player))
 | 
			
		||||
    #Special Rule for V
 | 
			
		||||
    add_rule(world.get_location("V",player), lambda state : state.can_reach("Laboratory",'Region',player) and
 | 
			
		||||
                                                            state.can_reach("The Tower",'Region',player) and
 | 
			
		||||
                                                            state.can_reach("Space Station 2",'Region',player) and
 | 
			
		||||
                                                            state.can_reach("Warp Zone",'Region',player))
 | 
			
		||||
 | 
			
		||||
    connect_regions(world, player,  "Laboratory", "Menu", lambda state: True)
 | 
			
		||||
    connect_regions(world, player,  "The Tower", "Menu", lambda state: True)
 | 
			
		||||
    connect_regions(world, player,  "Space Station 2", "Menu", lambda state: True)
 | 
			
		||||
    connect_regions(world, player,  "Warp Zone", "Menu", lambda state: True)
 | 
			
		||||
    connect_regions(world, player,  "The Final Level", "Menu", lambda state: True)
 | 
			
		||||
 | 
			
		||||
    create_npctrinket_rules(world,world.get_location("NPC Trinket",player),player)
 | 
			
		||||
    world.completion_condition[player] = lambda state: state.can_reach("The Final Level",'Region',player)
 | 
			
		||||
    world.completion_condition[player] = lambda state: state.can_reach("V",'Location',player)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue