From ff86cc978c81fe9f1d0a8d64eb502240e0015a19 Mon Sep 17 00:00:00 2001 From: PoryGone Date: Mon, 20 May 2024 23:09:03 -0400 Subject: [PATCH] Merge Conflicts --- worlds/sa2b/Options.py | 190 ++++++++++++++++++++-------------------- worlds/sa2b/__init__.py | 5 +- 2 files changed, 98 insertions(+), 97 deletions(-) diff --git a/worlds/sa2b/Options.py b/worlds/sa2b/Options.py index b2980426920a..0f9c2f34e56f 100644 --- a/worlds/sa2b/Options.py +++ b/worlds/sa2b/Options.py @@ -1,6 +1,6 @@ -import typing +from dataclasses import dataclass -from Options import Choice, Range, Option, Toggle, DeathLink, DefaultOnToggle, OptionList +from Options import Choice, Range, Option, Toggle, DeathLink, DefaultOnToggle, OptionList, PerGameCommonOptions class Goal(Choice): @@ -777,96 +777,96 @@ class LogicDifficulty(Choice): default = 0 -sa2b_options: typing.Dict[str, type(Option)] = { - "goal": Goal, - - "mission_shuffle": MissionShuffle, - "boss_rush_shuffle": BossRushShuffle, - - "keysanity": Keysanity, - "whistlesanity": Whistlesanity, - "beetlesanity": Beetlesanity, - "omosanity": Omosanity, - "animalsanity": Animalsanity, - "kart_race_checks": KartRaceChecks, - - "logic_difficulty": LogicDifficulty, - "required_rank": RequiredRank, - "required_cannons_core_missions": RequiredCannonsCoreMissions, - - "emblem_percentage_for_cannons_core": EmblemPercentageForCannonsCore, - "number_of_level_gates": NumberOfLevelGates, - "level_gate_distribution": LevelGateDistribution, - "level_gate_costs": LevelGateCosts, - "max_emblem_cap": MaximumEmblemCap, - - "chao_race_difficulty": ChaoRaceDifficulty, - "chao_karate_difficulty": ChaoKarateDifficulty, - "chao_stadium_checks": ChaoStadiumChecks, - "chao_stats": ChaoStats, - "chao_stats_frequency": ChaoStatsFrequency, - "chao_stats_stamina": ChaoStatsStamina, - "chao_stats_hidden": ChaoStatsHidden, - "chao_animal_parts": ChaoAnimalParts, - "chao_kindergarten": ChaoKindergarten, - "black_market_slots": BlackMarketSlots, - "black_market_unlock_costs": BlackMarketUnlockCosts, - "black_market_price_multiplier": BlackMarketPriceMultiplier, - "shuffle_starting_chao_eggs": ShuffleStartingChaoEggs, - "chao_entrance_randomization": ChaoEntranceRandomization, - - "junk_fill_percentage": JunkFillPercentage, - "trap_fill_percentage": TrapFillPercentage, - "omochao_trap_weight": OmochaoTrapWeight, - "timestop_trap_weight": TimestopTrapWeight, - "confusion_trap_weight": ConfusionTrapWeight, - "tiny_trap_weight": TinyTrapWeight, - "gravity_trap_weight": GravityTrapWeight, - "exposition_trap_weight": ExpositionTrapWeight, - #"darkness_trap_weight": DarknessTrapWeight, - "ice_trap_weight": IceTrapWeight, - "slow_trap_weight": SlowTrapWeight, - "cutscene_trap_weight": CutsceneTrapWeight, - "reverse_trap_weight": ReverseTrapWeight, - "pong_trap_weight": PongTrapWeight, - "minigame_trap_difficulty": MinigameTrapDifficulty, - - "sadx_music": SADXMusic, - "music_shuffle": MusicShuffle, - "voice_shuffle": VoiceShuffle, - "narrator": Narrator, - "ring_loss": RingLoss, - - "speed_mission_count": SpeedMissionCount, - "speed_mission_2": SpeedMission2, - "speed_mission_3": SpeedMission3, - "speed_mission_4": SpeedMission4, - "speed_mission_5": SpeedMission5, - - "mech_mission_count": MechMissionCount, - "mech_mission_2": MechMission2, - "mech_mission_3": MechMission3, - "mech_mission_4": MechMission4, - "mech_mission_5": MechMission5, - - "hunt_mission_count": HuntMissionCount, - "hunt_mission_2": HuntMission2, - "hunt_mission_3": HuntMission3, - "hunt_mission_4": HuntMission4, - "hunt_mission_5": HuntMission5, - - "kart_mission_count": KartMissionCount, - "kart_mission_2": KartMission2, - "kart_mission_3": KartMission3, - "kart_mission_4": KartMission4, - "kart_mission_5": KartMission5, - - "cannons_core_mission_count": CannonsCoreMissionCount, - "cannons_core_mission_2": CannonsCoreMission2, - "cannons_core_mission_3": CannonsCoreMission3, - "cannons_core_mission_4": CannonsCoreMission4, - "cannons_core_mission_5": CannonsCoreMission5, - - "ring_link": RingLink, - "death_link": DeathLink, -} +@dataclass +class SA2BOptions(PerGameCommonOptions): + goal: Goal + + mission_shuffle: MissionShuffle + boss_rush_shuffle: BossRushShuffle + + keysanity: Keysanity + whistlesanity: Whistlesanity + beetlesanity: Beetlesanity + omosanity: Omosanity + animalsanity: Animalsanity + kart_race_checks: KartRaceChecks + + logic_difficulty: LogicDifficulty + required_rank: RequiredRank + required_cannons_core_missions: RequiredCannonsCoreMissions + + emblem_percentage_for_cannons_core: EmblemPercentageForCannonsCore + number_of_level_gates: NumberOfLevelGates + level_gate_distribution: LevelGateDistribution + level_gate_costs: LevelGateCosts + max_emblem_cap: MaximumEmblemCap + + chao_race_difficulty: ChaoRaceDifficulty + chao_karate_difficulty: ChaoKarateDifficulty + chao_stadium_checks: ChaoStadiumChecks + chao_stats: ChaoStats + chao_stats_frequency: ChaoStatsFrequency + chao_stats_stamina: ChaoStatsStamina + chao_stats_hidden: ChaoStatsHidden + chao_animal_parts: ChaoAnimalParts + chao_kindergarten: ChaoKindergarten + black_market_slots: BlackMarketSlots + black_market_unlock_costs: BlackMarketUnlockCosts + black_market_price_multiplier: BlackMarketPriceMultiplier + shuffle_starting_chao_eggs: ShuffleStartingChaoEggs + chao_entrance_randomization: ChaoEntranceRandomization + + junk_fill_percentage: JunkFillPercentage + trap_fill_percentage: TrapFillPercentage + omochao_trap_weight: OmochaoTrapWeight + timestop_trap_weight: TimestopTrapWeight + confusion_trap_weight: ConfusionTrapWeight + tiny_trap_weight: TinyTrapWeight + gravity_trap_weight: GravityTrapWeight + exposition_trap_weight: ExpositionTrapWeight + #darkness_trap_weight: DarknessTrapWeight + ice_trap_weight: IceTrapWeight + slow_trap_weight: SlowTrapWeight + cutscene_trap_weight: CutsceneTrapWeight + reverse_trap_weight: ReverseTrapWeight + pong_trap_weight: PongTrapWeight + minigame_trap_difficulty: MinigameTrapDifficulty + + sadx_music: SADXMusic + music_shuffle: MusicShuffle + voice_shuffle: VoiceShuffle + narrator: Narrator + ring_loss: RingLoss + + speed_mission_count: SpeedMissionCount + speed_mission_2: SpeedMission2 + speed_mission_3: SpeedMission3 + speed_mission_4: SpeedMission4 + speed_mission_5: SpeedMission5 + + mech_mission_count: MechMissionCount + mech_mission_2: MechMission2 + mech_mission_3: MechMission3 + mech_mission_4: MechMission4 + mech_mission_5: MechMission5 + + hunt_mission_count: HuntMissionCount + hunt_mission_2: HuntMission2 + hunt_mission_3: HuntMission3 + hunt_mission_4: HuntMission4 + hunt_mission_5: HuntMission5 + + kart_mission_count: KartMissionCount + kart_mission_2: KartMission2 + kart_mission_3: KartMission3 + kart_mission_4: KartMission4 + kart_mission_5: KartMission5 + + cannons_core_mission_count: CannonsCoreMissionCount + cannons_core_mission_2: CannonsCoreMission2 + cannons_core_mission_3: CannonsCoreMission3 + cannons_core_mission_4: CannonsCoreMission4 + cannons_core_mission_5: CannonsCoreMission5 + + ring_link: RingLink + death_link: DeathLink diff --git a/worlds/sa2b/__init__.py b/worlds/sa2b/__init__.py index 7d77aebc4caf..6a0de220cd42 100644 --- a/worlds/sa2b/__init__.py +++ b/worlds/sa2b/__init__.py @@ -6,7 +6,7 @@ from .Items import SA2BItem, ItemData, item_table, upgrades_table, emeralds_table, junk_table, trap_table, item_groups, \ eggs_table, fruits_table, seeds_table, hats_table, animals_table, chaos_drives_table from .Locations import SA2BLocation, all_locations, setup_locations, chao_animal_event_location_table, black_market_location_table -from .Options import sa2b_options +from .Options import SA2BOptions from .Regions import create_regions, shuffleable_regions, connect_regions, LevelGate, gate_0_whitelist_regions, \ gate_0_blacklist_regions from .Rules import set_rules @@ -54,7 +54,8 @@ class SA2BWorld(World): Sonic Adventure 2 Battle is an action platforming game. Play as Sonic, Tails, Knuckles, Shadow, Rouge, and Eggman across 31 stages and prevent the destruction of the earth. """ game: str = "Sonic Adventure 2 Battle" - option_definitions = sa2b_options + options_dataclass = SA2BOptions + options: SA2BOptions topology_present = False data_version = 7