| 
									
										
										
										
											2022-02-04 21:34:39 +01:00
										 |  |  | import typing | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-01-21 22:42:11 +01:00
										 |  |  | from .Items import item_table, V6Item | 
					
						
							|  |  |  | from .Locations import location_table, V6Location | 
					
						
							|  |  |  | from .Options import v6_options | 
					
						
							| 
									
										
										
										
											2022-02-04 21:34:39 +01:00
										 |  |  | from .Rules import set_rules | 
					
						
							| 
									
										
										
										
											2022-01-21 22:42:11 +01:00
										 |  |  | from .Regions import create_regions | 
					
						
							|  |  |  | from BaseClasses import Region, RegionType, Entrance, Item, MultiWorld | 
					
						
							|  |  |  | from ..AutoWorld import World | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | client_version = 1 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class V6World(World): | 
					
						
							|  |  |  |     """ 
 | 
					
						
							|  |  |  |      VVVVVV is a platform game all about exploring one simple mechanical idea - what if you reversed gravity instead of jumping? | 
					
						
							|  |  |  |     """ #Lifted from Store Page
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     game: str = "VVVVVV" | 
					
						
							|  |  |  |     topology_present = False | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     item_name_to_id = item_table | 
					
						
							|  |  |  |     location_name_to_id = location_table | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     data_version = 1 | 
					
						
							|  |  |  |     forced_auto_forfeit = False | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-02-04 21:34:39 +01:00
										 |  |  |     area_connections: typing.Dict[int, int] | 
					
						
							| 
									
										
										
										
											2022-02-05 16:53:43 +01:00
										 |  |  |     area_cost_map: typing.Dict[int,int] | 
					
						
							| 
									
										
										
										
											2022-02-04 21:22:26 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-02-04 22:56:54 +01:00
										 |  |  |     music_map: typing.Dict[int,int] | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-01-21 22:42:11 +01:00
										 |  |  |     options = v6_options | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def create_regions(self): | 
					
						
							|  |  |  |         create_regions(self.world,self.player) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def set_rules(self): | 
					
						
							| 
									
										
										
										
											2022-02-04 21:22:26 +01:00
										 |  |  |         self.area_connections = {} | 
					
						
							| 
									
										
										
										
											2022-02-05 16:53:43 +01:00
										 |  |  |         self.area_cost_map = {} | 
					
						
							|  |  |  |         set_rules(self.world, self.player, self.area_connections, self.area_cost_map) | 
					
						
							| 
									
										
										
										
											2022-01-21 22:42:11 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def create_item(self, name: str) -> Item: | 
					
						
							| 
									
										
										
										
											2022-01-25 23:17:22 +01:00
										 |  |  |         return V6Item(name, True, item_table[name], self.player) | 
					
						
							| 
									
										
										
										
											2022-01-21 22:42:11 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def generate_basic(self): | 
					
						
							| 
									
										
										
										
											2022-02-05 16:53:43 +01:00
										 |  |  |         trinkets = [self.create_item("Trinket " + str(i+1).zfill(2)) for i in range(0,20)] | 
					
						
							|  |  |  |         self.world.itempool += trinkets | 
					
						
							| 
									
										
										
										
											2022-01-21 22:42:11 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-02-04 22:56:54 +01:00
										 |  |  |         musiclist_o = [1,2,3,4,9,12] | 
					
						
							|  |  |  |         musiclist_s = musiclist_o.copy() | 
					
						
							|  |  |  |         if self.world.MusicRandomizer[self.player].value: | 
					
						
							|  |  |  |             self.world.random.shuffle(musiclist_s) | 
					
						
							|  |  |  |         self.music_map = dict(zip(musiclist_o, musiclist_s)) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-01-21 22:42:11 +01:00
										 |  |  |     def fill_slot_data(self): | 
					
						
							|  |  |  |         return { | 
					
						
							| 
									
										
										
										
											2022-02-04 22:56:54 +01:00
										 |  |  |             "MusicRando": self.music_map, | 
					
						
							| 
									
										
										
										
											2022-02-04 21:22:26 +01:00
										 |  |  |             "AreaRando": self.area_connections, | 
					
						
							| 
									
										
										
										
											2022-01-21 22:42:11 +01:00
										 |  |  |             "DoorCost": self.world.DoorCost[self.player].value, | 
					
						
							| 
									
										
										
										
											2022-02-05 16:53:43 +01:00
										 |  |  |             "AreaCostRando": self.area_cost_map, | 
					
						
							| 
									
										
										
										
											2022-01-21 22:42:11 +01:00
										 |  |  |             "DeathLink": self.world.DeathLink[self.player].value, | 
					
						
							|  |  |  |             "DeathLink_Amnesty": self.world.DeathLinkAmnesty[self.player].value | 
					
						
							|  |  |  |         } |