| 
									
										
										
										
											2021-07-04 16:18:21 +02:00
										 |  |  | from argparse import Namespace | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-24 05:38:56 +02:00
										 |  |  | from BaseClasses import MultiWorld | 
					
						
							|  |  |  | from worlds.alttp.Dungeons import create_dungeons, get_dungeon_item_pool | 
					
						
							|  |  |  | from worlds.alttp.EntranceShuffle import link_entrances | 
					
						
							|  |  |  | from worlds.alttp.InvertedRegions import mark_dark_world_regions | 
					
						
							|  |  |  | from worlds.alttp.ItemPool import difficulties, generate_itempool | 
					
						
							|  |  |  | from worlds.alttp.Items import ItemFactory | 
					
						
							| 
									
										
										
										
											2021-01-30 23:29:32 +01:00
										 |  |  | from worlds.alttp.Regions import create_regions | 
					
						
							| 
									
										
										
										
											2021-01-30 23:43:15 +01:00
										 |  |  | from worlds.alttp.Shops import create_shops | 
					
						
							| 
									
										
										
										
											2020-10-24 05:38:56 +02:00
										 |  |  | from worlds.alttp.Rules import set_rules | 
					
						
							| 
									
										
										
										
											2020-04-29 01:34:30 +10:00
										 |  |  | from test.TestBase import TestBase | 
					
						
							| 
									
										
										
										
											2021-07-04 16:18:21 +02:00
										 |  |  | from worlds import AutoWorld | 
					
						
							| 
									
										
										
										
											2020-04-29 01:34:30 +10:00
										 |  |  | 
 | 
					
						
							|  |  |  | class TestVanilla(TestBase): | 
					
						
							|  |  |  |     def setUp(self): | 
					
						
							| 
									
										
										
										
											2021-03-14 08:38:02 +01:00
										 |  |  |         self.world = MultiWorld(1) | 
					
						
							| 
									
										
										
										
											2021-07-04 16:18:21 +02:00
										 |  |  |         args = Namespace() | 
					
						
							|  |  |  |         for name, option in AutoWorld.AutoWorldRegister.world_types["A Link to the Past"].options.items(): | 
					
						
							|  |  |  |             setattr(args, name, {1: option.from_any(option.default)}) | 
					
						
							|  |  |  |         self.world.set_options(args) | 
					
						
							| 
									
										
										
										
											2021-09-17 00:17:54 +02:00
										 |  |  |         self.world.set_default_common_options() | 
					
						
							| 
									
										
										
										
											2021-03-14 08:38:02 +01:00
										 |  |  |         self.world.logic[1] = "noglitches" | 
					
						
							| 
									
										
										
										
											2020-04-29 01:34:30 +10:00
										 |  |  |         self.world.difficulty_requirements[1] = difficulties['normal'] | 
					
						
							|  |  |  |         create_regions(self.world, 1) | 
					
						
							|  |  |  |         create_dungeons(self.world, 1) | 
					
						
							|  |  |  |         create_shops(self.world, 1) | 
					
						
							|  |  |  |         link_entrances(self.world, 1) | 
					
						
							| 
									
										
										
										
											2021-07-22 15:59:37 +02:00
										 |  |  |         self.world.worlds[1].create_items() | 
					
						
							| 
									
										
										
										
											2020-04-29 01:34:30 +10:00
										 |  |  |         self.world.required_medallions[1] = ['Ether', 'Quake'] | 
					
						
							|  |  |  |         self.world.itempool.extend(get_dungeon_item_pool(self.world)) | 
					
						
							|  |  |  |         self.world.itempool.extend(ItemFactory(['Green Pendant', 'Red Pendant', 'Blue Pendant', 'Beat Agahnim 1', 'Beat Agahnim 2', 'Crystal 1', 'Crystal 2', 'Crystal 3', 'Crystal 4', 'Crystal 5', 'Crystal 6', 'Crystal 7'], 1)) | 
					
						
							|  |  |  |         self.world.get_location('Agahnim 1', 1).item = None | 
					
						
							|  |  |  |         self.world.get_location('Agahnim 2', 1).item = None | 
					
						
							|  |  |  |         mark_dark_world_regions(self.world, 1) | 
					
						
							| 
									
										
										
										
											2021-07-22 15:59:37 +02:00
										 |  |  |         self.world.worlds[1].set_rules() |