 aee0df5359
			
		
	
	aee0df5359
	
	
	
		
			
			## What is this fixing or adding? - Adds the majority of OoTR 7.0 features: - Pot shuffle, Freestanding item shuffle, Crate shuffle, Beehive shuffle - Key rings mode - Dungeon shortcuts to speed up dungeons - "Regional" shuffle for dungeon items - New options for shop pricing in shopsanity - Expanded Ganon's Boss Key shuffle options - Pre-planted beans - Improved Chest Appearance Matches Contents mode - Blue Fire Arrows - Bonk self-damage - Finer control over MQ dungeons and spawn position randomization - Several bugfixes as a result of the update: - Items recognized by the server and valid starting items are now in a 1-to-1 correspondence. In particular, starting with keys is now supported. - Entrance randomization success rate improved. Hopefully it is now at 100%. Co-authored-by: Zach Parks <zach@alliware.com>
		
			
				
	
	
		
			55 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			55 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
| class Dungeon(object):
 | |
| 
 | |
|     def __init__(self, world, name, hint, font_color):
 | |
| 
 | |
|         self.world = world
 | |
|         self.name = name
 | |
|         self.hint_text = hint
 | |
|         self.font_color = font_color
 | |
|         self.regions = []
 | |
|         self.boss_key = []
 | |
|         self.small_keys = []
 | |
|         self.dungeon_items = []
 | |
| 
 | |
|         for region in world.multiworld.regions:
 | |
|             if region.player == world.player and region.dungeon == self.name:
 | |
|                 region.dungeon = self
 | |
|                 self.regions.append(region)                
 | |
| 
 | |
| 
 | |
|     def copy(self, new_world):
 | |
|         new_boss_key = [item.copy(new_world) for item in self.boss_key]
 | |
|         new_small_keys = [item.copy(new_world) for item in self.small_keys]
 | |
|         new_dungeon_items = [item.copy(new_world) for item in self.dungeon_items]
 | |
| 
 | |
|         new_dungeon = Dungeon(new_world, self.name, self.hint_text, self.font_color, new_boss_key, new_small_keys, new_dungeon_items)
 | |
| 
 | |
|         return new_dungeon
 | |
| 
 | |
| 
 | |
|     @property
 | |
|     def keys(self):
 | |
|         return self.small_keys + self.boss_key
 | |
| 
 | |
| 
 | |
|     @property
 | |
|     def all_items(self):
 | |
|         return self.dungeon_items + self.keys
 | |
| 
 | |
| 
 | |
|     def is_dungeon_item(self, item):
 | |
|         return item.name in [dungeon_item.name for dungeon_item in self.all_items]
 | |
| 
 | |
| 
 | |
|     def item_name(self, name):
 | |
|         return f"{name} ({self.name})"
 | |
| 
 | |
| 
 | |
|     def __str__(self):
 | |
|         return str(self.__unicode__())
 | |
| 
 | |
| 
 | |
|     def __unicode__(self):
 | |
|         return '%s' % self.name
 | |
| 
 |