Skip to content

Commit

Permalink
HK: speed up collect (a bit) (#3886)
Browse files Browse the repository at this point in the history
* speed up collect, will be obsolete after #3786

* vi's a meanie
  • Loading branch information
qwint authored Sep 5, 2024
1 parent 7e03a87 commit e984583
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions worlds/hk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e984583

Please sign in to comment.