From 59450f38f4c35eb334b618d694d825573a23029e Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Sat, 27 Jan 2024 18:24:17 +0100 Subject: [PATCH] This code was so broken wtf --- worlds/witness/hints.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/worlds/witness/hints.py b/worlds/witness/hints.py index 7a766a243e69..b0172351c005 100644 --- a/worlds/witness/hints.py +++ b/worlds/witness/hints.py @@ -634,7 +634,7 @@ def create_all_hints(world: "WitnessWorld", hint_amount: int, area_hints: int) - if loc.address and StaticWitnessLogic.ENTITIES_BY_NAME[loc.name]["area"]["name"] == "Tutorial (Inside)" } - intended_location_hints = area_hints - hint_amount + intended_location_hints = hint_amount - area_hints # First, make always and priority hints. @@ -652,19 +652,21 @@ def create_all_hints(world: "WitnessWorld", hint_amount: int, area_hints: int) - remaining_location_hints = intended_location_hints - always_hints_to_use priority_hints_to_use = int(max(0.0, min(possible_priority_hints / 2, remaining_location_hints / 2))) + amt_of_used_always_hints = 0 + amt_of_used_priority_hints = 0 + for _ in range(always_hints_to_use): + amt_of_used_always_hints += 1 location_hint = always_hints.pop() generated_hints.append(word_direct_hint(world, location_hint)) already_hinted_locations.add(location_hint.location) for _ in range(priority_hints_to_use): + amt_of_used_priority_hints += 1 location_hint = priority_hints.pop() generated_hints.append(word_direct_hint(world, location_hint)) already_hinted_locations.add(location_hint.location) - amt_of_used_always_hints = len(always_hints) - always_hints_to_use - amt_of_used_priority_hints = len(priority_hints) - priority_hints_to_use - location_hints_created_in_round_1 = len(generated_hints) unhinted_locations_per_area: Dict[str, Set[Location]] = dict()