From e984583e5e22725e33cc962494ad86f95304de39 Mon Sep 17 00:00:00 2001 From: qwint Date: Thu, 5 Sep 2024 14:19:37 -0500 Subject: [PATCH] HK: speed up collect (a bit) (#3886) * speed up collect, will be obsolete after #3786 * vi's a meanie --- worlds/hk/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/worlds/hk/__init__.py b/worlds/hk/__init__.py index cbb909606127..860243ee952e 100644 --- a/worlds/hk/__init__.py +++ b/worlds/hk/__init__.py @@ -601,11 +601,11 @@ def collect(self, state, item: HKItem) -> bool: if change: for effect_name, effect_value in item_effects.get(item.name, {}).items(): state.prog_items[item.player][effect_name] += effect_value - if item.name in {"Left_Mothwing_Cloak", "Right_Mothwing_Cloak"}: - if state.prog_items[item.player].get('RIGHTDASH', 0) and \ - state.prog_items[item.player].get('LEFTDASH', 0): - (state.prog_items[item.player]["RIGHTDASH"], state.prog_items[item.player]["LEFTDASH"]) = \ - ([max(state.prog_items[item.player]["RIGHTDASH"], state.prog_items[item.player]["LEFTDASH"])] * 2) + if item.name in {"Left_Mothwing_Cloak", "Right_Mothwing_Cloak"}: + if state.prog_items[item.player].get('RIGHTDASH', 0) and \ + state.prog_items[item.player].get('LEFTDASH', 0): + (state.prog_items[item.player]["RIGHTDASH"], state.prog_items[item.player]["LEFTDASH"]) = \ + ([max(state.prog_items[item.player]["RIGHTDASH"], state.prog_items[item.player]["LEFTDASH"])] * 2) return change def remove(self, state, item: HKItem) -> bool: