Skip to content

Commit

Permalink
More bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziktofel committed Jun 9, 2024
1 parent 0883a21 commit 5dae0dd
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions worlds/sc2/pool_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,15 +425,14 @@ def attempt_removal(item: Item) -> bool:
locked_items = [item for item in locked_items if item.name != item_names.SIEGE_TANK_PROGRESSIVE_TRANSPORT_HOOK]
if item_names.MEDIVAC not in logical_inventory_set:
# Don't allow L2 Siege Tank Transport Hook without Medivac
inventory_transport_hooks = [item for item in (inventory + locked_items) if item.name == item_names.SIEGE_TANK_PROGRESSIVE_TRANSPORT_HOOK]
if len(inventory_transport_hooks) > 1:
if inventory_transport_hooks[0] in inventory:
inventory.remove(inventory_transport_hooks[0])
elif inventory_transport_hooks[1] in inventory:
inventory_transport_hooks = [item for item in inventory if item.name == item_names.SIEGE_TANK_PROGRESSIVE_TRANSPORT_HOOK]
locked_transport_hooks = [item for item in locked_items if item.name == item_names.SIEGE_TANK_PROGRESSIVE_TRANSPORT_HOOK]
if len(inventory_transport_hooks) + len(locked_transport_hooks) > 1:
if len(inventory_transport_hooks) > 1:
inventory.remove(inventory_transport_hooks[0])
else:
locked_items.remove(inventory_transport_hooks[0])
if len(inventory_transport_hooks) > 0:
locked_items.remove(locked_transport_hooks[0])
if len(inventory_transport_hooks) + len(locked_transport_hooks) > 0:
# Transport Hook is in inventory, remove from unused_items
unused_items = [item_name for item_name in unused_items if item_name != item_names.SIEGE_TANK_PROGRESSIVE_TRANSPORT_HOOK]
else:
Expand All @@ -445,7 +444,7 @@ def attempt_removal(item: Item) -> bool:
# No orbital Command Spells
inventory = [item for item in inventory if item.name != item_names.PLANETARY_FORTRESS_ORBITAL_MODULE]
unused_items = [item_name for item_name in unused_items if item_name !=item_names.PLANETARY_FORTRESS_ORBITAL_MODULE]
locked_items = [item for item in inventory if item.name != item_names.PLANETARY_FORTRESS_ORBITAL_MODULE]
locked_items = [item for item in locked_items if item.name != item_names.PLANETARY_FORTRESS_ORBITAL_MODULE]

# HotS
# Baneling without sources => remove Baneling and upgrades
Expand Down

0 comments on commit 5dae0dd

Please sign in to comment.