| 
									
										
										
										
											2024-08-20 17:18:28 -06:00
										 |  |  | from dataclasses import dataclass | 
					
						
							| 
									
										
										
										
											2024-11-30 10:08:41 -05:00
										 |  |  | from Options import Choice, Toggle, DefaultOnToggle, DeathLink, PerGameCommonOptions, StartInventoryPool, OptionGroup | 
					
						
							| 
									
										
										
										
											2023-07-05 22:39:26 -06:00
										 |  |  | import random | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class ChoiceIsRandom(Choice): | 
					
						
							|  |  |  |     randomized: bool = False | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     @classmethod | 
					
						
							|  |  |  |     def from_text(cls, text: str) -> Choice: | 
					
						
							|  |  |  |         text = text.lower() | 
					
						
							|  |  |  |         if text == "random": | 
					
						
							|  |  |  |             cls.randomized = True | 
					
						
							|  |  |  |             return cls(random.choice(list(cls.name_lookup))) | 
					
						
							|  |  |  |         for option_name, value in cls.options.items(): | 
					
						
							|  |  |  |             if option_name == text: | 
					
						
							|  |  |  |                 return cls(value) | 
					
						
							|  |  |  |         raise KeyError( | 
					
						
							|  |  |  |             f'Could not find option "{text}" for "{cls.__name__}", ' | 
					
						
							|  |  |  |             f'known options are {", ".join(f"{option}" for option in cls.name_lookup.values())}') | 
					
						
							| 
									
										
										
										
											2023-02-23 23:33:09 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class PrieDieuWarp(DefaultOnToggle): | 
					
						
							| 
									
										
										
										
											2024-08-20 17:18:28 -06:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     Automatically unlocks the ability to warp between Prie Dieu shrines. | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2023-02-23 23:33:09 -07:00
										 |  |  |     display_name = "Unlock Fast Travel" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class SkipCutscenes(DefaultOnToggle): | 
					
						
							| 
									
										
										
										
											2024-08-20 17:18:28 -06:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     Automatically skips most cutscenes. | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2023-02-23 23:33:09 -07:00
										 |  |  |     display_name = "Auto Skip Cutscenes" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class CorpseHints(DefaultOnToggle): | 
					
						
							| 
									
										
										
										
											2024-08-20 17:18:28 -06:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     Changes the 34 corpses in game to give various hints about item locations. | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2023-02-23 23:33:09 -07:00
										 |  |  |     display_name = "Corpse Hints" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class Difficulty(Choice): | 
					
						
							| 
									
										
										
										
											2024-08-20 17:18:28 -06:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     Adjusts the overall difficulty of the randomizer, including upgrades required to defeat bosses and advanced movement tricks or glitches. | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2023-02-23 23:33:09 -07:00
										 |  |  |     display_name = "Difficulty" | 
					
						
							|  |  |  |     option_easy = 0 | 
					
						
							|  |  |  |     option_normal = 1 | 
					
						
							|  |  |  |     option_hard = 2 | 
					
						
							|  |  |  |     default = 1 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class Penitence(Toggle): | 
					
						
							| 
									
										
										
										
											2024-08-20 17:18:28 -06:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     Allows one of the three Penitences to be chosen at the beginning of the game. | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2023-02-23 23:33:09 -07:00
										 |  |  |     display_name = "Penitence" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-05 22:39:26 -06:00
										 |  |  | class StartingLocation(ChoiceIsRandom): | 
					
						
							| 
									
										
										
										
											2024-08-20 17:18:28 -06:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     Choose where to start the randomizer. Note that some starting locations cannot be chosen with certain other options. | 
					
						
							|  |  |  |      | 
					
						
							|  |  |  |     Specifically, Brotherhood and Mourning And Havoc cannot be chosen if Shuffle Dash is enabled, and Grievance Ascends cannot be chosen if Shuffle Wall Climb is enabled. | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2023-07-05 22:39:26 -06:00
										 |  |  |     display_name = "Starting Location" | 
					
						
							|  |  |  |     option_brotherhood = 0 | 
					
						
							|  |  |  |     option_albero = 1 | 
					
						
							|  |  |  |     option_convent = 2 | 
					
						
							|  |  |  |     option_grievance = 3 | 
					
						
							|  |  |  |     option_knot_of_words = 4 | 
					
						
							|  |  |  |     option_rooftops = 5 | 
					
						
							|  |  |  |     option_mourning_havoc = 6 | 
					
						
							|  |  |  |     default = 0 | 
					
						
							| 
									
										
										
										
											2023-02-23 23:33:09 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class Ending(Choice): | 
					
						
							| 
									
										
										
										
											2024-08-20 17:18:28 -06:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     Choose which ending is required to complete the game. | 
					
						
							|  |  |  |      | 
					
						
							| 
									
										
										
										
											2023-10-28 13:47:14 -06:00
										 |  |  |     Talking to Tirso in Albero will tell you the selected ending for the current game. | 
					
						
							| 
									
										
										
										
											2024-08-20 17:18:28 -06:00
										 |  |  |      | 
					
						
							| 
									
										
										
										
											2023-03-25 12:37:25 -06:00
										 |  |  |     Ending A: Collect all thorn upgrades. | 
					
						
							| 
									
										
										
										
											2024-08-20 17:18:28 -06:00
										 |  |  |      | 
					
						
							|  |  |  |     Ending C: Collect all thorn upgrades and the Holy Wound of Abnegation. | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2023-02-23 23:33:09 -07:00
										 |  |  |     display_name = "Ending" | 
					
						
							|  |  |  |     option_any_ending = 0 | 
					
						
							| 
									
										
										
										
											2023-03-25 12:37:25 -06:00
										 |  |  |     option_ending_a = 1 | 
					
						
							| 
									
										
										
										
											2023-02-23 23:33:09 -07:00
										 |  |  |     option_ending_c = 2 | 
					
						
							|  |  |  |     default = 0 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-05 22:39:26 -06:00
										 |  |  | class SkipLongQuests(Toggle): | 
					
						
							| 
									
										
										
										
											2024-08-20 17:18:28 -06:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     Ensures that the rewards for long quests will be filler items. | 
					
						
							|  |  |  |      | 
					
						
							|  |  |  |     Affected locations: "Albero: Donate 50000 Tears", "Ossuary: 11th reward", "AtTotS: Miriam's gift", "TSC: Jocinero's final reward" | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2023-07-05 22:39:26 -06:00
										 |  |  |     display_name = "Skip Long Quests" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-02-23 23:33:09 -07:00
										 |  |  | class ThornShuffle(Choice): | 
					
						
							| 
									
										
										
										
											2024-08-20 17:18:28 -06:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     Shuffles the Thorn given by Deogracias and all Thorn upgrades into the item pool. | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2023-02-23 23:33:09 -07:00
										 |  |  |     display_name = "Shuffle Thorn" | 
					
						
							|  |  |  |     option_anywhere = 0 | 
					
						
							|  |  |  |     option_local_only = 1 | 
					
						
							|  |  |  |     option_vanilla = 2 | 
					
						
							|  |  |  |     default = 0 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-05 22:39:26 -06:00
										 |  |  | class DashShuffle(Toggle): | 
					
						
							| 
									
										
										
										
											2024-08-20 17:18:28 -06:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     Turns the ability to dash into an item that must be found in the multiworld. | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2023-07-05 22:39:26 -06:00
										 |  |  |     display_name = "Shuffle Dash" | 
					
						
							| 
									
										
										
										
											2023-02-23 23:33:09 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-05 22:39:26 -06:00
										 |  |  | class WallClimbShuffle(Toggle): | 
					
						
							| 
									
										
										
										
											2024-08-20 17:18:28 -06:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     Turns the ability to climb walls with your sword into an item that must be found in the multiworld. | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2023-07-05 22:39:26 -06:00
										 |  |  |     display_name = "Shuffle Wall Climb" | 
					
						
							| 
									
										
										
										
											2023-02-23 23:33:09 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-05 22:39:26 -06:00
										 |  |  | class ReliquaryShuffle(DefaultOnToggle): | 
					
						
							| 
									
										
										
										
											2024-08-20 17:18:28 -06:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     Adds the True Torment exclusive Reliquary rosary beads into the item pool. | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2023-07-05 22:39:26 -06:00
										 |  |  |     display_name = "Shuffle Penitence Rewards" | 
					
						
							| 
									
										
										
										
											2023-02-23 23:33:09 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-05 22:39:26 -06:00
										 |  |  | class CustomItem1(Toggle): | 
					
						
							| 
									
										
										
										
											2024-08-20 17:18:28 -06:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     Adds the custom relic Boots of Pleading into the item pool, which grants the ability to fall onto spikes and survive. | 
					
						
							|  |  |  |      | 
					
						
							|  |  |  |     Must have the "Boots of Pleading" mod installed to connect to a multiworld. | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2023-07-05 22:39:26 -06:00
										 |  |  |     display_name = "Boots of Pleading" | 
					
						
							| 
									
										
										
										
											2023-02-23 23:33:09 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-05 22:39:26 -06:00
										 |  |  | class CustomItem2(Toggle): | 
					
						
							| 
									
										
										
										
											2024-08-20 17:18:28 -06:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     Adds the custom relic Purified Hand of the Nun into the item pool, which grants the ability to jump a second time in mid-air. | 
					
						
							|  |  |  |      | 
					
						
							|  |  |  |     Must have the "Double Jump" mod installed to connect to a multiworld. | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2023-07-05 22:39:26 -06:00
										 |  |  |     display_name = "Purified Hand of the Nun" | 
					
						
							| 
									
										
										
										
											2023-02-23 23:33:09 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class StartWheel(Toggle): | 
					
						
							| 
									
										
										
										
											2024-08-20 17:18:28 -06:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     Changes the beginning gift to The Young Mason's Wheel. | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2023-02-23 23:33:09 -07:00
										 |  |  |     display_name = "Start with Wheel" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class SkillRando(Toggle): | 
					
						
							| 
									
										
										
										
											2024-08-20 17:18:28 -06:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     Randomizes the abilities from the skill tree into the item pool. | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2023-02-23 23:33:09 -07:00
										 |  |  |     display_name = "Skill Randomizer" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class EnemyRando(Choice): | 
					
						
							| 
									
										
										
										
											2024-08-20 17:18:28 -06:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     Randomizes the enemies that appear in each room. | 
					
						
							|  |  |  |      | 
					
						
							|  |  |  |     Shuffled: Enemies will be shuffled amongst each other, but can only appear as many times as they do in a standard game. | 
					
						
							|  |  |  |      | 
					
						
							| 
									
										
										
										
											2023-02-23 23:33:09 -07:00
										 |  |  |     Randomized: Every enemy is completely random, and can appear any number of times. | 
					
						
							| 
									
										
										
										
											2024-08-20 17:18:28 -06:00
										 |  |  |      | 
					
						
							|  |  |  |     Some enemies will never be randomized. | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2023-02-23 23:33:09 -07:00
										 |  |  |     display_name = "Enemy Randomizer" | 
					
						
							|  |  |  |     option_disabled = 0 | 
					
						
							|  |  |  |     option_shuffled = 1 | 
					
						
							|  |  |  |     option_randomized = 2 | 
					
						
							|  |  |  |     default = 0 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class EnemyGroups(DefaultOnToggle): | 
					
						
							| 
									
										
										
										
											2024-08-20 17:18:28 -06:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     Randomized enemies will be chosen from sets of specific groups.  | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-02-23 23:33:09 -07:00
										 |  |  |     (Weak, normal, large, flying) | 
					
						
							| 
									
										
										
										
											2024-08-20 17:18:28 -06:00
										 |  |  |      | 
					
						
							|  |  |  |     Has no effect if Enemy Randomizer is disabled. | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2023-02-23 23:33:09 -07:00
										 |  |  |     display_name = "Enemy Groups" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class EnemyScaling(DefaultOnToggle): | 
					
						
							| 
									
										
										
										
											2024-08-20 17:18:28 -06:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     Randomized enemies will have their stats increased or decreased depending on the area they appear in. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Has no effect if Enemy Randomizer is disabled. | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2023-02-23 23:33:09 -07:00
										 |  |  |     display_name = "Enemy Scaling" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class BlasphemousDeathLink(DeathLink): | 
					
						
							| 
									
										
										
										
											2024-08-20 17:18:28 -06:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     When you die, everyone dies. The reverse is also true. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Note that Guilt Fragments will not appear when killed by Death Link. | 
					
						
							|  |  |  |     """
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @dataclass | 
					
						
							|  |  |  | class BlasphemousOptions(PerGameCommonOptions): | 
					
						
							| 
									
										
										
										
											2024-11-30 10:08:41 -05:00
										 |  |  |     start_inventory_from_pool: StartInventoryPool | 
					
						
							| 
									
										
										
										
											2024-08-20 17:18:28 -06:00
										 |  |  |     prie_dieu_warp: PrieDieuWarp | 
					
						
							|  |  |  |     skip_cutscenes: SkipCutscenes | 
					
						
							|  |  |  |     corpse_hints: CorpseHints | 
					
						
							|  |  |  |     difficulty: Difficulty | 
					
						
							|  |  |  |     penitence: Penitence | 
					
						
							|  |  |  |     starting_location: StartingLocation | 
					
						
							|  |  |  |     ending: Ending | 
					
						
							|  |  |  |     skip_long_quests: SkipLongQuests | 
					
						
							|  |  |  |     thorn_shuffle: ThornShuffle | 
					
						
							|  |  |  |     dash_shuffle: DashShuffle | 
					
						
							|  |  |  |     wall_climb_shuffle: WallClimbShuffle | 
					
						
							|  |  |  |     reliquary_shuffle: ReliquaryShuffle | 
					
						
							|  |  |  |     boots_of_pleading: CustomItem1 | 
					
						
							|  |  |  |     purified_hand: CustomItem2 | 
					
						
							|  |  |  |     start_wheel: StartWheel | 
					
						
							|  |  |  |     skill_randomizer: SkillRando | 
					
						
							|  |  |  |     enemy_randomizer: EnemyRando | 
					
						
							|  |  |  |     enemy_groups: EnemyGroups | 
					
						
							|  |  |  |     enemy_scaling: EnemyScaling | 
					
						
							|  |  |  |     death_link: BlasphemousDeathLink | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | blas_option_groups = [ | 
					
						
							|  |  |  |     OptionGroup("Quality of Life",  [ | 
					
						
							|  |  |  |         PrieDieuWarp, | 
					
						
							|  |  |  |         SkipCutscenes, | 
					
						
							|  |  |  |         CorpseHints, | 
					
						
							|  |  |  |         SkipLongQuests, | 
					
						
							|  |  |  |         StartWheel | 
					
						
							|  |  |  |     ]), | 
					
						
							|  |  |  |     OptionGroup("Moveset", [ | 
					
						
							|  |  |  |         DashShuffle, | 
					
						
							|  |  |  |         WallClimbShuffle, | 
					
						
							|  |  |  |         SkillRando, | 
					
						
							|  |  |  |         CustomItem1, | 
					
						
							|  |  |  |         CustomItem2 | 
					
						
							|  |  |  |     ]), | 
					
						
							|  |  |  |     OptionGroup("Enemy Randomizer", [ | 
					
						
							|  |  |  |         EnemyRando, | 
					
						
							|  |  |  |         EnemyGroups, | 
					
						
							|  |  |  |         EnemyScaling | 
					
						
							|  |  |  |     ]) | 
					
						
							|  |  |  | ] |