LTTP Shop updates (#177)

* Shop price modifier and non-lttp item price changes

* Item price modifier setting
This commit is contained in:
Alchav
2022-01-02 21:07:43 -05:00
committed by GitHub
parent 27c528a6b3
commit 41fdafa3fb
2 changed files with 14 additions and 2 deletions

View File

@@ -247,7 +247,12 @@ def ShopSlotFill(world):
item_name = location.item.name
if location.item.game != "A Link to the Past":
price = world.random.randrange(1, 28)
if location.item.advancement:
price = world.random.randrange(8, 56)
elif location.item.never_exclude:
price = world.random.randrange(4, 28)
else:
price = world.random.randrange(2, 14)
elif any(x in item_name for x in
['Compass', 'Map', 'Single Bomb', 'Single Arrow', 'Piece of Heart']):
price = world.random.randrange(1, 7)
@@ -258,7 +263,8 @@ def ShopSlotFill(world):
else:
price = world.random.randrange(8, 56)
shop.push_inventory(location.shop_slot, item_name, price * 5, 1,
shop.push_inventory(location.shop_slot, item_name,
min(int(price * 5 * world.shop_price_modifier[location.player] / 100), 9999), 1,
location.item.player if location.item.player != location.player else 0)
if 'P' in world.shop_shuffle[location.player]:
price_to_funny_price(shop.inventory[location.shop_slot], world, location.player)