From af96f71190acb569332c2836b298089828443f49 Mon Sep 17 00:00:00 2001 From: CaitSith2 Date: Thu, 16 Dec 2021 15:34:18 -0800 Subject: [PATCH] Fix bug where there is less locations than hint count. --- worlds/alttp/Rom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/alttp/Rom.py b/worlds/alttp/Rom.py index c5d7680b..1ac4d99c 100644 --- a/worlds/alttp/Rom.py +++ b/worlds/alttp/Rom.py @@ -2287,7 +2287,7 @@ def write_strings(rom, world, player): if hint_count: locations = world.find_items_in_locations(set(items_to_hint), player) local_random.shuffle(locations) - for x in range(hint_count): + 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) + '.' tt[hint_locations.pop(0)] = this_hint