| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  | from typing import List | 
					
						
							| 
									
										
										
										
											2022-01-03 18:12:32 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  | from BaseClasses import Tutorial | 
					
						
							| 
									
										
										
										
											2022-12-10 17:24:05 -06:00
										 |  |  | from worlds.AutoWorld import WebWorld, World | 
					
						
							|  |  |  | from .Items import RLItem, RLItemData, event_item_table, get_items_by_category, item_table | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  | from .Locations import RLLocation, location_table | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  | from .Options import RLOptions | 
					
						
							| 
									
										
										
										
											2023-11-16 04:37:06 -06:00
										 |  |  | from .Presets import rl_options_presets | 
					
						
							| 
									
										
										
										
											2022-01-03 18:12:32 +00:00
										 |  |  | from .Regions import create_regions | 
					
						
							|  |  |  | from .Rules import set_rules | 
					
						
							| 
									
										
										
										
											2022-05-11 13:05:53 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  | class RLWeb(WebWorld): | 
					
						
							| 
									
										
										
										
											2022-06-22 20:31:40 -04:00
										 |  |  |     theme = "stone" | 
					
						
							| 
									
										
										
										
											2022-05-11 13:05:53 -05:00
										 |  |  |     tutorials = [Tutorial( | 
					
						
							|  |  |  |         "Multiworld Setup Guide", | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |         "A guide to setting up the Rogue Legacy Randomizer software on your computer. This guide covers single-player, " | 
					
						
							|  |  |  |         "multiworld, and related software.", | 
					
						
							| 
									
										
										
										
											2022-05-11 13:05:53 -05:00
										 |  |  |         "English", | 
					
						
							|  |  |  |         "rogue-legacy_en.md", | 
					
						
							|  |  |  |         "rogue-legacy/en", | 
					
						
							|  |  |  |         ["Phar"] | 
					
						
							|  |  |  |     )] | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |     bug_report_page = "https://github.com/ThePhar/RogueLegacyRandomizer/issues/new?assignees=&labels=bug&template=" \ | 
					
						
							|  |  |  |                       "report-an-issue---.md&title=%5BIssue%5D" | 
					
						
							| 
									
										
										
										
											2023-11-16 04:37:06 -06:00
										 |  |  |     options_presets = rl_options_presets | 
					
						
							| 
									
										
										
										
											2022-01-03 18:12:32 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  | class RLWorld(World): | 
					
						
							| 
									
										
										
										
											2022-01-03 18:12:32 +00:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     Rogue Legacy is a genealogical rogue-"LITE" where anyone can be a hero. Each time you die, your child will succeed | 
					
						
							|  |  |  |     you. Every child is unique. One child might be colorblind, another might have vertigo-- they could even be a dwarf. | 
					
						
							|  |  |  |     But that's OK, because no one is perfect, and you don't have to be to succeed. | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2022-12-06 20:49:55 -06:00
										 |  |  |     game = "Rogue Legacy" | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |     options_dataclass = RLOptions | 
					
						
							|  |  |  |     options: RLOptions | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |     topology_present = True | 
					
						
							|  |  |  |     required_client_version = (0, 3, 5) | 
					
						
							|  |  |  |     web = RLWeb() | 
					
						
							| 
									
										
										
										
											2022-01-03 18:12:32 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |     item_name_to_id = {name: data.code for name, data in item_table.items() if data.code is not None} | 
					
						
							|  |  |  |     location_name_to_id = {name: data.code for name, data in location_table.items() if data.code is not None} | 
					
						
							| 
									
										
										
										
											2022-01-03 18:12:32 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def fill_slot_data(self) -> dict: | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |         return self.options.as_dict(*[name for name in self.options_dataclass.type_hints.keys()]) | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def generate_early(self): | 
					
						
							|  |  |  |         # Check validation of names. | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |         additional_lady_names = len(self.options.additional_lady_names.value) | 
					
						
							|  |  |  |         additional_sir_names = len(self.options.additional_sir_names.value) | 
					
						
							|  |  |  |         if not self.options.allow_default_names: | 
					
						
							|  |  |  |             if additional_lady_names < int(self.options.number_of_children): | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                 raise Exception( | 
					
						
							|  |  |  |                     f"allow_default_names is off, but not enough names are defined in additional_lady_names. " | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                     f"Expected {int(self.options.number_of_children)}, Got {additional_lady_names}") | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |             if additional_sir_names < int(self.options.number_of_children): | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                 raise Exception( | 
					
						
							|  |  |  |                     f"allow_default_names is off, but not enough names are defined in additional_sir_names. " | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                     f"Expected {int(self.options.number_of_children)}, Got {additional_sir_names}") | 
					
						
							| 
									
										
										
										
											2022-01-03 18:12:32 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-06 20:49:55 -06:00
										 |  |  |     def create_items(self): | 
					
						
							|  |  |  |         item_pool: List[RLItem] = [] | 
					
						
							|  |  |  |         total_locations = len(self.multiworld.get_unfilled_locations(self.player)) | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |         for name, data in item_table.items(): | 
					
						
							|  |  |  |             quantity = data.max_quantity | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             # Architect | 
					
						
							|  |  |  |             if name == "Architect": | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                 if self.options.architect == "disabled": | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                     continue | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                 if self.options.architect == "start_unlocked": | 
					
						
							| 
									
										
										
										
											2022-10-31 21:41:21 -05:00
										 |  |  |                     self.multiworld.push_precollected(self.create_item(name)) | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                     continue | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                 if self.options.architect == "early": | 
					
						
							| 
									
										
										
										
											2022-12-06 20:49:55 -06:00
										 |  |  |                     self.multiworld.local_early_items[self.player]["Architect"] = 1 | 
					
						
							| 
									
										
										
										
											2022-01-03 18:12:32 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |             # Blacksmith and Enchantress | 
					
						
							|  |  |  |             if name == "Blacksmith" or name == "Enchantress": | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                 if self.options.vendors == "start_unlocked": | 
					
						
							| 
									
										
										
										
											2022-10-31 21:41:21 -05:00
										 |  |  |                     self.multiworld.push_precollected(self.create_item(name)) | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                     continue | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                 if self.options.vendors == "early": | 
					
						
							| 
									
										
										
										
											2022-12-06 20:49:55 -06:00
										 |  |  |                     self.multiworld.local_early_items[self.player]["Blacksmith"] = 1 | 
					
						
							|  |  |  |                     self.multiworld.local_early_items[self.player]["Enchantress"] = 1 | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  |             # Haggling | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |             if name == "Haggling" and self.options.disable_charon: | 
					
						
							| 
									
										
										
										
											2022-01-03 18:12:32 +00:00
										 |  |  |                 continue | 
					
						
							| 
									
										
										
										
											2022-01-26 16:35:56 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |             # Blueprints | 
					
						
							|  |  |  |             if data.category == "Blueprints": | 
					
						
							|  |  |  |                 # No progressive blueprints if progressive_blueprints are disabled. | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                 if name == "Progressive Blueprints" and not self.options.progressive_blueprints: | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                     continue | 
					
						
							|  |  |  |                 # No distinct blueprints if progressive_blueprints are enabled. | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                 elif name != "Progressive Blueprints" and self.options.progressive_blueprints: | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                     continue | 
					
						
							| 
									
										
										
										
											2022-01-03 18:12:32 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |             # Classes | 
					
						
							|  |  |  |             if data.category == "Classes": | 
					
						
							|  |  |  |                 if name == "Progressive Knights": | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                     if "Knight" not in self.options.available_classes: | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                         continue | 
					
						
							| 
									
										
										
										
											2022-06-22 20:31:40 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                     if self.options.starting_class == "knight": | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                         quantity = 1 | 
					
						
							|  |  |  |                 if name == "Progressive Mages": | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                     if "Mage" not in self.options.available_classes: | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                         continue | 
					
						
							| 
									
										
										
										
											2022-01-03 18:12:32 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                     if self.options.starting_class == "mage": | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                         quantity = 1 | 
					
						
							|  |  |  |                 if name == "Progressive Barbarians": | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                     if "Barbarian" not in self.options.available_classes: | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                         continue | 
					
						
							| 
									
										
										
										
											2022-01-03 18:12:32 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                     if self.options.starting_class == "barbarian": | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                         quantity = 1 | 
					
						
							|  |  |  |                 if name == "Progressive Knaves": | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                     if "Knave" not in self.options.available_classes: | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                         continue | 
					
						
							| 
									
										
										
										
											2022-05-19 09:37:26 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                     if self.options.starting_class == "knave": | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                         quantity = 1 | 
					
						
							|  |  |  |                 if name == "Progressive Miners": | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                     if "Miner" not in self.options.available_classes: | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                         continue | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                     if self.options.starting_class == "miner": | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                         quantity = 1 | 
					
						
							|  |  |  |                 if name == "Progressive Shinobis": | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                     if "Shinobi" not in self.options.available_classes: | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                         continue | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                     if self.options.starting_class == "shinobi": | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                         quantity = 1 | 
					
						
							|  |  |  |                 if name == "Progressive Liches": | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                     if "Lich" not in self.options.available_classes: | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                         continue | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                     if self.options.starting_class == "lich": | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                         quantity = 1 | 
					
						
							|  |  |  |                 if name == "Progressive Spellthieves": | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                     if "Spellthief" not in self.options.available_classes: | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                         continue | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                     if self.options.starting_class == "spellthief": | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                         quantity = 1 | 
					
						
							|  |  |  |                 if name == "Dragons": | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                     if "Dragon" not in self.options.available_classes: | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                         continue | 
					
						
							|  |  |  |                 if name == "Traitors": | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                     if "Traitor" not in self.options.available_classes: | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                         continue | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             # Skills | 
					
						
							|  |  |  |             if name == "Health Up": | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                 quantity = self.options.health_pool.value | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |             elif name == "Mana Up": | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                 quantity = self.options.mana_pool.value | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |             elif name == "Attack Up": | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                 quantity = self.options.attack_pool.value | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |             elif name == "Magic Damage Up": | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                 quantity = self.options.magic_damage_pool.value | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |             elif name == "Armor Up": | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                 quantity = self.options.armor_pool.value | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |             elif name == "Equip Up": | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                 quantity = self.options.equip_pool.value | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |             elif name == "Crit Chance Up": | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                 quantity = self.options.crit_chance_pool.value | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |             elif name == "Crit Damage Up": | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |                 quantity = self.options.crit_damage_pool.value | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  |             # Ignore filler, it will be added in a later stage. | 
					
						
							|  |  |  |             if data.category == "Filler": | 
					
						
							|  |  |  |                 continue | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-06 20:49:55 -06:00
										 |  |  |             item_pool += [self.create_item(name) for _ in range(0, quantity)] | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  |         # Fill any empty locations with filler items. | 
					
						
							| 
									
										
										
										
											2022-12-06 20:49:55 -06:00
										 |  |  |         while len(item_pool) < total_locations: | 
					
						
							|  |  |  |             item_pool.append(self.create_item(self.get_filler_item_name())) | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-06 20:49:55 -06:00
										 |  |  |         self.multiworld.itempool += item_pool | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def get_filler_item_name(self) -> str: | 
					
						
							|  |  |  |         fillers = get_items_by_category("Filler") | 
					
						
							|  |  |  |         weights = [data.weight for data in fillers.values()] | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |         return self.random.choices([filler for filler in fillers.keys()], weights, k=1)[0] | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def create_item(self, name: str) -> RLItem: | 
					
						
							| 
									
										
										
										
											2022-01-03 18:12:32 +00:00
										 |  |  |         data = item_table[name] | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |         return RLItem(name, data.classification, data.code, self.player) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def create_event(self, name: str) -> RLItem: | 
					
						
							|  |  |  |         data = event_item_table[name] | 
					
						
							|  |  |  |         return RLItem(name, data.classification, data.code, self.player) | 
					
						
							| 
									
										
										
										
											2022-01-03 18:12:32 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def set_rules(self): | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |         set_rules(self, self.player) | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def create_regions(self): | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |         create_regions(self) | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |         self._place_events() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def _place_events(self): | 
					
						
							|  |  |  |         # Fountain | 
					
						
							| 
									
										
										
										
											2022-10-31 21:41:21 -05:00
										 |  |  |         self.multiworld.get_location("Fountain Room", self.player).place_locked_item( | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |             self.create_event("Defeat The Fountain")) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         # Khidr / Neo Khidr | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |         if self.options.khidr == "vanilla": | 
					
						
							| 
									
										
										
										
											2022-10-31 21:41:21 -05:00
										 |  |  |             self.multiworld.get_location("Castle Hamson Boss Room", self.player).place_locked_item( | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                 self.create_event("Defeat Khidr")) | 
					
						
							|  |  |  |         else: | 
					
						
							| 
									
										
										
										
											2022-10-31 21:41:21 -05:00
										 |  |  |             self.multiworld.get_location("Castle Hamson Boss Room", self.player).place_locked_item( | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                 self.create_event("Defeat Neo Khidr")) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         # Alexander / Alexander IV | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |         if self.options.alexander == "vanilla": | 
					
						
							| 
									
										
										
										
											2022-10-31 21:41:21 -05:00
										 |  |  |             self.multiworld.get_location("Forest Abkhazia Boss Room", self.player).place_locked_item( | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                 self.create_event("Defeat Alexander")) | 
					
						
							|  |  |  |         else: | 
					
						
							| 
									
										
										
										
											2022-10-31 21:41:21 -05:00
										 |  |  |             self.multiworld.get_location("Forest Abkhazia Boss Room", self.player).place_locked_item( | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                 self.create_event("Defeat Alexander IV")) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         # Ponce de Leon / Ponce de Freon | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |         if self.options.leon == "vanilla": | 
					
						
							| 
									
										
										
										
											2022-10-31 21:41:21 -05:00
										 |  |  |             self.multiworld.get_location("The Maya Boss Room", self.player).place_locked_item( | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                 self.create_event("Defeat Ponce de Leon")) | 
					
						
							|  |  |  |         else: | 
					
						
							| 
									
										
										
										
											2022-10-31 21:41:21 -05:00
										 |  |  |             self.multiworld.get_location("The Maya Boss Room", self.player).place_locked_item( | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                 self.create_event("Defeat Ponce de Freon")) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         # Herodotus / Astrodotus | 
					
						
							| 
									
										
										
										
											2024-09-08 11:50:08 -05:00
										 |  |  |         if self.options.herodotus == "vanilla": | 
					
						
							| 
									
										
										
										
											2022-10-31 21:41:21 -05:00
										 |  |  |             self.multiworld.get_location("Land of Darkness Boss Room", self.player).place_locked_item( | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                 self.create_event("Defeat Herodotus")) | 
					
						
							|  |  |  |         else: | 
					
						
							| 
									
										
										
										
											2022-10-31 21:41:21 -05:00
										 |  |  |             self.multiworld.get_location("Land of Darkness Boss Room", self.player).place_locked_item( | 
					
						
							| 
									
										
										
										
											2022-10-29 22:15:06 -05:00
										 |  |  |                 self.create_event("Defeat Astrodotus")) |