Rain state prevention fix

Also, disallowed door behind Throne Room to be dashable/bombable in standard/hc
This commit is contained in:
aerinon
2022-03-29 14:30:20 -06:00
parent 8bc446fbc5
commit 68c2d06d85
6 changed files with 17 additions and 8 deletions

View File

@@ -1743,7 +1743,7 @@ def smooth_door_pairs(world, player):
if type_b == DoorKind.SmallKey:
remove_pair(door, world, player)
else:
if valid_pair:
if valid_pair and not std_forbidden(door, world, player):
bd_candidates[door.entrance.parent_region.dungeon].append(door)
elif type_a in [DoorKind.Bombable, DoorKind.Dashable] or type_b in [DoorKind.Bombable, DoorKind.Dashable]:
if type_a in [DoorKind.Bombable, DoorKind.Dashable]:
@@ -1752,7 +1752,8 @@ def smooth_door_pairs(world, player):
else:
room_b.change(partner.doorListPos, DoorKind.Normal)
remove_pair(partner, world, player)
elif valid_pair and type_a != DoorKind.SmallKey and type_b != DoorKind.SmallKey:
elif (valid_pair and type_a != DoorKind.SmallKey and type_b != DoorKind.SmallKey
and not std_forbidden(door, world, player)):
bd_candidates[door.entrance.parent_region.dungeon].append(door)
shuffle_bombable_dashable(bd_candidates, world, player)
world.paired_doors[player] = [x for x in world.paired_doors[player] if x.pair or x.original]
@@ -1791,6 +1792,11 @@ def stateful_door(door, kind):
return False
def std_forbidden(door, world, player):
return (world.mode[player] == 'standard' and door.entrance.parent_region.dungeon.name == 'Hyrule Castle' and
'Hyrule Castle Throne Room N' in [door.name, door.dest.name])
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'