diff --git a/Hints.py b/Hints.py index 201be11eb8..45014fcc6a 100644 --- a/Hints.py +++ b/Hints.py @@ -1145,11 +1145,16 @@ def get_junk_hint(spoiler: Spoiler, world: World, checked: set[str]) -> HintRetu def get_important_check_hint(spoiler: Spoiler, world: World, checked: set[str]) -> HintReturn: top_level_locations = [] + empty_dungeons = [dungeon for dungeon in world.precompleted_dungeons if world.precompleted_dungeons[dungeon]] for location in world.get_filled_locations(): if (HintArea.at(location).text(world.settings.clearer_hints) not in top_level_locations and (HintArea.at(location).text(world.settings.clearer_hints) + ' Important Check') not in checked - and HintArea.at(location) != HintArea.ROOT): + and HintArea.at(location) != HintArea.ROOT + and HintArea.at(location).dungeon_name not in empty_dungeons # prevent pre-completed dungeons from being hinted + and not location.locked): # prevent areas with unshuffled checks from being hinted top_level_locations.append(HintArea.at(location).text(world.settings.clearer_hints)) + if not top_level_locations: + return None hint_loc = random.choice(top_level_locations) item_count = 0 for location in world.get_filled_locations(): @@ -1188,7 +1193,7 @@ def get_important_check_hint(spoiler: Spoiler, world: World, checked: set[str]) else: numcolor = 'Green' - return GossipText('#%s# has #%d# major item%s.' % (hint_loc, item_count, "s" if item_count != 1 else ""), ['Green', numcolor]), None + return GossipText('%s has #%d# major item%s.' % (hint_loc, item_count, "s" if item_count != 1 else ""), ['Green', numcolor]), None hint_func: dict[str, HintFunc | BarrenFunc] = {