Cherry pick fix for district+shopsanity

This commit is contained in:
aerinon
2022-02-24 14:06:34 -07:00
committed by codemann8
parent 1eae786c43
commit 95280e8705
3 changed files with 15 additions and 5 deletions

View File

@@ -496,7 +496,7 @@ def sell_potions(world, player):
loc_choices += [world.get_location(loc, player) for loc in shop_to_location_table[shop.region.name]]
locations = [loc for loc in loc_choices if not loc.item]
for potion in ['Green Potion', 'Blue Potion', 'Red Potion']:
location = random.choice(filter_locations(ItemFactory(potion, player), locations, world))
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)