Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Hints.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -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] = {
Expand Down