From 742f0fc9de77bd1d1f5e3b9488d7e2a4835c00e7 Mon Sep 17 00:00:00 2001 From: qwint Date: Fri, 19 Jul 2024 11:50:33 -0500 Subject: [PATCH] fixed conflicts in hk_idk --- worlds/hk/__init__.py | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/worlds/hk/__init__.py b/worlds/hk/__init__.py index dd675ce6ce92..5a2778500cf2 100644 --- a/worlds/hk/__init__.py +++ b/worlds/hk/__init__.py @@ -540,17 +540,17 @@ def collect(self, state, item: HKItem) -> bool: if change: prog_items = state.prog_items for effect_name, effect_value in item_effects.get(item.name, {}).items(): - prog_items[effect_name, self.player] += effect_value + prog_items[self.player][effect_name] += effect_value # a directional overflow in dash grants an upgrade for the other side if item.name == "Right_Mothwing_Cloak" and \ - prog_items["RIGHTDASH", self.player] > 2 > prog_items["LEFTDASH", self.player]: - prog_items["OVERFLOWLEFTDASH", self.player] += 1 - prog_items["LEFTDASH", self.player] += 1 + prog_items[self.player]["RIGHTDASH"] > 2 > prog_items[self.player]["LEFTDASH"]: + prog_items[self.player]["OVERFLOWLEFTDASH"] += 1 + prog_items[self.player]["LEFTDASH"] += 1 elif item.name == "Left_Mothwing_Cloak" and \ - prog_items["LEFTDASH", self.player] > 2 > prog_items["RIGHTDASH", self.player]: - prog_items["OVERFLOWRIGHTDASH", self.player] += 1 - prog_items["RIGHTDASH", self.player] += 1 + prog_items[self.player]["LEFTDASH"] > 2 > prog_items[self.player]["RIGHTDASH"]: + prog_items[self.player]["OVERFLOWRIGHTDASH"] += 1 + prog_items[self.player]["RIGHTDASH"] += 1 return change @@ -561,17 +561,15 @@ def remove(self, state, item: HKItem) -> bool: prog_items = state.prog_items # a directional overflow in dash grants an upgrade for the other side - if item.name == "Right_Mothwing_Cloak" and prog_items["OVERFLOWLEFTDASH", self.player]: - prog_items["LEFTDASH", self.player] -= 1 - prog_items["OVERFLOWLEFTDASH", self.player] -= 1 - elif item.name == "Left_Mothwing_Cloak" and prog_items["OVERFLOWRIGHTDASH", self.player]: - prog_items["RIGHTDASH", self.player] -= 1 - prog_items["OVERFLOWRIGHTDASH", self.player] -= 1 + if item.name == "Right_Mothwing_Cloak" and prog_items[self.player]["OVERFLOWLEFTDASH"]: + prog_items[self.player]["LEFTDASH"] -= 1 + prog_items[self.player]["OVERFLOWLEFTDASH"] -= 1 + elif item.name == "Left_Mothwing_Cloak" and prog_items[self.player]["OVERFLOWRIGHTDASH"]: + prog_items[self.player]["RIGHTDASH"] -= 1 + prog_items[self.player]["OVERFLOWRIGHTDASH"] -= 1 for effect_name, effect_value in item_effects.get(item.name, {}).items(): - if prog_items[effect_name, item.player] == effect_value: - del prog_items[effect_name, item.player] - prog_items[effect_name, item.player] -= effect_value + prog_items[self.player][effect_name] -= effect_value return change