| 
									
										
										
										
											2024-01-12 01:07:40 +01:00
										 |  |  | from dataclasses import dataclass, fields | 
					
						
							| 
									
										
										
										
											2024-03-29 01:01:31 +01:00
										 |  |  | from datetime import datetime | 
					
						
							| 
									
										
										
										
											2024-03-12 14:03:57 -07:00
										 |  |  | from typing import Any, ClassVar, cast, Dict, Iterator, List, Tuple, Protocol | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-15 09:17:46 +01:00
										 |  |  | from Options import AssembleOptions, Choice, DeathLink, DefaultOnToggle, Option, PerGameCommonOptions, \ | 
					
						
							|  |  |  |     ProgressionBalancing, Range, Toggle | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-21 23:26:40 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | # typing boilerplate | 
					
						
							| 
									
										
										
										
											2024-01-12 01:07:40 +01:00
										 |  |  | class FlagsProtocol(Protocol): | 
					
						
							| 
									
										
										
										
											2022-10-21 23:26:40 +02:00
										 |  |  |     value: int | 
					
						
							| 
									
										
										
										
											2024-03-12 14:03:57 -07:00
										 |  |  |     default: ClassVar[int] | 
					
						
							| 
									
										
										
										
											2024-01-12 01:07:40 +01:00
										 |  |  |     flags: List[str] | 
					
						
							| 
									
										
										
										
											2022-10-21 23:26:40 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-12 01:07:40 +01:00
										 |  |  | class FlagProtocol(Protocol): | 
					
						
							| 
									
										
										
										
											2022-10-21 23:26:40 +02:00
										 |  |  |     value: int | 
					
						
							| 
									
										
										
										
											2024-03-12 14:03:57 -07:00
										 |  |  |     default: ClassVar[int] | 
					
						
							| 
									
										
										
										
											2022-10-21 23:26:40 +02:00
										 |  |  |     flag: str | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # meta options | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  | class EvermizerFlags: | 
					
						
							| 
									
										
										
										
											2024-01-12 01:07:40 +01:00
										 |  |  |     flags: List[str] | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-21 23:26:40 +02:00
										 |  |  |     def to_flag(self: FlagsProtocol) -> str: | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  |         return self.flags[self.value] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class EvermizerFlag: | 
					
						
							|  |  |  |     flag: str | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-21 23:26:40 +02:00
										 |  |  |     def to_flag(self: FlagProtocol) -> str: | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  |         return self.flag if self.value != self.default else '' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-19 05:34:41 +01:00
										 |  |  | class OffOnFullChoice(Choice): | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  |     option_off = 0 | 
					
						
							|  |  |  |     option_on = 1 | 
					
						
							| 
									
										
										
										
											2021-12-19 05:34:41 +01:00
										 |  |  |     option_full = 2 | 
					
						
							|  |  |  |     alias_chaos = 2 | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-08 17:27:05 +02:00
										 |  |  | class OffOnLogicChoice(Choice): | 
					
						
							|  |  |  |     option_off = 0 | 
					
						
							|  |  |  |     option_on = 1 | 
					
						
							|  |  |  |     option_logic = 2 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-21 23:26:40 +02:00
										 |  |  | # actual options | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  | class Difficulty(EvermizerFlags, Choice): | 
					
						
							|  |  |  |     """Changes relative spell cost and stuff""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Difficulty" | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  |     option_easy = 0 | 
					
						
							|  |  |  |     option_normal = 1 | 
					
						
							|  |  |  |     option_hard = 2 | 
					
						
							| 
									
										
										
										
											2021-12-18 16:39:47 +01:00
										 |  |  |     option_mystery = 3  # 'random' is reserved | 
					
						
							|  |  |  |     alias_chaos = 3 | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  |     default = 1 | 
					
						
							|  |  |  |     flags = ['e', 'n', 'h', 'x'] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-07-15 18:01:07 +02:00
										 |  |  | class EnergyCore(EvermizerFlags, Choice): | 
					
						
							|  |  |  |     """How to obtain the Energy Core""" | 
					
						
							|  |  |  |     display_name = "Energy Core" | 
					
						
							|  |  |  |     option_vanilla = 0 | 
					
						
							|  |  |  |     option_shuffle = 1 | 
					
						
							|  |  |  |     option_fragments = 2 | 
					
						
							|  |  |  |     default = 1 | 
					
						
							|  |  |  |     flags = ['z', '', 'Z'] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class RequiredFragments(Range): | 
					
						
							|  |  |  |     """Required fragment count for Energy Core = Fragments""" | 
					
						
							|  |  |  |     display_name = "Required Fragments" | 
					
						
							|  |  |  |     range_start = 1 | 
					
						
							|  |  |  |     range_end = 99 | 
					
						
							|  |  |  |     default = 10 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class AvailableFragments(Range): | 
					
						
							|  |  |  |     """Placed fragment count for Energy Core = Fragments""" | 
					
						
							|  |  |  |     display_name = "Available Fragments" | 
					
						
							|  |  |  |     range_start = 1 | 
					
						
							|  |  |  |     range_end = 99 | 
					
						
							|  |  |  |     default = 11 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  | class MoneyModifier(Range): | 
					
						
							|  |  |  |     """Money multiplier in %""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Money Modifier" | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  |     range_start = 1 | 
					
						
							|  |  |  |     range_end = 2500 | 
					
						
							|  |  |  |     default = 200 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class ExpModifier(Range): | 
					
						
							|  |  |  |     """EXP multiplier for Weapons, Characters and Spells in %""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Exp Modifier" | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  |     range_start = 1 | 
					
						
							|  |  |  |     range_end = 2500 | 
					
						
							|  |  |  |     default = 200 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-08 17:27:05 +02:00
										 |  |  | class SequenceBreaks(EvermizerFlags, OffOnLogicChoice): | 
					
						
							|  |  |  |     """Disable, enable some sequence breaks or put them in logic""" | 
					
						
							|  |  |  |     display_name = "Sequence Breaks" | 
					
						
							|  |  |  |     default = 0 | 
					
						
							|  |  |  |     flags = ['', 'j', 'J'] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class OutOfBounds(EvermizerFlags, OffOnLogicChoice): | 
					
						
							|  |  |  |     """Disable, enable the out-of-bounds glitch or put it in logic""" | 
					
						
							|  |  |  |     display_name = "Out Of Bounds" | 
					
						
							|  |  |  |     default = 0 | 
					
						
							|  |  |  |     flags = ['', 'u', 'U'] | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class FixCheats(EvermizerFlag, DefaultOnToggle): | 
					
						
							|  |  |  |     """Fix cheats left in by the devs (not desert skip)""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Fix Cheats" | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  |     flag = '2' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class FixInfiniteAmmo(EvermizerFlag, Toggle): | 
					
						
							|  |  |  |     """Fix infinite ammo glitch""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Fix Infinite Ammo" | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  |     flag = '5' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class FixAtlasGlitch(EvermizerFlag, Toggle): | 
					
						
							|  |  |  |     """Fix atlas underflowing stats""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Fix Atlas Glitch" | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  |     flag = '6' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class FixWingsGlitch(EvermizerFlag, Toggle): | 
					
						
							|  |  |  |     """Fix wings making you invincible in some areas""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Fix Wings Glitch" | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  |     flag = '7' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-01-22 00:02:06 +01:00
										 |  |  | class ShorterDialogs(EvermizerFlag, DefaultOnToggle): | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  |     """Cuts some dialogs""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Shorter Dialogs" | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  |     flag = '9' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-01-22 00:02:06 +01:00
										 |  |  | class ShortBossRush(EvermizerFlag, DefaultOnToggle): | 
					
						
							| 
									
										
										
										
											2021-12-19 05:34:41 +01:00
										 |  |  |     """Start boss rush at Metal Magmar, cut enemy HP in half""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Short Boss Rush" | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  |     flag = 'f' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-19 05:34:41 +01:00
										 |  |  | class Ingredienizer(EvermizerFlags, OffOnFullChoice): | 
					
						
							|  |  |  |     """On Shuffles, Full randomizes spell ingredients""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Ingredienizer" | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  |     default = 1 | 
					
						
							|  |  |  |     flags = ['i', '', 'I'] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-29 01:01:31 +01:00
										 |  |  | class Sniffamizer(EvermizerFlags, Choice): | 
					
						
							|  |  |  |     """
 | 
					
						
							|  |  |  |     Off: all vanilla items in sniff spots | 
					
						
							|  |  |  |     Shuffle: sniff items shuffled into random sniff spots | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Sniffamizer" | 
					
						
							| 
									
										
										
										
											2024-03-29 01:01:31 +01:00
										 |  |  |     option_off = 0 | 
					
						
							|  |  |  |     option_shuffle = 1 | 
					
						
							|  |  |  |     if datetime.today().year > 2024 or datetime.today().month > 3: | 
					
						
							|  |  |  |         option_everywhere = 2 | 
					
						
							|  |  |  |         __doc__ = __doc__ + "    Everywhere: add sniff spots to multiworld pool" | 
					
						
							|  |  |  |     alias_true = 1 | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  |     default = 1 | 
					
						
							|  |  |  |     flags = ['s', '', 'S'] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-29 01:01:31 +01:00
										 |  |  | class SniffIngredients(EvermizerFlag, Choice): | 
					
						
							|  |  |  |     """Select which items should be used as sniff items""" | 
					
						
							|  |  |  |     display_name = "Sniff Ingredients" | 
					
						
							|  |  |  |     option_vanilla_ingredients = 0 | 
					
						
							|  |  |  |     option_random_ingredients = 1 | 
					
						
							|  |  |  |     flag = 'v' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-19 05:34:41 +01:00
										 |  |  | class Callbeadamizer(EvermizerFlags, OffOnFullChoice): | 
					
						
							|  |  |  |     """On Shuffles call bead characters, Full shuffles individual spells""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Callbeadamizer" | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  |     default = 1 | 
					
						
							|  |  |  |     flags = ['c', '', 'C'] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class Musicmizer(EvermizerFlag, Toggle): | 
					
						
							|  |  |  |     """Randomize music for some rooms""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Musicmizer" | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  |     flag = 'm' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-19 05:34:41 +01:00
										 |  |  | class Doggomizer(EvermizerFlags, OffOnFullChoice): | 
					
						
							|  |  |  |     """On shuffles dog per act, Full randomizes dog per screen, Pupdunk gives you Everpupper everywhere""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Doggomizer" | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  |     option_pupdunk = 3 | 
					
						
							|  |  |  |     default = 0 | 
					
						
							|  |  |  |     flags = ['', 'd', 'D', 'p'] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class TurdoMode(EvermizerFlag, Toggle): | 
					
						
							|  |  |  |     """Replace offensive spells by Turd Balls with varying strength and make weapons weak""" | 
					
						
							| 
									
										
										
										
											2022-02-02 16:29:29 +01:00
										 |  |  |     display_name = "Turdo Mode" | 
					
						
							| 
									
										
										
										
											2021-11-07 15:38:02 +01:00
										 |  |  |     flag = 't' | 
					
						
							| 
									
										
										
										
											2021-09-29 09:12:23 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-03-22 01:13:30 +01:00
										 |  |  | class TrapCount(Range): | 
					
						
							|  |  |  |     """Replace some filler items with traps""" | 
					
						
							|  |  |  |     display_name = "Trap Count" | 
					
						
							|  |  |  |     range_start = 0 | 
					
						
							|  |  |  |     range_end = 100 | 
					
						
							|  |  |  |     default = 0 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-21 23:26:40 +02:00
										 |  |  | # more meta options | 
					
						
							| 
									
										
										
										
											2022-03-22 01:13:30 +01:00
										 |  |  | class ItemChanceMeta(AssembleOptions): | 
					
						
							| 
									
										
										
										
											2024-01-12 01:07:40 +01:00
										 |  |  |     def __new__(mcs, name: str, bases: Tuple[type], attrs: Dict[Any, Any]) -> "ItemChanceMeta": | 
					
						
							| 
									
										
										
										
											2022-03-22 01:13:30 +01:00
										 |  |  |         if 'item_name' in attrs: | 
					
						
							|  |  |  |             attrs["display_name"] = f"{attrs['item_name']} Chance" | 
					
						
							|  |  |  |         attrs["range_start"] = 0 | 
					
						
							|  |  |  |         attrs["range_end"] = 100 | 
					
						
							| 
									
										
										
										
											2024-03-29 01:01:31 +01:00
										 |  |  |         cls = super(ItemChanceMeta, mcs).__new__(mcs, name, bases, attrs)   # type: ignore[no-untyped-call] | 
					
						
							| 
									
										
										
										
											2024-01-12 01:07:40 +01:00
										 |  |  |         return cast(ItemChanceMeta, cls) | 
					
						
							| 
									
										
										
										
											2022-03-22 01:13:30 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class TrapChance(Range, metaclass=ItemChanceMeta): | 
					
						
							|  |  |  |     item_name: str | 
					
						
							|  |  |  |     default = 20 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-21 23:26:40 +02:00
										 |  |  | # more actual options | 
					
						
							| 
									
										
										
										
											2022-03-22 01:13:30 +01:00
										 |  |  | class TrapChanceQuake(TrapChance): | 
					
						
							|  |  |  |     """Sets the chance/ratio of quake traps""" | 
					
						
							|  |  |  |     item_name = "Quake Trap" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class TrapChancePoison(TrapChance): | 
					
						
							|  |  |  |     """Sets the chance/ratio of poison effect traps""" | 
					
						
							|  |  |  |     item_name = "Poison Trap" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class TrapChanceConfound(TrapChance): | 
					
						
							|  |  |  |     """Sets the chance/ratio of confound effect traps""" | 
					
						
							|  |  |  |     item_name = "Confound Trap" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class TrapChanceHUD(TrapChance): | 
					
						
							|  |  |  |     """Sets the chance/ratio of HUD visibility traps""" | 
					
						
							|  |  |  |     item_name = "HUD Trap" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class TrapChanceOHKO(TrapChance): | 
					
						
							|  |  |  |     """Sets the chance/ratio of OHKO (1HP left) traps""" | 
					
						
							|  |  |  |     item_name = "OHKO Trap" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-06-19 11:10:26 +02:00
										 |  |  | class SoEProgressionBalancing(ProgressionBalancing): | 
					
						
							|  |  |  |     default = 30 | 
					
						
							| 
									
										
										
										
											2022-10-21 23:26:40 +02:00
										 |  |  |     __doc__ = ProgressionBalancing.__doc__.replace(f"default {ProgressionBalancing.default}", f"default {default}") \ | 
					
						
							|  |  |  |         if ProgressionBalancing.__doc__ else None | 
					
						
							| 
									
										
										
										
											2022-07-15 18:01:07 +02:00
										 |  |  |     special_range_names = {**ProgressionBalancing.special_range_names, "normal": default} | 
					
						
							| 
									
										
										
										
											2022-06-19 11:10:26 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-12 01:07:40 +01:00
										 |  |  | # noinspection SpellCheckingInspection | 
					
						
							|  |  |  | @dataclass | 
					
						
							|  |  |  | class SoEOptions(PerGameCommonOptions): | 
					
						
							|  |  |  |     difficulty:            Difficulty | 
					
						
							|  |  |  |     energy_core:           EnergyCore | 
					
						
							|  |  |  |     required_fragments:    RequiredFragments | 
					
						
							|  |  |  |     available_fragments:   AvailableFragments | 
					
						
							|  |  |  |     money_modifier:        MoneyModifier | 
					
						
							|  |  |  |     exp_modifier:          ExpModifier | 
					
						
							|  |  |  |     sequence_breaks:       SequenceBreaks | 
					
						
							|  |  |  |     out_of_bounds:         OutOfBounds | 
					
						
							|  |  |  |     fix_cheats:            FixCheats | 
					
						
							|  |  |  |     fix_infinite_ammo:     FixInfiniteAmmo | 
					
						
							|  |  |  |     fix_atlas_glitch:      FixAtlasGlitch | 
					
						
							|  |  |  |     fix_wings_glitch:      FixWingsGlitch | 
					
						
							|  |  |  |     shorter_dialogs:       ShorterDialogs | 
					
						
							|  |  |  |     short_boss_rush:       ShortBossRush | 
					
						
							|  |  |  |     ingredienizer:         Ingredienizer | 
					
						
							|  |  |  |     sniffamizer:           Sniffamizer | 
					
						
							| 
									
										
										
										
											2024-03-29 01:01:31 +01:00
										 |  |  |     sniff_ingredients:     SniffIngredients | 
					
						
							| 
									
										
										
										
											2024-01-12 01:07:40 +01:00
										 |  |  |     callbeadamizer:        Callbeadamizer | 
					
						
							|  |  |  |     musicmizer:            Musicmizer | 
					
						
							|  |  |  |     doggomizer:            Doggomizer | 
					
						
							|  |  |  |     turdo_mode:            TurdoMode | 
					
						
							|  |  |  |     death_link:            DeathLink | 
					
						
							|  |  |  |     trap_count:            TrapCount | 
					
						
							|  |  |  |     trap_chance_quake:     TrapChanceQuake | 
					
						
							|  |  |  |     trap_chance_poison:    TrapChancePoison | 
					
						
							|  |  |  |     trap_chance_confound:  TrapChanceConfound | 
					
						
							|  |  |  |     trap_chance_hud:       TrapChanceHUD | 
					
						
							|  |  |  |     trap_chance_ohko:      TrapChanceOHKO | 
					
						
							|  |  |  |     progression_balancing: SoEProgressionBalancing | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     @property | 
					
						
							|  |  |  |     def trap_chances(self) -> Iterator[TrapChance]: | 
					
						
							|  |  |  |         for field in fields(self): | 
					
						
							|  |  |  |             option = getattr(self, field.name) | 
					
						
							|  |  |  |             if isinstance(option, TrapChance): | 
					
						
							|  |  |  |                 yield option | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     @property | 
					
						
							|  |  |  |     def flags(self) -> str: | 
					
						
							| 
									
										
										
										
											2025-01-17 18:53:29 +01:00
										 |  |  |         flags = 'AGBo'  # configures auto-tracker to AP's fill | 
					
						
							| 
									
										
										
										
											2024-01-12 01:07:40 +01:00
										 |  |  |         for field in fields(self): | 
					
						
							|  |  |  |             option = getattr(self, field.name) | 
					
						
							|  |  |  |             if isinstance(option, (EvermizerFlag, EvermizerFlags)): | 
					
						
							| 
									
										
										
										
											2024-01-15 09:17:46 +01:00
										 |  |  |                 assert isinstance(option, Option) | 
					
						
							|  |  |  |                 # noinspection PyUnresolvedReferences | 
					
						
							|  |  |  |                 flags += option.to_flag() | 
					
						
							| 
									
										
										
										
											2024-01-12 01:07:40 +01:00
										 |  |  |         return flags |