Skip to content

Commit

Permalink
fixed conflicts in hk_idk
Browse files Browse the repository at this point in the history
  • Loading branch information
qwint committed Jul 19, 2024
1 parent e5b0c29 commit 742f0fc
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions worlds/hk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down

0 comments on commit 742f0fc

Please sign in to comment.