Added Lite/Lean support for Fixed Take-Any caves
This commit is contained in:
@@ -62,7 +62,8 @@ def link_entrances(world, player):
|
|||||||
|
|
||||||
# if we do not shuffle, set default connections
|
# if we do not shuffle, set default connections
|
||||||
if world.shuffle[player] in ['vanilla', 'dungeonssimple', 'dungeonsfull']:
|
if world.shuffle[player] in ['vanilla', 'dungeonssimple', 'dungeonsfull']:
|
||||||
for entrancename, exitname in default_connections + default_pot_connections + drop_connections + default_item_connections + default_shop_connections:
|
for entrancename, exitname in (default_connections + default_pot_connections +
|
||||||
|
default_takeany_connections + drop_connections + default_item_connections + default_shop_connections):
|
||||||
connect_logical(world, entrancename, exitname, player, exitname.endswith(' Exit'))
|
connect_logical(world, entrancename, exitname, player, exitname.endswith(' Exit'))
|
||||||
for entrancename, exitname in default_connector_connections + dropexit_connections:
|
for entrancename, exitname in default_connector_connections + dropexit_connections:
|
||||||
connect_logical(world, entrancename, exitname, player, True)
|
connect_logical(world, entrancename, exitname, player, True)
|
||||||
@@ -330,7 +331,10 @@ def link_entrances(world, player):
|
|||||||
# place remaining doors
|
# place remaining doors
|
||||||
connect_doors(world, list(entrance_pool), list(exit_pool), player)
|
connect_doors(world, list(entrance_pool), list(exit_pool), player)
|
||||||
elif world.shuffle[player] == 'lite':
|
elif world.shuffle[player] == 'lite':
|
||||||
for entrancename, exitname in default_connections + ([] if world.shopsanity[player] else default_shop_connections) + ([] if world.pottery[player] not in ['none', 'keys', 'dungeon'] else default_pot_connections):
|
for entrancename, exitname in (default_connections +
|
||||||
|
([] if world.shopsanity[player] else default_shop_connections) +
|
||||||
|
([] if world.pottery[player] not in ['none', 'keys', 'dungeon'] else default_pot_connections) +
|
||||||
|
([] if world.take_any[player] == 'fixed' else default_takeany_connections)):
|
||||||
connect_logical(world, entrancename, exitname, player, False)
|
connect_logical(world, entrancename, exitname, player, False)
|
||||||
if invFlag:
|
if invFlag:
|
||||||
world.get_entrance('Dark Sanctuary Hint Exit', player).connect(world.get_entrance('Dark Sanctuary Hint', player).parent_region)
|
world.get_entrance('Dark Sanctuary Hint Exit', player).connect(world.get_entrance('Dark Sanctuary Hint', player).parent_region)
|
||||||
@@ -420,7 +424,10 @@ def link_entrances(world, player):
|
|||||||
# place remaining doors
|
# place remaining doors
|
||||||
connect_doors(world, list(entrance_pool), list(exit_pool), player)
|
connect_doors(world, list(entrance_pool), list(exit_pool), player)
|
||||||
elif world.shuffle[player] == 'lean':
|
elif world.shuffle[player] == 'lean':
|
||||||
for entrancename, exitname in default_connections + ([] if world.shopsanity[player] else default_shop_connections) + ([] if world.pottery[player] not in ['none', 'keys', 'dungeon'] else default_pot_connections):
|
for entrancename, exitname in (default_connections +
|
||||||
|
([] if world.shopsanity[player] else default_shop_connections) +
|
||||||
|
([] if world.pottery[player] not in ['none', 'keys', 'dungeon'] else default_pot_connections) +
|
||||||
|
([] if world.take_any[player] == 'fixed' else default_takeany_connections)):
|
||||||
connect_logical(world, entrancename, exitname, player, False)
|
connect_logical(world, entrancename, exitname, player, False)
|
||||||
if invFlag:
|
if invFlag:
|
||||||
world.get_entrance('Dark Sanctuary Hint Exit', player).connect(world.get_entrance('Dark Sanctuary Hint', player).parent_region)
|
world.get_entrance('Dark Sanctuary Hint Exit', player).connect(world.get_entrance('Dark Sanctuary Hint', player).parent_region)
|
||||||
@@ -1342,7 +1349,10 @@ def place_links_house(world, player, ignore_list=[]):
|
|||||||
else:
|
else:
|
||||||
links_house_doors = [i for i in get_starting_entrances(world, player, world.shuffle[player] != 'insanity') if i in entrance_pool]
|
links_house_doors = [i for i in get_starting_entrances(world, player, world.shuffle[player] != 'insanity') if i in entrance_pool]
|
||||||
if world.shuffle[player] in ['lite', 'lean']:
|
if world.shuffle[player] in ['lite', 'lean']:
|
||||||
links_house_doors = [e for e in links_house_doors if e in list(zip(*(default_item_connections + (default_shop_connections if world.shopsanity[player] else []) + (default_pot_connections if world.pottery[player] not in ['none', 'keys', 'dungeon'] else []))))[0]]
|
links_house_doors = [e for e in links_house_doors if e in list(zip(*(default_item_connections +
|
||||||
|
(default_shop_connections if world.shopsanity[player] else []) +
|
||||||
|
(default_pot_connections if world.pottery[player] not in ['none', 'keys', 'dungeon'] else []) +
|
||||||
|
(default_takeany_connections if world.take_any[player] == 'fixed' else []))))[0]]
|
||||||
|
|
||||||
#TODO: Need to improve Links House placement to choose a better sector or eliminate entrances that are after ledge drops
|
#TODO: Need to improve Links House placement to choose a better sector or eliminate entrances that are after ledge drops
|
||||||
links_house_doors = [e for e in links_house_doors if e not in ignore_list]
|
links_house_doors = [e for e in links_house_doors if e not in ignore_list]
|
||||||
@@ -1390,7 +1400,10 @@ def place_blacksmith(world, links_house, player):
|
|||||||
sanc_region = world.get_entrance('Sanctuary Exit', player).connected_region.name
|
sanc_region = world.get_entrance('Sanctuary Exit', player).connected_region.name
|
||||||
blacksmith_doors = list(OrderedDict.fromkeys(blacksmith_doors + list(build_accessible_entrance_list(world, sanc_region, player, assumed_inventory, False, True, True))))
|
blacksmith_doors = list(OrderedDict.fromkeys(blacksmith_doors + list(build_accessible_entrance_list(world, sanc_region, player, assumed_inventory, False, True, True))))
|
||||||
if world.shuffle[player] in ['lite', 'lean']:
|
if world.shuffle[player] in ['lite', 'lean']:
|
||||||
blacksmith_doors = [e for e in blacksmith_doors if e in list(zip(*(default_item_connections + (default_shop_connections if world.shopsanity[player] else []) + (default_pot_connections if world.pottery[player] not in ['none', 'keys', 'dungeon'] else []))))[0]]
|
blacksmith_doors = [e for e in blacksmith_doors if e in list(zip(*(default_item_connections +
|
||||||
|
(default_shop_connections if world.shopsanity[player] else []) +
|
||||||
|
(default_pot_connections if world.pottery[player] not in ['none', 'keys', 'dungeon'] else []) +
|
||||||
|
(default_takeany_connections if world.take_any[player] == 'fixed' else []))))[0]]
|
||||||
|
|
||||||
assert len(blacksmith_doors), 'No valid candidates to place Blacksmiths Hut'
|
assert len(blacksmith_doors), 'No valid candidates to place Blacksmiths Hut'
|
||||||
blacksmith_hut = random.choice(blacksmith_doors)
|
blacksmith_hut = random.choice(blacksmith_doors)
|
||||||
@@ -1457,7 +1470,8 @@ def junk_fill_inaccessible(world, player):
|
|||||||
if not exit.connected_region and exit.name in entrance_pool:
|
if not exit.connected_region and exit.name in entrance_pool:
|
||||||
inaccessible_entrances.append(exit.name)
|
inaccessible_entrances.append(exit.name)
|
||||||
|
|
||||||
junk_locations = [e for e in list(zip(*(default_connections + ([] if world.pottery[player] not in ['none', 'keys', 'dungeon'] else default_pot_connections))))[1] if e in exit_pool]
|
junk_locations = [e for e in list(zip(*(default_connections +
|
||||||
|
([] if world.pottery[player] not in ['none', 'keys', 'dungeon'] else default_pot_connections))))[1] if e in exit_pool]
|
||||||
random.shuffle(junk_locations)
|
random.shuffle(junk_locations)
|
||||||
for entrance in inaccessible_entrances:
|
for entrance in inaccessible_entrances:
|
||||||
connect_entrance(world, entrance, junk_locations.pop(), player)
|
connect_entrance(world, entrance, junk_locations.pop(), player)
|
||||||
@@ -2070,8 +2084,6 @@ mandatory_connections = [('Lost Woods Hideout (top to bottom)', 'Lost Woods Hide
|
|||||||
default_connections = [('Bonk Fairy (Light)', 'Bonk Fairy (Light)'),
|
default_connections = [('Bonk Fairy (Light)', 'Bonk Fairy (Light)'),
|
||||||
('Lake Hylia Fairy', 'Lake Hylia Healer Fairy'),
|
('Lake Hylia Fairy', 'Lake Hylia Healer Fairy'),
|
||||||
('Lake Hylia Fortune Teller', 'Lake Hylia Fortune Teller'),
|
('Lake Hylia Fortune Teller', 'Lake Hylia Fortune Teller'),
|
||||||
('Light Hype Fairy', 'Swamp Healer Fairy'),
|
|
||||||
('Desert Fairy', 'Desert Healer Fairy'),
|
|
||||||
('Lost Woods Gamble', 'Lost Woods Gamble'),
|
('Lost Woods Gamble', 'Lost Woods Gamble'),
|
||||||
('Fortune Teller (Light)', 'Fortune Teller (Light)'),
|
('Fortune Teller (Light)', 'Fortune Teller (Light)'),
|
||||||
('Bush Covered House', 'Bush Covered House'),
|
('Bush Covered House', 'Bush Covered House'),
|
||||||
@@ -2081,16 +2093,20 @@ default_connections = [('Bonk Fairy (Light)', 'Bonk Fairy (Light)'),
|
|||||||
|
|
||||||
('East Dark World Hint', 'East Dark World Hint'),
|
('East Dark World Hint', 'East Dark World Hint'),
|
||||||
('Dark Lake Hylia Fairy', 'Dark Lake Hylia Healer Fairy'),
|
('Dark Lake Hylia Fairy', 'Dark Lake Hylia Healer Fairy'),
|
||||||
('Dark Lake Hylia Ledge Fairy', 'Dark Lake Hylia Ledge Healer Fairy'),
|
|
||||||
('Dark Lake Hylia Ledge Hint', 'Dark Lake Hylia Ledge Hint'),
|
('Dark Lake Hylia Ledge Hint', 'Dark Lake Hylia Ledge Hint'),
|
||||||
('Bonk Fairy (Dark)', 'Bonk Fairy (Dark)'),
|
|
||||||
('Dark Sanctuary Hint', 'Dark Sanctuary Hint'),
|
('Dark Sanctuary Hint', 'Dark Sanctuary Hint'),
|
||||||
('Fortune Teller (Dark)', 'Fortune Teller (Dark)'),
|
('Fortune Teller (Dark)', 'Fortune Teller (Dark)'),
|
||||||
('Archery Game', 'Archery Game'),
|
('Archery Game', 'Archery Game'),
|
||||||
('Dark Desert Fairy', 'Dark Desert Healer Fairy'),
|
('Dark Desert Fairy', 'Dark Desert Healer Fairy')
|
||||||
('Dark Death Mountain Fairy', 'Dark Death Mountain Healer Fairy'),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
default_takeany_connections = [('Light Hype Fairy', 'Swamp Healer Fairy'),
|
||||||
|
('Desert Fairy', 'Desert Healer Fairy'),
|
||||||
|
('Dark Lake Hylia Ledge Fairy', 'Dark Lake Hylia Ledge Healer Fairy'),
|
||||||
|
('Bonk Fairy (Dark)', 'Bonk Fairy (Dark)'),
|
||||||
|
('Dark Death Mountain Fairy', 'Dark Death Mountain Healer Fairy')
|
||||||
|
]
|
||||||
|
|
||||||
default_pot_connections = [('Lumberjack House', 'Lumberjack House'),
|
default_pot_connections = [('Lumberjack House', 'Lumberjack House'),
|
||||||
('Snitch Lady (East)', 'Snitch Lady (East)'),
|
('Snitch Lady (East)', 'Snitch Lady (East)'),
|
||||||
('Snitch Lady (West)', 'Snitch Lady (West)'),
|
('Snitch Lady (West)', 'Snitch Lady (West)'),
|
||||||
|
|||||||
@@ -775,6 +775,9 @@ def do_vanilla_connect(pool_def, avail):
|
|||||||
elif pool_def['condition'] == 'pottery': # this condition involves whether caves with pots are shuffled or not
|
elif pool_def['condition'] == 'pottery': # this condition involves whether caves with pots are shuffled or not
|
||||||
if avail.world.pottery[avail.player] not in ['none', 'keys', 'dungeon']:
|
if avail.world.pottery[avail.player] not in ['none', 'keys', 'dungeon']:
|
||||||
return
|
return
|
||||||
|
elif pool_def['condition'] == 'takeany':
|
||||||
|
if avail.world.take_any[avail.player] == 'fixed':
|
||||||
|
return
|
||||||
defaults = inverted_default_connections if avail.inverted else default_connections
|
defaults = inverted_default_connections if avail.inverted else default_connections
|
||||||
if avail.inverted:
|
if avail.inverted:
|
||||||
if 'Dark Death Mountain Fairy' in pool_def['entrances']:
|
if 'Dark Death Mountain Fairy' in pool_def['entrances']:
|
||||||
@@ -1200,13 +1203,11 @@ modes = {
|
|||||||
'fixed_non_items': {
|
'fixed_non_items': {
|
||||||
'special': 'vanilla',
|
'special': 'vanilla',
|
||||||
'condition': '',
|
'condition': '',
|
||||||
'entrances': ['Dark Death Mountain Fairy', 'Dark Desert Fairy', 'Archery Game',
|
'entrances': ['Dark Desert Fairy', 'Archery Game', 'Fortune Teller (Dark)', 'Dark Sanctuary Hint',
|
||||||
'Fortune Teller (Dark)', 'Dark Sanctuary Hint', 'Bonk Fairy (Dark)',
|
'Dark Lake Hylia Ledge Hint', 'Dark Lake Hylia Fairy', 'Dark Lake Hylia Shop',
|
||||||
'Dark Lake Hylia Ledge Hint', 'Dark Lake Hylia Ledge Fairy', 'Dark Lake Hylia Fairy',
|
'East Dark World Hint', 'Kakariko Gamble Game', 'Good Bee Cave', 'Long Fairy Cave',
|
||||||
'Dark Lake Hylia Shop', 'East Dark World Hint', 'Kakariko Gamble Game', 'Good Bee Cave',
|
'Bush Covered House', 'Fortune Teller (Light)', 'Lost Woods Gamble',
|
||||||
'Long Fairy Cave', 'Bush Covered House', 'Fortune Teller (Light)', 'Lost Woods Gamble',
|
'Lake Hylia Fortune Teller', 'Lake Hylia Fairy', 'Bonk Fairy (Light)', 'Inverted Dark Sanctuary'],
|
||||||
'Desert Fairy', 'Light Hype Fairy', 'Lake Hylia Fortune Teller', 'Lake Hylia Fairy',
|
|
||||||
'Bonk Fairy (Light)', 'Inverted Dark Sanctuary'],
|
|
||||||
},
|
},
|
||||||
'fixed_shops': {
|
'fixed_shops': {
|
||||||
'special': 'vanilla',
|
'special': 'vanilla',
|
||||||
@@ -1215,6 +1216,12 @@ modes = {
|
|||||||
'Dark World Shop', 'Red Shield Shop', 'Kakariko Shop', 'Capacity Upgrade',
|
'Dark World Shop', 'Red Shield Shop', 'Kakariko Shop', 'Capacity Upgrade',
|
||||||
'Cave Shop (Lake Hylia)'],
|
'Cave Shop (Lake Hylia)'],
|
||||||
},
|
},
|
||||||
|
'fixed_takeanys': {
|
||||||
|
'special': 'vanilla',
|
||||||
|
'condition': 'takeany',
|
||||||
|
'entrances': ['Desert Fairy', 'Light Hype Fairy', 'Dark Death Mountain Fairy',
|
||||||
|
'Dark Lake Hylia Ledge Fairy', 'Bonk Fairy (Dark)'],
|
||||||
|
},
|
||||||
'fixed_pottery': {
|
'fixed_pottery': {
|
||||||
'special': 'vanilla',
|
'special': 'vanilla',
|
||||||
'condition': 'pottery',
|
'condition': 'pottery',
|
||||||
@@ -1276,13 +1283,11 @@ modes = {
|
|||||||
'fixed_non_items': {
|
'fixed_non_items': {
|
||||||
'special': 'vanilla',
|
'special': 'vanilla',
|
||||||
'condition': '',
|
'condition': '',
|
||||||
'entrances': ['Dark Death Mountain Fairy', 'Dark Desert Fairy', 'Archery Game',
|
'entrances': ['Dark Desert Fairy', 'Archery Game', 'Fortune Teller (Dark)', 'Dark Sanctuary Hint',
|
||||||
'Fortune Teller (Dark)', 'Dark Sanctuary Hint', 'Bonk Fairy (Dark)',
|
'Dark Lake Hylia Ledge Hint', 'Dark Lake Hylia Fairy', 'Dark Lake Hylia Shop',
|
||||||
'Dark Lake Hylia Ledge Hint', 'Dark Lake Hylia Ledge Fairy', 'Dark Lake Hylia Fairy',
|
'East Dark World Hint', 'Kakariko Gamble Game', 'Good Bee Cave', 'Long Fairy Cave',
|
||||||
'Dark Lake Hylia Shop', 'East Dark World Hint', 'Kakariko Gamble Game', 'Good Bee Cave',
|
'Bush Covered House', 'Fortune Teller (Light)', 'Lost Woods Gamble',
|
||||||
'Long Fairy Cave', 'Bush Covered House', 'Fortune Teller (Light)', 'Lost Woods Gamble',
|
'Lake Hylia Fortune Teller', 'Lake Hylia Fairy', 'Bonk Fairy (Light)', 'Inverted Dark Sanctuary'],
|
||||||
'Desert Fairy', 'Light Hype Fairy', 'Lake Hylia Fortune Teller', 'Lake Hylia Fairy',
|
|
||||||
'Bonk Fairy (Light)', 'Inverted Dark Sanctuary'],
|
|
||||||
},
|
},
|
||||||
'fixed_shops': {
|
'fixed_shops': {
|
||||||
'special': 'vanilla',
|
'special': 'vanilla',
|
||||||
@@ -1291,6 +1296,12 @@ modes = {
|
|||||||
'Dark World Shop', 'Red Shield Shop', 'Kakariko Shop', 'Capacity Upgrade',
|
'Dark World Shop', 'Red Shield Shop', 'Kakariko Shop', 'Capacity Upgrade',
|
||||||
'Cave Shop (Lake Hylia)'],
|
'Cave Shop (Lake Hylia)'],
|
||||||
},
|
},
|
||||||
|
'fixed_takeanys': {
|
||||||
|
'special': 'vanilla',
|
||||||
|
'condition': 'takeany',
|
||||||
|
'entrances': ['Desert Fairy', 'Light Hype Fairy', 'Dark Death Mountain Fairy',
|
||||||
|
'Dark Lake Hylia Ledge Fairy', 'Bonk Fairy (Dark)'],
|
||||||
|
},
|
||||||
'fixed_pottery': {
|
'fixed_pottery': {
|
||||||
'special': 'vanilla',
|
'special': 'vanilla',
|
||||||
'condition': 'pottery',
|
'condition': 'pottery',
|
||||||
|
|||||||
Reference in New Issue
Block a user