Merge branch 'DoorDevVolatile' into Customizer
# Conflicts: # DoorShuffle.py
This commit is contained in:
@@ -1948,6 +1948,23 @@ def custom_door_kind(custom_key, kind, bd_candidates, counts, world, player):
|
||||
counts[d_name] += 1
|
||||
|
||||
|
||||
dashable_forbidden = {
|
||||
'Swamp Trench 1 Key Ledge NW', 'Swamp Left Elbow WN', 'Swamp Right Elbow SE', 'Mire Hub WN', 'Mire Hub WS',
|
||||
'Mire Hub Top NW', 'Mire Hub NE', 'Ice Dead End WS'
|
||||
}
|
||||
|
||||
ohko_forbidden = {
|
||||
'GT Invisible Catwalk NE', 'GT Falling Bridge WN', 'GT Falling Bridge WS', 'GT Hidden Star ES', 'GT Hookshot EN',
|
||||
'GT Torch Cross WN', 'TR Torches WN', 'Mire Falling Bridge WS', 'Mire Falling Bridge W', 'Ice Hookshot Balcony SW',
|
||||
'Ice Catwalk WN', 'Ice Catwalk NW', 'Ice Bomb Jump NW', 'GT Cannonball Bridge SE'
|
||||
}
|
||||
|
||||
|
||||
def filter_dashable_candidates(candidates, world):
|
||||
forbidden_set = dashable_forbidden if world.can_take_damage else ohko_forbidden
|
||||
return [x for x in candidates if x not in forbidden_set and x.dest not in forbidden_set]
|
||||
|
||||
|
||||
def shuffle_bombable_dashable(bd_candidates, world, player):
|
||||
dash_counts = defaultdict(int)
|
||||
bomb_counts = defaultdict(int)
|
||||
@@ -1958,7 +1975,8 @@ def shuffle_bombable_dashable(bd_candidates, world, player):
|
||||
for dungeon, candidates in bd_candidates.items():
|
||||
diff = bomb_dash_counts[dungeon.name][1] - dash_counts[dungeon.name]
|
||||
if diff > 0:
|
||||
for chosen in random.sample(candidates, min(diff, len(candidates))):
|
||||
dash_candidates = filter_dashable_candidates(candidates, world)
|
||||
for chosen in random.sample(dash_candidates, min(diff, len(candidates))):
|
||||
change_pair_type(chosen, DoorKind.Dashable, world, player)
|
||||
candidates.remove(chosen)
|
||||
diff = bomb_dash_counts[dungeon.name][0] - bomb_counts[dungeon.name]
|
||||
@@ -1973,7 +1991,8 @@ def shuffle_bombable_dashable(bd_candidates, world, player):
|
||||
desired_dashables = 8 - sum(dash_counts.values(), 0)
|
||||
desired_bombables = 12 - sum(bomb_counts.values(), 0)
|
||||
if desired_dashables > 0:
|
||||
for chosen in random.sample(all_candidates, min(desired_dashables, len(all_candidates))):
|
||||
dash_candidates = filter_dashable_candidates(all_candidates, world)
|
||||
for chosen in random.sample(dash_candidates, min(desired_dashables, len(all_candidates))):
|
||||
change_pair_type(chosen, DoorKind.Dashable, world, player)
|
||||
all_candidates.remove(chosen)
|
||||
if desired_bombables > 0:
|
||||
@@ -2389,6 +2408,8 @@ logical_connections = [
|
||||
('Skull Pot Circle Star Path', 'Skull Map Room'),
|
||||
('Skull Big Chest Hookpath', 'Skull 1 Lobby'),
|
||||
('Skull Back Drop Star Path', 'Skull Small Hall'),
|
||||
('Skull 2 West Lobby Pits', 'Skull 2 West Lobby Ledge'),
|
||||
('Skull 2 West Lobby Ledge Pits', 'Skull 2 West Lobby'),
|
||||
('Thieves Rail Ledge Drop Down', 'Thieves BK Corner'),
|
||||
('Thieves Hellway Orange Barrier', 'Thieves Hellway S Crystal'),
|
||||
('Thieves Hellway Crystal Orange Barrier', 'Thieves Hellway'),
|
||||
|
||||
Reference in New Issue
Block a user