diff --git a/worlds/alttp/Options.py b/worlds/alttp/Options.py index fb832d5b..962f1297 100644 --- a/worlds/alttp/Options.py +++ b/worlds/alttp/Options.py @@ -91,6 +91,11 @@ class ShopItemSlots(Range): range_start = 0 range_end = 30 +class ShopPriceModifier(Range): + """Percentage modifier for shuffled item prices in shops""" + range_start = 0 + default = 100 + range_end = 10000 class WorldState(Choice): option_standard = 1 @@ -306,6 +311,7 @@ alttp_options: typing.Dict[str, type(Option)] = { "killable_thieves": KillableThieves, "bush_shuffle": BushShuffle, "shop_item_slots": ShopItemSlots, + "shop_price_modifier": ShopPriceModifier, "tile_shuffle": TileShuffle, "ow_palettes": OWPalette, "uw_palettes": UWPalette, diff --git a/worlds/alttp/Shops.py b/worlds/alttp/Shops.py index fce50d72..a5d35b1b 100644 --- a/worlds/alttp/Shops.py +++ b/worlds/alttp/Shops.py @@ -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)