From 067f5e215d8f36196dc99ce2b309596a68e1b45c Mon Sep 17 00:00:00 2001 From: Fenhl Date: Fri, 13 Sep 2024 16:24:22 +0000 Subject: [PATCH] Enable alternate dungeon reward hint mode for tower ER --- Hints.py | 2 +- Patches.py | 6 +++--- World.py | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Hints.py b/Hints.py index e694bd4c1..aa9ef7fe9 100644 --- a/Hints.py +++ b/Hints.py @@ -1271,7 +1271,7 @@ def build_gossip_hints(spoiler: Spoiler, worlds: list[World]) -> None: for world in worlds: for location in world.hinted_dungeon_reward_locations.values(): if world.settings.enhance_map_compass: - if world.mixed_pools_bosses or world.settings.shuffle_dungeon_rewards not in ('vanilla', 'reward'): + if world.entrance_rando_reward_hints: # In these settings, there is not necessarily one dungeon reward in each dungeon, # so we instead have each compass hint the area of its dungeon's vanilla reward. compass_locations = [ diff --git a/Patches.py b/Patches.py index c847b8b88..e166fac0d 100644 --- a/Patches.py +++ b/Patches.py @@ -2004,7 +2004,7 @@ def update_scrub_text(message: bytearray, text_replacement: list[str], default_p update_message_by_id(messages, map_id, map_message, allow_duplicates=True) else: dungeon_name, compass_id, map_id = dungeon_list[dungeon.name] - if world.mixed_pools_bosses or world.settings.shuffle_dungeon_rewards not in ('vanilla', 'reward'): + if world.entrance_rando_reward_hints: vanilla_reward = world.get_location(dungeon.vanilla_boss_name).vanilla_item vanilla_reward_location = world.hinted_dungeon_reward_locations[vanilla_reward] area = HintArea.at(vanilla_reward_location) @@ -2796,9 +2796,9 @@ def configure_dungeon_info(rom: Rom, world: World) -> None: rom.write_int32(rom.sym('CFG_DUNGEON_INFO_MQ_ENABLE'), int(mq_enable)) rom.write_int32(rom.sym('CFG_DUNGEON_INFO_MQ_NEED_MAP'), int(enhance_map_compass)) rom.write_int32(rom.sym('CFG_DUNGEON_INFO_REWARD_ENABLE'), int('altar' in world.settings.misc_hints or enhance_map_compass)) - rom.write_int32(rom.sym('CFG_DUNGEON_INFO_REWARD_NEED_COMPASS'), (2 if world.mixed_pools_bosses or world.settings.shuffle_dungeon_rewards not in ('vanilla', 'reward') else 1) if enhance_map_compass and world.settings.shuffle_dungeon_rewards != 'dungeon' else 0) + rom.write_int32(rom.sym('CFG_DUNGEON_INFO_REWARD_NEED_COMPASS'), (2 if world.entrance_rando_reward_hints else 1) if enhance_map_compass and world.settings.shuffle_dungeon_rewards != 'dungeon' else 0) rom.write_int32(rom.sym('CFG_DUNGEON_INFO_REWARD_NEED_ALTAR'), int(not enhance_map_compass and world.settings.shuffle_dungeon_rewards != 'dungeon')) - rom.write_int32(rom.sym('CFG_DUNGEON_INFO_REWARD_SUMMARY_ENABLE'), int(not world.mixed_pools_bosses and world.settings.shuffle_dungeon_rewards in ('vanilla', 'reward'))) + rom.write_int32(rom.sym('CFG_DUNGEON_INFO_REWARD_SUMMARY_ENABLE'), int(not world.entrance_rando_reward_hints)) rom.write_bytes(rom.sym('CFG_DUNGEON_REWARDS'), dungeon_rewards) rom.write_bytes(rom.sym('CFG_DUNGEON_IS_MQ'), dungeon_is_mq) rom.write_bytes(rom.sym('CFG_DUNGEON_REWARD_AREAS'), dungeon_reward_areas) diff --git a/World.py b/World.py index 1cedb926d..6f31b0ffc 100644 --- a/World.py +++ b/World.py @@ -75,6 +75,8 @@ def __init__(self, world_id: int, settings: Settings, resolve_randomized_setting ) self.mixed_pools_bosses = False # this setting is still in active development at https://github.com/Roman971/OoT-Randomizer + # in these settings, there's not necessarily one dungeon reward in each main dungeon, so compasses and the pause menu switch to a different behavior + self.entrance_rando_reward_hints = self.mixed_pools_bosses or self.settings.shuffle_ganon_tower or self.settings.shuffle_dungeon_rewards not in ('vanilla', 'reward') self.ensure_tod_access: bool = bool(self.shuffle_interior_entrances or settings.shuffle_overworld_entrances or settings.spawn_positions) self.disable_trade_revert: bool = self.shuffle_interior_entrances or settings.shuffle_overworld_entrances or settings.adult_trade_shuffle