Merge branch 'OverworldShuffleDev' into OverworldShuffle
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
# Changelog
|
||||
|
||||
### 0.2.2.2
|
||||
- Fixed Whirlpool Shuffle with Grouped Crossed OW
|
||||
- Made filename not spoil OWR in Mystery
|
||||
- Fixed Triforce Hunt goal
|
||||
|
||||
### 0.2.2.1
|
||||
- Allow normal Link speed with Old Man following if not in his cave or WDM
|
||||
- Fixed issue with Flute exits not getting placed on the correct tiles
|
||||
|
||||
4
Main.py
4
Main.py
@@ -130,8 +130,8 @@ def main(args, seed=None, fish=None):
|
||||
for player, name in enumerate(team, 1):
|
||||
world.player_names[player].append(name)
|
||||
logger.info('')
|
||||
|
||||
if world.owShuffle[1] != 'vanilla' or world.owCrossed[1] not in ['none', 'polar'] or world.owMixed[1] or str(world.seed).startswith('M'):
|
||||
|
||||
if world.owShuffle[1] != 'vanilla' or world.owCrossed[1] not in ['none', 'polar'] or world.owMixed[1] or str(args.outputname).startswith('M'):
|
||||
outfilebase = f'OR_{args.outputname if args.outputname else world.seed}'
|
||||
else:
|
||||
outfilebase = f'DR_{args.outputname if args.outputname else world.seed}'
|
||||
|
||||
@@ -3,7 +3,7 @@ from BaseClasses import OWEdge, WorldType, RegionType, Direction, Terrain, PolSl
|
||||
from Regions import mark_dark_world_regions, mark_light_world_regions
|
||||
from OWEdges import OWTileRegions, OWTileGroups, OWEdgeGroups, OWExitTypes, OpenStd, parallel_links, IsParallel
|
||||
|
||||
__version__ = '0.2.2.1-u'
|
||||
__version__ = '0.2.2.2-u'
|
||||
|
||||
def link_overworld(world, player):
|
||||
# setup mandatory connections
|
||||
@@ -153,7 +153,8 @@ def link_overworld(world, player):
|
||||
logging.getLogger('').debug('Crossing overworld edges')
|
||||
if world.owCrossed[player] in ['grouped', 'limited', 'chaos']:
|
||||
if world.owCrossed[player] == 'grouped':
|
||||
crossed_edges = shuffle_tiles(world, tile_groups, [[],[],[]], player)
|
||||
ow_crossed_tiles = [[],[],[]]
|
||||
crossed_edges = shuffle_tiles(world, tile_groups, ow_crossed_tiles, player)
|
||||
elif world.owCrossed[player] in ['limited', 'chaos']:
|
||||
crossed_edges = list()
|
||||
crossed_candidates = list()
|
||||
@@ -196,24 +197,31 @@ def link_overworld(world, player):
|
||||
connect_simple(world, to_whirlpool, from_region, player)
|
||||
else:
|
||||
whirlpool_candidates = [[],[]]
|
||||
world.owwhirlpools[player] = [None] * 8
|
||||
for (from_owid, from_whirlpool, from_region), (to_owid, to_whirlpool, to_region) in default_whirlpool_connections:
|
||||
if world.owCrossed[player] == 'polar' and world.owMixed[player] and from_owid == 0x55:
|
||||
# connect the 2 DW whirlpools in Polar Mixed
|
||||
connect_simple(world, from_whirlpool, to_region, player)
|
||||
connect_simple(world, to_whirlpool, from_region, player)
|
||||
world.owwhirlpools[player][7] = from_owid
|
||||
world.owwhirlpools[player][6] = to_owid
|
||||
world.spoiler.set_overworld(from_whirlpool, to_whirlpool, 'both', player)
|
||||
else:
|
||||
if world.owCrossed[player] != 'none' or world.get_region(from_region, player).type == RegionType.LightWorld:
|
||||
if ((world.owCrossed[player] == 'none' or (world.owCrossed[player] == 'polar' and not world.owMixed[player])) and (world.get_region(from_region, player).type == RegionType.LightWorld)) \
|
||||
or world.owCrossed[player] not in ['none', 'polar', 'grouped'] \
|
||||
or (world.owCrossed[player] == 'grouped' and ((from_owid < 0x40) == (from_owid not in ow_crossed_tiles[0]))):
|
||||
whirlpool_candidates[0].append(tuple((from_owid, from_whirlpool, from_region)))
|
||||
else:
|
||||
whirlpool_candidates[1].append(tuple((from_owid, from_whirlpool, from_region)))
|
||||
|
||||
if world.owCrossed[player] != 'none' or world.get_region(to_region, player).type == RegionType.LightWorld:
|
||||
if ((world.owCrossed[player] == 'none' or (world.owCrossed[player] == 'polar' and not world.owMixed[player])) and (world.get_region(to_region, player).type == RegionType.LightWorld)) \
|
||||
or world.owCrossed[player] not in ['none', 'polar', 'grouped'] \
|
||||
or (world.owCrossed[player] == 'grouped' and ((to_owid < 0x40) == (to_owid not in ow_crossed_tiles[0]))):
|
||||
whirlpool_candidates[0].append(tuple((to_owid, to_whirlpool, to_region)))
|
||||
else:
|
||||
whirlpool_candidates[1].append(tuple((to_owid, to_whirlpool, to_region)))
|
||||
|
||||
# shuffle happens here
|
||||
world.owwhirlpools[player] = [None] * 8
|
||||
whirlpool_map = [ 0x35, 0x0f, 0x15, 0x33, 0x12, 0x3f, 0x55, 0x7f ]
|
||||
for whirlpools in whirlpool_candidates:
|
||||
random.shuffle(whirlpools)
|
||||
@@ -447,7 +455,7 @@ def shuffle_tiles(world, groups, result_list, player):
|
||||
exist_dw_regions.extend(dw_regions)
|
||||
|
||||
# check whirlpool parity
|
||||
valid_whirlpool_parity = world.owCrossed[player] != 'none' or len(set(new_results[0]) & set({0x0f, 0x12, 0x15, 0x33, 0x35, 0x3f, 0x55, 0x7f})) % 2 == 0
|
||||
valid_whirlpool_parity = world.owCrossed[player] not in ['none', 'grouped'] or len(set(new_results[0]) & set({0x0f, 0x12, 0x15, 0x33, 0x35, 0x3f, 0x55, 0x7f})) % 2 == 0
|
||||
|
||||
(exist_owids, exist_lw_regions, exist_dw_regions) = result_list
|
||||
exist_owids.extend(new_results[0])
|
||||
|
||||
14
Rom.py
14
Rom.py
@@ -2186,8 +2186,15 @@ def write_strings(rom, world, player, team):
|
||||
entrances_to_hint.update(OtherEntrances)
|
||||
elif world.shopsanity[player]:
|
||||
entrances_to_hint.update(ShopEntrances)
|
||||
if world.shufflelinks[player] and world.shuffle[player] not in ['vanilla', 'dungeonssimple', 'dungeonsfull']:
|
||||
entrances_to_hint.update({'Links House': 'The hero\'s old residence'})
|
||||
if world.shuffle[player] not in ['vanilla', 'dungeonssimple', 'dungeonsfull']:
|
||||
if world.mode[player] == 'inverted' != (0x2c in world.owswaps[player][0] and world.owMixed[player]):
|
||||
entrances_to_hint.update({'Links House': 'The hero\'s old residence'})
|
||||
if world.shufflelinks[player]:
|
||||
entrances_to_hint.update({'Big Bomb Shop': 'The old bomb shop'})
|
||||
else:
|
||||
entrances_to_hint.update({'Big Bomb Shop': 'The old bomb shop'})
|
||||
if world.shufflelinks[player]:
|
||||
entrances_to_hint.update({'Links House': 'The hero\'s old residence'})
|
||||
entrances_to_hint.update({'Dark Sanctuary Hint': 'The dark sanctuary cave'})
|
||||
if world.shuffle[player] in ['insanity', 'madness_legacy', 'insanity_legacy']:
|
||||
entrances_to_hint.update(InsanityEntrances)
|
||||
@@ -2760,8 +2767,7 @@ ItemEntrances = {'Blinds Hideout': 'Blind\'s old house',
|
||||
'Spike Cave': 'The ledge cave on west dark DM',
|
||||
'Hype Cave': 'The cave south of the old bomb shop',
|
||||
'Brewery': 'The Village of Outcasts building with no door',
|
||||
'Chest Game': 'The westmost building in the Village of Outcasts',
|
||||
'Big Bomb Shop': 'The old bomb shop'
|
||||
'Chest Game': 'The westmost building in the Village of Outcasts'
|
||||
}
|
||||
|
||||
ShopEntrances = {'Cave Shop (Lake Hylia)': 'The cave NW Lake Hylia',
|
||||
|
||||
3
Rules.py
3
Rules.py
@@ -56,7 +56,8 @@ def set_rules(world, player):
|
||||
# require aga2 to beat ganon
|
||||
add_rule(world.get_location('Ganon', player), lambda state: state.has('Beat Agahnim 2', player))
|
||||
elif world.goal[player] == 'triforcehunt':
|
||||
add_rule(world.get_location('Murahdahla', player), lambda state: state.item_count('Triforce Piece', player) + state.item_count('Power Star', player) >= int(state.world.treasure_hunt_count[player]))
|
||||
if ('Murahdahla', player) in world._location_cache:
|
||||
add_rule(world.get_location('Murahdahla', player), lambda state: state.item_count('Triforce Piece', player) + state.item_count('Power Star', player) >= int(state.world.treasure_hunt_count[player]))
|
||||
|
||||
# if swamp and dam have not been moved we require mirror for swamp palace
|
||||
if not world.swamp_patch_required[player]:
|
||||
|
||||
Reference in New Issue
Block a user