From a8239625df08cf5cb58ca74a7a493edb5d6f8938 Mon Sep 17 00:00:00 2001 From: spinerak Date: Mon, 10 Jun 2024 18:37:26 +0200 Subject: [PATCH] fixed making location closest to goal_score be goal_score --- worlds/yachtdice/Locations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/yachtdice/Locations.py b/worlds/yachtdice/Locations.py index 5265a4323f..aed2641419 100644 --- a/worlds/yachtdice/Locations.py +++ b/worlds/yachtdice/Locations.py @@ -60,7 +60,7 @@ def ini_locations(goal_score, max_score, num_locs, dif): if goal_score != max_score: # if the goal score is not in the list, find the closest one and make it the goal. if goal_score not in scores: - closest_num = min(scores, key=lambda x: abs(x - 500)) + closest_num = min(scores, key=lambda x: abs(x - goal_score)) scores[scores.index(closest_num)] = goal_score scores += [max_score]