LttP: split Retro into Retro Bows and Retro Caves (#588)

This commit is contained in:
Fabian Dill
2022-06-01 17:29:21 +02:00
committed by GitHub
parent e13e7f286c
commit d0a98949f5
7 changed files with 43 additions and 37 deletions

View File

@@ -287,7 +287,7 @@ def create_shops(world, player: int):
if 'g' in option or 'f' in option:
default_shop_table = [i for l in
[shop_generation_types[x] for x in ['arrows', 'bombs', 'potions', 'shields', 'bottle'] if
not world.retro[player] or x != 'arrows'] for i in l]
not world.retro_bow[player] or x != 'arrows'] for i in l]
new_basic_shop = world.random.sample(default_shop_table, k=3)
new_dark_shop = world.random.sample(default_shop_table, k=3)
for name, shop in player_shop_table.items():
@@ -305,7 +305,7 @@ def create_shops(world, player: int):
# make sure that blue potion is available in inverted, special case locked = None; lock when done.
player_shop_table["Dark Lake Hylia Shop"] = \
player_shop_table["Dark Lake Hylia Shop"]._replace(items=_inverted_hylia_shop_defaults, locked=None)
chance_100 = int(world.retro[player]) * 0.25 + int(
chance_100 = int(world.retro_bow[player]) * 0.25 + int(
world.smallkey_shuffle[player] == smallkey_shuffle.option_universal) * 0.5
for region_name, (room_id, type, shopkeeper, custom, locked, inventory, sram_offset) in player_shop_table.items():
region = world.get_region(region_name, player)
@@ -402,7 +402,7 @@ shop_generation_types = {
def set_up_shops(world, player: int):
# TODO: move hard+ mode changes for shields here, utilizing the new shops
if world.retro[player]:
if world.retro_bow[player]:
rss = world.get_region('Red Shield Shop', player).shop
replacement_items = [['Red Potion', 150], ['Green Potion', 75], ['Blue Potion', 200], ['Bombs (10)', 50],
['Blue Shield', 50], ['Small Heart',
@@ -413,7 +413,7 @@ def set_up_shops(world, player: int):
rss.add_inventory(2, 'Single Arrow', 80, 1, replacement_item[0], replacement_item[1])
rss.locked = True
if world.smallkey_shuffle[player] == smallkey_shuffle.option_universal or world.retro[player]:
if world.smallkey_shuffle[player] == smallkey_shuffle.option_universal or world.retro_bow[player]:
for shop in world.random.sample([s for s in world.shops if
s.custom and not s.locked and s.type == ShopType.Shop and s.region.player == player],
5):
@@ -423,7 +423,7 @@ def set_up_shops(world, player: int):
slots = iter(slots)
if world.smallkey_shuffle[player] == smallkey_shuffle.option_universal:
shop.add_inventory(next(slots), 'Small Key (Universal)', 100)
if world.retro[player]:
if world.retro_bow[player]:
shop.push_inventory(next(slots), 'Single Arrow', 80)
@@ -436,7 +436,7 @@ def shuffle_shops(world, items, player: int):
new_items = ["Bomb Upgrade (+5)"] * 6
new_items.append("Bomb Upgrade (+5)" if progressive else "Bomb Upgrade (+10)")
if not world.retro[player]:
if not world.retro_bow[player]:
new_items += ["Arrow Upgrade (+5)"] * 6
new_items.append("Arrow Upgrade (+5)" if progressive else "Arrow Upgrade (+10)")
@@ -578,7 +578,7 @@ def price_to_funny_price(world, item: dict, player: int):
if world.smallkey_shuffle[player] == smallkey_shuffle.option_universal \
and not "Small Key (Universal)" == item['replacement']:
price_types.append(ShopPriceType.Keys)
if not world.retro[player]:
if not world.retro_bow[player]:
price_types.append(ShopPriceType.Arrows)
world.random.shuffle(price_types)
for p_type in price_types: