| 
									
										
										
										
											2022-08-20 18:09:35 -05:00
										 |  |  | from typing import Dict | 
					
						
							| 
									
										
										
										
											2021-09-07 17:14:20 -05:00
										 |  |  | from Options import Option, DefaultOnToggle, Range, Choice | 
					
						
							| 
									
										
										
										
											2021-08-29 14:02:02 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class TotalLocations(Range): | 
					
						
							|  |  |  |     """Number of location checks which are added to the Risk of Rain playthrough.""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Total Locations" | 
					
						
							| 
									
										
										
										
											2021-08-29 14:02:02 -04:00
										 |  |  |     range_start = 10 | 
					
						
							| 
									
										
										
										
											2022-07-15 16:19:36 -05:00
										 |  |  |     range_end = 250 | 
					
						
							| 
									
										
										
										
											2021-09-07 17:14:20 -05:00
										 |  |  |     default = 20 | 
					
						
							| 
									
										
										
										
											2021-08-29 14:02:02 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class TotalRevivals(Range): | 
					
						
							| 
									
										
										
										
											2022-01-24 14:40:51 -08:00
										 |  |  |     """Total Percentage of `Dio's Best Friend` item put in the item pool.""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Total Percentage Revivals Available" | 
					
						
							| 
									
										
										
										
											2021-08-29 14:02:02 -04:00
										 |  |  |     range_start = 0 | 
					
						
							| 
									
										
										
										
											2022-01-24 14:40:51 -08:00
										 |  |  |     range_end = 10 | 
					
						
							| 
									
										
										
										
											2021-08-29 14:02:02 -04:00
										 |  |  |     default = 4 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class ItemPickupStep(Range): | 
					
						
							|  |  |  |     """Number of items to pick up before an AP Check is completed.
 | 
					
						
							|  |  |  |     Setting to 1 means every other pickup. | 
					
						
							|  |  |  |     Setting to 2 means every third pickup. So on..."""
 | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Item Pickup Step" | 
					
						
							| 
									
										
										
										
											2021-08-29 14:02:02 -04:00
										 |  |  |     range_start = 0 | 
					
						
							|  |  |  |     range_end = 5 | 
					
						
							| 
									
										
										
										
											2021-09-07 17:14:20 -05:00
										 |  |  |     default = 2 | 
					
						
							| 
									
										
										
										
											2021-08-29 14:02:02 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-06 23:40:39 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | class AllowLunarItems(DefaultOnToggle): | 
					
						
							| 
									
										
										
										
											2021-08-31 20:38:44 -04:00
										 |  |  |     """Allows Lunar items in the item pool.""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Enable Lunar Item Shuffling" | 
					
						
							| 
									
										
										
										
											2021-08-29 14:02:02 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-06 23:40:39 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | class StartWithRevive(DefaultOnToggle): | 
					
						
							| 
									
										
										
										
											2021-08-29 14:02:02 -04:00
										 |  |  |     """Start the game with a `Dio's Best Friend` item.""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Start with a Revive" | 
					
						
							| 
									
										
										
										
											2022-08-20 18:09:35 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-07-15 22:21:36 +01:00
										 |  |  | class FinalStageDeath(DefaultOnToggle): | 
					
						
							|  |  |  |     """Death on the final boss stage counts as a win.""" | 
					
						
							|  |  |  |     display_name = "Final Stage Death is Win" | 
					
						
							| 
									
										
										
										
											2021-08-29 14:02:02 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-06 23:40:39 -05:00
										 |  |  | class GreenScrap(Range): | 
					
						
							| 
									
										
										
										
											2022-07-15 14:24:40 -07:00
										 |  |  |     """Weight of Green Scraps in the item pool. (Ignored unless Item Weight Presets is 'No')""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Green Scraps" | 
					
						
							| 
									
										
										
										
											2021-09-06 23:40:39 -05:00
										 |  |  |     range_start = 0 | 
					
						
							| 
									
										
										
										
											2022-01-23 16:13:07 -08:00
										 |  |  |     range_end = 100 | 
					
						
							| 
									
										
										
										
											2021-09-07 17:14:20 -05:00
										 |  |  |     default = 16 | 
					
						
							| 
									
										
										
										
											2021-09-06 23:40:39 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class RedScrap(Range): | 
					
						
							| 
									
										
										
										
											2022-07-15 14:24:40 -07:00
										 |  |  |     """Weight of Red Scraps in the item pool. (Ignored unless Item Weight Presets is 'No')""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Red Scraps" | 
					
						
							| 
									
										
										
										
											2021-09-06 23:40:39 -05:00
										 |  |  |     range_start = 0 | 
					
						
							| 
									
										
										
										
											2022-01-23 16:13:07 -08:00
										 |  |  |     range_end = 100 | 
					
						
							| 
									
										
										
										
											2021-09-07 17:14:20 -05:00
										 |  |  |     default = 4 | 
					
						
							| 
									
										
										
										
											2021-09-06 23:40:39 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class YellowScrap(Range): | 
					
						
							| 
									
										
										
										
											2022-07-15 14:24:40 -07:00
										 |  |  |     """Weight of yellow scraps in the item pool. (Ignored unless Item Weight Presets is 'No')""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Yellow Scraps" | 
					
						
							| 
									
										
										
										
											2021-09-06 23:40:39 -05:00
										 |  |  |     range_start = 0 | 
					
						
							| 
									
										
										
										
											2022-01-23 16:13:07 -08:00
										 |  |  |     range_end = 100 | 
					
						
							| 
									
										
										
										
											2021-09-06 23:40:39 -05:00
										 |  |  |     default = 1 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class WhiteScrap(Range): | 
					
						
							| 
									
										
										
										
											2022-07-15 14:24:40 -07:00
										 |  |  |     """Weight of white scraps in the item pool. (Ignored unless Item Weight Presets is 'No')""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "White Scraps" | 
					
						
							| 
									
										
										
										
											2021-09-06 23:40:39 -05:00
										 |  |  |     range_start = 0 | 
					
						
							| 
									
										
										
										
											2022-01-23 16:13:07 -08:00
										 |  |  |     range_end = 100 | 
					
						
							| 
									
										
										
										
											2021-09-07 17:14:20 -05:00
										 |  |  |     default = 32 | 
					
						
							| 
									
										
										
										
											2021-09-06 23:40:39 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class CommonItem(Range): | 
					
						
							| 
									
										
										
										
											2022-07-15 14:24:40 -07:00
										 |  |  |     """Weight of common items in the item pool. (Ignored unless Item Weight Presets is 'No')""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Common Items" | 
					
						
							| 
									
										
										
										
											2021-09-06 23:40:39 -05:00
										 |  |  |     range_start = 0 | 
					
						
							| 
									
										
										
										
											2022-01-23 16:13:07 -08:00
										 |  |  |     range_end = 100 | 
					
						
							| 
									
										
										
										
											2021-09-07 17:14:20 -05:00
										 |  |  |     default = 64 | 
					
						
							| 
									
										
										
										
											2021-09-06 23:40:39 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class UncommonItem(Range): | 
					
						
							| 
									
										
										
										
											2022-07-15 14:24:40 -07:00
										 |  |  |     """Weight of uncommon items in the item pool. (Ignored unless Item Weight Presets is 'No')""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Uncommon Items" | 
					
						
							| 
									
										
										
										
											2021-09-06 23:40:39 -05:00
										 |  |  |     range_start = 0 | 
					
						
							| 
									
										
										
										
											2022-01-23 16:13:07 -08:00
										 |  |  |     range_end = 100 | 
					
						
							| 
									
										
										
										
											2021-09-07 17:14:20 -05:00
										 |  |  |     default = 32 | 
					
						
							| 
									
										
										
										
											2021-09-06 23:40:39 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class LegendaryItem(Range): | 
					
						
							| 
									
										
										
										
											2022-07-15 14:24:40 -07:00
										 |  |  |     """Weight of legendary items in the item pool. (Ignored unless Item Weight Presets is 'No')""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Legendary Items" | 
					
						
							| 
									
										
										
										
											2021-09-06 23:40:39 -05:00
										 |  |  |     range_start = 0 | 
					
						
							| 
									
										
										
										
											2022-01-23 16:13:07 -08:00
										 |  |  |     range_end = 100 | 
					
						
							| 
									
										
										
										
											2021-09-07 17:14:20 -05:00
										 |  |  |     default = 8 | 
					
						
							| 
									
										
										
										
											2021-09-06 23:40:39 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class BossItem(Range): | 
					
						
							| 
									
										
										
										
											2022-07-15 14:24:40 -07:00
										 |  |  |     """Weight of boss items in the item pool. (Ignored unless Item Weight Presets is 'No')""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Boss Items" | 
					
						
							| 
									
										
										
										
											2021-09-06 23:40:39 -05:00
										 |  |  |     range_start = 0 | 
					
						
							| 
									
										
										
										
											2022-01-23 16:13:07 -08:00
										 |  |  |     range_end = 100 | 
					
						
							| 
									
										
										
										
											2021-09-07 17:14:20 -05:00
										 |  |  |     default = 4 | 
					
						
							| 
									
										
										
										
											2021-09-06 23:40:39 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class LunarItem(Range): | 
					
						
							| 
									
										
										
										
											2022-07-15 14:24:40 -07:00
										 |  |  |     """Weight of lunar items in the item pool. (Ignored unless Item Weight Presets is 'No')""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Lunar Items" | 
					
						
							| 
									
										
										
										
											2021-09-06 23:40:39 -05:00
										 |  |  |     range_start = 0 | 
					
						
							| 
									
										
										
										
											2022-01-23 16:13:07 -08:00
										 |  |  |     range_end = 100 | 
					
						
							| 
									
										
										
										
											2021-09-07 17:14:20 -05:00
										 |  |  |     default = 16 | 
					
						
							| 
									
										
										
										
											2021-09-06 23:40:39 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class Equipment(Range): | 
					
						
							| 
									
										
										
										
											2022-07-15 14:24:40 -07:00
										 |  |  |     """Weight of equipment items in the item pool. (Ignored unless Item Weight Presets is 'No')""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Equipment" | 
					
						
							| 
									
										
										
										
											2021-09-06 23:40:39 -05:00
										 |  |  |     range_start = 0 | 
					
						
							| 
									
										
										
										
											2022-01-23 16:13:07 -08:00
										 |  |  |     range_end = 100 | 
					
						
							| 
									
										
										
										
											2021-09-07 17:14:20 -05:00
										 |  |  |     default = 32 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class ItemPoolPresetToggle(DefaultOnToggle): | 
					
						
							|  |  |  |     """Will use the item weight presets when set to true, otherwise will use the custom set item pool weights.""" | 
					
						
							| 
									
										
										
										
											2022-08-20 18:09:35 -05:00
										 |  |  |     display_name = "Use Item Weight Presets" | 
					
						
							| 
									
										
										
										
											2021-09-07 17:14:20 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-07-15 16:19:36 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-07 17:14:20 -05:00
										 |  |  | class ItemWeights(Choice): | 
					
						
							| 
									
										
										
										
											2022-07-15 14:24:40 -07:00
										 |  |  |     """Preset choices for determining the weights of the item pool.
 | 
					
						
							|  |  |  |     New is a test for a potential adjustment to the default weights. | 
					
						
							|  |  |  |     Uncommon puts a large number of uncommon items in the pool. | 
					
						
							|  |  |  |     Legendary puts a large number of legendary items in the pool. | 
					
						
							|  |  |  |     Lunartic makes everything a lunar item. | 
					
						
							|  |  |  |     Chaos generates the pool completely at random with rarer items having a slight cap to prevent this option being too easy. | 
					
						
							|  |  |  |     No Scraps removes all scrap items from the item pool. | 
					
						
							|  |  |  |     Even generates the item pool with every item having an even weight. | 
					
						
							| 
									
										
										
										
											2021-10-04 22:28:40 -05:00
										 |  |  |     Scraps Only will be only scrap items in the item pool."""
 | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Item Weights" | 
					
						
							| 
									
										
										
										
											2021-09-07 17:14:20 -05:00
										 |  |  |     option_default = 0 | 
					
						
							|  |  |  |     option_new = 1 | 
					
						
							|  |  |  |     option_uncommon = 2 | 
					
						
							|  |  |  |     option_legendary = 3 | 
					
						
							|  |  |  |     option_lunartic = 4 | 
					
						
							|  |  |  |     option_chaos = 5 | 
					
						
							|  |  |  |     option_no_scraps = 6 | 
					
						
							|  |  |  |     option_even = 7 | 
					
						
							| 
									
										
										
										
											2021-10-04 22:28:40 -05:00
										 |  |  |     option_scraps_only = 8 | 
					
						
							| 
									
										
										
										
											2021-09-07 17:14:20 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-07-15 16:19:36 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | # define a dictionary for the weights of the generated item pool. | 
					
						
							| 
									
										
										
										
											2022-08-20 18:09:35 -05:00
										 |  |  | ror2_weights: Dict[str, type(Option)] = { | 
					
						
							| 
									
										
										
										
											2021-09-06 23:40:39 -05:00
										 |  |  |     "green_scrap":          GreenScrap, | 
					
						
							|  |  |  |     "red_scrap":            RedScrap, | 
					
						
							|  |  |  |     "yellow_scrap":         YellowScrap, | 
					
						
							|  |  |  |     "white_scrap":          WhiteScrap, | 
					
						
							|  |  |  |     "common_item":          CommonItem, | 
					
						
							|  |  |  |     "uncommon_item":        UncommonItem, | 
					
						
							|  |  |  |     "legendary_item":       LegendaryItem, | 
					
						
							|  |  |  |     "boss_item":            BossItem, | 
					
						
							|  |  |  |     "lunar_item":           LunarItem, | 
					
						
							|  |  |  |     "equipment":            Equipment | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-08-20 18:09:35 -05:00
										 |  |  | ror2_options: Dict[str, type(Option)] = { | 
					
						
							| 
									
										
										
										
											2021-08-29 14:02:02 -04:00
										 |  |  |     "total_locations":      TotalLocations, | 
					
						
							|  |  |  |     "total_revivals":       TotalRevivals, | 
					
						
							|  |  |  |     "start_with_revive":    StartWithRevive, | 
					
						
							| 
									
										
										
										
											2022-07-15 22:21:36 +01:00
										 |  |  |     "final_stage_death":    FinalStageDeath, | 
					
						
							| 
									
										
										
										
											2021-08-31 20:38:44 -04:00
										 |  |  |     "item_pickup_step":     ItemPickupStep, | 
					
						
							| 
									
										
										
										
											2021-09-06 23:40:39 -05:00
										 |  |  |     "enable_lunar":         AllowLunarItems, | 
					
						
							| 
									
										
										
										
											2021-09-07 17:14:20 -05:00
										 |  |  |     "item_weights":         ItemWeights, | 
					
						
							|  |  |  |     "item_pool_presets":    ItemPoolPresetToggle, | 
					
						
							| 
									
										
										
										
											2021-09-06 23:40:39 -05:00
										 |  |  |     **ror2_weights | 
					
						
							| 
									
										
										
										
											2022-01-22 22:52:02 -08:00
										 |  |  | } |