From c1980f322a3428556c87ca52e7b695cd6c121ec1 Mon Sep 17 00:00:00 2001 From: shananas <47014056+shananas@users.noreply.github.com> Date: Sun, 27 Sep 2026 19:25:28 -0400 Subject: [PATCH] KH2: Keyblade Min Max Clarification (#6188) Actually swap option values for keyblade min an max to show correctly in spoiler log. And clarify in the warning the two values get swapped. (same as bounties but not lucky emblems) --- worlds/kh2/OpenKH.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/worlds/kh2/OpenKH.py b/worlds/kh2/OpenKH.py index 07d728347a7..527bae159c7 100644 --- a/worlds/kh2/OpenKH.py +++ b/worlds/kh2/OpenKH.py @@ -59,9 +59,12 @@ def patch_kh2(self, output_directory): if self.options.Keyblade_Minimum.value > self.options.Keyblade_Maximum.value: logging.info( - f"{self.multiworld.get_file_safe_player_name(self.player)} has Keyblade Minimum greater than Keyblade Maximum") + f"{self.multiworld.get_file_safe_player_name(self.player)} has Keyblade Minimum greater than Keyblade Maximum." + f" Swapping Minimum and Maximum") keyblademin = self.options.Keyblade_Maximum.value keyblademax = self.options.Keyblade_Minimum.value + self.options.Keyblade_Maximum.value = keyblademax + self.options.Keyblade_Minimum.value = keyblademin else: keyblademin = self.options.Keyblade_Minimum.value keyblademax = self.options.Keyblade_Maximum.value @@ -514,10 +517,10 @@ def patch_kh2(self, output_directory): # client install generating apworldloc = os.path.join("lib","worlds") - if not os.path.isfile(Utils.user_path(apworldloc, 'kh2.apworld')): + if not os.path.isfile(Utils.user_path(apworldloc, 'kh2.apworld')): apworldloc = os.path.join("custom_worlds", "") if os.path.exists(os.path.join(apworldloc,"kh2.apworld")): - try: + try: with zipfile.ZipFile(Utils.user_path(os.path.join( apworldloc, 'kh2.apworld')), 'r') as apworld_archive: # zipfile requires the forward slash