LTTP: Open Pyramid and Shop Prog Balancing Bug Fixes (#2890)

This commit is contained in:
Alchav
2024-03-03 19:52:03 -05:00
committed by GitHub
parent 37a871eab1
commit a70b94fd62
4 changed files with 15 additions and 8 deletions

View File

@@ -176,6 +176,9 @@ def push_shop_inventories(multiworld):
get_price(multiworld, location.shop.inventory[location.shop_slot], location.player,
location.shop_price_type)[1])
for world in multiworld.get_game_worlds("A Link to the Past"):
world.pushed_shop_inventories.set()
def create_shops(multiworld, player: int):
@@ -451,15 +454,15 @@ def get_price(multiworld, item, player: int, price_type=None):
if multiworld.randomize_shop_prices[player]:
adjust = 2 if price < 100 else 5
price = int((price / adjust) * (0.5 + multiworld.random.random() * 1.5)) * adjust
multiworld.random.shuffle(price_types)
multiworld.per_slot_randoms[player].shuffle(price_types)
for p_type in price_types:
if any(x in item['item'] for x in price_blacklist[p_type]):
continue
return p_type, price_chart[p_type](price, diff)
else:
# This is an AP location and the price will be adjusted after an item is shuffled into it
p_type = multiworld.random.choice(price_types)
return p_type, price_chart[p_type](min(int(multiworld.random.randint(8, 56)
p_type = multiworld.per_slot_randoms[player].choice(price_types)
return p_type, price_chart[p_type](min(int(multiworld.per_slot_randoms[player].randint(8, 56)
* multiworld.shop_price_modifier[player] / 100) * 5, 9999), diff)