Customize certain potions refills.

This commit is contained in:
aerinon
2023-03-13 14:26:25 -06:00
parent c48c89f65b
commit b44caa76a7
2 changed files with 5 additions and 4 deletions

View File

@@ -661,9 +661,10 @@ def sell_potions(world, player):
for potion in ['Green Potion', 'Blue Potion', 'Red Potion']:
location = random.choice(filter_locations(ItemFactory(potion, player), locations, world, potion=True))
locations.remove(location)
p_item = next(item for item in world.itempool if item.name == potion and item.player == player)
world.push_item(location, p_item, collect=False)
world.itempool.remove(p_item)
p_item = next((item for item in world.itempool if item.name == potion and item.player == player), None)
if p_item:
world.push_item(location, p_item, collect=False)
world.itempool.remove(p_item)
def sell_keys(world, player):