Merged in DR v1.2.0.13

This commit is contained in:
codemann8
2023-03-14 17:48:42 -05:00
9 changed files with 36 additions and 31 deletions

View File

@@ -670,9 +670,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):