Skip to content

Commit

Permalink
Enable alternate dungeon reward hint mode for tower ER
Browse files Browse the repository at this point in the history
  • Loading branch information
fenhl committed Sep 13, 2024
1 parent d70b7f9 commit 067f5e2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Hints.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
6 changes: 3 additions & 3 deletions Patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions World.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 067f5e2

Please sign in to comment.