From 19f1b265b1f6478d7ae678fb6016f0ed5761aab8 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sun, 14 Apr 2024 20:36:36 +0200 Subject: [PATCH] LttP: deprioritize locked locations for ingame hints (#3127) --- worlds/alttp/Rom.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/worlds/alttp/Rom.py b/worlds/alttp/Rom.py index 274aceba..80f7ab7f 100644 --- a/worlds/alttp/Rom.py +++ b/worlds/alttp/Rom.py @@ -2397,6 +2397,9 @@ def write_strings(rom, world, player): if hint_count: locations = world.find_items_in_locations(items_to_hint, player, True) local_random.shuffle(locations) + # make locked locations less likely to appear as hint, + # chances are the lock means the player already knows. + locations.sort(key=lambda sorting_location: not sorting_location.locked) for x in range(min(hint_count, len(locations))): this_location = locations.pop() this_hint = this_location.item.hint_text + ' can be found ' + hint_text(this_location) + '.'