From 6b0eb7da7989bd7e1516118bcac84b1cc0984452 Mon Sep 17 00:00:00 2001 From: JaredWeakStrike <96694163+JaredWeakStrike@users.noreply.github.com> Date: Sun, 10 Dec 2023 12:58:52 -0500 Subject: [PATCH] KH2: RC1 Bug Fixes (#2530) Changes the finished_game to new variable so now it only checks the game's memory and if it has sent the finished flag before Fixed ag2 not requiring 1 of each black magic Fix hitlist if you exclude summon level 7 and have summon levels option turned off --- worlds/kh2/Client.py | 5 +++-- worlds/kh2/Rules.py | 2 +- worlds/kh2/__init__.py | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/worlds/kh2/Client.py b/worlds/kh2/Client.py index be85dc69..a5be06c7 100644 --- a/worlds/kh2/Client.py +++ b/worlds/kh2/Client.py @@ -29,6 +29,7 @@ class KH2Context(CommonContext): self.kh2_local_items = None self.growthlevel = None self.kh2connected = False + self.kh2_finished_game = False self.serverconneced = False self.item_name_to_data = {name: data for name, data, in item_dictionary_table.items()} self.location_name_to_data = {name: data for name, data, in all_locations.items()} @@ -833,9 +834,9 @@ async def kh2_watcher(ctx: KH2Context): await asyncio.create_task(ctx.verifyItems()) await asyncio.create_task(ctx.verifyLevel()) message = [{"cmd": 'LocationChecks', "locations": ctx.sending}] - if finishedGame(ctx, message): + if finishedGame(ctx, message) and not ctx.kh2_finished_game: await ctx.send_msgs([{"cmd": "StatusUpdate", "status": ClientStatus.CLIENT_GOAL}]) - ctx.finished_game = True + ctx.kh2_finished_game = True await ctx.send_msgs(message) elif not ctx.kh2connected and ctx.serverconneced: logger.info("Game Connection lost. waiting 15 seconds until trying to reconnect.") diff --git a/worlds/kh2/Rules.py b/worlds/kh2/Rules.py index 18375231..41207c6c 100644 --- a/worlds/kh2/Rules.py +++ b/worlds/kh2/Rules.py @@ -224,7 +224,7 @@ class KH2WorldRules(KH2Rules): RegionName.Pl2: lambda state: self.pl_unlocked(state, 2), RegionName.Ag: lambda state: self.ag_unlocked(state, 1), - RegionName.Ag2: lambda state: self.ag_unlocked(state, 2), + RegionName.Ag2: lambda state: self.ag_unlocked(state, 2) and self.kh2_has_all([ItemName.FireElement,ItemName.BlizzardElement,ItemName.ThunderElement],state), RegionName.Bc: lambda state: self.bc_unlocked(state, 1), RegionName.Bc2: lambda state: self.bc_unlocked(state, 2), diff --git a/worlds/kh2/__init__.py b/worlds/kh2/__init__.py index dd57f5e7..2bddbd5e 100644 --- a/worlds/kh2/__init__.py +++ b/worlds/kh2/__init__.py @@ -465,7 +465,7 @@ class KH2World(World): if location in self.random_super_boss_list: self.random_super_boss_list.remove(location) - if not self.options.SummonLevelLocationToggle: + if not self.options.SummonLevelLocationToggle and LocationName.Summonlvl7 in self.random_super_boss_list: self.random_super_boss_list.remove(LocationName.Summonlvl7) # Testing if the player has the right amount of Bounties for Completion.